<html>
  <head>
    <meta HTTP-EQUIV='Pragma' CONTENT='no-cache'>
    <link rel="stylesheet" href='stylemain.css' type='text/css'>
         <link rel="stylesheet" href='colors.css' type='text/css'>
            <script language="javascript" src="util.js"></script>
            <script language="javascript">
<!-- hide

function btnNext() {
  var loc = 'pppoe.cgi?cfgPptpAc=1&cfgL2tpAc=0&ntwkPrtcl=0&serviceId=0&enblNat=1&enblFirewall=1&enblAdvDmz=0&useStaticIpAddress=0&pppUserName=&pppPassword=';
  loc += '&enblFullcone=0&enblOnDemand=0&enblIpVer=0&pppToBridge=0';

  with( document.forms[0] ) {
      if ( (tunnelName.value.length == 0) || (tunnelName.value.length > 64) ) {
        alert('Tunnel Name is invalid [1-64].');
        return;
      }
      loc += '&pptpTunnelName='+tunnelName.value;
  	
      if (!isValidIpAddress(lnsIpAddress.value)) {
        alert('PNS Ip Adress "' + lnsIpAddress.value + '" is invalid.');		  
        return;
      }
      loc += '&pnsIpAddress='+lnsIpAddress.value;
	  loc += '&X_BROADCOM_COM_AssociatedWanIfName=' + encodeUrl(associatedWanIfName.value);
  }
  loc += '&sessionKey=<%ejGetOther(sessionKey)%>';
  var code = 'location="' + loc + '"';
  eval(code);
}

function frmLoad() {
  with (document.forms[0]) {
  }
}

// done hiding -->
    </script>
  </head>
  <body onLoad='frmLoad()'>
    <blockquote>
      <form>
        <b>Add a PPTP Client Side PPP Connection (PPPoPPTP WAN Service)</b><br><br>
        <br><br>
        <br><br>
        <div id="l2tpAc">
          <table border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td width='150'>Tunnel Name</td>
              <td><input type='text' name='tunnelName'></td>
            </tr>
            <tr>
              <td width='150'>PPTP Server Ip Address</td>
              <td><input type='text' name='lnsIpAddress'></td>
            </tr>
			
		   <tr>
			  <td> <span id='greassociatedWanIfName'>Wan Interface</span>:&nbsp;&nbsp;</td>
			  <td><select name='associatedWanIfName' onChange='changeSelect()'>
			  
			<script language="javascript">
			<!-- hide
				   var interfaceInfo = '<%ejGetOther(wanInterfaceInfo, route)%>';

				{
						  var i = 0;
						  var interfaces = interfaceInfo.split('|');
					   
						  for ( i = 0; i < interfaces.length; i++ ) {
							 var names = interfaces[i].split('/');
							 if(names[1]=='ppp0' || names[1]=='pptp0')
							 	continue;
							 document.write("  <option value='" + names[1] + "'>");
							 document.writeln(interfaces[i]);
						  } 
					   }
			// done hiding -->
			</script>
			   </select>
		   </td>
		   </tr>
		   
          </table>
        </div>
        <br><br>
        <center>
        <input type="button" value="Next" onClick='btnNext()'>
        </center>
      </form>
    </blockquote>
  </body>
</html>
