设为首页收藏本站

宽带技术网

 找回密码
 注 册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 802|回复: 0

W300D V2.0的源码,如何查看里面的超级密码,跪求!

[复制链接]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">
<head>
<META HTTP-EQUIV="pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<LINK REL="stylesheet" HREF="css/template.css" TYPE="text/css" />
<title>ZXV10 W300D</title>
</head>
<SCRIPT LANGUAGE="javascript">
var g_errorInfo = "错误信息";
function getObj(id){return(document.getElementById(id));}function jslSetValue(src,dst){var ss=document.getElementById(dst).value;document.getElementById(src).value=ss;}function setValue(id,value){document.getElementById(id).value=value;}function getValue(id){return(document.getElementById(id).value);}function getDisabled(id){return(document.getElementById(id).disabled);}function getDisplay(id){if(document.getElementById(id).style.display=="none")return false;else return true;}function getChecked(id){return(document.getElementById(id).checked);}function setChecked(id,value){document.getElementById(id).checked=value;}function jslDiDisplay(id){var i;var num=arguments.length;if(num==0)return;for(i=0;i<num;i++){document.getElementById(arguments).style.display="none";}}function jslEnDisplay(id){var i;var num=arguments.length;if(num==0)return;for(i=0;i<num;i++)document.getElementById(arguments).style.display="";}function jslDisable(id){var i;var num=arguments.length;if(num==0)return;for(i=0;i<num;i++){document.getElementById(arguments).disabled=true;}}function jslEnable(id){var i=0;var num=arguments.length;if(num==0)return;for(i=0;i<num;i++)document.getElementById(arguments).disabled=false;}function jslViewToPostCheckBox(PostId,ViewId){if(document.getElementById(ViewId).checked)document.getElementById(PostId).value="1";else document.getElementById(PostId).value="0";}function jslPostToViewCheckBox(ViewId,PostId){if(document.getElementById(PostId).value=="1")document.getElementById(ViewId).checked=true;else document.getElementById(ViewId).checked=false;}function jslGetRadioValue(radioObject){if(radioObject){if(radioObject.length){for(var i=0;i<radioObject.length;i++){if(radioObject.checked){return radioObject.value;}}}else if(radioObject.checked){return radioObject.value;}}return -1;}function jslSetRadioValue(radioObject,value){if(radioObject){if(radioObject.length){for(var i=0;i<radioObject.length;i++){if(radioObject.value==value){radioObject.checked=true;return true;}}}else if(radioObject.value==value){radioObject.checked=true;}}return false;}function jslDoShowComboBox(viewid,postid){var i;var selector=document.getElementById(viewid);var value=document.getElementById(postid).value;if(selector==null)return;for(i=0;i<selector.length;i++){if(selector.options.value==value){selector.selectedIndex=i;return;}}selector.selectedIndex=-1;}function RmZero(str){while(str.indexOf("0")==0&&str.length>1){str=str.substr(1);}return str;}function IpRmZero(IpAddrValue){var IpAddr=IpAddrValue;var addrParts=IpAddr.split('.');IpAddr="";for(var i=0;i<4;i++){addrParts=RmZero(addrParts);IpAddr=addrParts.join(".");}return IpAddr;}function ReSetIpRmZero(ID){var num=arguments.length;var re=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/;var obj;if(num==0)return;for(i=0;i<num;i++){obj=document.getElementById(arguments);if(obj!=null &&obj.value!=""&&obj.value!=null ){if(re.test(obj.value)!=true){return false;}obj.value=IpRmZero(obj.value);}}}function ReSetValueRmZero(ID){var num=arguments.length;var obj;if(num==0)return;for(i=0;i<num;i++){obj=document.getElementById(arguments);if(obj!=null &&obj.value!=null &&obj.value!=""){if(obj.value.length>10){return false;}obj.value=RmZero(obj.value);}}}function Transfer_meaning(id,value){document.getElementById(id).value=value;}function HiddenParaInit(arr){var val;for(var i=0;i<arr.length;i++){val=arr;arr="NULL";setValue(val,"NULL");}}function HiddenMultiInstParaInit(arr,index){var val;for(var i=0;i<arr.length;i++){val=arr;setValue(val+index, "NULL");}}function setNULLToSepPort(Port,Val){var portvalue=Port;if(portvalue==""){portvalue=Val;}return portvalue;}function getSepPortToNULL(Port,Val){var portvalue=Port;if(portvalue==Val){portvalue="";}return portvalue;}function setNULLToPort(Port){var portvalue=Port;if(portvalue==""){portvalue="-1";}return portvalue;}function getPortToNULL(Port){var portvalue=Port;if(portvalue=="-1"){portvalue="";}return portvalue;}function setNULLToMAC(MAC){var macaddr=MAC;if(macaddr==""){macaddr="00:00:00:00:00:00";}return macaddr;}function getMACToNULL(MAC){var macaddr=MAC;if(macaddr=="00:00:00:00:00:00"){macaddr="";}return macaddr;}function setNULLToIP(IP){var ipvalue=IP;if(ipvalue==""){ipvalue="0.0.0.0";}return ipvalue;}function getIPToNULL(IP){var ipvalue=IP;if(ipvalue=="0.0.0.0"){ipvalue="";}return ipvalue;}function encode64(input){var keyStr="ABCDEFGHIJKLMNOP"+"QRSTUVWXYZabcdef"+"ghijklmnopqrstuv"+"wxyz0123456789+/"+"=";input =escape(input);var output="";var chr1,chr2,chr3="";var enc1,enc2,enc3,enc4="";var i=0;do{chr1=input.charCodeAt(i++);chr2=input.charCodeAt(i++);chr3=input.charCodeAt(i++);enc1=chr1>>2;enc2=((chr1&3)<<4)|(chr2>>4);enc3=((chr2&15)<<2)|(chr3>>6);enc4=chr3&63;if(isNaN(chr2)){enc3=enc4=64;}else if(isNaN(chr3)){enc4=64;}output=output+keyStr.charAt(enc1)+keyStr.charAt(enc2)+keyStr.charAt(enc3)+keyStr.charAt(enc4);chr1=chr2=chr3="";enc1=enc2=enc3=enc4="";}while(i<input.length);return output;}function decode64(input){var output="";var chr1,chr2,chr3="";var enc1,enc2,enc3,enc4="";var i=0;var base64test=/[^A-Za-z0-9\+\/\=]/g;var keyStr="ABCDEFGHIJKLMNOP"+"QRSTUVWXYZabcdef"+"ghijklmnopqrstuv"+"wxyz0123456789+/"+"=";if(base64test.exec(input)) {alert("There were invalid base64 characters in the input text.\n"+"Valid base64 characters are A-Z, a-z, 0-9, '+', '/', and '='\n"+"Expect errors in decoding.");}input =input.replace(/[^A-Za-z0-9\+\/\=]/g, "");do{enc1=keyStr.indexOf(input.charAt(i++));enc2=keyStr.indexOf(input.charAt(i++));enc3=keyStr.indexOf(input.charAt(i++));enc4=keyStr.indexOf(input.charAt(i++));chr1=(enc1<<2)|(enc2>>4);chr2=((enc2&15)<<4)|(enc3>>2);chr3=((enc3&3)<<6)|enc4;output=output+String.fromCharCode(chr1);if(enc3!=64){output=output+String.fromCharCode(chr2);}if(enc4!=64){output=output+String.fromCharCode(chr3);}chr1=chr2=chr3="";enc1=enc2=enc3=enc4="";}while(i<input.length);return unescape(output);}function trimLSpaces(str){return str.replace(/(^\s*)/g,"");}function trimRSpaces(str){return str.replace(/(\s*$)/g,"");}function trimLRSpaces(str){return str.replace(/(^\s*)|(\s*$)/g,"");}function trimAllSpaces(str){for(var i=0;i<str.length;i++){if(str.charAt(i)==" "){str=str.substring(0, i)+str.substring(i+1, str.length);i--;}}return str;}function DisableALL(){var txtArrs=document.getElementsByTagName('input');for(var i=0;i<txtArrs.length;i++){if(("hidden"!=txtArrs.type)&&("help_info"!=txtArrs.name)){txtArrs.disabled=true;}}var selectArrs=document.getElementsByTagName('select');for(var i=0;i<selectArrs.length;i++){selectArrs.disabled=true;}}function myTrim(str,chr){var pos=str.lastIndexOf(chr);while(pos!=-1){if(pos+chr.length==str.length){str=str.substring(0, pos);pos=str.lastIndexOf(chr);}else {pos=-1;}}return str;}function calcSubNet(ipaddr,netmask){var ips=ipaddr.split(".");var ns=netmask.split(".");var sub="";if(ips.length!=4||ns.length!=4)return "0.0.0.0";for(var i=0;i<4;i++){sub+=ips&ns;sub+=".";}sub=myTrim(sub,".");return sub;}function checkNull(value){if(value==""||value==null)return false;else return true;}function checkGenString(sz){if(checkNull(sz)==false)return -1;if(sz.match("[^0-9a-zA-Z_-]")!=null)return false;return true;}function checkGenStringForASC(value){var length=value.length;for(var j=0;j<length;j++){var xx=value.charCodeAt(j);if(xx>0&&xx<=255){}else {return false;}}return true;}function checkStrLengthRange(value,min, max){if(checkNull(value)==false){return -1;}var len=value.length;if((len<min) ||(len>max)){return -3;}return true;}function checkInteger(str){if(str.charAt(0)=='-')str=str.substr(1);if(str.match("^[0-9]+\$"))return true;return false;}function checkIntegerRange(value,minValue, maxValue){if(checkNull(value)==false){return -1;}if(checkInteger(value)!=true)return -2;if(value<minValue ||value>maxValue){return -3;}return true;}function checkGenInt(str){if(checkIntegerRange(str,-2147483648,2147483647)!=true)return false;return true;}function checkUnSingleInt(str){if(checkIntegerRange(str,0,4294967295)!=true)return false;return true;}function checkHostName(HostName){var len=HostName.length;var firstChar=HostName.substr(0,1);var lastChar=HostName.substr(len-1,1);var leftChar="";var rightChar="";var iDotCount=0;var i=0;var preDotPos=0;var statu=checkStrLengthRange(HostName,1,256);if(statu!=true){return statu;}if(HostName.match("[^0-9a-zA-Z.-]")!=null){return false;}if(firstChar.match("[^0-9a-zA-Z]")!=null){return false;}if(lastChar.match("[^0-9a-zA-Z]")!=null){return false;}var pos=HostName.lastIndexOf(".");if(pos==-1){var str=HostName;var len=HostName.length;for(var i=0;i<len;i++){var value=str.substring(i,i+1);if(isNaN(parseInt(value))){return true;}}return false;}else {var str=HostName.substr(pos+1);var len=HostName.length-(pos+1);for(var i=0;i<len;i++){var value=str.substring(i,i+1);if(isNaN(parseInt(value))){return true;}}return false;}return true;}function checkDomainName(domain_name){var len=domain_name.length;var firstChar=domain_name.substr(0,1);var lastChar=domain_name.substr(len-1,1);var leftChar="";var rightChar="";var iDotCount=0;var i=0;var preDotPos=0;var statu=checkStrLengthRange(domain_name, 1,64);if(statu!=true){return statu;}if(domain_name.match("[^0-9a-zA-Z.-]")!=null){return false;}if(firstChar.match("[^0-9a-zA-Z]")!=null){return false;}if(lastChar.match("[^0-9a-zA-Z]")!=null){return false;}var pos=domain_name.lastIndexOf(".");if(pos==-1){var str=domain_name;var len=domain_name.length;for(var i=0;i<len;i++){var value=str.substring(i,i+1);if(isNaN(parseInt(value))){return true;}}return false;}else {var str=domain_name.substr(pos+1);var len=domain_name.length -(pos+1);for(var i=0;i<len;i++){var value=str.substring(i,i+1);if(isNaN(parseInt(value))){return true;}}return false;}return true;}function checkEssid(value){var statu=checkStrLengthRange(value,1,32);if(statu!=true){return statu;}var length=value.length;for(var j=0;j<length;j++){var xx=value.charCodeAt(j);if(xx>0&&xx<=255){}else {return false;}}return true;}function checkURL(url){var statu=checkStrLengthRange(url,1,256);if(statu!=true){return statu;}if(url.match("[^0-9a-zA-Z.:;,!@%#?_/&=+*'$()-]")!=null){return false;}return true;}function checkIpAddress(value,num){var ipaddr=value;var c=false;var re=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/;if(re.test(ipaddr)==true){var parts=ipaddr.split(".");for(var i=0;i<parts.length;i++){if(parts.indexOf("0")==0&&parts.length>1)return false;if(parseInt((parts),10)>255||parseInt((parts),10)<0){return false;}}if(num==2){if(parseInt(parts[0],10)==0||parseInt(parts[3],10)==0){return false;}if(parseInt(parts[0],10)==255||parseInt(parts[3],10)==255){return false;}if(parseInt(parts[0],10)>223)return false;}if(num==3){for(var i=0;i<parts.length;i++){if(parseInt((parts),10)==0)break;}if(i==parts.length){if((parseInt(parts[1],10)==255)&&(parseInt(parts[2],10)==255)&&(parseInt(parts[3],10)==255)){c=true;}else {c=false;return c;}}for(var j=i;j<parts.length;j++){if(parseInt((parts[j]),10)==0)c=true;else {c=false;break;}}return c;}return true;}else {return false;}}function checkIPV6Address(str){if(str.match("[^0-9a-fA-F:.]")!=null)return false;addrParts=str.split(':');Doublecolon=str.split('::');ipv4Parts=str.split('.');if(addrParts.length<3||addrParts.length>8){return false;}else if(Doublecolon.length==1&&ipv4Parts.length==1&&addrParts.length!=8){return false;}else if(Doublecolon.length==1&&ipv4Parts.length>1&&addrParts.length!=6){return false;}else if(Doublecolon.length>1&&ipv4Parts.length>1&&addrParts.length>6){return false;}else if(Doublecolon.length>2||str.split(':::').length>1){return false;}else {if(addrParts[0]==""&&addrParts[1]!=""){return false;}for(var i=0;i<addrParts.length;i++){if(i==addrParts.length-1&&addrParts==""&&addrParts[i-1]!=""){return false;}if(addrParts.length>4&&addrParts.split('.').length<2){return false;}}}var pos=str.lastIndexOf(":");var ipv4Parts=str.split('.');if(ipv4Parts.length>1){var ipv4=str.substring(pos+1,str.length);if(true!=checkIpAddress(ipv4,"")){return false;}if("::ffff"!=str.substring(0,str.lastIndexOf(":"))){return false;}}return true;}function checkGateway(Address){var address=Address.match("^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$");var digits;var i;if(address==null){return false;}digits=address[0].split(".");if(digits.length!=4){return false;}for(i=0;i<4;i++){if((Number(digits)>255)||(Number(digits)<0)||(Number(digits[0])>223)){return false;}}return true;}function checkMACAddress(Addr){var c='';var i=0,j=0;if(Addr=="00:00:00:00:00:00"){return false;}var addrParts=Addr.split(':');if(addrParts.length!=6)return false;for(i=0;i<6;i++){if(addrParts.length!=2)return false;for(j=0;j<addrParts.length;j++){c=addrParts.toLowerCase().charAt(j);if((c>='0'&&c<='9')||(c>='a'&&c<='f'))continue;else return false;}}return true;}function checkMaskAddress(MaskAddr){var mask=MaskAddr.match("^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$");var digits;var bMask=0;var watch=false;var i;var error=null;if(mask==null){return false;}digits=mask[0].split(".");if(digits.length!=4){return false;}for(i=0;i<4;i++){if((Number(digits)>255)||(Number(digits)<0)||(digits.indexOf("0")==0&&digits.length>1)){return false;}bMask=(bMask<<8)|Number(digits);}bMask=bMask&0x0FFFFFFFF;if((bMask&0x01)==1)watch=true;for(i=0;i<32;i++){if((watch==true)&&((bMask&0x1)==0)){return false;}bMask=bMask>>1;if((bMask&0x01)==1)watch=true;}return true;}function checkIPNet(ipaddr,netmask){var ret=checkIpAddress(ipaddr);if(ret!=true)return ret;if(netmask==null)return null;ret=checkMaskAddress(netmask);if(ret!=null)return ret;var ips=ipaddr.split(".");var subnet=calcSubNet(ipaddr,netmask);var subs=subnet.split(".");var s="";for(var i=0;i<4;i++){s+=parseInt(ips)^parseInt(subs);s+=".";}if(s=="0.0.0.0.")return true;return false;}function checkPort(port){var value=port;if(port=="-1")return false;else return true;}function valIpMask(ipaddr,netmask){var ss=netmask.split(".");var mac=0;for(var i=0;i<4;i++){mac=mac<<8;mac=mac+parseInt(ss);}var ip=0;var as=ipaddr.split(".");for(var i=0;i<4;i++){ip=ip<<8;ip=ip+parseInt(as);}if(mac&&((ip&mac)==ip)){return false;}if(mac&&((ip&(~mac))==~mac)){return false;}return true;}function moveErrLayer(left,top){document.getElementById("myLayer").style.left=left+"px";document.getElementById("myLayer").style.top=top+"px";}function ShowNote(notetitle,msg){document.getElementById("errnote").innerHTML =notetitle;document.getElementById("errmsg").innerHTML =msg;document.getElementById("myLayer").style.visibility="visible";}function ShowNoteNew(ctl,notetitle,msg){document.getElementById("errnote").innerHTML =notetitle;document.getElementById("errmsg").innerHTML =msg;document.getElementById("myLayer").style.visibility="visible";if(ctl!=null &&ctl.disabled==false){ctl.focus();}}function ShowNoteForCom(frmid,fntid,msg){var fntmsg;var strmsg;if(document.getElementById(fntid)==null){if(fntid==null)fntmsg="";else fntmsg=fntid;}else{fntmsg=document.getElementById(fntid).innerHTML;}strmsg=fntmsg+msg;ShowNoteNew(document.getElementById(frmid),"Note",strmsg);}function ShowError(ctl,msg){var tmpStr=g_errorInfo;if(tmpStr=="undefined"){tmpStr="Error";}document.getElementById("errnote").innerHTML =tmpStr;document.getElementById("errmsg").innerHTML =msg;document.getElementById("myLayer").style.visibility="visible";if(ctl!=null &&ctl.disabled==false){ctl.focus();}}function ShowErrorForCom(frmid,fntid,msg){var fntmsg;var strmsg;if(document.getElementById(fntid)==null){if(fntid==null)fntmsg="";else fntmsg=fntid;}else{fntmsg=document.getElementById(fntid).innerHTML;}strmsg=fntmsg+msg;ShowError(document.getElementById(frmid),strmsg);}function getMsgFormArray(str,arg){var errid=0;var min =0;var max=0;var param=-1;var msg="";var num=arg.length;if(num==1){errid=arg[0];}else if(num==3){errid=arg[0];min =arg[1];max=arg[2];}else if(num==2){errid=arg[0];param=arg[1];}else return null;for(var i=0;i<str.length;i++){if(typeof(str)=="undefined"){alert("数组初始化有误,请检查代码!i = "+i);return null;}if(errid==str[0]){if(min ==max&&min ==0){if(param==-1){msg=str[1];}else {msg=str[1]+param+str[i+1][1];}}else msg=str[1]+min +"~"+max+str[i+1][1];return msg;}}return null;}function setTextFocusEnd(){var srcElement=event.srcElement;var textRange=srcElement.createTextRange();textRange.moveStart('character',srcElement.value.length);textRange.collapse(true);textRange.select();}function getURL(){var ret="getpage.gch?pid=1002&nextpage=";var len=arguments.length;if(0!=(len-1)%2){ShowErrorForCom(null,null,"arguments len err of getURL!");return;}for(var i=0;i<len;i++){if(i%2==1){ret+="&"+arguments+"=";}else {ret+=arguments;}}return ret;}function menuURLGen(){for(var supId in meta_menu){meta_menu[supId]['URL']=getURL(meta_menu[supId]['page']);for(var midId in menu_items[supId]){menu_items[supId][midId]['URL']=getURL(menu_items[supId][midId]['page']);for(var subId in menu_subitems[supId][midId]){menu_subitems[supId][midId][subId]['URL']=getURL(menu_subitems[supId][midId][subId]['page']);}}}}function menuURLGen_Top(){for(var supId in meta_menu){meta_menu[supId]['URL']=getURL(meta_menu[supId]['page']);}}function menuDisp(){menuURLGen();menuUpdate();}function ReplaceDemo(ss){var r,re;re=/ /g;r=ss.replace(re,"&nbsp;");return r;}function openLink(pageurl){var replaceurl=ReplaceDemo(pageurl);var tag=getObj("IF_UPLOADING").value;if(tag=="1"){top.mainFrame.location.href ="#";}else {top.mainFrame.location.href =replaceurl;}}function getMidMenuStat(supId,midId){var len=0;for(var i in menu_subitems[supId][midId]){len++;}if(0==len){return "single";}for(var subId in menu_subitems[supId][midId]){if(selectPage==menu_subitems[supId][midId][subId]['page']){return "open";}}return "closed";}function OnMenuItemClick(supId,midId){selectPage=menu_items[supId][midId]['page'];selectSupId=supId;menuUpdate();}
function OverTime()
{
setTimeout("relogin()", 300*1000+5000);
}
function relogin()
{
alert("页面超时,请重新登录。");
document.getElementById("logout").value = 1;
document.flogout.submit();
}
OverTime();
function setenter(e)
{
e = window.event?window.event:e;
if( e == "[object]")
{
if (event.keyCode == 13 && event.srcElement.type == "text")
{
event.keyCode = 9;
}
}
}
</SCRIPT>
<body>
<form name="flogout" id="flogout" method="post"  action="/" target="_top">
<input type="hidden" name="logout" id="logout" value="" >
</form>
<SCRIPT LANGUAGE="javascript">
</SCRIPT>
<div id="myLayer" style="position:absolute; width:185px; height:91px; z-index:9; left: 506px; top: 140px; background: url(img/pop_up.gif) no-repeat; border: 1px none #000000; visibility: hidden;">
<iframe id="myiframe" style="position: absolute; width: 179px; height: 88px; border: 1px none #000000; z-index: -1; filter:alpha(opacity=0); -moz-opacity:0">
</iframe>
<div id="Layer1" style="position:absolute; width:180px; height:45px; z-index:999; left: 2px; top: 28px;">
<table width="183" border="0">
<tr>
<td width="183">&nbsp;<font id="errmsg" class="notecontent" ></font></td>
</tr>
</table>
</div>
<div id="Layer3" style="position:absolute; width:140px; height:10px; z-index:11; left: 34px; top: 9px; font-size: 8pt;">
<font  class="note" id="errnote">&nbsp;错误信息</font>
</div>
</div>
<!--help部分开始-->
<div id="alertFram" align="center" style="position:absolute; width:314px; height:height:auto; z-index:999; left: 400px; top: 9px; font-size: 9pt;">
</div>
<!--help部分结束-->
<div class="container">
<!--head部分开始-->
<div class="head1">
<!--二级菜单开始-->
<div class="h2" id="menu0">
</div>
<!--二级菜单结束-->
<div style="height:14px;"></div>
<div class="shadow">
<ul>
<li><a class="s1" style="background:url(../img/left_bg.gif) repeat left top;"></a></li>
<li><a class="s2" style="background:url(../img/jiao_bg.gif) no-repeat left top;"></a></li>
<li><a class="s3" style="background:url(../img/up_bg.gif) repeat-x left top;"></a></li>
</ul>
</div>
</div>
<!--帮助按钮开始-->
<div class="help">
<ul>
<input name="help_info" type="button" class="help_button" value="帮助"/>
</ul>
</div>
<!--帮助按钮结束-->
<!--content部分开始-->
<div class="content text_content" style="background:url(../img/content_bg.gif) repeat-y left top;">
<!--三级菜单开始-->
<div class="h3_div" id="h3_menu">
</div>
<!--内容开始-->
<div class="div1">
<FORM NAME=fSubmit ID=fSubmit METHOD='POST' action=>
<INPUT type='hidden' name=IF_ACTION     ID=IF_ACTION value=''>
<script language=javascript>Transfer_meaning('IF_ACTION','');</script>
<INPUT type='hidden' name=IF_ERRORSTR     ID=IF_ERRORSTR value=''>
<script language=javascript>Transfer_meaning('IF_ERRORSTR','SUCC');</script>
<INPUT type='hidden' name=IF_ERRORPARAM     ID=IF_ERRORPARAM value=''>
<script language=javascript>Transfer_meaning('IF_ERRORPARAM','SUCC');</script>
<INPUT type='hidden' name=IF_ERRORTYPE     ID=IF_ERRORTYPE value=''>
<script language=javascript>Transfer_meaning('IF_ERRORTYPE','-1');</script>
<INPUT type='hidden' name=IF_INDEX     ID=IF_INDEX value=''>
<script language=javascript>Transfer_meaning('IF_INDEX','0');</script>
<INPUT type='hidden' name=IF_INSTNUM     ID=IF_INSTNUM value=''>
<script language=javascript>Transfer_meaning('IF_INSTNUM','');</script>
<INPUT type='hidden' name=IF_WANNAME0     ID=IF_WANNAME0 value=''>
<script language=javascript>Transfer_meaning('IF_WANNAME0','1_TR069_R_8_46');</script>
<INPUT type='hidden' name=IF_WANIDENTITY0     ID=IF_WANIDENTITY0 value=''>
<script language=javascript>Transfer_meaning('IF_WANIDENTITY0','IGD.WD1.WCD1.WCIP1');</script>
<INPUT type='hidden' name=IF_WANNAME1     ID=IF_WANNAME1 value=''>
<script language=javascript>Transfer_meaning('IF_WANNAME1','2_INTERNET_B_0_35');</script>
<INPUT type='hidden' name=IF_WANIDENTITY1     ID=IF_WANIDENTITY1 value=''>
<script language=javascript>Transfer_meaning('IF_WANIDENTITY1','IGD.WD1.WCD2.WCPPP1');</script>
<INPUT type='hidden' name=IF_WANNAME2     ID=IF_WANNAME2 value=''>
<script language=javascript>Transfer_meaning('IF_WANNAME2','3_Other_B_0_32');</script>
<INPUT type='hidden' name=IF_WANIDENTITY2     ID=IF_WANIDENTITY2 value=''>
<script language=javascript>Transfer_meaning('IF_WANIDENTITY2','IGD.WD1.WCD3.WCPPP1');</script>
<INPUT type='hidden' name=Enable0   ID=Enable0 value=''>
<script language=javascript>Transfer_meaning('Enable0','1');</script>
<INPUT type='hidden' name=WANCName0   ID=WANCName0 value=''>
<script language=javascript>Transfer_meaning('WANCName0','1_TR069_R_8_46');</script>
<INPUT type='hidden' name=ConnType0   ID=ConnType0 value=''>
<script language=javascript>Transfer_meaning('ConnType0','IP_Routed');</script>
<INPUT type='hidden' name=LANDViewName0   ID=LANDViewName0 value=''>
<script language=javascript>Transfer_meaning('LANDViewName0','');</script>
<INPUT type='hidden' name=StrServList0   ID=StrServList0 value=''>
<script language=javascript>Transfer_meaning('StrServList0','TR069');</script>
<INPUT type='hidden' name=ServList0   ID=ServList0 value=''>
<script language=javascript>Transfer_meaning('ServList0','2');</script>
<INPUT type='hidden' name=IsNAT0   ID=IsNAT0 value=''>
<script language=javascript>Transfer_meaning('IsNAT0','0');</script>
<INPUT type='hidden' name=IsDefGW0   ID=IsDefGW0 value=''>
<script language=javascript>Transfer_meaning('IsDefGW0','0');</script>
<INPUT type='hidden' name=IsForward0   ID=IsForward0 value=''>
<script language=javascript>Transfer_meaning('IsForward0','0');</script>
<INPUT type='hidden' name=VLANID0   ID=VLANID0 value=''>
<script language=javascript>Transfer_meaning('VLANID0','0');</script>
<INPUT type='hidden' name=Priority0   ID=Priority0 value=''>
<script language=javascript>Transfer_meaning('Priority0','0');</script>
<INPUT type='hidden' name=WBDMode0   ID=WBDMode0 value=''>
<script language=javascript>Transfer_meaning('WBDMode0','Transparent');</script>
<INPUT type='hidden' name=IPAddress0   ID=IPAddress0 value=''>
<script language=javascript>Transfer_meaning('IPAddress0','0.0.0.0');</script>
<INPUT type='hidden' name=SubnetMask0   ID=SubnetMask0 value=''>
<script language=javascript>Transfer_meaning('SubnetMask0','255.255.255.255');</script>
<INPUT type='hidden' name=GateWay0   ID=GateWay0 value=''>
<script language=javascript>Transfer_meaning('GateWay0','0.0.0.0');</script>
<INPUT type='hidden' name=DNS10   ID=DNS10 value=''>
<script language=javascript>Transfer_meaning('DNS10','0.0.0.0');</script>
<INPUT type='hidden' name=DNS20   ID=DNS20 value=''>
<script language=javascript>Transfer_meaning('DNS20','0.0.0.0');</script>
<INPUT type='hidden' name=DNS30   ID=DNS30 value=''>
<script language=javascript>Transfer_meaning('DNS30','0.0.0.0');</script>
<INPUT type='hidden' name=WorkIFMac0   ID=WorkIFMac0 value=''>
<script language=javascript>Transfer_meaning('WorkIFMac0','00:25:12:a9:04:43');</script>
<INPUT type='hidden' name=UpTime0   ID=UpTime0 value=''>
<script language=javascript>Transfer_meaning('UpTime0','0');</script>
<INPUT type='hidden' name=RemainLeaseTime0   ID=RemainLeaseTime0 value=''>
<script language=javascript>Transfer_meaning('RemainLeaseTime0','0');</script>
<INPUT type='hidden' name=ConnStatus0   ID=ConnStatus0 value=''>
<script language=javascript>Transfer_meaning('ConnStatus0','Connecting');</script>
<INPUT type='hidden' name=Addressingtype0   ID=Addressingtype0 value=''>
<script language=javascript>Transfer_meaning('Addressingtype0','DHCP');</script>
<INPUT type='hidden' name=DestAddress0   ID=DestAddress0 value=''>
<script language=javascript>Transfer_meaning('DestAddress0','8/46');</script>
<INPUT type='hidden' name=VcSearchEnable0   ID=VcSearchEnable0 value=''>
<script language=javascript>Transfer_meaning('VcSearchEnable0','');</script>
<INPUT type='hidden' name=VcSearchList0   ID=VcSearchList0 value=''>
<script language=javascript>Transfer_meaning('VcSearchList0','');</script>
<INPUT type='hidden' name=ATMLinkType0   ID=ATMLinkType0 value=''>
<script language=javascript>Transfer_meaning('ATMLinkType0','EoA');</script>
<INPUT type='hidden' name=ATMEncapsulation0   ID=ATMEncapsulation0 value=''>
<script language=javascript>Transfer_meaning('ATMEncapsulation0','LLC');</script>
<INPUT type='hidden' name=ATMQoS0   ID=ATMQoS0 value=''>
<script language=javascript>Transfer_meaning('ATMQoS0','UBR');</script>
<INPUT type='hidden' name=ATMPeakCellRate0   ID=ATMPeakCellRate0 value=''>
<script language=javascript>Transfer_meaning('ATMPeakCellRate0','0');</script>
<INPUT type='hidden' name=ATMMaxBurstSize0   ID=ATMMaxBurstSize0 value=''>
<script language=javascript>Transfer_meaning('ATMMaxBurstSize0','0');</script>
<INPUT type='hidden' name=ATMMinCellRate0   ID=ATMMinCellRate0 value=''>
<script language=javascript>Transfer_meaning('ATMMinCellRate0','0');</script>
<INPUT type='hidden' name=ATMSCR0   ID=ATMSCR0 value=''>
<script language=javascript>Transfer_meaning('ATMSCR0','0');</script>
<INPUT type='hidden' name=ATMCDV0   ID=ATMCDV0 value=''>
<script language=javascript>Transfer_meaning('ATMCDV0','0');</script>
<INPUT type='hidden' name=RxPackets0   ID=RxPackets0 value=''>
<script language=javascript>Transfer_meaning('RxPackets0','0');</script>
<INPUT type='hidden' name=TxPackets0   ID=TxPackets0 value=''>
<script language=javascript>Transfer_meaning('TxPackets0','18');</script>
<INPUT type='hidden' name=RxBytes0   ID=RxBytes0 value=''>
<script language=javascript>Transfer_meaning('RxBytes0','0');</script>
<INPUT type='hidden' name=TxBytes0   ID=TxBytes0 value=''>
<script language=javascript>Transfer_meaning('TxBytes0','10620');</script>
<INPUT type='hidden' name=DSCP0   ID=DSCP0 value=''>
<script language=javascript>Transfer_meaning('DSCP0','-1');</script>
<INPUT type='hidden' name=MTU0   ID=MTU0 value=''>
<script language=javascript>Transfer_meaning('MTU0','1400');</script>
<INPUT type='hidden' name=bitBind0   ID=bitBind0 value=''>
<script language=javascript>Transfer_meaning('bitBind0','00000000');</script>
<INPUT type='hidden' name=dhcpEnable0   ID=dhcpEnable0 value=''>
<script language=javascript>Transfer_meaning('dhcpEnable0','1');</script>
<INPUT type='hidden' name=IPMode0   ID=IPMode0 value=''>
<script language=javascript>Transfer_meaning('IPMode0','0');</script>
<INPUT type='hidden' name=GUASrc0   ID=GUASrc0 value=''>
<script language=javascript>Transfer_meaning('GUASrc0','None');</script>
<INPUT type='hidden' name=DNSv6Src0   ID=DNSv6Src0 value=''>
<script language=javascript>Transfer_meaning('DNSv6Src0','None');</script>
<INPUT type='hidden' name=Gatewayv6Src0   ID=Gatewayv6Src0 value=''>
<script language=javascript>Transfer_meaning('Gatewayv6Src0','None');</script>
<INPUT type='hidden' name=MTUv6Src0   ID=MTUv6Src0 value=''>
<script language=javascript>Transfer_meaning('MTUv6Src0','None');</script>
<INPUT type='hidden' name=IsPD0   ID=IsPD0 value=''>
<script language=javascript>Transfer_meaning('IsPD0','1');</script>
<INPUT type='hidden' name=GUA10   ID=GUA10 value=''>
<script language=javascript>Transfer_meaning('GUA10','::');</script>
<INPUT type='hidden' name=IsOutPreferredLft10   ID=IsOutPreferredLft10 value=''>
<script language=javascript>Transfer_meaning('IsOutPreferredLft10','0');</script>
<INPUT type='hidden' name=GUA20   ID=GUA20 value=''>
<script language=javascript>Transfer_meaning('GUA20','::');</script>
<INPUT type='hidden' name=IsOutPreferredLft20   ID=IsOutPreferredLft20 value=''>
<script language=javascript>Transfer_meaning('IsOutPreferredLft20','0');</script>
<INPUT type='hidden' name=GUA30   ID=GUA30 value=''>
<script language=javascript>Transfer_meaning('GUA30','::');</script>
<INPUT type='hidden' name=IsOutPreferredLft30   ID=IsOutPreferredLft30 value=''>
<script language=javascript>Transfer_meaning('IsOutPreferredLft30','0');</script>
<INPUT type='hidden' name=Gatewayv60   ID=Gatewayv60 value=''>
<script language=javascript>Transfer_meaning('Gatewayv60','::');</script>
<INPUT type='hidden' name=DNS1v60   ID=DNS1v60 value=''>
<script language=javascript>Transfer_meaning('DNS1v60','::');</script>
<INPUT type='hidden' name=DNS2v60   ID=DNS2v60 value=''>
<script language=javascript>Transfer_meaning('DNS2v60','::');</script>
<INPUT type='hidden' name=DNS3v60   ID=DNS3v60 value=''>
<script language=javascript>Transfer_meaning('DNS3v60','::');</script>
<INPUT type='hidden' name=MTUv60   ID=MTUv60 value=''>
<script language=javascript>Transfer_meaning('MTUv60','0');</script>
<script language=javascript>Transfer_meaning('IF_ERRORSTR','SUCC');</script>
<script language=javascript>Transfer_meaning('IF_ERRORPARAM','SUCC');</script>
<script language=javascript>Transfer_meaning('IF_ERRORTYPE','-1');</script>
<INPUT type='hidden' name=IF_PVC0     ID=IF_PVC0 value=''>
<script language=javascript>Transfer_meaning('IF_PVC0','8/46');</script>
<INPUT type='hidden' name=IF_TYPE0     ID=IF_TYPE0 value=''>
<script language=javascript>Transfer_meaning('IF_TYPE0','EoA');</script>
<INPUT type='hidden' name=IF_PVC1     ID=IF_PVC1 value=''>
<script language=javascript>Transfer_meaning('IF_PVC1','0/35');</script>
<INPUT type='hidden' name=IF_TYPE1     ID=IF_TYPE1 value=''>
<script language=javascript>Transfer_meaning('IF_TYPE1','EoA');</script>
<INPUT type='hidden' name=IF_PVC2     ID=IF_PVC2 value=''>
<script language=javascript>Transfer_meaning('IF_PVC2','0/32');</script>
<INPUT type='hidden' name=IF_TYPE2     ID=IF_TYPE2 value=''>
<script language=javascript>Transfer_meaning('IF_TYPE2','EoA');</script>
<INPUT type='hidden' name=IPMode0     ID=IPMode0 value=''>
<script language=javascript>Transfer_meaning('IPMode0','ipv4');</script>
<INPUT type='hidden' name=IPMode1     ID=IPMode1 value=''>
<script language=javascript>Transfer_meaning('IPMode1','ipv4');</script>
<INPUT type='hidden' name=IPMode2     ID=IPMode2 value=''>
<script language=javascript>Transfer_meaning('IPMode2','ipv4');</script>
<INPUT type='hidden' name=IF_STATUS     ID=IF_STATUS value=''>
<script language=javascript>Transfer_meaning('IF_STATUS','Up');</script>
<INPUT type='hidden' name=IF_PVCNUM     ID=IF_PVCNUM value=''>
<script language=javascript>Transfer_meaning('IF_PVCNUM','3');</script>
<INPUT type='hidden' name=IF_MULTIDISPLAY     ID=IF_MULTIDISPLAY value=''>
<script language=javascript>Transfer_meaning('IF_MULTIDISPLAY','0');</script>
<INPUT type='hidden' name=IF_TYPE     ID=IF_TYPE value=''>
<script language=javascript>Transfer_meaning('IF_TYPE','DHCP');</script>
<INPUT type='hidden' name=IF_NAME     ID=IF_NAME value=''>
<script language=javascript>Transfer_meaning('IF_NAME','');</script>
<INPUT type='hidden' name=IF_MODE     ID=IF_MODE value=''>
<script language=javascript>Transfer_meaning('IF_MODE','');</script>
<INPUT type='hidden' name=IF_IDLE     ID=IF_IDLE value=''>
<script language=javascript>Transfer_meaning('IF_IDLE','');</script>
<script language=javascript>Transfer_meaning('IF_INSTNUM','3');</script>
</FORM>
<script language="javascript">var PPP_PARA=new Array("Enable","WANCName","ConnType","LANDViewName","StrServList","ServList","IsNAT","IsDefGW","IsForward","VLANID","Priority","WBDMode","IPAddress","SubnetMask","GateWay","DNS1","DNS2","DNS3","WorkIFMac","UpTime","ConnStatus","UserName","Password","VcSearchEnable","VcSearchList","MRU","MTU","ConnTrigger","TransType","AuthType","IdleTime","ConnError","DestAddress","ATMLinkType","ATMEncapsulation","ATMQoS","ATMPeakCellRate","ATMMaxBurstSize","ATMMinCellRate","ATMSCR","ATMCDV","RxPackets","TxPackets","RxBytes","TxBytes","EnableProxy","MaxUser","DSCP","EnablePassThrough","ValidWANRx","ValidLANTx","HostTrigger","bitBind","dhcpEnable","IPMode","GUASrc","DNSv6Src","Gatewayv6Src","MTUv6Src","IsPD","GUA1","IsOutPreferredLft1","GUA2","IsOutPreferredLft2","GUA3","IsOutPreferredLft3","Gatewayv6","DNS1v6","DNS2v6","DNS3v6","MTUv6");var IP_PARA=new Array("Enable","WANCName","ConnType","LANDViewName","StrServList","ServList","IsNAT","IsDefGW","IsForward","VLANID","Priority","WBDMode","IPAddress","SubnetMask","GateWay","DNS1","DNS2","DNS3","WorkIFMac","UpTime","RemainLeaseTime","ConnStatus","Addressingtype","DestAddress","VcSearchEnable","VcSearchList","ATMLinkType","ATMEncapsulation","ATMQoS","ATMPeakCellRate","ATMMaxBurstSize","ATMMinCellRate","ATMSCR","ATMCDV","RxPackets","TxPackets","RxBytes","TxBytes","DSCP","MTU","bitBind","dhcpEnable","IPMode","GUASrc","DNSv6Src","Gatewayv6Src","MTUv6Src","IsPD","GUA1","IsOutPreferredLft1","GUA2","IsOutPreferredLft2","GUA3","IsOutPreferredLft3","Gatewayv6","DNS1v6","DNS2v6","DNS3v6","MTUv6");var BRIDGE_PARA=new Array("Enable","WANCName","StrServList","ServList","VLANID","Priority","WBDMode","LANDViewName","DestAddress","VcSearchEnable","VcSearchList","ATMLinkType","ATMEncapsulation","ATMQoS","ATMPeakCellRate","ATMMaxBurstSize","ATMMinCellRate","ATMSCR","ATMCDV","RxPackets","TxPackets","RxBytes","TxBytes","DSCP","bitBind","dhcpEnable");var SERVICELIST_PARA=new Array("nouse","INTERNET","TR069","TR069,INTERNET","VOIP","VOIP,INTERNET","TR069,VOIP","TR069,VOIP,INTERNET","Other");var Tr069WebConfigEnable=1;function pageLoad(url){getObj("fSubmit").action=url;var errstr=getValue("IF_ERRORSTR");var errpara=getValue("IF_ERRORPARAM");OldProcessRet(errstr,errpara);moveErrLayer(590,110);pageGetValue();}function refresh(){var link=getValue("Frm_WANCName0");var obj=getObj("Frm_WANCName0");var name=obj.options[obj.selectedIndex].text;setValue("IF_NAME",name);setValue("IF_ACTION","wanctype");setValue("IF_INDEX",link);setValue("IF_MULTIDISPLAY","0");getObj("fSubmit").submit();}function pageGetValue(){var pwdStr="";var err="N";if(err=="Y"){var msg=getmsg(166);ShowErrorForCom(null,null,msg);}var key=getValue("IF_INDEX");var wan_type=getValue("IF_TYPE");if(wan_type==""||wan_type=="NULL"){wan_type="PPPoE";}switch(wan_type){case "PPPoE":{setValue("Frm_protocol","IPv4");jslDiDisplay("TABLE_static","TABLE_dhcp","IPv6_mode","TABLE_ipv6");jslEnDisplay("TABLE_pppoe","TR_VLANID","TR_PRO","TR_WBDMode","IPv4_mode");jslEnDisplay("TR_DHCPEnable","TR_MTU","TR_nat");setValue("Frm_UserName","");setValue("Frm_Password","");jslEnDisplay("TR_UserName","TR_Password","TR_AuthType");setValue("Frm_mode","PPPoE");break;}case "Static":{setValue("Frm_protocol","IPv4");jslDiDisplay("TABLE_pppoe","TABLE_dhcp","IPv6_mode","TABLE_ipv6");jslEnDisplay("TABLE_static","TR_VLANID","TR_PRO","TR_WBDMode","TR_MTU","IPv4_mode");jslEnDisplay("TR_DHCPEnable","TR_nat");jslDiDisplay("TR_UserName","TR_Password","TR_AuthType");setValue("Frm_mode","Static");break;}case "DHCP":{setValue("Frm_protocol","IPv4");jslDiDisplay("TABLE_pppoe","TABLE_static","IPv6_mode","TABLE_ipv6");jslEnDisplay("TABLE_dhcp","TR_VLANID","TR_PRO","TR_WBDMode","TR_MTU","IPv4_mode");jslEnDisplay("TR_DHCPEnable","TR_nat");jslDiDisplay("TR_UserName","TR_Password","TR_AuthType");setValue("Frm_mode","DHCP");break;}case "BRIDGE":{setValue("Frm_protocol","IPv4");jslDiDisplay("TABLE_pppoe","TABLE_static","TABLE_dhcp","TR_MTU","IPv6_mode","TABLE_ipv6","TR_nat","TR_MTU");jslEnDisplay("TR_VLANID","TR_WBDMode","IPv4_mode");jslEnDisplay("TR_DHCPEnable");jslDiDisplay("TR_UserName","TR_Password","TR_AuthType");setValue("Frm_mode","BRIDGE");break;}case "PPP":{setValue("Frm_protocol","IPv6");jslEnDisplay("TABLE_ipv6","IPv6_mode");jslDiDisplay("IPv4_mode","TR_nat","TR_DHCPEnable","TR_MTU");jslDiDisplay("TABLE_pppoe","TABLE_static","TABLE_dhcp");setValue("Frm_UserName","");setValue("Frm_Password","");jslEnDisplay("TR_UserName","TR_Password","TR_AuthType");setValue("Frm_IPv6mode","PPP");break;}case "IP":{setValue("Frm_protocol","IPv6");jslEnDisplay("TABLE_ipv6","IPv6_mode");jslDiDisplay("IPv4_mode","TR_nat","TR_DHCPEnable","TR_MTU");jslDiDisplay("TABLE_pppoe","TABLE_static","TABLE_dhcp");jslDiDisplay("TR_UserName","TR_Password","TR_AuthType");setValue("Frm_IPv6mode","IP");break;}case "PPP_both":{setValue("Frm_protocol","IPv4/v6");jslEnDisplay("TABLE_ipv6","IPv6_mode","TR_nat","TR_DHCPEnable","TR_MTU","TABLE_pppoe");jslDiDisplay("TABLE_static","TABLE_dhcp","IPv4_mode","TR_EnableProxy","TR_MaxUser","TR_ConnTrigger","TR_IdleTime");setValue("Frm_UserName","");setValue("Frm_Password","");jslEnDisplay("TR_UserName","TR_Password","TR_AuthType");setValue("Frm_IPv6mode","PPP");break;}case "IP_both":{setValue("Frm_protocol","IPv4/v6");setValue("Frm_IPv6mode","IP");jslEnDisplay("TABLE_ipv6","IPv6_mode","TR_nat","TR_DHCPEnable","TR_MTU");jslDiDisplay("IPv4_mode","TABLE_dhcp");jslDiDisplay("TABLE_pppoe","TABLE_static");jslDiDisplay("TR_UserName","TR_Password","TR_AuthType");setValue("Frm_IPv6mode","IP");break;}default:break;}jslEnDisplay("TR_ATMEncapsulation");var protolmodify=getValue("Frm_protocol");var serclist_tag=0;var wannameobj=getObj("Frm_WANCName0");var wanservlistobj=getObj("Frm_ServList");var tem;var identity;var WANNAME;var wan_namenum;wan_namenum=getValue("IF_INSTNUM");var j=0;var k=0;var q=0;for(var i=0;i<wan_namenum;i++){identity=getValue("IF_WANIDENTITY"+i);WANNAME=getValue("IF_WANNAME"+i);tem=WANNAME.lastIndexOf("TR069");if(tem!=-1){serclist_tag=1;}var ipmode=getValue("IPMode"+i);if(protolmodify=="IPv4"&&ipmode=="ipv4"){wannameobj.options[j+1]=new Option(WANNAME,i);j++;}if(protolmodify=="IPv6"&&ipmode=="ipv6"){wannameobj.options[k+1]=new Option(WANNAME,i);k++;}if(protolmodify=="IPv4/v6"&&ipmode=="ipv4/v6"){wannameobj.options[q+1]=new Option(WANNAME,i);q++;}}var pvcobj=getObj("Frm_DestAddress0");var pvcnum=getValue("IF_PVCNUM");var j=0;for(var i=0;i<pvcnum;i++){var pvc=getValue("IF_PVC"+i);var type=getValue("IF_TYPE"+i);pvcobj.options[j+1]=new Option(pvc,pvc);j++;}if(key=="-1"){jslDiDisplay("Btn_DoEdit","Btn_Delete","TABLE_dhcp");jslEnDisplay("Btn_Add","Btn_Cancel");setValue("Frm_IdleTime","1200");setValue("Frm_MTU","1400");setChecked("Frm_IsNAT",true);setChecked("Frm_IsDefGW",false);setChecked("Frm_EnableProxy",false);jslDisable("Frm_MaxUser");if(serclist_tag==0&&wan_type!="BRIDGE"){wanservlistobj.options[0]=new Option("TR069",2);wanservlistobj.options[1]=new Option("INTERNET",1);wanservlistobj.options[2]=new Option("TR069_INTERNET",3);wanservlistobj.options[3]=new Option("Other",8);}else {wanservlistobj.options[0]=new Option("INTERNET",1);wanservlistobj.options[1]=new Option("Other",8);}Change_WBDMode();Select_ServList();Change_GUASrc();Change_Gatewayv6Src();Change_DNSv6Src();setChecked("Frm_IsPD",false);}else {jslDiDisplay("Btn_Add","Btn_Cancel");jslEnDisplay("Btn_DoEdit","Btn_Delete");wanservlistobj.options[0]=new Option("TR069",2);wanservlistobj.options[1]=new Option("INTERNET",1);wanservlistobj.options[2]=new Option("TR069_INTERNET",3);wanservlistobj.options[3]=new Option("Other",8);wan_namenum=getValue("IF_INSTNUM");for(var i=0;i<wan_namenum;i++){identity=getValue("IF_WANIDENTITY"+i);WANNAME=getValue("IF_WANNAME"+i);if(WANNAME==getValue("WANCName"+key)){setValue("Frm_WANCName0",i);}}var bitBind =getValue("bitBind"+key);var tem;for(var i=1;i<9;i++){tem=bitBind.substring(i-1,i);if("1"==tem){setChecked("Frm_bitBind"+i,true);}else {setChecked("Frm_bitBind"+i,false);}}jslSetValue("Frm_ServList","ServList"+key);jslDisable("Frm_DHCPEnable");var dhcpEnable=getValue("dhcpEnable"+key);if(dhcpEnable=="1"){setChecked("Frm_DHCPEnable",true);}else {setChecked("Frm_DHCPEnable",false);}var mode=getValue("Frm_mode");if(protolmodify!="IPv6"&&mode!="BRIDGE"){jslSetValue("Frm_MTU","MTU"+key);}jslSetValue("Frm_DestAddress0","DestAddress"+key);jslSetValue("Frm_DestAddress1","DestAddress"+key);jslDisable("Frm_DestAddress1");var ServList=getObj("Frm_ServList");if(mode!="BRIDGE"&&ServList!="2"){if(getValue("IsNAT"+key)==1){setChecked("Frm_IsNAT",true);}else {setChecked("Frm_IsNAT",false);}if(ServList=="8"){if(getValue("IsDefGW"+key)==1){setChecked("Frm_IsDefGW",true);}else {setChecked("Frm_IsDefGW",false);}}}if(getValue("WBDMode"+key)=="Tag_Drop"){setChecked("Frm_WBDMode",true);jslSetValue("Frm_VLANID","VLANID"+key);jslSetValue("Frm_Priority","Priority"+key);}else {setChecked("Frm_WBDMode",false);setValue("Frm_VLANID","");setValue("Frm_Priority","0");}jslSetValue("Frm_ATMEncapsulation","ATMEncapsulation"+key);jslSetValue("Frm_ATMQoS","ATMQoS"+key);var atm=getValue("Frm_ATMQoS");ATMQoS();if(atm=="UBR"){}else if(atm=="CBR"){jslSetValue("Frm_ATMPeakCellRate","ATMPeakCellRate"+key);}else if(atm=="VBR-nrt"||atm=="VBR-rt"){jslSetValue("Frm_ATMPeakCellRate","ATMPeakCellRate"+key);jslSetValue("Frm_ATMSCR","ATMSCR"+key);jslSetValue("Frm_ATMMaxBurstSize","ATMMaxBurstSize"+key);}switch(wan_type){case "PPPoE":{jslSetValue("Frm_UserName","UserName"+key);if(getValue("Password"+key)=="AA=="){pwdStr="";}else {pwdStr=decode64(getValue("Password"+key));}document.getElementById("Frm_Password").value=pwdStr;jslSetValue("Frm_EnableProxy","EnableProxy"+key);jslSetValue("Frm_MaxUser","MaxUser"+key);if(getValue("EnableProxy"+key)==1){setChecked("Frm_EnableProxy",true);jslEnable("Frm_MaxUser");}else if(getValue("EnableProxy"+key)==0){setChecked("Frm_EnableProxy",false);jslDisable("Frm_MaxUser");}jslSetValue("Frm_AuthType","AuthType"+key);jslSetValue("Frm_ConnTrigger","ConnTrigger"+key);jslSetValue("Frm_IdleTime","IdleTime"+key);ConnTrigger();jslDisable("Frm_EnableProxy","Frm_MaxUser","Frm_AuthType","Frm_ConnTrigger","Frm_IdleTime");PPPoEPageAttrInfo();break;}case "Static":{jslSetValue("Frm_IPAddress","IPAddress"+key);jslSetValue("Frm_SubnetMask","SubnetMask"+key);jslSetValue("Frm_GateWay","GateWay"+key);if(getValue("DNS1"+key)!="0.0.0.0"){jslSetValue("Frm_DNS1","DNS1"+key);}else {setValue("Frm_DNS1","");}if(getValue("DNS2"+key)!="0.0.0.0"){jslSetValue("Frm_DNS2","DNS2"+key);}else {setValue("Frm_DNS2","");}if(getValue("DNS3"+key)!="0.0.0.0"){jslSetValue("Frm_DNS3","DNS3"+key);}else {setValue("Frm_DNS3","");}jslDisable("Frm_IPAddress","Frm_SubnetMask","Frm_GateWay","Frm_DNS1","Frm_DNS2","Frm_DNS3","Btn_DoEdit");break;}case "DHCP":{var status=getValue("IF_STATUS");if(status=="Up"){var tem=getValue("IF_IDLE");if(tem=="dhcprelease"||tem=="dhcprenew"||tem=="edit"){setValue("IF_IDLE","");disableAllbutton();setTimeout("refresh()",2000);}else {if(getValue("ConnStatus"+key)=="Disconnected"||getValue("ConnStatus"+key)=="Connecting"){jslEnable("Btn_Renew");jslDisable("Btn_Release");}else {jslEnable("Btn_Renew");jslEnable("Btn_Release");}}}else {jslDisable("Btn_Renew");jslDisable("Btn_Release");}jslDisable("Btn_DoEdit");break;}case "BRIDGE":{jslDisable("Btn_DoEdit");break;}case "PPP":{jslSetValue("Frm_UserName","UserName"+key);if(getValue("Password"+key)=="AA=="){pwdStr="";}else {pwdStr=decode64(getValue("Password"+key));}document.getElementById("Frm_Password").value=pwdStr;jslSetValue("Frm_AuthType","AuthType"+key);break;}case "IP":{jslDisable("Btn_DoEdit");break;}case "PPP_both":{jslSetValue("Frm_UserName","UserName"+key);if(getValue("Password"+key)=="AA=="){pwdStr="";}else {pwdStr=decode64(getValue("Password"+key));}document.getElementById("Frm_Password").value=pwdStr;jslSetValue("Frm_EnableProxy","EnableProxy"+key);jslSetValue("Frm_MaxUser","MaxUser"+key);if(getValue("EnableProxy"+key)==1){setChecked("Frm_EnableProxy",true);jslEnable("Frm_MaxUser");}else if(getValue("EnableProxy"+key)==0){setChecked("Frm_EnableProxy",false);jslDisable("Frm_MaxUser");}jslSetValue("Frm_AuthType","AuthType"+key);jslDisable("Frm_EnableProxy","Frm_MaxUser","Frm_AuthType");break;}case "IP_both":{var status=getValue("IF_STATUS");if(status=="Up"){var tem=getValue("IF_IDLE");if(tem=="dhcprelease"||tem=="dhcprenew"||tem=="edit"){setValue("IF_IDLE","");disableAllbutton();setTimeout("refresh()",2000);}else {if(getValue("ConnStatus"+key)=="Disconnected"||getValue("ConnStatus"+key)=="Connecting"){jslEnable("Btn_Renew");jslDisable("Btn_Release");}else {jslEnable("Btn_Renew");jslEnable("Btn_Release");}}}else {jslDisable("Btn_Renew");jslDisable("Btn_Release");}jslDisable("Btn_DoEdit");break;}default:break;}if(protolmodify!="IPv4"){jslSetValue("Frm_GUASrc","GUASrc"+key);jslSetValue("Frm_GUA1","GUA1"+key);Change_GUASrc();jslSetValue("Frm_Gatewayv6Src","Gatewayv6Src"+key);jslSetValue("Frm_Gatewayv6","Gatewayv6"+key);Change_Gatewayv6Src();jslSetValue("Frm_DNSv6Src","DNSv6Src"+key);jslSetValue("Frm_DNS1v6","DNS1v6"+key);jslSetValue("Frm_DNS2v6","DNS2v6"+key);jslSetValue("Frm_DNS3v6","DNS3v6"+key);Change_DNSv6Src();if(getValue("IsPD"+key)=="1"){setChecked("Frm_IsPD",true);}else {setChecked("Frm_IsPD",false);}jslDisable("Frm_GUASrc","Frm_GUA1","Frm_Gatewayv6Src","Frm_Gatewayv6","Frm_DNSv6Src","Frm_DNS1v6","Frm_DNS2v6","Frm_DNS3v6","Frm_IsPD");}Change_WBDMode();Select_ServList();jslDisable("Frm_bitBind1","Frm_bitBind2","Frm_bitBind3","Frm_bitBind4","Frm_bitBind5","Frm_bitBind6","Frm_bitBind7","Frm_bitBind8","Frm_IsNAT","Frm_IsDefGW","Frm_ServList","Frm_WBDMode","Frm_VLANID","Frm_Priority","Frm_DestAddress0","Frm_DestAddress1","Frm_ATMEncapsulation","Frm_ATMQoS","Frm_ATMPeakCellRate","Frm_ATMSCR","Frm_ATMMaxBurstSize","Frm_MTU");jslDisable("Frm_AuthType","Frm_mode","Frm_protocol");if(protolmodify!="IPv4")jslDisable("Frm_IPv6mode");}return;}function PPPoEPageAttrInfo(){var key=getValue("IF_INDEX");var usernameattr=getValue("IF_UsernameATTR"+key);if(usernameattr=="3"){jslDisable("Frm_UserName");}else {jslEnable("Frm_UserName");}var passwordattr=getValue("IF_PasswordATTR"+key);if(passwordattr=="3"){jslDisable("Frm_Password");}else {jslEnable("Frm_Password");}}function Change_mode(){var mode=getValue("Frm_mode");setValue("IF_NAME","新建WAN连接");if(mode=="PPPoE"){setValue("IF_TYPE","PPPoE");disableAllbutton();getObj("fSubmit").submit();}else if(mode=="Static"){setValue("IF_TYPE","Static");disableAllbutton();getObj("fSubmit").submit();}else if(mode=="DHCP"){setValue("IF_TYPE","DHCP");disableAllbutton();getObj("fSubmit").submit();}else if(mode=="BRIDGE"){setValue("IF_TYPE","BRIDGE");disableAllbutton();getObj("fSubmit").submit();}}function Change_Link(){var link=getValue("Frm_WANCName0");var proto=getValue("Frm_protocol");var modev4=getValue("Frm_mode");var modev6=getValue("Frm_IPv6mode");if(link=="-1"){if(proto=="IPv4")setValue("IF_TYPE","PPPoE");else if(proto=="IPv6")setValue("IF_TYPE","PPP");else if(proto=="IPv4/v6")setValue("IF_TYPE","PPP_both");setValue("IF_INDEX","-1");setValue("IF_ACTION","");setValue("IF_MULTIDISPLAY","-1");setValue("IF_NAME","新建WAN连接");disableAllbutton();getObj("fSubmit").submit();}else {var obj=getObj("Frm_WANCName0");var name=obj.options[obj.selectedIndex].text;setValue("IF_NAME",name);setValue("IF_ACTION","wanctype");setValue("IF_INDEX",link);setValue("IF_MULTIDISPLAY","0");if(proto=="IPv4"){setValue("IF_TYPE",modev4);}else if(proto=="IPv6"){setValue("IF_TYPE",modev6);}else if(proto=="IPv4/v6"){if(modev6=="PPP")setValue("IF_TYPE","PPP_both");if(modev6=="IP")setValue("IF_TYPE","IP_both");}disableAllbutton();getObj("fSubmit").submit();}}function Change_type(){ATMQoS();}function Change_Protocol(){var protocol=getValue("Frm_protocol");if(protocol=="IPv4"){setValue("IF_TYPE","PPPoE");setValue("IF_INDEX",-1);disableAllbutton();getObj("fSubmit").submit();}else if(protocol=="IPv6"){setValue("IF_TYPE","PPP");setValue("IF_INDEX",-1);disableAllbutton();getObj("fSubmit").submit();}else if(protocol=="IPv4/v6"){setValue("IF_TYPE","PPP_both");setValue("IF_INDEX",-1);disableAllbutton();getObj("fSubmit").submit();}}function Change_IPv6mode(){var IPv6mode=getValue("Frm_IPv6mode");var proto=getValue("Frm_protocol");if(proto=="IPv4/v6"){if(IPv6mode=="PPP")setValue("IF_TYPE","PPP_both");else if(IPv6mode=="IP")setValue("IF_TYPE","IP_both");}if(proto=="IPv6")setValue("IF_TYPE",IPv6mode);disableAllbutton();getObj("fSubmit").submit();}function ATMQoS(){var type=getValue("Frm_ATMQoS");switch(type){case "UBR":{jslDiDisplay("TR_pcr","TR_scr","TR_mbs");break;}case "CBR":{jslDiDisplay("TR_scr","TR_mbs");jslEnDisplay("TR_pcr");break;}case "VBR-nrt":{jslEnDisplay("TR_pcr","TR_scr","TR_mbs");break;}case "VBR-rt":{jslEnDisplay("TR_pcr","TR_scr","TR_mbs");break;}default:break;}return;}function change_enable(){if(getValue("Frm_DestAddress0")=="new"){setValue("Frm_DestAddress1","");jslEnable("Frm_DestAddress1");}else {jslSetValue("Frm_DestAddress1","Frm_DestAddress0");jslDisable("Frm_DestAddress1");}}function Change_WBDMode(){if(getChecked("Frm_WBDMode")==true){jslEnable("Frm_VLANID","Frm_Priority");}else {jslDisable("Frm_VLANID","Frm_Priority");}}function Change_Dialup(){ConnTrigger();}function ConnTrigger(){var dailup=getValue("Frm_ConnTrigger");switch(dailup){case "AlwaysOn":{jslDisable("Frm_IdleTime");jslDiDisplay("TR_connect");break;}case "OnDemand":{jslEnable("Frm_IdleTime");jslDiDisplay("TR_connect");break;}case "Manual":{var tem=getValue("IF_IDLE");if(tem=="pppconnect"||tem=="pppdisconnect"||tem=="edit"){setValue("IF_IDLE","");disableAllbutton();setTimeout("refresh()",2000);}else {var pppoename;var pppoeobject;var status=getValue("IF_STATUS");if(status=="Up"){var pppnum=getValue("IF_PPPNUM");for(var i=0;i<pppnum;i++){var PPP_WANCName=getValue("IF_CONNNAME"+i);var PPP_ConnStatus=getValue("IF_CONNSTATUS"+i);pppoeobject=getObj("Frm_WANCName0");pppoename=pppoeobject.options[pppoeobject.selectedIndex].text;if(PPP_WANCName==pppoename){if(PPP_ConnStatus=="true"){jslDisable("Btn_Connect");jslEnable("Btn_Disconnect");}else {jslDisable("Btn_Disconnect");jslEnable("Btn_Connect");}}}}else {jslDisable("Btn_Disconnect");jslDisable("Btn_Connect");}}jslDisable("Frm_IdleTime");jslEnDisplay("TR_connect");break;}default:break;}var key=getValue("IF_INDEX");if(key==-1||getValue("ConnTrigger"+key)!="Manual"){jslDiDisplay("TR_connect");}}function Change_EnableProxy(){if(getChecked("Frm_EnableProxy")==true){jslEnable("Frm_MaxUser");}else if(getChecked("Frm_EnableProxy")==false){jslDisable("Frm_MaxUser");}}function clearBitBind(){for(var i=1;i<9;i++){setChecked("Frm_bitBind"+i,false);}}function Select_ServList(){var ServList=getValue("Frm_ServList");var mode=getValue("Frm_mode");var modev6=getValue("Frm_IPv6mode");var protol=getValue("Frm_protocol");var key=getValue("IF_INDEX");if("-1"!=key){if((getValue("ServList"+key))==2&&Tr069WebConfigEnable==1){jslDisable("Btn_Delete","Btn_DoEdit");if(mode=="PPPoE"){jslDisable("Frm_UserName","Frm_Password");}}if((getValue("ServList"+key))==3&&Tr069WebConfigEnable==1){jslDisable("Btn_Delete","Btn_DoEdit");if(mode=="PPPoE"){jslDisable("Frm_UserName","Frm_Password");}}var hiddenServList=getValue("ServList"+key);if(mode!="BRIDGE"&&ServList!="2"&&protol!="IPv6"){jslEnDisplay("TR_nat");if(getValue("IsNAT"+key)==1){setChecked("Frm_IsNAT",true);}else {setChecked("Frm_IsNAT",false);}}else {jslDiDisplay("TR_nat");}if(ServList=="8"&&mode!="BRIDGE"){jslEnDisplay("TR_IsDefGW");if(getValue("IsDefGW"+key)==1){setChecked("Frm_IsDefGW",true);}else {setChecked("Frm_IsDefGW",false);}}else {jslDiDisplay("TR_IsDefGW");}}else {if(mode!=="BRIDGE"&&"2"!=ServList&&protol!="IPv6"){jslEnDisplay("TR_nat");setChecked("Frm_IsNAT",true);}else {jslDiDisplay("TR_nat");}if(ServList=="8"&&mode!="BRIDGE"){jslEnDisplay("TR_IsDefGW");setChecked("Frm_IsDefGW",false);}else {jslDiDisplay("TR_IsDefGW");}if("8"==ServList){setChecked("Frm_DHCPEnable",false);}else {setChecked("Frm_DHCPEnable",true);}if((mode=="PPPoE"||(modev6=="PPP"&&protol=="IPv4/v6"))&&(ServList=="2"||ServList=="3")){jslDisable("Frm_EnableProxy");setChecked("Frm_EnableProxy",false);}else {jslEnable("Frm_EnableProxy");}}if("2"==ServList){clearBitBind();jslDiDisplay("TR_bitBind0","TR_bitBind1");}else {jslEnDisplay("TR_bitBind0","TR_bitBind1");}if("2"==ServList||protol=="IPv6"){jslDiDisplay("TR_DHCPEnable");}else {jslEnDisplay("TR_DHCPEnable");}if(protol=="IPv6"||protol=="IPv4/v6"){if(ServList=="2"){jslDiDisplay("TR_IsPD");}else {jslEnDisplay("TR_IsPD");}}}function getmsg(id){var str=new Array();str[0]=new Array(128,"不允许重复,请重新输入。");str[1]=new Array(101,"不允许为空,请重新输入。");str[2]=new Array(102,"长度有误,请输入长度为");str[3]=new Array(103,"之间的字符。");str[4]=new Array(114,"有误,请输入合法字符。");str[5]=new Array(108,"有误,请输入合法IP地址。");str[6]=new Array(115,"有误,请输入整数。");str[7]=new Array(116,"有误,请输入值为");str[8]=new Array(117,"之间的整数。");str[9]=new Array(129,"有误,请输入合法的VPI/VCI。");str[10]=new Array(126,"IP地址与掩码地址不匹配,请重新输入。");str[11]=new Array(127,"已超出最大数据项,请重新配置。");str[12]=new Array(123,"有误,请重新输入。");str[13]=new Array(122,"当前操作无效,请检查配置参数。");str[14]=new Array(118,"当前操作无效,请检查");str[15]=new Array(119,"是否合法。");str[16]=new Array(109,"有误,请输入合法掩码地址。");str[17]=new Array(130,"有误,请输入合法的网关地址。");str[18]=new Array(147,"SCR必须小于PCR,请重新输入。");str[19]=new Array(170,"错误的拨号模式。");str[20]=new Array(171,"连接正在拨号中。");str[21]=new Array(172,"连接正在断开拨号中。");str[22]=new Array(173,"连接已拨号成功。");str[23]=new Array(174,"连接已断开拨号。");str[24]=new Array(166,"该连接已不存在。");str[25]=new Array(192,"起始端口、结束端口、起始映射端口和结束映射端口必须全为0,或者全不为0。");return getMsgFormArray(str,arguments);}function pvcCheckValue(){var key=getValue("IF_INDEX");var pvc0=getValue("DestAddress"+key);var dessadd=getValue("Frm_DestAddress0");if(dessadd=="new"){var msg="";var pvcnum=getValue("IF_PVCNUM");for(var i=0;i<pvcnum;i++){var pvc=getValue("IF_PVC"+i);if(getValue("Frm_DestAddress1")==pvc&&getValue("Frm_DestAddress1")!=pvc0){msg=getmsg(128);ShowErrorForCom("Frm_DestAddress1","Fnt_DestAddress1",msg);return false;}}}else {if(pvc0!=dessadd){msg=getmsg(128);ShowErrorForCom("Frm_DestAddress0","Fnt_DestAddress0",msg);return false;}}return true;}function pageCheckValue(){var msg="";var protol=getValue("Frm_protocol");var mode=getValue("Frm_mode");var modev6=getValue("Frm_IPv6mode");if(getChecked("Frm_WBDMode")==true){var vlan=getValue("Frm_VLANID");if(Check_IntegerRange(vlan,0,4094,"Frm_VLANID","Fnt_VLANID")!=true){return false;}}var pvc=getValue("Frm_DestAddress1");if(pvc==""){msg=getmsg(101);ShowErrorForCom("Frm_DestAddress1","Fnt_DestAddress1",msg);return false;}else if(pvc=="0/0"){msg=getmsg(129);ShowErrorForCom("Frm_DestAddress1","Fnt_DestAddress1",msg);return false;}var parts=pvc.split("/");if(parts.length!=2){msg=getmsg(129);ShowErrorForCom("Frm_DestAddress1","Fnt_DestAddress1",msg);return false;}else {if(Check_IntegerRange(parts[0],0,255,"Frm_DestAddress1","VPI")!=true){return false;}if(Check_IntegerRange(parts[1],0,65535,"Frm_DestAddress1","VCI")!=true){return false;}}var atm=getValue("Frm_ATMQoS");if(atm=="UBR"){}else if(atm=="CBR"){if(Check_IntegerRange(getValue("Frm_ATMPeakCellRate"),1,20000,"Frm_ATMPeakCellRate","Fnt_ATMPeakCellRate")!=true){return false;}}else if(atm=="VBR-nrt"||atm=="VBR-rt"){if(Check_IntegerRange(getValue("Frm_ATMPeakCellRate"),2,20000,"Frm_ATMPeakCellRate","Fnt_ATMPeakCellRate")!=true){return false;}var temp=getValue("Frm_ATMPeakCellRate");if(Check_IntegerRange(getValue("Frm_ATMSCR"),1,temp-1,"Frm_ATMSCR","Fnt_ATMSCR")!=true){return false;}if(Check_MBS(getValue("Frm_ATMMaxBurstSize"),Number(getValue("Frm_ATMSCR")),Number(getValue("Frm_ATMPeakCellRate")),"Frm_ATMMaxBurstSize","Fnt_ATMMaxBurstSize")!=true){return false;}}if(mode!="BRIDGE"||protol!="IPv6"){var MTU=getValue("Frm_MTU");}if((mode=="PPPoE"&&protol=="IPv4")||(modev6=="PPP"&&protol=="IPv4/v6")){if(Check_IntegerRange(MTU,128,1492,"Frm_MTU","Fnt_MTU")!=true){return false;}var username=getValue("Frm_UserName");if(checkGenStringForASC(username)!=true){msg=getmsg(114);ShowErrorForCom("Frm_UserName","Fnt_UserName",msg);return false;}if(Check_StrLengthRange(username,1,64,"Frm_UserName","Fnt_UserName")!=true){return false;}var pass=getValue("Frm_Password");if(checkGenStringForASC(pass)!=true){msg=getmsg(114);ShowErrorForCom("Frm_Password","Fnt_Password",msg);return false;}var pass_range=checkStrLengthRange(pass,0,64);if(pass_range==-3){msg=getmsg(102,0,64);ShowErrorForCom("Frm_Password","Fnt_Password",msg);return false;}var MaxUserNum=8;if(getChecked("Frm_EnableProxy")==true){if(checkNull(getValue("Frm_MaxUser"))!=true){msg=getmsg(101);ShowErrorForCom("Frm_MaxUser","Fnt_MaxUser",msg);return false;}if(checkInteger(getValue("Frm_MaxUser"))!=true){msg=getmsg(115);ShowErrorForCom("Frm_MaxUser","Fnt_MaxUser",msg);return false;}if(checkIntegerRange(getValue("Frm_MaxUser"),1,MaxUserNum)!=true){msg=getmsg(116,1,MaxUserNum);ShowErrorForCom("Frm_MaxUser","Fnt_MaxUser",msg);return false;}}if(protol=="IPv4"){var idletime=getValue("Frm_IdleTime");if(getValue("Frm_ConnTrigger")=="OnDemand"){if(Check_IntegerRange(idletime,0,4294967295,"Frm_IdleTime","Fnt_IdleTime")!=true){return false;}}}}else if(mode=="Static"){var ip=getValue("Frm_IPAddress");if(Check(ip,"Frm_IPAddress","Fnt_IPAddress")!=true){return false;}else if(checkIpAddress(ip,"")!=true){msg=getmsg(108);ShowErrorForCom("Frm_IPAddress","Fnt_IPAddress",msg);return false;}var mask=getValue("Frm_SubnetMask");if(Check(mask,"Frm_SubnetMask","Fnt_SubnetMask")!=true){return false;}else if(checkMaskAddress(mask)!=true){msg=getmsg(109);ShowErrorForCom("Frm_SubnetMask","Fnt_SubnetMask",msg);return false;}if(checkIPNet(ip,mask)!=true){msg=getmsg(126);ShowErrorForCom("Frm_SubnetMask","Fnt_SubnetMask",msg);return false;}var gateway=getValue("Frm_GateWay");if(Check(gateway,"Frm_GateWay","Fnt_GateWay")!=true){return false;}else if(checkGateway(gateway)==false){msg=getmsg(130);ShowErrorForCom("Frm_GateWay","Fnt_GateWay",msg);return false;}var DNS1=getValue("Frm_DNS1");if(DNS1!=""){if(Check_DNS(DNS1,"Frm_DNS1","Fnt_DNS1")!=true){return false;}}var DNS2=getValue("Frm_DNS2");if(DNS2!=""){if(Check_DNS(DNS2,"Frm_DNS2","Fnt_DNS2")!=true){return false;}}var DNS3=getValue("Frm_DNS3");if(DNS3!=""){if(Check_DNS(DNS3,"Frm_DNS3","Fnt_DNS3")!=true){return false;}}if(Check_IntegerRange(MTU,128,1500,"Frm_MTU","Fnt_MTU")!=true){return false;}}else if((mode=="DHCP"&&protol=="IPv4")||(modev6=="IP"&&protol=="IPv4/v6")){if(Check_IntegerRange(MTU,576,1500,"Frm_MTU","Fnt_MTU")!=true){return false;}}else if(modev6=="PPP"&&protol=="IPv6"){var username=getValue("Frm_UserName");if(checkGenStringForASC(username)!=true){msg=getmsg(114);ShowErrorForCom("Frm_UserName","Fnt_UserName",msg);return false;}if(Check_StrLengthRange(username,1,64,"Frm_UserName","Fnt_UserName")!=true){return false;}var pass=getValue("Frm_Password");if(checkGenStringForASC(pass)!=true){msg=getmsg(114);ShowErrorForCom("Frm_Password","Fnt_Password",msg);return false;}var pass_range=checkStrLengthRange(pass,0,64);if(pass_range==-3){msg=getmsg(102,0,64);ShowErrorForCom("Frm_Password","Fnt_Password",msg);return false;}}if(protol!="IPv4"){if(getValue("Frm_GUASrc")=="Static"){if(CheckIPv6("Frm_GUA1","Fnt_GUA1","-1")!=true){return false;}}if(getValue("Frm_Gatewayv6Src")=="Static"){if(CheckIPv6("Frm_Gatewayv6","Fnt_Gatewayv6","-1")!=true){return false;}}if(getValue("Frm_DNSv6Src")=="Static"){if(getValue("Frm_DNS1v6")!=""){if(checkIPV6Address(getValue("Frm_DNS1v6"))!=true){msg=getmsg(108);ShowErrorForCom("Frm_DNS1v6","Fnt_DNS1v6",msg);return false;}}if(getValue("Frm_DNS2v6")!=""){if(checkIPV6Address(getValue("Frm_DNS2v6"))!=true){msg=getmsg(108);ShowErrorForCom("Frm_DNS2v6","Fnt_DNS2v6",msg);return false;}}if(getValue("Frm_DNS3v6")!=""){if(checkIPV6Address(getValue("Frm_DNS3v6"))!=true){msg=getmsg(108);ShowErrorForCom("Frm_DNS3v6","Fnt_DNS3v6",msg);return false;}}}}return true;}function Check_DNS(value,Frm,Fnt){if(checkIpAddress(value,"")!=true){msg=getmsg(108);ShowErrorForCom(Frm,Fnt,msg);return false;}if(value=="0.0.0.0"){msg=getmsg(108);ShowErrorForCom(Frm,Fnt,msg);return false;}return true;}function Check_StrLengthRange(value,min,max,Frm,Fnt){var temp=checkStrLengthRange(value,min,max);if(temp==-1){msg=getmsg(101);ShowErrorForCom(Frm,Fnt,msg);return false;}else if(temp==-3){msg=getmsg(102,min,max);ShowErrorForCom(Frm,Fnt,msg);return false;}return true;}function Check_IntegerRange(value,min,max,Frm,Fnt){var tem=checkIntegerRange(value,min,max);if(tem==-1){msg=getmsg(101);ShowErrorForCom(Frm,Fnt,msg);return false;}else if(tem==-2){msg=getmsg(115);ShowErrorForCom(Frm,Fnt,msg);return false;}else if(tem==-3){msg=getmsg(116,min,max);ShowErrorForCom(Frm,Fnt,msg);return false;}return true;}function Check_MBS(value,scrValue,pcrValue,Frm,Fnt){var tmpDeno=pcrValue-scrValue;var tmpMole=pcrValue*scrValue;var tmpMax=Math.floor(tmpMole/tmpDeno)+1;if(scrValue>=pcrValue){msg=getmsg(147);ShowErrorForCom(null,null,msg);return false;}var tem=checkIntegerRange(value,1,tmpMax);if(tem==-1){msg=getmsg(101);ShowErrorForCom(Frm,Fnt,msg);return false;}else if(tem==-2){msg=getmsg(115);ShowErrorForCom(Frm,Fnt,msg);return false;}else if(tem==-3){msg=getmsg(116,1,tmpMax);ShowErrorForCom(Frm,Fnt,msg);return false;}return true;}function Check(value,Frm,Fnt){if(value==""){msg=getmsg(101);ShowErrorForCom(Frm,Fnt,msg);return false;}return true;}function pageSetValue(){var number;var protol=getValue("Frm_protocol");var mode;number=getValue("IF_INSTNUM");if(protol=="IPv4"){mode=getValue("Frm_mode");}else if(protol=="IPv6"){mode=getValue("Frm_IPv6mode");}else if(protol=="IPv4/v6"){mode=getValue("Frm_IPv6mode");if(mode=="PPP"){mode="PPP_both";}else if(mode=="IP"){mode="IP_both";}}var wanc_value=getValue("Frm_WANCName0");var index;if(wanc_value==-1){index=number;}else {index=getValue("Frm_WANCName0");}switch(mode){case "PPPoE":{HiddenMultiInstParaInit(PPP_PARA,index);for(var j=0;j<PPP_PARA.length;j++){val=PPP_PARA[j];PPP_PARA[j]="NULL";}setValue("IPMode"+index,"0");setValue("TransType"+index,"PPPoE");setValue("IF_TYPE","PPPoE");setValue("ATMLinkType"+index,"EoA");jslSetValue("UserName"+index,"Frm_UserName");jslSetValue("Password"+index,"Frm_Password");if(getChecked("Frm_EnableProxy")==true){setValue("EnableProxy"+index, 1);jslSetValue("MaxUser"+index,"Frm_MaxUser");}else if(getChecked("Frm_EnableProxy")==false){setValue("EnableProxy"+index, 0);}jslSetValue("AuthType"+index,"Frm_AuthType");jslSetValue("ConnTrigger"+index,"Frm_ConnTrigger");if(getValue("Frm_ConnTrigger")=="OnDemand"){jslSetValue("IdleTime"+index,"Frm_IdleTime");}break;}case "Static":{HiddenMultiInstParaInit(IP_PARA,index);for(var j=0;j<IP_PARA.length;j++){val=IP_PARA[j];IP_PARA[j]="NULL";}setValue("IPMode"+index,"0");setValue("Addressingtype"+index,"Static");setValue("IF_TYPE","Static");setValue("ATMLinkType"+index,"EoA");jslSetValue("IPAddress"+index,"Frm_IPAddress");jslSetValue("SubnetMask"+index,"Frm_SubnetMask");jslSetValue("GateWay"+index,"Frm_GateWay");if(""==getValue("DNS1"+index))setValue("DNS1"+index,"0.0.0.0");else jslSetValue("DNS1"+index,"Frm_DNS1");if(""==getValue("DNS2"+index))setValue("DNS2"+index,"0.0.0.0");else jslSetValue("DNS2"+index,"Frm_DNS2");if(""==getValue("DNS3"+index))setValue("DNS3"+index,"0.0.0.0");else jslSetValue("DNS3"+index,"Frm_DNS3");break;}case "DHCP":{HiddenMultiInstParaInit(IP_PARA,index);for(var j=0;j<IP_PARA.length;j++){val=IP_PARA[j];IP_PARA[j]="NULL";}setValue("IPMode"+index,"0");setValue("Addressingtype"+index,"DHCP");setValue("IF_TYPE","DHCP");setValue("ATMLinkType"+index,"EoA");break;}case "BRIDGE":{HiddenMultiInstParaInit(BRIDGE_PARA,index);for(var j=0;j<BRIDGE_PARA.length;j++){val=BRIDGE_PARA[j];BRIDGE_PARA[j]="NULL";}setValue("IPMode"+index,"0");setValue("IF_TYPE","BRIDGE");setValue("ATMLinkType"+index,"EoA");break;}case "PPP":{HiddenMultiInstParaInit(PPP_PARA,index);for(var j=0;j<PPP_PARA.length;j++){val=PPP_PARA[j];PPP_PARA[j]="NULL";}setValue("IPMode"+index,"1");setValue("TransType"+index,"PPPoE");setValue("IF_TYPE","PPP");setValue("ATMLinkType"+index,"EoA");jslSetValue("UserName"+index,"Frm_UserName");jslSetValue("Password"+index,"Frm_Password");jslSetValue("AuthType"+index,"Frm_AuthType");break;}case "IP":{HiddenMultiInstParaInit(IP_PARA,index);for(var j=0;j<IP_PARA.length;j++){val=IP_PARA[j];IP_PARA[j]="NULL";}setValue("IPMode"+index,"1");setValue("Addressingtype"+index,"DHCP");setValue("IF_TYPE","IP");setValue("ATMLinkType"+index,"EoA");break;}case "PPP_both":{HiddenMultiInstParaInit(PPP_PARA,index);for(var j=0;j<PPP_PARA.length;j++){val=PPP_PARA[j];PPP_PARA[j]="NULL";}setValue("IPMode"+index,"2");setValue("TransType"+index,"PPPoE");setValue("IF_TYPE","PPP_both");setValue("ATMLinkType"+index,"EoA");jslSetValue("UserName"+index,"Frm_UserName");jslSetValue("Password"+index,"Frm_Password");jslSetValue("AuthType"+index,"Frm_AuthType");if(getChecked("Frm_EnableProxy")==true){setValue("EnableProxy"+index, 1);jslSetValue("MaxUser"+index,"Frm_MaxUser");}else if(getChecked("Frm_EnableProxy")==false){setValue("EnableProxy"+index, 0);}break;}case "IP_both":{HiddenMultiInstParaInit(IP_PARA,index);for(var j=0;j<IP_PARA.length;j++){val=IP_PARA[j];IP_PARA[j]="NULL";}setValue("IPMode"+index,"2");setValue("Addressingtype"+index,"DHCP");setValue("IF_TYPE","IP_both");setValue("ATMLinkType"+index,"EoA");break;}}if(protol=="IPv6"||protol=="IPv4/v6"){jslSetValue("GUASrc"+index,"Frm_GUASrc");if(getValue("Frm_GUASrc")=="Static"){if(""==getValue("Frm_GUA1")){setValue("GUA1"+index,"::");}else {jslSetValue("GUA1"+index,"Frm_GUA1");}}jslSetValue("Gatewayv6Src"+index,"Frm_Gatewayv6Src");if(getValue("Frm_Gatewayv6Src")=="Static"){if(""==getValue("Frm_Gatewayv6")){setValue("Gatewayv6"+index,"::");}else {jslSetValue("Gatewayv6"+index,"Frm_Gatewayv6");}}jslSetValue("DNSv6Src"+index,"Frm_DNSv6Src");if(getValue("Frm_DNSv6Src")=="Static"){if(""==getValue("Frm_DNS1v6")){setValue("DNS1v6"+index,"::");}else {jslSetValue("DNS1v6"+index,"Frm_DNS1v6");}if(""==getValue("Frm_DNS2v6")){setValue("DNS2v6"+index,"::");}else {jslSetValue("DNS2v6"+index,"Frm_DNS2v6");}if(""==getValue("Frm_DNS3v6")){setValue("DNS3v6"+index,"::");}else {jslSetValue("DNS3v6"+index,"Frm_DNS3v6");}}if(getChecked("Frm_IsPD")==true){setValue("IsPD"+index, "1");}else {setValue("IsPD"+index, "0");}}setValue("IF_INDEX",index);var ServList=getValue("Frm_ServList");if(mode!="BRIDGE"&&ServList!="2"&&protol!="IPv6"){if(getChecked("Frm_IsNAT")==true){setValue("IsNAT"+index, "1");}else {setValue("IsNAT"+index, "0");}}if(mode!="BRIDGE"&&ServList=="8"){if(getChecked("Frm_IsDefGW")==true){setValue("IsDefGW"+index, "1");}else {setValue("IsDefGW"+index, "0");}}if(ServList!="2"){var str="";var tem="";for(var i=1;i<9;i++){if(getChecked("Frm_bitBind"+i)==true){tem=1;str=str+tem;}else {tem=0;str=str+tem;}}setValue("bitBind"+index,str);if(protol!="IPv6"){var dhcpEnable=getChecked("Frm_DHCPEnable");if(dhcpEnable==true){setValue("dhcpEnable"+index, "1");}else {setValue("dhcpEnable"+index, "0");}}}if(mode!="BRIDGE"&&protol!="IPv6"){jslSetValue("MTU"+index,"Frm_MTU");}var num=getValue("Frm_ServList");var StrService=SERVICELIST_PARA[num];setValue("StrServList"+index, StrService);if(getChecked("Frm_WBDMode")==true){setValue("WBDMode"+index, "Tag_Drop");jslSetValue("VLANID"+index,"Frm_VLANID");jslSetValue("Priority"+index,"Frm_Priority");}else {setValue("WBDMode"+index, "Transparent");setValue("VLANID"+index,"0");setValue("Priority"+index,"0");}setValue("Enable"+index, "1");jslSetValue("ATMEncapsulation"+index,"Frm_ATMEncapsulation");jslSetValue("DestAddress"+index,"Frm_DestAddress1");jslSetValue("ATMQoS"+index,"Frm_ATMQoS");var atm=getValue("Frm_ATMQoS");if(atm=="UBR"){}else if(atm=="CBR"){jslSetValue("ATMPeakCellRate"+index,"Frm_ATMPeakCellRate");}else if(atm=="VBR-rt"||atm=="VBR-nrt"){jslSetValue("ATMPeakCellRate"+index,"Frm_ATMPeakCellRate");jslSetValue("ATMSCR"+index,"Frm_ATMSCR");jslSetValue("ATMMaxBurstSize"+index,"Frm_ATMMaxBurstSize");setValue("ATMMinCellRate"+index,"0");}}function ReSetPVCRmZero(ID){var pvc=getValue(ID);var parts=pvc.split("/");var msg;var obj;if(parts.length!=2){return false;}for(i=0;i<parts.length;i++){obj=parts;if(obj!=null &&obj!=""){while(obj.indexOf("0")==0&&obj.length>1){obj=obj.substr(1);}parts=obj;}if(i==0){msg=parts;}else {var msg=parts[i-1]+"/"+parts;}}setValue(ID,msg);}function pageAdd(){ReSetIpRmZero("Frm_IPAddress","Frm_SubnetMask","Frm_GateWay","Frm_DNS1","Frm_DNS2","Frm_DNS3");ReSetValueRmZero("Frm_ATMPeakCellRate","Frm_ATMSCR","Frm_ATMMaxBurstSize","Frm_IdleTime","Frm_Priority","Frm_MaxUser","Frm_VLANID","Frm_MTU");ReSetPVCRmZero("Frm_DestAddress1");if(pageCheckValue()==true){jslDisable("Btn_Add","Btn_DoEdit","Btn_Delete","Btn_Cancel","Frm_WANCName0");setValue("IF_ACTION","new");pageSetValue();if(getValue("Frm_mode")=="DHCP"||(getValue("Frm_IPv6mode")=="IP"&&getValue("Frm_protocol")=="IPv4/v6")){setValue("IF_IDLE","edit");}setValue("IF_MULTIDISPLAY","0");disableAllbutton();getObj("fSubmit").submit();}}function pageCancel(){jslDisable("Btn_Add","Btn_DoEdit","Btn_Delete","Btn_Cancel");document.getElementById("fSubmit").submit();}function pageEdit(){ReSetIpRmZero("Frm_IPAddress","Frm_SubnetMask","Frm_GateWay","Frm_DNS1","Frm_DNS2","Frm_DNS3");ReSetValueRmZero("Frm_ATMPeakCellRate","Frm_ATMSCR","Frm_ATMMaxBurstSize","Frm_IdleTime","Frm_Priority","Frm_MaxUser","Frm_VLANID","Frm_MTU");ReSetPVCRmZero("Frm_DestAddress1");if(pvcCheckValue()==true&&pageCheckValue()==true){jslDisable("Btn_Add","Btn_DoEdit","Btn_Delete","Btn_Cancel","Frm_WANCName0");pageSetValue();setValue("IF_ACTION","apply");if((getValue("Frm_mode")=="PPPoE"&&getValue("Frm_protocol")=="IPv4")||(getValue("Frm_mode")=="DHCP"&&getValue("Frm_protocol")=="IPv4")||(getValue("Frm_IPv6mode")=="IP"&&getValue("Frm_protocol")=="IPv4/v6")||(getValue("Frm_IPv6mode")=="PPP"&&getValue("Frm_protocol")=="IPv4/v6")){setValue("IF_IDLE","edit");}setValue("IF_MULTIDISPLAY","0");disableAllbutton();getObj("fSubmit").submit();}}function pageDel(){jslDisable("Btn_Add","Btn_DoEdit","Btn_Delete","Frm_WANCName0");setValue("IF_INDEX",getValue("Frm_WANCName0"));var proto=getValue("Frm_protocol");var modev4=getValue("Frm_mode");var modev6=getValue("Frm_IPv6mode");if(proto=="IPv4"){setValue("IF_MODE",modev4);}else if(proto=="IPv6"){setValue("IF_MODE",modev6);}else if(proto=="IPv4/v6"){if(modev6=="PPP")setValue("IF_MODE","PPP_both");if(modev6=="IP")setValue("IF_MODE","IP_both");}setValue("IF_ACTION","delete");disableAllbutton();getObj("fSubmit").submit();}function PPP_connect(){jslDisable("Btn_Connect");setValue("IF_INDEX",getValue("Frm_WANCName0"));if(getValue("Frm_protocol")=="IPv4")setValue("IF_MODE",getValue("Frm_mode"));else if(getValue("Frm_protocol")=="IPv4/v6")setValue("IF_MODE","PPP_both");setValue("IF_ACTION","pppconnect");setValue("IF_IDLE","pppconnect");disableAllbutton();getObj("fSubmit").submit();}function PPP_disconnect(){jslDisable("Btn_Disconnect");setValue("IF_INDEX",getValue("Frm_WANCName0"));if(getValue("Frm_protocol")=="IPv4")setValue("IF_MODE",getValue("Frm_mode"));else if(getValue("Frm_protocol")=="IPv4/v6")setValue("IF_MODE","PPP_both");setValue("IF_ACTION","pppdisconnect");setValue("IF_IDLE","pppdisconnect");disableAllbutton();getObj("fSubmit").submit();}function dhcp_release(){jslDisable("Btn_Release");setValue("IF_INDEX",getValue("Frm_WANCName0"));if(getValue("Frm_protocol")=="IPv4")setValue("IF_MODE",getValue("Frm_mode"));else if(getValue("Frm_protocol")=="IPv4/v6")setValue("IF_MODE","IP_both");setValue("IF_ACTION","dhcprelease");setValue("IF_IDLE","dhcprelease");disableAllbutton();getObj("fSubmit").submit();}function dhcp_renew(){setValue("IF_INDEX",getValue("Frm_WANCName0"));if(getValue("Frm_protocol")=="IPv4")setValue("IF_MODE",getValue("Frm_mode"));else if(getValue("Frm_protocol")=="IPv4/v6")setValue("IF_MODE","IP_both");setValue("IF_ACTION","dhcprenew");setValue("IF_IDLE","dhcprenew");disableAllbutton();getObj("fSubmit").submit();}function Change_GUASrc(){if(getValue("Frm_GUASrc")=="Static")jslEnDisplay("TR_GUA1");else jslDiDisplay("TR_GUA1");}function Change_Gatewayv6Src(){if(getValue("Frm_Gatewayv6Src")=="Static")jslEnDisplay("TR_Gatewayv6");else jslDiDisplay("TR_Gatewayv6");}function Change_DNSv6Src(){if(getValue("Frm_DNSv6Src")=="Static"){jslEnDisplay("TR_DNS1v6","TR_DNS2v6","TR_DNS3v6");}else {jslDiDisplay("TR_DNS1v6","TR_DNS2v6","TR_DNS3v6");}}function CheckIPv6(Frm,Fnt,len){var value=getValue(Frm);if(value==""){msg=getmsg(101);ShowErrorForCom(Frm,Fnt,msg);return false;}if(checkIPV6Address(value)!=true){msg=getmsg(108);ShowErrorForCom(Frm,Fnt,msg);return false;}return true;}function disableAllbutton(){jslDisable("Btn_Renew","Btn_Release");jslDisable("Btn_Add","Btn_DoEdit","Btn_Delete","Btn_Cancel");jslDisable("Frm_mode","Frm_IPv6mode","Frm_WANCName0");}</script>
<table id="TestContent" class="table" width="450px" border="0">
<tr id="protol_mode">
<td class="td1">IP协议版本</td>
<td class="td2">
<select size="1" class="list_8" id="Frm_protocol">
<option value="IPv4">IPv4</option>
<option value="IPv6">IPv6</option>
<option value="IPv4/v6">IPv4/v6</option>
</select></td>
</tr>
<tr id="IPv4_mode">
<td class="td1">模式</td>
<td class="td2">
<select size="1" class="list_8" id="Frm_mode">
<option value="PPPoE">PPPoE</option>
<option value="Static">Static</option>
<option value="DHCP">DHCP</option>
<option value="BRIDGE">桥接</option>
</select></td>
</tr>
<tr id="IPv6_mode" style="display:none">
<td class="td1">模式</td>
<td class="td2">
<select size="1" class="list_8" id="Frm_IPv6mode">
<option value="PPP">PPP</option>
<option value="IP">IP</option>
</select></td>
</tr>
<!--连接名称-->
<tr>
<td class="td1">连接名称</td>
<td class="td2" >
<select size="1" class="list_2" id="Frm_WANCName0">
<option value="-1" >新建WAN连接</option>
</select></td>
</tr>
<!--绑定-->
<tr id="TR_bitBind0">
<td class="td11">端口绑定</td>
<td class="td2"><input id="Frm_bitBind1" type="checkbox" value=""/>LAN1&nbsp;&nbsp;<input id="Frm_bitBind2" type="checkbox" value=""/>LAN2&nbsp;&nbsp;
<input id="Frm_bitBind3" type="checkbox" value="" style="display:none"/><input id="Frm_bitBind4" type="checkbox" value="" style="display:none"/>
</td>
</tr>
<tr id="TR_bitBind1">
<td class="td11"></td>
<td class="td2"><input id="Frm_bitBind5" type="checkbox" value=""/>SSID1&nbsp;<input id="Frm_bitBind6" type="checkbox" value=""/>SSID2&nbsp;
<input id="Frm_bitBind7" type="checkbox" value=""/>SSID3&nbsp;<input id="Frm_bitBind8" type="checkbox" value=""/>SSID4
</td>
</tr>
<!--DHCP服务使能 -->
<tr id="TR_DHCPEnable">
<td class="td11">DHCP服务使能</td>
<td class="td2"><input name="Frm_DHCPEnable" type="checkbox" value="" id="Frm_DHCPEnable" checked/></td>
</tr>
<!--NAT-->
<tr id="TR_nat">
<td class="td1">启用NAT</td>
<td class="td2"><input name="Frm_IsNAT" type="checkbox" value="" id="Frm_IsNAT"/></td>
</tr>
<!--缺省网关-->
<tr id="TR_IsDefGW">
<td class="td1">缺省网关</td>
<td class="td2"><input name="Frm_IsDefGW" type="checkbox" value="" id="Frm_IsDefGW"/></td>
</tr>
<!--业务模式-->
<tr>
<td class="td1">业务模式</td>
<td class="td2">
<select size="1" class="list_2" id="Frm_ServList">
</select></td>
</tr>
<!--启用VLAN-->
<tr id="TR_WBDMode">
<td class="td1">启用VLAN</td>
<td class="td2"><input  name="Frm_WBDMode" type="checkbox" value="" id="Frm_WBDMode" /></td>
</tr>
<tr id="TR_VLANID">
<td class="td1"><font id="Fnt_VLANID">VLAN ID</font></td>
<td class="td2"><input type="text" name="Frm_VLANID" id="Frm_VLANID" class="inputId"/></td>
</tr>
<tr id="TR_PRO">
<td class="td1">802.1p</td>
<td class="td2">
<select size="1" class="list_5" id="Frm_Priority">
<option value="0">0</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
</select></td>
</tr>
<!--PVC-->
<tr>
<td class="td1"><font id="Fnt_DestAddress0">VPI/VCI</font></td>
<td class="td2">
<select size="1" class="list_8" id="Frm_DestAddress0">
<option value="new">新建</option>
</select>
</td>
</tr>
<tr id="TR_DestAddress1">
<td class="td1"><font id="Fnt_DestAddress1">新VPI/VCI</font></td>
<td class="td2"><input name="Frm_DestAddress1" type="text" id="Frm_DestAddress1" value="" class="inputId" /></td>
</tr>
<!--封装类型-->
<tr id="TR_ATMEncapsulation">
<td class="td1">封装类型</td>
<td class="td2">
<select size="1" class="list_8" id="Frm_ATMEncapsulation">
<option value="LLC">LLC</option>
</select></td>
</tr>
<!--服务类别-->
<tr id="TR_ATMQoS">
<td class="td1">服务类别</td>
<td class="td2">
<select size="1" class="list_8" id="Frm_ATMQoS">
<option value="UBR" selected="selected">UBR</option>
<option value="CBR">CBR</option>
<option value="VBR-nrt">nRT_VBR</option>
<option value="VBR-rt">RT_VBR</option>
</select></td>
</tr>
<tr id="TR_pcr" style="display:none">
<td class="td1"><font id="Fnt_ATMPeakCellRate">PCR</font></td>
<td class="td2"><input type="text" id="Frm_ATMPeakCellRate" value="" class="inputId"/ >cps</td>
</tr>
<tr id="TR_scr" style="display:none">
<td class="td1"><font id="Fnt_ATMSCR">SCR</font></td>
<td class="td2"><input type="text" id="Frm_ATMSCR" value="" class="inputId" />cps</td>
</tr>
<tr id="TR_mbs" style="display:none">
<td class="td1"><font id="Fnt_ATMMaxBurstSize">MBS</font></td>
<td class="td2"><input type="text" id="Frm_ATMMaxBurstSize" value="" class="inputId" />cells</td>
</tr>
<!--MTU-->
<tr id="TR_MTU">
<td class="td1"><font id="Fnt_MTU">MTUv4</font></td>
<td class="td2"><input type="text" id="Frm_MTU" value="" class="inputId" /></td>
</tr>
<!--用户名和密码 -->
<tr id="TR_UserName">
<td class="td1"><font id="Fnt_UserName">用户名</font></td>
<td class="td2"><input type="text" id="Frm_UserName" value="" class="inputId"/></td>
</tr>
<tr id="TR_Password">
<td class="td1"><font id="Fnt_Password">密码</font></td>
<td class="td2"><input type="password" id="Frm_Password" value="" class="inputId"/></td>
</tr>
<!--认证类型 -->
<tr id="TR_AuthType">
<td class="td1">认证类型</td>
<td class="td2">
<select size="1" class="list_8" id="Frm_AuthType">
<option value="PAP,CHAP,MS-CHAP">自动</option>
<option value="PAP">PAP</option>
<option value="CHAP">CHAP</option>
</select></td>
</tr>
</table>
<!--pppoe的参数设置-->
<table class="table" width="450px" border="0" id="TABLE_pppoe">
<tr id="TR_EnableProxy" style="display:none">
<td class="td1">启用PPPoE代理</td>
<td class="td2"><input name="Frm_EnableProxy" type="checkbox" checked="" value="" id="Frm_EnableProxy" /></td>
</tr>
<tr id="TR_MaxUser" style="display:none">
<td class="td1"><font id="Fnt_MaxUser">允许最大用户数</font></td>
<td class="td2"><input name="Frm_MaxUser" type="text" id="Frm_MaxUser"  value="4" class="inputId" /></td>
</tr>
<tr id="TR_ConnTrigger">
<td class="td1">拨号模式</td>
<td class="td2" >
<select size="1" class="list_8" id="Frm_ConnTrigger">
<option value="AlwaysOn" selected>自动连接</option>
<option value="OnDemand">按需拨号</option>
<!--  <option value="Manual">手动连接</option> -->
</select></td>
</tr>
<tr id="TR_IdleTime">
<td class="td1"><font id="Fnt_IdleTime">超时时间</font></td>
<td class="td2"><input size="1" class="inputId" id="Frm_IdleTime" value="" disabled="disabled">秒</td>
</tr>
<tr id="TR_connect" style="display:none">
<td class="td7" colspan="2">
<input name="Btn_Connect" id="Btn_Connect" type="button" class="button2" value="连 接" />
<input name="Btn_Disconnect" id="Btn_Disconnect" type="button"  class="button5" value="断 开" />
</td>
</tr>
</table>
<!--static的参数设置-->
<table class="table" width="450px" border="0" id="TABLE_static" style="display:none">
<tr>
<td class="td1"><font id="Fnt_IPAddress">IP地址</font></td>
<td class="td2"><input type="text" id="Frm_IPAddress" value="" class="inputId"/></td>
</tr>
<tr>
<td class="td1"><font id="Fnt_SubnetMask">掩码</font></td>
<td class="td2"><input type="text" id="Frm_SubnetMask" value="" class="inputId"/></td>
</tr>
<tr>
<td class="td1"><font id="Fnt_GateWay">网关</font></td>
<td class="td2"><input type="text" id="Frm_GateWay" value="" class="inputId"/></td>
</tr>
<tr>
<td class="td1"><font id="Fnt_DNS1">DNS1</font></td>
<td class="td2"><input type="text" id="Frm_DNS1" value="" class="inputId"/></td>
</tr>
<tr>
<td class="td1"><font id="Fnt_DNS2">DNS2</font></td>
<td class="td2"><input type="text" id="Frm_DNS2" value="" class="inputId"/></td>
</tr>
<tr>
<td class="td1"><font id="Fnt_DNS3">DNS3</font></td>
<td class="td2"><input type="text" id="Frm_DNS3" value="" class="inputId"/></td>
</tr>
</table>
<!--IPv6的参数设置-->
<table class="table" width="450px" border="0" id="TABLE_ipv6" style="display:none">
<tr>
<td class="td1"><font id="Fnt_GUASrc">全局地址获取方式</font></td>
<td class="td2">
<select size="1" class="list_8" id="Frm_GUASrc">
<option value="None"></option>
<option value="SLAAC">无状态自动配置</option>
<option value="Static">手动</option>
<option value="DHCP">DHCPv6</option>
</select></td>
</tr>
<tr id="TR_GUA1" style="display:none">
<td class="td1"><font id="Fnt_GUA1">IPv6</font></td>
<td class="td2"><input type="text" id="Frm_GUA1" value="" class="inputId"/></td>
</tr>
<tr>
<td class="td1"><font id="Fnt_Gatewayv6Src">网关获取方式</font></td>
<td class="td2">
<select size="1" class="list_8" id="Frm_Gatewayv6Src">
<option value="None"></option>
<option value="SLAAC">无状态自动配置</option>
<option value="Static">手动</option>
</select></td>
</tr>
<tr id="TR_Gatewayv6" style="display:none">
<td class="td1"><font id="Fnt_Gatewayv6">IPv6</font></td>
<td class="td2"><input type="text" id="Frm_Gatewayv6" value="" class="inputId"/></td>
</tr>
<tr>
<td class="td1"><font id="Fnt_DNSv6Src">DNS获取方式</font></td>
<td class="td2">
<select size="1" class="list_8" id="Frm_DNSv6Src">
<option value="None"></option>
<option value="SLAAC">无状态自动配置</option>
<option value="Static">手动</option>
<option value="DHCP">DHCPv6</option>
</select></td>
</tr>
<tr id="TR_DNS1v6" style="display:none">
<td class="td1"><font id="Fnt_DNS1v6">DNS1</font></td>
<td class="td2"><input type="text" id="Frm_DNS1v6" value="" class="inputId"/></td>
</tr>
<tr id="TR_DNS2v6" style="display:none">
<td class="td1"><font id="Fnt_DNS2v6">DNS2</font></td>
<td class="td2"><input type="text" id="Frm_DNS2v6" value="" class="inputId"/></td>
</tr>
<tr id="TR_DNS3v6" style="display:none">
<td class="td1"><font id="Fnt_DNS3v6">DNS3</font></td>
<td class="td2"><input type="text" id="Frm_DNS3v6" value="" class="inputId"/></td>
</tr>
<tr id = "TR_IsPD">
<td class="td1">DHCP启用前缀代理</td>
<td class="td2"><input  name="Frm_IsPD" type="checkbox" value="" id="Frm_IsPD" /></td>
</tr>
</table>
<!--dhcp的参数设置-->
<table class="table" width="450px" border="0" id="TABLE_dhcp" style="display:none">
<tr>
<td class="td7" colspan="2">
<input name="Btn_Release" id="Btn_Release" type="button" class="button2" value="释 放" />
<input name="Btn_Renew" id="Btn_Renew" type="button"  class="button2" value="续 租" />
</td>
</tr>
</table>
<div id="div4"></div>
<div class="div4"></div>
</div>
<!--内容结束-->
</div>
<!--bottom部分开始-->
<div class="bottom_div" id="bottom"></div>
<div class="bottomx"></div>
<!--bottom部分结束-->
</div>
</body>
<input type="hidden" id="IF_UPLOADING" name="IF_UPLOADING" value="">
</body>
</html>
<script language="javascript">
var x,y,z,obj;var down=false;var browser=navigator.appName;var b_version=navigator.appVersion;var version=b_version.split(";");var trim_Version="";if(null!=version[1]){trim_Version=version[1].replace(/[ ]/g,"");}function setinner(type){if(browser=="Microsoft Internet Explorer"&&trim_Version=="MSIE6.0"){document.getElementById("myLayer").style.visibility=type;}else {document.getElementById("myLayer").style.visibility=type;}}function framedispalay(id){if(browser=="Microsoft Internet Explorer"&&trim_Version=="MSIE6.0"){}else {getObj(id).style.display="none";}}function init(){if(browser=="Microsoft Internet Explorer"&&trim_Version=="MSIE6.0"){obj=event.srcElement;obj.setCapture();z=obj.style.zIndex;obj.style.zIndex=100;x=event.offsetX;y=event.offsetY;down=true;}}function moveit(){if(browser=="Microsoft Internet Explorer"&&trim_Version=="MSIE6.0"){if(down&&event.srcElement==obj){with(obj.style){posLeft=document.body.scrollLeft+event.x-x;posTop=document.body.scrollTop+event.y-y;}}}}function stopdrag(){if(browser=="Microsoft Internet Explorer"&&trim_Version=="MSIE6.0"){down=false;obj.style.zIndex=z;obj.releaseCapture();}}this.remove=function(){document.getElementById("alertFram").innerHTML ="";};var ie=document.all;var nn6=document.getElementById&&!document.all;var isdrag=false;var y,x;var oDragObj;function moveMouse(e){if(isdrag){oDragObj.style.top=(nn6?nTY+e.clientY-y:nTY+event.clientY-y)+"px";oDragObj.style.left=(nn6?nTX+e.clientX-x:nTX+event.clientX-x)+"px";return false;}}function initDrag(e){var oDragHandle=nn6?e.target:event.srcElement;var topElement="HTML";if(oDragHandle.tagName){while(oDragHandle.tagName!=topElement&&oDragHandle.className!="dragAble"){oDragHandle=nn6?oDragHandle.parentNode:oDragHandle.parentElement;}if(oDragHandle.className=="dragAble"){isdrag=true;oDragObj=oDragHandle;nTY=parseInt(oDragObj.style.top+0);y=nn6?e.clientY:event.clientY;nTX=parseInt(oDragObj.style.left+0);x=nn6?e.clientX:event.clientX;document.onmousemove=moveMouse;return false;}}}document.onmousedown=initDrag;document.onmouseup=new Function("isdrag=false");function showHelp(helpInfo,titleTag){var text;text="<div style='width:220px;border:1px solid #34627e;' id='dragAble' class='dragAble'>\n";text+="<table cellpadding='0' cellspacing='0' style='width:220px;background-color:#fff;font-size:12px;'>\n";text+="<tr>\n";text+="<td align='left' style='height:26px;width:198px;background:url(img/1x26.gif) repeat-x;'><font color='#000'><b>&nbsp;"+titleTag+"<\/b><\/font><\/td>\n";text+="<td style='width:22px;'><img src='img/22x26.gif' onclick='remove();' border='0' style='cursor:pointer;'><\/td>\n";text+="<\/tr>\n";text+="<tr>\n";text+="<td colspan='2' height='200px' width='210px' valign='top' align='left'  style='padding:5px 0 0 5px;' id='helpText'><\/td>\n";text+="<\/tr><\/table><\/div>\n";getObj("alertFram").innerHTML =text;getObj("helpText").innerHTML =helpInfo;}function jump(){top.location.href="/";}function AutoRelogin(type){var timeout;if((type=="restart")||(type=="upgconfig")){timeout=3;}else if(type=="restore"){timeout=3;}else if(type=="upgversion"){timeout=5;}else {return;}setTimeout("jump()",timeout*60*1000+5000);}function OldProcessRet(errstr,errpara){if("当前操作无效,请检查"==errstr&&"SUCC"==errpara){errstr="FAIL";}ProcessRet(errstr,errpara);}function ProcessRet(errstr,errpara){var errtype=getValue("IF_ERRORTYPE");if(errstr!="SUCC"){if(errpara!="SUCC"){var param=document.getElementById("Fnt_"+errpara);if(param==null){ShowErrorForCom(null,null,"当前操作无效,请检查配置参数。");}else {msg="当前操作无效,请检查"+param.innerHTML +"是否合法。";ShowErrorForCom("Frm_"+errpara,null,msg);}}else {if(errstr=="FAIL"){errstr="当前操作无效,请检查配置参数。";}if((errtype&1)==1){ShowNote("提示信息",errstr);}else if((errtype&2)==2){ShowErrorForCom(null,null,errstr);}else if((errtype&4)==4){}else {ShowErrorForCom(null,null,errstr);}}}}
getObj("IF_UPLOADING").value = "N/A";
text  = "<table class='bottom_table' border='0' cellpadding='0' cellspacing='0'>"
+"<tbody><tr>"
+"<td class='bottom_td1'></td>"
+"<td class='bottom_td2'>"
+"<input name='Submit' type='button' id='Btn_Add' onclick=pageAdd()  class='button' value=' 创 建 ' />"
+"<input name='Submit' type='button' id='Btn_Cancel' onclick=pageCancel()  class='button' value=' 取 消 '>&nbsp;&nbsp;&nbsp;"
+"<input name='Submit' type='button' id='Btn_DoEdit' onclick=pageEdit()  class='button' value=' 修 改 ' style='display:none'/>"
+"<input name='Submit' type='button' id='Btn_Delete' onclick=pageDel()  class='button' value=' 删 除 ' style='display:none'/>&nbsp;&nbsp;&nbsp;"
+"</td>"
+"<td class='bottom_td3'></td></tr></tbody>"
+"</table>";
getObj("bottom").innerHTML=text;
getObj("myLayer").style.left = "580px";
getObj("myLayer").style.top  = "59px";
pageLoad(getURL("net_wan_conf_t.gch"));
meta_menu        = new Array();
menu_items       = new Array();
menu_subitems    = new Array();
meta_menu['mmStatu'] = new Array();
meta_menu['mmStatu']['langName'] = '状态';
meta_menu['mmStatu']['page']     = 'status_dev_info_t.gch';
meta_menu['mmNet'] = new Array();
meta_menu['mmNet']['langName'] = '网络';
meta_menu['mmNet']['page']     = 'net_wan_conf_t.gch';
menu_items['mmNet']      = new Array();
menu_subitems['mmNet']   = new Array();
menu_items['mmNet']['smWANConn'] = new Array();
menu_items['mmNet']['smWANConn']['langName'] = '宽带设置';
menu_items['mmNet']['smWANConn']['page']     = 'net_wan_conf_t.gch';
menu_subitems['mmNet']['smWANConn'] = new Array();
menu_subitems['mmNet']['smWANConn']['ssmWANConn'] = new Array();
menu_subitems['mmNet']['smWANConn']['ssmWANConn']['langName'] = 'Internet连接';
menu_subitems['mmNet']['smWANConn']['ssmWANConn']['page']     = 'net_wan_conf_t.gch';
menu_items['mmNet']['smAddMgr'] = new Array();
menu_items['mmNet']['smAddMgr']['langName'] = 'LAN侧地址配置';
menu_items['mmNet']['smAddMgr']['page']     = 'net_dhcp_dynamic_t.gch';
menu_subitems['mmNet']['smAddMgr'] = new Array();
menu_items['mmNet']['smWLAN'] = new Array();
menu_items['mmNet']['smWLAN']['langName'] = 'WLAN配置';
menu_items['mmNet']['smWLAN']['page']     = 'net_11n_conf_t.gch';
menu_subitems['mmNet']['smWLAN'] = new Array();
menu_items['mmNet']['smTR069'] = new Array();
menu_items['mmNet']['smTR069']['langName'] = '远程管理';
menu_items['mmNet']['smTR069']['page']     = 'net_tr069_basic_t.gch';
menu_subitems['mmNet']['smTR069'] = new Array();
menu_items['mmNet']['smQoS'] = new Array();
menu_items['mmNet']['smQoS']['langName'] = 'QoS';
menu_items['mmNet']['smQoS']['page']     = 'e8_net_qos_basic_t.gch';
menu_subitems['mmNet']['smQoS'] = new Array();
menu_items['mmNet']['smSNTP'] = new Array();
menu_items['mmNet']['smSNTP']['langName'] = '时间管理';
menu_items['mmNet']['smSNTP']['page']     = 'net_sntp_conf_t.gch';
menu_subitems['mmNet']['smSNTP'] = new Array();
menu_items['mmNet']['smRoutMgr'] = new Array();
menu_items['mmNet']['smRoutMgr']['langName'] = '路由配置';
menu_items['mmNet']['smRoutMgr']['page']     = 'net_route_static_t.gch';
menu_subitems['mmNet']['smRoutMgr'] = new Array();
menu_items['mmNet']['smADSL'] = new Array();
menu_items['mmNet']['smADSL']['langName'] = 'DSL配置';
menu_items['mmNet']['smADSL']['page']     = 'net_dsl_conf_t.gch';
menu_subitems['mmNet']['smADSL'] = new Array();
meta_menu['mmSec'] = new Array();
meta_menu['mmSec']['langName'] = '安全';
meta_menu['mmSec']['page']     = 'sec_firewall_conf_t.gch';
meta_menu['mmApp'] = new Array();
meta_menu['mmApp']['langName'] = '应用';
meta_menu['mmApp']['page']     = 'sec_fw_alg_t.gch';
meta_menu['mmManager'] = new Array();
meta_menu['mmManager']['langName'] = '管理';
meta_menu['mmManager']['page']     = 'manager_aduser_conf_t.gch';
meta_menu['mmDiag'] = new Array();
meta_menu['mmDiag']['langName'] = '诊断';
meta_menu['mmDiag']['page']     = 'manager_dsl_diag_t.gch';
meta_menu['mmHelp'] = new Array();
meta_menu['mmHelp']['langName'] = '帮助';
meta_menu['mmHelp']['page']     = 'help_t.gch';

var selectPage  = "net_wan_conf_t.gch";
var selectSupId = "mmNet";
function menuUpdate()
{
var supId = selectSupId;
text = "<ul>"
+ "<li><a class='left'></a></li>"
+ "<li><span class='rightx text_content'><a name='top'></a>"
+ "&nbsp;|&nbsp;";
for ( var midId in menu_items[supId] )
{
var stat = getMidMenuStat(supId, midId);
if ( stat == "single" || stat == "closed" )
{
text = text
+ "<a class='h2_link' id='"+midId+"' onclick='javascript:OnMenuItemClick(\"" + supId + "\",\"" + midId + "\"); openLink(\"" + menu_items[supId][midId]['URL'] + "\")'>"
+  menu_items[supId][midId]['langName']
+  "</a>&nbsp;|&nbsp;";
}
else if ( stat == "open" )
{
text = text
+   "<span class='text_h2_s'>"
+    menu_items[supId][midId]['langName']
+    "</span>&nbsp;|&nbsp;";
var textc3 = "<table class='h3_table' border='0' cellpadding='0' cellspacing='0'>";
for ( var subId in menu_subitems[supId][midId] )
{
if (subId == "ssmDHCPSer")
{
textc3 = textc3
+    "<tr class='h3_s'>"
+    "<td>"
+     "<font id='"+subId+"' style='color:rgb(44,80,109)'>"
+     "IPv4配置&nbsp;&nbsp;&nbsp;&nbsp;"
+    "</tr>";
}
else if (subId == "ssmIPV6Ra")
{
textc3 = textc3
+    "<tr class='h3_s'>"
+    "<td>"
+     "<font id='"+subId+"' style='color:rgb(44,80,109)'>"
+     "<br>IPv6配置&nbsp;&nbsp;&nbsp;&nbsp;"
+    "</tr>";
}
if (menu_subitems[supId][midId][subId]['page'] == selectPage)
{
textc3 = textc3
+    "<tr class='h3_s'>"
+    "<td>"
+     "<font id='"+subId+"'>"
+     menu_subitems[supId][midId][subId]['langName']
+    "<img src='img/push.gif'/></font></td>"
+    "</tr>";
}
else
{
textc3 = textc3
+   "<tr class='h3'>"
+   "<td>"
+   "<a class='h3_space'  id='"+subId+"' onclick=\"javascript:openLink('" +menu_subitems[supId][midId][subId]['URL'] + "')\">"
+   menu_subitems[supId][midId][subId]['langName']
+  "</a></td>"
+   "</tr>";
}
}
textc3 += "</table>";
getObj("h3_menu").innerHTML=textc3;
}
+"</span></li>"
+"</ul>";
getObj("menu0").innerHTML=text;
}
}
function myOnLoad()
{
menuDisp();
}
framedispalay('myiframe');
myOnLoad();
</script>

您需要登录后才可以回帖 登录 | 注 册

本版积分规则

QQ|Archiver|手机版|小黑屋|宽带技术网 ( 粤ICP备15054574号  

粤公网安备 44152102000001号

GMT+8, 2016-12-11 00:41 , Processed in 0.483112 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表