http://downloads.netgear.com/files/GPL/DM111PSP_v3.61d_GPL.tar.gz
[bcm963xx.git] / userapps / broadcom / cfm / html / ipsconfig.html
index 2c0310f..c43f00e 100755 (executable)
@@ -1,66 +1,80 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<!--
-       (c) 2005-2006 U.S. Robotics Corporation
--->
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
-<head>
-        <title>VPN IPSec Settings &laquo; Internet</title>
-        <link href="usr_layout.css" type="text/css" rel="stylesheet" />
-        <script src="usr_layout.js" type="text/javascript"></script>
-                                                                                
-        <link href="usr_device.css" type="text/css" rel="stylesheet" />
-        <script src="usr_device.js" type="text/javascript"></script>
-                                                                                
-        <link href="usr_menus_dropdown.css" rel="stylesheet" type="text/css">
-        <script src="usr_menus_dropdown.js" type="text/javascript"></script>
-        <script src="usr_menus_build.js" type="text/javascript"></script>
-                                                                                
-        <link href="usr_91xx.css" type="text/css" rel="stylesheet" />
-        <script src="usr_91xx.js" type="text/javascript"></script>
-        <script src="usr_resources.js" type="text/javascript"></script>
-        <script type="text/javascript" src="util.js"></script>
-                                                                                
-        <meta http-equiv="Pragma" content="no-cache">
-
-<script type="text/javascript">
-
-var ipsTableIndex = '<%ejGetJS(ipsTableIndex)%>';
-var ipsConnName = '<%ejGetJS(ipsConnName)%>';
-var ipsRemoteGWAddr = '<%ejGetJS(ipsRemoteGWAddr)%>';
-var ipsLocalIPMode = '<%ejGetJS(ipsLocalIPMode)%>';
-var ipsLocalIP = '<%ejGetJS(ipsLocalIP)%>';
-var ipsLocalMask = '<%ejGetJS(ipsLocalMask)%>';
-var ipsLocalRangeLo = '<%ejGetJS(ipsLocalRangeLo)%>';
-var ipsLocalRangeHi = '<%ejGetJS(ipsLocalRangeHi)%>';
-var ipsLocalMac = "<%ejGetJS(ipsLocalMac)%>";
-var ipsRemoteIPMode = '<%ejGetJS(ipsRemoteIPMode)%>';
-var ipsRemoteIP = '<%ejGetJS(ipsRemoteIP)%>';
-var ipsRemoteMask = '<%ejGetJS(ipsRemoteMask)%>';
-var ipsRemoteRangeLo = '<%ejGetJS(ipsRemoteRangeLo)%>';
-var ipsRemoteRangeHi = '<%ejGetJS(ipsRemoteRangeHi)%>';
-var ipsKeyExM = '<%ejGetJS(ipsKeyExM)%>';
-var ipsAuthM = '<%ejGetJS(ipsAuthM)%>';
-var ipsPSK = '<%ejGetJS(ipsPSK)%>';
-var ipsCertificateName = '<%ejGetJS(ipsCertificateName)%>';
-var ipsPerfectFSEn = '<%ejGetJS(ipsPerfectFSEn)%>';
-var ipsManualEncryptionAlgo = '<%ejGetJS(ipsManualEncryptionAlgo)%>';
-var ipsManualEncryptionKey = '<%ejGetJS(ipsManualEncryptionKey)%>';
-var ipsManualAuthAlgo = '<%ejGetJS(ipsManualAuthAlgo)%>';
-var ipsManualAuthKey = '<%ejGetJS(ipsManualAuthKey)%>';
-var ipsSPI = '<%ejGetJS(ipsSPI)%>';
-var ipsPh1Mode = '<%ejGetJS(ipsPh1Mode)%>';
-var ipsPh1EncryptionAlgo = '<%ejGetJS(ipsPh1EncryptionAlgo)%>';
-var ipsPh1IntegrityAlgo = '<%ejGetJS(ipsPh1IntegrityAlgo)%>';
-var ipsPh1DHGroup = '<%ejGetJS(ipsPh1DHGroup)%>';
-var ipsPh1KeyTime = '<%ejGetJS(ipsPh1KeyTime)%>';
-var ipsPh2EncryptionAlgo = '<%ejGetJS(ipsPh2EncryptionAlgo)%>';
-var ipsPh2IntegrityAlgo = '<%ejGetJS(ipsPh2IntegrityAlgo)%>';
-var ipsPh2DHGroup = '<%ejGetJS(ipsPh2DHGroup)%>';
-var ipsPh2KeyTime = '<%ejGetJS(ipsPh2KeyTime)%>';
-
-
-var showAdv = false;
 
+<head>
+  <link rel="stylesheet" href="stylemain.css" type="text/css">
+  <link rel="stylesheet" href="colors.css" type="text/css">
+  <meta http-equiv="Pragma" content="no-cache">
+  <title> IPSec Settings</title>
+
+   <script language="javascript" src="util.js"></script>
+   <script language="javascript">
+   
+<!-- hide
+
+var ipsTableIndex = '<%ejGet(ipsTableIndex)%>';
+var ipsConnName = '<%ejGet(ipsConnName)%>';
+var ipsRemoteGWAddr = '<%ejGet(ipsRemoteGWAddr)%>';
+var ipsLocalIPMode = '<%ejGet(ipsLocalIPMode)%>';
+var ipsLocalIP = '<%ejGet(ipsLocalIP)%>';
+var ipsLocalMask = '<%ejGet(ipsLocalMask)%>'; 
+var ipsLocalRangeLo = '<%ejGet(ipsLocalRangeLo)%>';
+var ipsLocalRangeHi = '<%ejGet(ipsLocalRangeHi)%>'; 
+var ipsRemoteIPMode = '<%ejGet(ipsRemoteIPMode)%>';
+var ipsRemoteIP = '<%ejGet(ipsRemoteIP)%>'; 
+var ipsRemoteMask = '<%ejGet(ipsRemoteMask)%>';
+var ipsRemoteRangeLo = '<%ejGet(ipsRemoteRangeLo)%>'; 
+var ipsRemoteRangeHi = '<%ejGet(ipsRemoteRangeHi)%>';
+var ipsKeyExM = '<%ejGet(ipsKeyExM)%>';
+var ipsAuthM = '<%ejGet(ipsAuthM)%>';
+var ipsPSK = '<%ejGet(ipsPSK)%>';
+var ipsCertificateName = '<%ejGet(ipsCertificateName)%>';
+var ipsPerfectFSEn = '<%ejGet(ipsPerfectFSEn)%>';
+var ipsManualEncryptionAlgo = '<%ejGet(ipsManualEncryptionAlgo)%>';
+var ipsManualEncryptionKey = '<%ejGet(ipsManualEncryptionKey)%>';
+var ipsManualAuthAlgo = '<%ejGet(ipsManualAuthAlgo)%>';
+var ipsManualAuthKey = '<%ejGet(ipsManualAuthKey)%>';
+var ipsSPI = '<%ejGet(ipsSPI)%>';
+var ipsPh1Mode = '<%ejGet(ipsPh1Mode)%>';
+var ipsPh1EncryptionAlgo = '<%ejGet(ipsPh1EncryptionAlgo)%>';
+var ipsPh1IntegrityAlgo = '<%ejGet(ipsPh1IntegrityAlgo)%>';
+var ipsPh1DHGroup = '<%ejGet(ipsPh1DHGroup)%>';
+var ipsPh1KeyTime = '<%ejGet(ipsPh1KeyTime)%>';
+var ipsPh2EncryptionAlgo = '<%ejGet(ipsPh2EncryptionAlgo)%>';
+var ipsPh2IntegrityAlgo = '<%ejGet(ipsPh2IntegrityAlgo)%>';
+var ipsPh2DHGroup = '<%ejGet(ipsPh2DHGroup)%>';
+var ipsPh2KeyTime = '<%ejGet(ipsPh2KeyTime)%>';
+
+
+var showAdv = 0;
+
+
+function showhide(element, sh)
+{
+    var status;
+    if (sh == 1) {
+        status = "block";
+    }
+    else {
+        status = "none"
+    }
+        
+       if (document.getElementById)
+       {
+               // standard
+               document.getElementById(element).style.display = status;
+       }
+       else if (document.all)
+       {
+               // old IE
+               document.all[element].style.display = status;
+       }
+       else if (document.layers)
+       {
+               // Netscape 4
+               document.layers[element].display = status;
+       }
+}
 
 function setSelect(item, value)
 {
@@ -97,7 +111,7 @@ function submitSelect(item, name)
 function loadCertList()
 {
    with ( document.forms[0] ) {
-<%ejGetStr(ipsCertList)%>
+<%ejGet(ipsCertList)%>
    }
 }
 
@@ -106,20 +120,12 @@ function localIPModeChange() {
       var mode = localIPMode[localIPMode.selectedIndex].value;
       switch ( mode ) {
       case "subnet":
-        setVisibility("IP11", true);
-        setVisibility("IP12", true);
-        setVisibility("IP13", false);
-        localIP.value = ipsLocalIP; 
-        setVisibility("noteIP", false);
-        break;
+        showhide("IP11", 1);
+        showhide("IP12", 1);
+        break; 
       case "single":
-        setVisibility("IP11", true);
-        setVisibility("IP12", false);
-        setVisibility("IP13", true);
-        if (localIP.value == "0.0.0.0" ) {
-           localIP.value = "<%ejGetOther(memInfo,localHostIP)%>"; 
-           setVisibility("noteIP", true);
-        }
+        showhide("IP11", 1);
+        showhide("IP12", 0);
         break;
       default:
     }
@@ -131,12 +137,12 @@ function remoteIPModeChange() {
       var mode = remoteIPMode[remoteIPMode.selectedIndex].value;
       switch ( mode ) {
       case "subnet":
-        setVisibility("IP21", true);
-        setVisibility("IP22", true);
-        break;
+        showhide("IP21", 1);
+        showhide("IP22", 1);
+        break; 
       case "single":
-        setVisibility("IP21", true);
-        setVisibility("IP22", false);
+        showhide("IP21", 1);
+        showhide("IP22", 0);
         break;
       default:
     }
@@ -150,26 +156,26 @@ function keyauthChange() {
       var authmode = authM[authM.selectedIndex].value;
       switch (keymode) {
       case "auto":
-        setVisibility("AutoKeyEx", true);
-        setVisibility("ManualKey", false);
+        showhide("AutoKeyEx", 1);
+        showhide("ManualKey", 0);
         switch (authmode) {
         case "pre_shared_key":
-          setVisibility("PSK", true);
-          setVisibility("Certificate", false);
+          showhide("PSK", 1);
+          showhide("Certificate", 0);
           break;
         case "certificate":
-          setVisibility("PSK", false);
-          setVisibility("Certificate", true);
-          break;
-        default:
+          showhide("PSK", 0);
+          showhide("Certificate", 1);
+          break;        
+        default:       
         }
-        break;
+        break; 
       case "manual":
-        setVisibility("AutoKeyEx", false);
-        setVisibility("ManualKey", true);
-        setVisibility("PSK", false);
-        setVisibility("Certificate", false);
-               showAdv = false;
+        showhide("AutoKeyEx", 0);
+        showhide("ManualKey", 1);
+        showhide("PSK", 0);
+        showhide("Certificate", 0);
+               showAdv = 0;
                showhideAdv(showAdv);
         break;
       default:
@@ -177,22 +183,24 @@ function keyauthChange() {
   }
 }
 
-function switchAdv()
-{
-       showhideAdv(!showAdv);
+function switchAdv() {
+   with ( document.forms[0] ) {
+     showAdv = !showAdv;
+     showhideAdv(showAdv);
+   }
 }
 
-function showhideAdv(show)
-{
-       with (document.forms[0])
-       {
-               setVisibility("adv", show);
-               if (show)
-                       advSWButton.value = "Hide Advanced IKE Settings";
-               else
-                       advSWButton.value = "Show Advanced IKE Settings";
-               showAdv = show;
-       }
+function showhideAdv(show) {
+   with ( document.forms[0] ) {
+     showhide("adv", show);
+     if (show) {
+        advSWButton.value = "Hide Advanced Settings";
+     }
+     else {
+        advSWButton.value = "Show Advanced Settings";
+     }
+     showAdv = show;
+   }
 }
 
 //////////////////////////
@@ -204,9 +212,8 @@ function formLoad()
                connName.value = ipsConnName;
                remoteGWAddr.value = ipsRemoteGWAddr;
                setSelect(localIPMode, ipsLocalIPMode);
-               localIP.value = ipsLocalIP;
+               localIP.value = ipsLocalIP; 
                localMask.value = ipsLocalMask;
-               localMac.value = ipsLocalMac; 
                setSelect(remoteIPMode, ipsRemoteIPMode);
                remoteIP.value = ipsRemoteIP;
                remoteMask.value = ipsRemoteMask;
@@ -214,10 +221,10 @@ function formLoad()
                setSelect(authM, ipsAuthM);
                psk.value = ipsPSK;
                setSelect(certificateName, ipsCertificateName);
-               perfectFSEn.checked = (ipsPerfectFSEn == "enable");
+               perfectFSEn.value = ipsPerfectFSEn;
                setSelect(manualEncryptionAlgo, ipsManualEncryptionAlgo);
                manualEncryptionKey.value = ipsManualEncryptionKey;
-               setSelect(manualAuthAlgo, ipsManualAuthAlgo);
+               setSelect(manualAuthAlgo, ipsManualAuthAlgo)
                manualAuthKey.value = ipsManualAuthKey;
                spi.value = ipsSPI;
                setSelect(ph1Mode, ipsPh1Mode);
@@ -230,17 +237,18 @@ function formLoad()
                setSelect(ph2DHGroup, ipsPh2DHGroup);
                ph2KeyTime.value = ipsPh2KeyTime;
        }
-
+       
     localIPModeChange();
     remoteIPModeChange();
     keyauthChange();
     showhideAdv(showAdv);
+    
 }
 
 function applyClick() {
        var loc = 'ipsec.cmd?action=editsubmit';
        with ( document.forms[0] ) {
-
+       
                if ( isValidNameWSpace(connName.value) == false ) {
                        alert('Invalid connection name "' + connName.value + '".');
                        return;
@@ -254,10 +262,6 @@ function applyClick() {
                        alert('Local Subnet Mask "' + localMask.value + '" is invalid.');
                        return;
                }
-               if ( getSelect(localIPMode) == "single" && isValidMacAddress(localMac.value) == false ) {
-                       alert('Local MAC address "' + localMac.value + '" is invalid.');
-                       return;
-               }
                if ( isValidIpAddress(remoteIP.value) == false ) {
                        alert('Remote IP Address "' + remoteIP.value + '" is invalid.');
                        return;
@@ -269,19 +273,19 @@ function applyClick() {
                if ( getSelect(keyExM) == "auto" ) {
                val = parseInt(ph1KeyTime.value);
                if (  isNaN(val) == true || val < 0 ) {
-                  alert('Phase 1 key lifetime is invalid.');
-                  showhideAdv(true);
+                  alert('Phase 1 Key Life Time is invalid.');
+                  showhideAdv(1);
                   return;
                }
                val = parseInt(ph2KeyTime.value);
                if (  isNaN(val) == true || val < 0 ) {
-                  alert('Phase 2 key lifetime is invalid.');
-                  showhideAdv(true);
+                  alert('Phase 2 Key Life Time is invalid.');
+                  showhideAdv(1);
                   return;
                }
                if ( getSelect(authM) == "certificate") {
                   if ( certificateName.options.length == 0) {
-                      alert('No certificate avaiable for authentication. Use Certificate page to add certificates or choose another autentication method.');
+                      alert('No certificate avaiable for authentication. Use Certificate menu to add certificates or choose another autentication method.');
                       return;
                   }
                }
@@ -298,7 +302,7 @@ function applyClick() {
                                ekeys = -1;
                        }
                        if ( ekeys != -1 && isValidHexKey(manualEncryptionKey.value, ekeys) == false) {
-                               alert('The manual encryption key is not a valid hexadecimal key.');
+                               alert('Invalid Manual Encryption Key.');
                                return;
                        }
                        var akeys;
@@ -312,19 +316,18 @@ function applyClick() {
                                akeys = -1;
                        }
                        if ( akeys != -1 && isValidHexKey(manualAuthKey.value, akeys) == false) {
-                               alert('The manual authentication key is not a valid hexadecimal key.');
+                               alert('Invalid Manual Authentication Key.');
                                return;
                        }
                }
-
-               loc += '&ipsTableIndex=' + ipsTableIndex;
+       
+               loc += '&ipsTableIndex=' + ipsTableIndex;   
                loc += '&ipsConnName=' + connName.value;
                loc += submitText(connName, 'ipsConnName');
                loc += submitText(remoteGWAddr, 'ipsRemoteGWAddr');
                loc += submitSelect(localIPMode, 'ipsLocalIPMode');
                loc += submitText(localIP, 'ipsLocalIP');
                loc += submitText(localMask, 'ipsLocalMask');
-               loc += submitText(localMac, 'ipsLocalMac');
                loc += submitSelect(remoteIPMode, 'ipsRemoteIPMode');
                loc += submitText(remoteIP, 'ipsRemoteIP');
                loc += submitText(remoteMask, 'ipsRemoteMask');
@@ -332,11 +335,7 @@ function applyClick() {
                loc += submitSelect(authM, 'ipsAuthM');
                loc += submitText(psk, 'ipsPSK');
                loc += submitSelect(certificateName, 'ipsCertificateName');
-
-               var val = perfectFSEn.checked ? "enable":"disable";
-               loc += '&ipsPerfectFSEn=' + (perfectFSEn.checked ? 
-                        "enable":"disable");
-
+               loc += submitSelect(perfectFSEn, 'ipsPerfectFSEn');
                loc += submitSelect(manualEncryptionAlgo, 'ipsManualEncryptionAlgo');
                loc += submitText(manualEncryptionKey, 'ipsManualEncryptionKey');
                loc += submitSelect(manualAuthAlgo, 'ipsManualAuthAlgo');
@@ -351,264 +350,275 @@ function applyClick() {
                loc += submitSelect(ph2IntegrityAlgo, 'ipsPh2IntegrityAlgo');
                loc += submitSelect(ph2DHGroup, 'ipsPh2DHGroup');
                loc += submitText(ph2KeyTime, 'ipsPh2KeyTime');
-
+               
        }
-
-       location = loc;
-//     var code = 'location = "' + loc + '"';
-//     eval(code);
+        var code = 'location="' + loc + '"';
+       eval(code);
 }
 
+// done hiding -->
 </script>
+  
 </head>
 
-<body onload="initMenu(); formLoad();">
-
-<script type="text/javascript">
-       writeHeader("Internet");
-</script>
-
-<h3>VPN IPSec Settings</h3>
-
+<body onLoad="formLoad()">
+<blockquote>
 <form>
-
-<table border="0">
-       <tr>
-               <td><label for="connName">Connection name:</label></td>
-               <td><input name="connName" size="20" maxlength="60" value="testconnection" type="text"></td>
-       </tr>
-
-       <tr>
-               <td><label for="remoteGWAddr">Remote gateway address:</label></td>
-               <td><input name="remoteGWAddr" size="20" maxlength="38" value="" type="text">
-                       <span class="clsNote">(IP address or domain name)</span></td>
-       </tr>
-</table>
-
-<p><label>Allow tunnel access from these local IP addresses:</label>
-       <select name="localIPMode" onchange="localIPModeChange();">
-               <option value="subnet">Subnet</option>
-               <option value="single">Single address</option>
-       </select>
-</p>
-<table border="0">
-       <tr id="IP11">
-               <td><label for="localIP">&nbsp;&nbsp;IP address for VPN:</label></td>
-               <td><input name="localIP" type="text"></td>
-       </tr>
-
-       <tr id="IP12">
-               <td><label for="localMask">&nbsp;&nbsp;IP subnet mask:</label></td>
-               <td><input name="localMask" type="text"></td>
-       </tr>
-
-       <tr id="IP13">
-               <td><label for="localMac">&nbsp;&nbsp;MAC address for VPN:</label></td>
-               <td><input name="localMac" type="text"></td>
-       </tr>\r
-       <tr id="noteIP"> <td></td>\r
-               <td>\r
-                       <span class="clsNote">(Note: To give VPN access to another device, override the current client addresses.)\r
-                       </span>\r
-               </td>\r
-       </tr>
-</table>
-
-<p><label>Allow tunnel access from these remote IP addresses:</label>
-       <select name="remoteIPMode" onchange="remoteIPModeChange();">
-               <option value="subnet" selected>Subnet</option>
-               <option value="single">Single Address</option>
-       </select>
-</p>
-<table border="0">
-       <tr id="IP21">
-               <td><label for="remoteIP">&nbsp;&nbsp;IP address for VPN:</label></td>
-               <td><input name="remoteIP" type="text"></td>
-       </tr>
-
-       <tr id="IP22">
-               <td><label for="remoteMask">&nbsp;&nbsp;IP subnet mask:</label></td>
-               <td><input name="remoteMask" type="text"></td>
-       </tr>
-</table>
-
-<p><label>Key exchange method:</label>
-       <select name="keyExM" onchange="keyauthChange();">
-               <option value="auto">Automatic (IKE)</option>
-               <option value="manual">Manual</option>
-       </select>
-</p>
-
-<div id="AutoKeyEx">
-       <table border="0">
-               <tr>
-                       <td><label>Authentication method:</label></td>
-                       <td>
-                               <select name="authM" onchange="keyauthChange();">
-                                       <option value="pre_shared_key">Pre-shared key</option>
-                                       <option value="certificate">Certificate (X.509)</option>
-                               </select>
-                       </td>
-               </tr>
-
-               <tr id="PSK">
-                       <td><label for="psk">Pre-shared key:</label></td>
-                       <td><input type="text" name="psk" maxlength="15" /></td>
-               </tr>
-
-               <tr id="Certificate">
-                       <td><label>Certificates:</label></td>
-                       <td><select name="certificateName" /></td>
-               </tr>
-       </table>
-
-       <p><input name="advSWButton" type="button" value="Show Advanced IKE Settings" onclick="switchAdv();"></p>
-</div>
-
-<table border="0" id="ManualKey">
-       <tr>
-               <td><label>Encryption algorithm:</label></td>
-               <td>
-                       <select name="manualEncryptionAlgo">
-                               <option value="des-cbc">DES-CBC</option>
-                               <option value="3des-cbc" selected>3DES-CBC</option>
-                               <option value="aes-ctr">AES-CBC</option>
-                       </select>
-               </td>
-       </tr>
-       <tr>
-               <td><label for="manualEncryptionKey">Encryption key:</label></td>
-               <td><input name="manualEncryptionKey", size="40" maxlength="60" value="a0bc8475912431d1"><br/>
-                       <span class="clsNote">DES: 16-digit hex, 3DES: 48-digit hex</span></td>
-       </tr>
-       <tr>
-               <td><label>Authentication algorithm:</label></td>
-               <td>
-                       <select name="manualAuthAlgo">
-                               <option value="hmac-md5">MD5</option>
-                               <option value="hmac-sha1">SHA-1</option>
-                       </select>
-               </td>
-       </tr>
-       <tr>
-               <td><label for="manualAuthKey">Authentication key:</label></td>
-               <td><input name="manualAuthKey" size="50" maxlength="60" value="a0bc8475912431d1a7bc458ef12837516"><br/>
-                       <span class="clsNote">MD5: 32-digit hex, SHA-1: 40-digit hex</span></td>
-       </tr>
-       <tr>
-               <td><label for="spi">SPI:</label></td>
-               <td><input name="spi" size="8" maxlength="8" value="105"> <span class="clsNote">(hex 100-FFFFFFFF)</span></td>
-       </tr>
-</table>
-
-<table border="0" id="adv">
-       <tr>
-               <td colspan="2"><h4>Phase 1</h4></td>
-       </tr>
-       <tr>
-               <td><label>Mode:</label></td>
-               <td>
-                       <select name="ph1Mode">
-                               <option value="main">Main</option>
-                               <option value="aggressive">Aggressive</option>
-                       </select>
-               </td>
-       </tr>
-       <tr>
-               <td><label>Encryption algorithm:</label></td>
-               <td>
-                       <select name="ph1EncryptionAlgo">
-                               <option value="3des" selected>3DES-CBC</option>
-                               <option value="aes128">AES-128-CBC</option>
-                               <option value="aes192">AES-192-CBC</option>
-                               <option value="aes256">AES-256-CBC</option>
-                       </select>
-               </td>
-       </tr>
-       <tr>
-               <td><label>Integrity algorithm:</label></td>
-               <td>
-                       <select name="ph1IntegrityAlgo">
-                               <option value="md5">MD5</option>
-                               <option value="sha1">SHA-1</option>
-                       </select>
-               </td>
-       <tr>
-               <td><label>Diffie-Hellman group for key exchange:</label></td>
-               <td>
-                       <select name="ph1DHGroup">
-                               <option value="modp768">DH Group 1 (768 bit)</option>
-                               <option value="modp1024">DH Group 2 (1024 bit)</option>
-                               <option value="modp1536">DH Group 5 (1536 bit)</option>
-                               <option value="modp2048">DH Group 14 (2048 bit)</option>
-                               <option value="modp3072">DH Group 15 (3072 bit)</option>
-                               <option value="modp4096">DH Group 16 (4096 bit)</option>
-                               <option value="modp6144">DH Group 17 (6144 bit)</option>
-                               <option value="modp8192">DH Group 18 (8192 bit)</option>
-                       </select>
-               </td>
-       </tr>
-       <tr>
-               <td><label for="ph1KeyTime">Key lifetime:</label></td>
-               <td><input type="text" name="ph1KeyTime" maxlength="5"> seconds (1-28800)</td>
-       </tr>
-
-       <tr>
-               <td colspan="2"><h4>Phase 2</h4></td>
-       </tr>
-       <tr>\r
-               <td colspan="2"><input type='checkbox' name='perfectFSEn' id='perfectFSEn' value="ON"> \r
-               <label for="perfectFSEn">Allow perfect forward secrecy (PFS)</label></td>\r
-       </tr>\r
-       <tr>
-               <td><label>Encryption algorithm:</label></td>
-               <td>
-                       <select name="ph2EncryptionAlgo">
-                               <option value="des">DES-CBC</option>
-                               <option value="3des" selected >3DES-CBC</option>
-                               <option value="aes128">AES-128-CBC</option>
-                               <option value="aes192">AES-192-CBC</option>
-                               <option value="aes256">AES-256-CBC</option>
-                       </select>
-               </td>
-       </tr>
-       <tr>
-       <td><label>Integrity algorithm:</label></td>
-       <td>
-       <select name="ph2IntegrityAlgo">
-       <option value="hmac_md5">MD5</option>
-       <option value="hmac_sha1">SHA-1</option>
-       </select>
-       </td>
-       </tr>
-       <tr>
-               <td><label>Diffie-Hellman group for key exchange:</label></td>
-               <td>
-                       <select name="ph2DHGroup">
-                               <option value="modp768">DH Group 1 (768 bit)</option>
-                               <option value="modp1024">DH Group 2 (1024 bit)</option>
-                               <option value="modp1536">DH Group 5 (1536 bit)</option>
-                               <option value="modp2048">DH Group 14 (2048 bit)</option>
-                               <option value="modp3072">DH Group 15 (3072 bit)</option>
-                               <option value="modp4096">DH Group 16 (4096 bit)</option>
-                               <option value="modp6144">DH Group 17 (6144 bit)</option>
-                               <option value="modp8192">DH Group 18 (8192 bit)</option>
-                       </select>
-               </td>
-       </tr>
-       <tr>
-               <td><label for="ph2KeyTime">Key lifetime:</label></td>
-               <td><input type="text" name="ph2KeyTime" maxlength="5"> seconds (1-86400)</td>
-       </tr>
-</table>
-
-<p><input value="Save" type="button" onclick="applyClick();"></p>
-
+  <b>IPSec Settings</b> 
+  <br><br>
+  <table border="0" cellpadding="0" cellspacing="2" width="100%">
+    <tr>
+      <td width="40%"> IPSec Connection Name </td>
+      <td> <input name="connName" size="20" maxlength="60" type="text"> </td>
+    </tr>
+    <tr>
+        <td width="40%">Remote IPSec Gateway Address (IP or Domain Name)</td>
+        <td><input name="remoteGWAddr" size="20" maxlength="255" type="text"></td>
+    </tr>
+  </table></div>
+  <table border="0" cellpadding="0" cellspacing="2" width="100%">
+   <tr><td>&nbsp;</td></tr>
+    <tr>
+      <td width="40%"> Tunnel access from local IP addresses </td>
+      <td >
+      <select name="localIPMode" onchange="localIPModeChange();">
+        <option value="subnet">Subnet</option>
+        <option value="single">Single Address</option>
+      </select>
+    </td>
+    </tr>
+  </table>
+  <div id = "IP11"><table border="0" cellpadding="0" cellspacing="2" width="100%">
+    <tr>
+      <td width="40%">&nbsp;&nbsp; IP Address for VPN</td>
+        <td> <input name="localIP" type="text"> </td>
+      </td>
+    </tr>
+   </table></div>
+   <div id = "IP12"><table border="0" cellpadding="0" cellspacing="2" width="100%">
+      <tr>
+        <td width="40%">&nbsp;&nbsp; IP Subnetmask</td>
+        <td> <input name="localMask" type="text"> </td> 
+      </tr>
+   </table></div>
+   <table border="0" cellpadding="0" cellspacing="2" width="100%">
+      <tr><td></td><td>&nbsp;</td></tr>
+      <tr>
+        <td width="40%"> Tunnel access from remote IP addresses </td>
+        <td >
+        <select name="remoteIPMode" onchange="remoteIPModeChange();">
+        <option value="subnet" selected>Subnet</option>
+        <option value="single">Single Address</option>
+        </select>
+        </td>
+      </tr>
+   </table>
+   <div id = "IP21"><table border="0" cellpadding="0" cellspacing="2" width="100%">
+    <tr>
+      <td width="40%">&nbsp;&nbsp; IP Address for VPN</td>
+        <td> <input name="remoteIP" type="text"> </td>
+    </tr>
+   </table></div>
+   <div id = "IP22"><table border="0" cellpadding="0" cellspacing="2" width="100%">
+      <tr>
+        <td width="40%">&nbsp;&nbsp; IP Subnetmask</td>
+        <td> <input name="remoteMask" type="text"> </td>
+      </tr>
+    </table></div>
+    <table border="0" cellpadding="0" cellspacing="2" width="100%">
+    <tr><td>&nbsp;</td><td>&nbsp;</td></tr>
+     <tr> 
+        <td width="40%">Key Exchange Method </td>
+        <td><select name="keyExM" onChange="keyauthChange();">
+            <option value="auto">Auto(IKE)</option>
+            <option value="manual">Manual</option>
+          </select>
+        </td>
+     </tr> 
+     </table>
+    <div id="AutoKeyEx"><table border="0" cellpadding="0" cellspacing="2" width="100%">
+      <tr>
+        <td width="40%"> Authentication Method </td>
+        <td>
+          <select name="authM" onChange="keyauthChange();">
+            <option value="pre_shared_key">Pre-Shared Key</option>
+            <option value="certificate">Certificate (X.509)</option>
+          </select>
+        </td>
+      </tr>
+    </table> 
+    <div id="PSK"><table border="0" cellpadding="0" cellspacing="2" width="100%">
+       <tr>
+        <td width="40%">Pre-Shared Key</td>
+        <td> <input name="psk"></td>
+      </tr>
+    </table></div>
+    <div id="Certificate">
+      <table border="0" cellpadding="0" cellspacing="2" width="100%">
+        <tr>
+          <td width="40%"> Certificates </td>
+          <td><select name="certificateName">
+          </select></td>
+        </tr>
+      </table></div>
+     <table border="0" cellpadding="0" cellspacing="2" width="100%">
+      <tr>
+        <td width="40%">Perfect Forward Secrecy</td>
+        <td align="left" > 
+          <select name="perfectFSEn">
+            <option value="enable">Enable</option>
+            <option value="disable">Disable</option>
+          </select>
+        </td>
+     </tr> 
+     <tr><td>&nbsp;</td></tr>
+     <tr>
+       <td width="40%">Advanced IKE Settings</td>
+       <td><input name="advSWButton" type="button" value="Show Advanced Settings" onclick="switchAdv();" ></td>
+     </tr>
+    </table></div>
+    <div id="ManualKey"> <table border="0" cellpadding="0" cellspacing="2" width="100%">
+       <tr>
+        <td width="40%">Encryption Algorithm</td>
+        <td>
+          <select name="manualEncryptionAlgo">
+          <option value="des-cbc">DES</option>
+          <option value="3des-cbc" selected>3DES</option>
+          <option value="aes-cbc">AES(aes-cbc)</option>
+        </select>
+        </td>
+      </tr>
+      <tr>
+        <td width = "40%"> Encryption Key </td>
+        <td> <input name="manualEncryptionKey", size = "40" maxlength = "80">  DES: 16 digit Hex, 3DES: 48 digit Hex <br></td>
+      </tr>
+      <tr>
+       <td width="40%">Authentication Algorithm</td>
+       <td>
+         <select name="manualAuthAlgo">
+           <option value="hmac-md5">MD5</option>
+           <option value="hmac-sha1">SHA1</option>
+         </select>
+       </td>
+     </tr>
+      <tr>
+        <td> Authentication Key </td>
+        <td> <input name="manualAuthKey" size="50" maxlength = "60"> MD5: 32 digit Hex, SHA1: 40 digit Hex </td>
+      </tr>
+      <tr>
+        <td> SPI </td>
+        <td> <input name="spi" size="8" maxlength = "8"> Hex 100-FFFFFFFF</td>
+      </tr>      
+    </table></div>
+    <div id = "adv">
+    <table border="0" cellpadding="0" cellspacing="2" width="100%">
+     <tr>
+       <td> Phase 1</td>
+     </tr>
+     <tr>
+       <td width="40%">Mode</td>
+       <td>
+         <select name="ph1Mode">
+           <option value="main">Main</option>
+           <option value="aggressive">Aggressive</option>
+         </select>
+       </td>
+       </tr>
+       <tr>
+        <td width="40%">Encryption Algorithm</td>
+        <td>
+          <select name="ph1EncryptionAlgo">
+          <option value="des">DES</option>
+          <option value="3des" selected>3DES</option>
+          <option value="aes128">AES - 128</option>
+          <option value="aes192">AES - 192</option>
+          <option value="aes256">AES - 256</option>          
+        </select>
+        </td>
+      </tr>
+      <tr>
+       <td width="40%">Integrity Algorithm</td>
+       <td>
+         <select name="ph1IntegrityAlgo">
+           <option value="md5">MD5</option>
+           <option value="sha1">SHA1</option>
+         </select>
+       </td>
+       <tr>
+       <td width="40%">Select Diffie-Hellman Group for Key Exchange</td>
+       <td>
+         <select name="ph1DHGroup">
+           <option value="modp768">768bit</option>
+           <option value="modp1024">1024bit</option>
+           <option value="modp1536">1536bit</option>
+           <option value="modp2048">2048bit</option>
+           <option value="modp3072">3072bit</option>
+           <option value="modp4096">4096bit</option>
+           <option value="modp6144">6144bit</option>
+           <option value="modp8192">8192bit</option>
+         </select>
+       </td>
+      </tr>
+      <tr>
+        <td width="40%">Key Life Time </td>
+        <td> <input name="ph1KeyTime" > &nbsp Seconds </td>
+      </tr>
+      <tr>
+     <tr><td>&nbsp;</td></tr>
+     <tr>
+       <td> Phase 2</td>
+     </tr>
+     <tr>
+        <td width="40%">Encryption Algorithm</td>
+        <td>
+          <select name="ph2EncryptionAlgo">
+          <option value="des">DES</option>
+          <option value="3des" selected >3DES</option>
+          <option value="aes128">AES - 128</option>
+          <option value="aes192">AES - 192</option>
+          <option value="aes256">AES - 256</option>
+        </select>
+        </td>
+      </tr>
+      <tr>
+       <td width="40%">Integrity Algorithm</td>
+       <td>
+         <select name="ph2IntegrityAlgo">
+           <option value="hmac_md5">MD5</option>
+           <option value="hmac_sha1">SHA1</option>
+         </select>
+       </td>
+      </tr>
+      <tr>
+       <td width="40%">Select Diffie-Hellman Group for Key Exchange</td>
+       <td>
+         <select name="ph2DHGroup">
+           <option value="modp768">768bit</option>
+           <option value="modp1024">1024bit</option>
+           <option value="modp1536">1536bit</option>
+           <option value="modp2048">2048bit</option>
+           <option value="modp3072">3072bit</option>
+           <option value="modp4096">4096bit</option>
+           <option value="modp6144">6144bit</option>
+           <option value="modp8192">8192bit</option>
+         </select>
+       </td>
+      </tr>
+      <tr>
+        <td width="40%">Key Life Time </td>
+        <td> <input name="ph2KeyTime" > &nbsp Seconds </td>
+      </tr>
+   </table>
+    </div>
+    <table border="0" cellpadding="0" cellspacing="2" width="100%">
+      <tr><td></td><td>&nbsp;</td></tr>
+      <tr>
+        <td colspan="2" align="center"> 
+          <input value="Save / Apply" type="button" onclick="applyClick();" > 
+        </td>
+      </tr>
+  </table>
 </form>
-
-<script type="text/javascript">
-       writeFooter();
-</script>
-
+</blockquote>
 </body>
 </html>