<html>
   <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></title>
            <base target="_self">
            <script type="text/javascript" src="lang/b28n.js"></script>
		<script language="javascript" src="util.js"></script>
		<script language="javascript"><%ejGetOther(forbidHTMLCode)%></script>
<script language="javascript">
<!-- hide
var prtcl = '<%ejGetOther(memInfo, ntwkPrtcl)%>';
var sessionKey='<%ejGetOther(sessionKey)%>';

function initTranslation() {
}

function disableVlanIdInput() {
   with ( document.forms[0] ) {
      if(wanmode[0].checked || wanmode[1].checked)
      {
         vlanIdValue.hidden = 1;
      }
      else
      {
         vlanIdValue.hidden = 0;
      }
   }
}
function typeClick() {
   disableVlanIdInput();
}

function frmLoad() {
	initTranslation();
   with ( document.forms[0] ) 
   {
      wanmode[0].checked=true;
      if(wanmode[0].checked || wanmode[1].checked)
      {
         disableVlanIdInput();
         vlanMuxId.value = -1;
      }
   }
}
function btnBack()
{
  var loc ='qvdslwanmode.cgi'
  loc += '?sessionKey=' + sessionKey;
  var code = 'location.assign("' + loc + '")';
  eval(code);       
}
function btnNext()
{
   var loc =''      
   with ( document.forms[0] ) 
   {
		if(prtcl == 'PPPoE')
		{
		   loc = 'qvdslppp.cgi?';      
		}
		else if(prtcl == 'IPoE')
		{
         loc = 'qipoe.cgi?';
		}
		else
		{
			loc = 'qbridgesum.cgi?';
		}
      if(wanmode[0].checked==true)
      {
         loc += 'enVlanMux=1&vlanMuxId=-1&vlanMuxPr=-1&vlanTpid=0';
      }
      else if(wanmode[1].checked==true)
      {
         loc += 'enVlanMux=1&vlanMuxId=10&vlanMuxPr=0&vlanTpid=0';
      }
      else if(wanmode[2].checked==true)
      {
         if ( vlanMuxId.value != -1 ) 
         {
            if ( vlanMuxId.value < 0 || vlanMuxId.value > 4094 ) 
            {
               alert('VLAN ID \"' + vlanMuxId.value + '\" is out of range [0-4094].');
               return;
            }
            loc += 'enVlanMux=1&vlanMuxPr=0';            
         }  
         else
         {
            loc += 'enVlanMux=1&vlanMuxPr=-1';
         }
         loc += '&vlanMuxId=' + vlanMuxId.value;
         loc += '&vlanTpid=0';
      }
      loc += '&sessionKey=' + sessionKey;
   }
   var code = 'location.assign("' + loc + '")';
   eval(code);   
}
// done hiding -->
</script>
   </head>
   <body onLoad='frmLoad()'>
      <blockquote>
         <form>
           <b id='quickSetup'>Basic &gt; Quick Setup &gt; VLAN Setup</b>
           <br><br><br><br>
           <p>
           		Please select the correct VLAN option for your connection:<br>
           		If you are unsure, please contact your ISP
           </p>
           <p>
           <input type='radio' name=wanmode value='novlan' onClick='typeClick()' checked>No VLAN Tag
           </p>
           <p>
           <input type='radio' name=wanmode value='vlan10' onClick='typeClick()' checked>VLAN Tag 10(For most New Zealand Customers)
           </p>
           <p>
           <input type='radio' name=wanmode value='customvlan' onClick='typeClick()' checked>Custom VLAN Tag
           </p>
           <div id='vlanIdValue'>
           <table border="0" cellpadding="0" cellspacing="0">
             <tr>
	             <td>VLAN Tag:&nbsp;</td>
	             <td><input type='text' size='4' name='vlanMuxId'></td>
	             <td>(0-4094)</td>
             </tr>       
           </table>
           </div>           
           <center>
           <input type='button' onClick='btnBack()' value='Back' selected>
           <input type='button' onClick='btnNext()' value='Next'>
           </center>

         </form>
      </blockquote>
   </body>
</html>
