var sysOPMode_AR = 0; var sysOPMode_APRP = 1; var sysOPMode_AP = 2; var sysOPMode_CB = 3; var sysOPMode_CR = 4; var WebOpModeList = "0001110" var FunctionList = {HAS_DUAL_PPPOE:0,HAS_PASS_THROUGH:0,HAS_PORTBASED_QOS:0,HAS_WLAN_CONNECTION_CONTROL:0,HAS_5G_SETTING:0,HAS_RALINK_COUNTRY_SETTING:0,HAS_TX_NUM:2,HAS_RX_NUM:2,HAS_BOTTOM_IMG:0,HAS_NONE_LOGO_IMG:0,HAS_IPBASED_QOS:0,HAS_NEW_NAT_SERVER:1,HAS_WAN_3G_SETTING:0,HAS_IGMPPROXY:1,HAS_NETBIOS:0,HAS_UPNP_PORTFORWARDING:1,HAS_DNS_SERVERS_ASSIGNED_BY_DHCP_SERVER:0,HAS_MULTI_DNS_MODE:1,HAS_QOS_TOTAL_BANDWIDTH_SETTING:0,HAS_IOBB_DDNS:0,HAS_ADVANCED_DIAGNOSIS:0,USE_ONE_FW_IMAGE:0,HAS_PRIORITY_WEB_ACCOUNT:0,HAS_ENGINEERING_MODE:0,HAS_TR_AGENT:0,HAS_SNMP_TRAP_SUPPORT:1,HAS_IODATA_3G:0,HAS_ENCORE_PIC:0,HAS_WEB_USE_HTML_LOGIN:0,IO_6650_STYLE_LANG_STR:0,HAS_PPPOE_UNNUMBERED_IP:0,HAS_WIZARD_CFLAG:0,HAS_WAN_L2TP:0,HAS_WEB_3G_ISP_LIST:0,HAS_HWNAT:0,HAS_SUPPORT_VPN_REMOTE_DNS:0,HAS_STA_WPSBUTTON:1,HAS_SUPPORT_SNMPD:1,HAS_WIMAX_OUTSIDE:0,HAS_NOT_SUPPORT_MULTI_LAN:1,HAS_WEB_ISOLATION_IN_ADV:1,HAS_IGMPPROXY_GUI:0,HAS_SNMPD_WAN_SUPPORT:0,HAS_WEB_LOCAL_NTP_NO_CHECK:1,NON_USED:0} var wanConnectype=[[0,"Static IP"],[1,"PPPoE"],[2,"Dynamic IP Address"],[3,"PPTP"]]; var VENDORS= {vendorMode:"NetComm NP121 AP", modelName:"NetComm NP121 AP", productID:"03080026", vendorLogo:"logo_netcomm.gif", bannerLogo:"", titleLogo:"title_netcomm.png"}; var vendorString = VENDORS.productID.substr(0,VENDORS.productID.length/2); var modelString = VENDORS.productID.substr(VENDORS.productID.length/2, VENDORS.productID.length-VENDORS.productID.length/2); var g_sysOPMode=2; var wlanApMode=0; var default_language = 'uk_netcomm'; if(vendorString!="030A") var language = getCookie('language'); else var language = "jp"; var file = 'file/'+ language + '.txt'; var xmlfile='file/'+language+'_xml.txt'; var tekst = readFile(file); var tekst_array = tekst.split("~"); function getCookie(c_name) { if (document.cookie.length>0) { c_start=document.cookie.indexOf(c_name + "=") if (c_start!=-1) { c_start=c_start + c_name.length+1 c_end=document.cookie.indexOf(";",c_start) if (c_end==-1) c_end=document.cookie.length return unescape(document.cookie.substring(c_start,c_end)) } } return default_language; } function readFile(url){ var xmlhttp; /*@cc_on @if (@_jscript_version >= 5) try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp = false; } } @else xmlhttp = false; @end @*/ if (!xmlhttp && typeof XMLHttpRequest != 'undefined') { try { xmlhttp = new XMLHttpRequest(); } catch (e) { xmlhttp = false; } } xmlhttp.open("GET",url,false); xmlhttp.send(null); return xmlhttp.responseText; } function decode(code) { code = code.replace(/"/g,'\\"'); code = '"' + code + '"'; code=(eval(code)); return code } function replacespecial(val) { val=val.replace(//g,">"); val=val.replace(/ /g," "); return val; } function showText(number) { return decode(tekst_array[number]); } //TODO function showXmlText(number) { var tekst=readFile(xmlfile); var tekst_array=tekst.split("~"); return tekst_array[number]; } function showFwFixed() { var tekst=readFile(xmlfile); var tekst_array=tekst.split("~"); for(var i=3;i
  • ");} } var oWidth=12; var lWidth; var g_showHomeLink=new Array(); var g_showHomeStr=new Array(); var g_showFwLink=new Array(); var g_showFwStr=new Array(); var g_showWlanLink=new Array(); var g_showWlanStr=new Array(); var g_showra2WlanLink=new Array(); var g_showra2WlanStr=new Array(); var g_showAdvSetLink=new Array(); var g_showAdvSetStr=new Array(); var g_showToolBoxLink=new Array(); var g_showToolBoxStr=new Array(); var g_showEngineeringLink=new Array(); var g_showEngineeringStr=new Array(); function getOPMode(opmode) { var l2tpIdx=0; switch(opmode){ case 0://Ap router default : if(vendorString=="0308"){ g_showHomeLink=new Array("stainfo","lan","stadhcptbl","staschedule","stasylog","stasmonitor"); g_showHomeStr=new Array(showText(7),showText(8),"DHCP",showText(474),showText(11),showText(602)); } else if(vendorString=="030A") { g_showHomeLink=new Array("stainfo","lan","stadhcptbl","stasylog"); g_showHomeStr=new Array(showText(7),showText(8),"DHCP",showText(11)); } else{ g_showHomeLink=new Array("stainfo","lan","stadhcptbl","staschedule","stasylog","stasmonitor"); g_showHomeStr=new Array(showText(7),showText(8),"DHCP",showText(474),showText(11),showText(602)); if(!FunctionList.HAS_NOT_SUPPORT_MULTI_LAN) { g_showHomeLink.push("stamultilan"); g_showHomeStr.push(showText(603)); } } if(FunctionList.HAS_DUAL_PPPOE) { g_showIntLink=new Array("stanet","wizard_dynamic","wizard_static","wizard_pppoe","wizard_pptp","dual_pppoe_cfg"); g_showIntStr=new Array(showText(7),showText(135),showText(136),"PPPoE","PPTP","Dual PPPoE"); } else { if(vendorString=="030A") { g_showIntLink=new Array("stanet"); g_showIntStr=new Array(showText(7)); //l2tpIdx=1; } else { g_showIntLink=new Array("stanet","wizard_dynamic","wizard_static","wizard_pppoe","wizard_pptp"); g_showIntStr=new Array(showText(7),showText(135),showText(136),"PPPoE","PPTP"); //l2tpIdx=5; } } if(vendorString=="030A" && FunctionList.HAS_WIMAX_OUTSIDE) { g_showIntLink.push("wimax_site"); g_showIntStr.push(showText(835)); } if(FunctionList.HAS_WAN_3G_SETTING) { g_showIntLink.push("wizard_3g"); if(vendorString=="030A") { g_showIntStr.push("DATA CARD"); } else { g_showIntStr.push("3G"); } //l2tpIdx=g_showIntLink.length-1; } l2tpIdx=g_showIntLink.length; /*joey 2009-0714 add l2tp page*/ if(FunctionList.HAS_WAN_L2TP) { g_showIntLink.splice(l2tpIdx,0,"wizard_l2tp"); g_showIntStr.splice(l2tpIdx,0,"L2TP"); } if(FunctionList.HAS_WLAN_CONNECTION_CONTROL) { g_showWlanLink=new Array("wlbasic","wladvance","wlencrypt","wlcontrol","wps","staapclisurvey","wlctl"); g_showWlanStr=new Array(showText(77),showText(78),showText(79),showText(604),showText(306),showText(605),showText(519)); } else { g_showWlanLink=new Array("wlbasic","wladvance","wlencrypt","wlcontrol","wps","staapclisurvey"); g_showWlanStr=new Array(showText(77),showText(78),showText(79),showText(604),showText(306),showText(605)); } if(FunctionList.HAS_5G_SETTING) { //g_showWlanLink.unshift(""); //g_showWlanStr.unshift("2.4G"); g_showra2WlanLink=new Array("wlbasic_ra2","wladvance_ra2","wlencrypt_ra2","wlcontrol_ra2","wps_ra2","staapclisurvey_ra2"); g_showra2WlanStr=new Array(showText(77),showText(78),showText(79),showText(604),showText(306),showText(605)); if(FunctionList.HAS_WLAN_CONNECTION_CONTROL) { g_showra2WlanLink.push("wlctl_ra2"); g_showra2WlanStr.push(showText(519)); } //g_showra2WlanLink.unshift(""); //g_showra2WlanStr.unshift("5G"); } if(FunctionList.HAS_PASS_THROUGH) { if(vendorString=="030A") { g_showFwLink=new Array("fwmain","fwpass","fwdmz","fwdos"); g_showFwStr=new Array(showText(87),showText(78),"DMZ","DoS"); } else { g_showFwLink=new Array("fwmain","fwpass","fwdmz","fwdos","fwmaccontrol","fwipcontrol","fwurlb"); g_showFwStr=new Array(showText(87),showText(78),"DMZ","DoS",showText(606),showText(607),showText(608)); } } else { if(vendorString=="030A") { g_showFwLink=new Array("fwmain","fwdmz","fwdos"); g_showFwStr=new Array(showText(87),"DMZ","DoS"); } else { g_showFwLink=new Array("fwmain","fwdmz","fwdos","fwmaccontrol","fwipcontrol","fwurlb"); g_showFwStr=new Array(showText(87),"DMZ","DoS",showText(606),showText(607),showText(608)); } } if(vendorString=="030A") { g_showAdvSetLink=new Array("natvser","natupnp"); g_showAdvSetStr=new Array(showText(610),"UPnP"); if(FunctionList.HAS_IGMPPROXY_GUI) { g_showAdvSetLink.push("wanadv"); g_showAdvSetStr.push("IGMP"); } if(FunctionList.HAS_IOBB_DDNS) { g_showToolBoxLink=new Array("syspasswd","systimezone","wanddns_iobb","tlupgrade","tlcon","tlreset"); g_showToolBoxStr=new Array(showText(612),showText(613),"DDNS",showText(213),showText(214),showText(124)); } else { g_showToolBoxLink=new Array("syspasswd","systimezone","wanddns","tlupgrade","tlcon","tlreset"); g_showToolBoxStr=new Array(showText(612),showText(613),"DDNS",showText(213),showText(214),showText(124)); } } else { if(FunctionList.HAS_IGMPPROXY_GUI) { g_showAdvSetLink=new Array("natmain","natpfw","natvser","natsapp","natalg","natupnp","wanadv","wanqos","natsrout"); g_showAdvSetStr=new Array("NAT",showText(609),showText(610),showText(611),"ALG","UPnP","IGMP","QoS",showText(436)); } else { g_showAdvSetLink=new Array("natmain","natpfw","natvser","natsapp","natalg","natupnp","wanqos","natsrout"); g_showAdvSetStr=new Array("NAT",showText(609),showText(610),showText(611),"ALG","UPnP","QoS",showText(436)); } if(FunctionList.HAS_SUPPORT_SNMPD) { g_showAdvSetLink.push("snmp"); g_showAdvSetStr.push("SNMP"); } if(FunctionList.HAS_ADVANCED_DIAGNOSIS) { g_showToolBoxLink=new Array("syspasswd","systimezone","wanddns","powersaving","sysdiag_adv","tlupgrade","tlcon","tlreset"); g_showToolBoxStr=new Array(showText(612),showText(613),"DDNS",showText(614),showText(615),showText(213),showText(214),showText(124)); } else { g_showToolBoxLink=new Array("syspasswd","systimezone","wanddns","powersaving","sysdiag","tlupgrade","tlcon","tlreset"); g_showToolBoxStr=new Array(showText(612),showText(613),"DDNS",showText(614),showText(615),showText(213),showText(214),showText(124)); } } if(wlanApMode==5) { g_showToolBoxLink.splice(3, 1); g_showToolBoxStr.splice(3, 1); } if(FunctionList.HAS_ENGINEERING_MODE && FunctionList.HAS_TR_AGENT) { g_showEngineeringLink=new Array("acs","bridgelan"); g_showEngineeringStr=new Array("ACS","Bridging"); } break; case 1: // repeater mode case 2: // ap mode if(vendorString=="0308"){ g_showHomeLink=new Array("stainfo","lan","stasylog","stasmonitor"); g_showHomeStr=new Array(showText(7),showText(8),showText(11),showText(602)); } else if(vendorString=="030A") { g_showHomeLink=new Array("stainfo","lan","stadhcptbl","stasylog"); g_showHomeStr=new Array(showText(7),showText(8),"DHCP",showText(11)); } else{ g_showHomeLink=new Array("stainfo","lan","stasylog","stasmonitor"); g_showHomeStr=new Array(showText(7),showText(8),showText(11),showText(602)); if(!FunctionList.HAS_NOT_SUPPORT_MULTI_LAN) { g_showHomeLink.push("stamultilan"); g_showHomeStr.push(showText(603)); } } if(FunctionList.HAS_DUAL_PPPOE) { g_showIntLink=new Array("stanet","wizard_dynamic","wizard_static","wizard_pppoe","wizard_pptp","dual_pppoe_cfg"); g_showIntStr=new Array(showText(7),showText(135),showText(136),"PPPoE","PPTP","Dual PPPoE"); } else { if(vendorString=="030A") { g_showIntLink=new Array("stanet"); g_showIntStr=new Array(showText(7)); } else { g_showIntLink=new Array("stanet","wizard_dynamic","wizard_static","wizard_pppoe","wizard_pptp"); g_showIntStr=new Array(showText(7),showText(135),showText(136),"PPPoE","PPTP"); } } if(vendorString=="030A" && FunctionList.HAS_WIMAX_OUTSIDE) { g_showIntLink.push("wimax_site"); g_showIntStr.push(showText(835)); } if(FunctionList.HAS_WAN_3G_SETTING) { g_showIntLink.push("wizard_3g"); g_showIntStr.push("3G"); } if(FunctionList.HAS_WLAN_CONNECTION_CONTROL) { if(FunctionList.HAS_STA_WPSBUTTON) { g_showWlanLink1=new Array("wlbasic","wladvance","wlencrypt","wlcontrol","wps","staapclisurvey","wlctl"); g_showWlanStr1=new Array(showText(77),showText(78),showText(79),showText(604),showText(306),showText(605),showText(519)); } else { g_showWlanLink1=new Array("wlbasic","wladvance","wlencrypt","wlcontrol","staapclisurvey","wlctl"); g_showWlanStr1=new Array(showText(77),showText(78),showText(79),showText(604),showText(605),showText(519)); } } else { if(FunctionList.HAS_STA_WPSBUTTON) { g_showWlanLink1=new Array("wlbasic","wladvance","wlencrypt","wlcontrol","wps","staapclisurvey"); g_showWlanStr1=new Array(showText(77),showText(78),showText(79),showText(604),showText(306),showText(605)); } else { g_showWlanLink1=new Array("wlbasic","wladvance","wlencrypt","wlcontrol","staapclisurvey"); g_showWlanStr1=new Array(showText(77),showText(78),showText(79),showText(604),showText(605)); } } if(FunctionList.HAS_WLAN_CONNECTION_CONTROL) { if(FunctionList.HAS_STA_WPSBUTTON) { g_showWlanLink2=new Array("wlbasic","wlcontrol","wps","staapclisurvey","wlctl"); g_showWlanStr2=new Array(showText(77),showText(604),showText(306),showText(605),showText(519)); } else { g_showWlanLink2=new Array("wlbasic","wlcontrol","staapclisurvey","wlctl"); g_showWlanStr2=new Array(showText(77),showText(604),showText(605),showText(519)); } } else { if(FunctionList.HAS_STA_WPSBUTTON) { g_showWlanLink2=new Array("wlbasic","wlcontrol","wps","staapclisurvey"); g_showWlanStr2=new Array(showText(77),showText(604),showText(306),showText(605)); } else { g_showWlanLink2=new Array("wlbasic","wlcontrol","staapclisurvey"); g_showWlanStr2=new Array(showText(77),showText(604),showText(605)); } } if(FunctionList.HAS_PASS_THROUGH) { if(vendorString=="030A") { g_showFwLink=new Array("fwmain","fwpass","fwdmz","fwdos"); g_showFwStr=new Array(showText(87),showText(78),"DMZ","DoS"); } else { g_showFwLink=new Array("fwmain","fwpass","fwdmz","fwdos","fwmaccontrol","fwipcontrol","fwurlb"); g_showFwStr=new Array(showText(87),showText(78),"DMZ","DoS",showText(606),showText(607),showText(608)); } } else { if(vendorString=="030A") { g_showFwLink=new Array("fwmain","fwdmz","fwdos"); g_showFwStr=new Array(showText(87),"DMZ","DoS"); } else { g_showFwLink=new Array("fwmain","fwdmz","fwdos","fwmaccontrol","fwipcontrol","fwurlb"); g_showFwStr=new Array(showText(87),"DMZ","DoS",showText(606),showText(607),showText(608)); } } if(vendorString=="030A") { g_showAdvSetLink=new Array("natvser","natupnp"); g_showAdvSetStr=new Array(showText(610),"UPnP"); g_showToolBoxLink=new Array("syspasswd","systimezone","tlupgrade","tlcon","tlreset"); g_showToolBoxStr=new Array(showText(612),showText(613),showText(213),showText(214),showText(124)); } else { g_showAdvSetLink=new Array("natmain","natpfw","natvser","natsapp","natalg","natupnp","wanqos","natsrout"); g_showAdvSetStr=new Array("NAT",showText(609),showText(610),showText(611),"ALG","UPnP","QoS",showText(436)); if(FunctionList.HAS_SUPPORT_SNMPD) { g_showAdvSetLink.push("snmp"); g_showAdvSetStr.push("SNMP"); } if(FunctionList.HAS_ADVANCED_DIAGNOSIS) { g_showToolBoxLink=new Array("syspasswd","systimezone","sysdiag_adv","tlupgrade","tlcon","tlreset"); g_showToolBoxStr=new Array(showText(612),showText(613),showText(615),showText(213),showText(214),showText(124)); } else { g_showToolBoxLink=new Array("syspasswd","systimezone","sysdiag","tlupgrade","tlcon","tlreset"); g_showToolBoxStr=new Array(showText(612),showText(613),showText(615),showText(213),showText(214),showText(124)); } } break; case 5://WDS if(vendorString=="0308"){ g_showHomeLink=new Array("stainfo","lan","stadevice","staschedule","stasylog","stasmonitor"); g_showHomeStr=new Array(showText(7),showText(8),showText(9),showText(474),showText(11),showText(602)); } else if(vendorString=="030A") { g_showHomeLink=new Array("stainfo","lan","stadhcptbl","stasylog"); g_showHomeStr=new Array(showText(7),showText(8),"DHCP",showText(11)); } else{ g_showHomeLink=new Array("stainfo","lan","stadevice","staschedule","stasylog","stasmonitor"); g_showHomeStr=new Array(showText(7),showText(8),showText(9),showText(474),showText(11),showText(602)); if(!FunctionList.HAS_NOT_SUPPORT_MULTI_LAN) { g_showHomeLink.push("stamultilan"); g_showHomeStr.push(showText(603)); } } g_showWlanLink=new Array("wlbasic"); g_showWlanStr=new Array(showText(77)); if(FunctionList.HAS_PASS_THROUGH) { if(vendorString=="030A") { g_showFwLink=new Array("fwmain","fwpass","fwdmz","fwdos"); g_showFwStr=new Array(showText(87),showText(78),"DMZ","DoS"); } else { g_showFwLink=new Array("fwmain","fwpass","fwdmz","fwdos","fwcontrol","fwurlb"); g_showFwStr=new Array(showText(87),showText(78),"DMZ","DoS",showText(128),showText(618)); } } else { if(vendorString=="030A") { g_showFwLink=new Array("fwmain","fwdmz","fwdos"); g_showFwStr=new Array(showText(87),"DMZ","DoS"); } else { g_showFwLink=new Array("fwmain","fwdmz","fwdos","fwcontrol","fwurlb"); g_showFwStr=new Array(showText(87),"DMZ","DoS",showText(128),showText(618)); } } if(vendorString=="030A") { g_showAdvSetLink=new Array("natvser","natupnp"); g_showAdvSetStr=new Array(showText(610),"UPnP"); g_showToolBoxLink=new Array("syspasswd","systimezone","tlupgrade","tlcon","tlreset"); g_showToolBoxStr=new Array(showText(210),showText(211),showText(213),showText(214),showText(124)); } else { g_showAdvSetLink=new Array("natmain","natpfw","natvser","natsapp","natalg","natupnp","wanqos"); g_showAdvSetStr=new Array(showText(87),showText(610),showText(616),showText(617),"ALG","UPnP","QoS"); g_showToolBoxLink=new Array("syspasswd","systimezone","powersaving","tlupgrade","tlcon","tlreset"); g_showToolBoxStr=new Array(showText(210),showText(211),showText(614),showText(213),showText(214),showText(124)); if(FunctionList.HAS_SUPPORT_SNMPD) { g_showAdvSetLink.push("snmp"); g_showAdvSetStr.push("SNMP"); } } break; case sysOPMode_CB: g_showHomeLink=new Array("stainfo","lan","stasylog","stasmonitor"); g_showHomeStr=new Array(showText(7),showText(8),showText(11),showText(602)); if(!FunctionList.HAS_NOT_SUPPORT_MULTI_LAN) { g_showHomeLink.push("stamultilan"); g_showHomeStr.push(showText(603)); } if(FunctionList.HAS_STA_WPSBUTTON) { g_showWlanLink3=new Array("wlbasic","wladvance","wps","wlapprofile"); g_showWlanStr3=new Array(showText(77),showText(78),showText(306),"AP Profile"); } else { g_showWlanLink3=new Array("wlbasic","wladvance","wlapprofile"); g_showWlanStr3=new Array(showText(77),showText(78),"AP Profile"); } g_showToolBoxLink=new Array("syspasswd","systimezone","sysdiag","tlupgrade","tlcon","tlreset"); g_showToolBoxStr=new Array(showText(612),showText(613),showText(615),showText(213),showText(214),showText(124)); break; case sysOPMode_CR: g_showHomeLink=new Array("stainfo","lan","stadhcptbl","stasylog","stasmonitor"); g_showHomeStr=new Array(showText(7),showText(8),"DHCP",showText(11),showText(602)); if(!FunctionList.HAS_NOT_SUPPORT_MULTI_LAN) { g_showHomeLink.push("stamultilan"); g_showHomeStr.push(showText(603)); } g_showIntLink=new Array("stanet","wizard_dynamic","wizard_static","wizard_pppoe","wizard_pptp"); g_showIntStr=new Array(showText(7),showText(135),showText(136),"PPPoE","PPTP"); if(FunctionList.HAS_STA_WPSBUTTON) { g_showWlanLink3=new Array("wlbasic","wladvance","wps","wlapprofile"); g_showWlanStr3=new Array(showText(77),showText(78),showText(306),"AP Profile"); } else { g_showWlanLink3=new Array("wlbasic","wladvance","wlapprofile"); g_showWlanStr3=new Array(showText(77),showText(78),"AP Profile"); } g_showFwLink=new Array("fwmain","fwdmz","fwdos","fwmaccontrol","fwipcontrol","fwurlb"); g_showFwStr=new Array(showText(87),"DMZ","DoS",showText(606),showText(607),showText(608)); g_showAdvSetLink=new Array("natmain","natpfw","natvser","natsapp","natalg","natupnp","wanqos","natsrout"); g_showAdvSetStr=new Array("NAT",showText(609),showText(610),showText(611),"ALG","UPnP","QoS",showText(436)); g_showToolBoxLink=new Array("syspasswd","systimezone","wanddns","sysdiag","tlupgrade","tlcon","tlreset"); g_showToolBoxStr=new Array(showText(612),showText(613),"DDNS",showText(615),showText(213),showText(214),showText(124)); break; } } function showButton() { /* document.write('') document.write(' ') */ document.write('') document.write(' ') document.write('') } function sysLink(index,opmode) { getOPMode(opmode); lWidth=(100-oWidth*g_showHomeLink.length); document.write(""); for(i=1;i<=g_showHomeLink.length;i++){ var picStr=(index==g_showHomeLink[i-1])?"on":"off"; if(index==g_showHomeLink[i-1]){document.write("");} else{document.write("");} document.write(""+g_showHomeStr[i-1]+""); } document.write(""); document.write(""); } function internetLink(index,opmode) { getOPMode(opmode); lWidth=(100-oWidth*g_showIntLink.length); document.write(""); for(i=1;i<=g_showIntLink.length;i++){ var picStr=(index==g_showIntLink[i-1])?"on":"off"; if(index==g_showIntLink[i-1]){document.write("");} else{document.write("");} document.write(""+g_showIntStr[i-1]+""); } document.write(""); document.write(""); } function wlanLink(index,opmode,ssidnum) { var showWlanLink=new Array(); var showWlanStr=new Array(); getOPMode(opmode); if(opmode==0){ lWidth=(100-oWidth*g_showWlanLink.length); showWlanLink=g_showWlanLink; showWlanStr=g_showWlanStr; } else if(opmode==sysOPMode_APRP && ssidnum==1){ lWidth=(100-oWidth*g_showWlanLink2.length); showWlanLink=g_showWlanLink2; showWlanStr=g_showWlanStr2; } else if(opmode==sysOPMode_CB || opmode==sysOPMode_CR) { lWidth=(100-oWidth*g_showWlanLink3.length); showWlanLink=g_showWlanLink3; showWlanStr=g_showWlanStr3; } else if(opmode==sysOPMode_AP) { lWidth=(100-oWidth*g_showWlanLink1.length); showWlanLink=g_showWlanLink1; showWlanStr=g_showWlanStr1; } else{ lWidth=(100-oWidth*g_showWlanLink1.length); showWlanLink=g_showWlanLink1; showWlanStr=g_showWlanStr1; } document.write(""); for(i=1;i<=showWlanLink.length;i++){ var picStr=(index==showWlanLink[i-1])?"on":"off"; if(index==showWlanLink[i-1]){document.write("");} else{document.write("");} document.write(""+showWlanStr[i-1]+""); } document.write(""); document.write(""); } function wlanra2Link(index,opmode,ssidnum) { var showra2WlanLink=new Array(); var showra2WlanStr=new Array(); getOPMode(opmode); if(opmode==0){ lWidth=(100-oWidth*g_showra2WlanLink.length); showra2WlanLink=g_showra2WlanLink; showra2WlanStr=g_showra2WlanStr; } document.write(""); for(i=1;i<=showra2WlanLink.length;i++){ var picStr=(index==showra2WlanLink[i-1])?"on":"off"; if(index==showra2WlanLink[i-1]){document.write("");} else{document.write("");} document.write(""+showra2WlanStr[i-1]+""); } document.write(""); document.write(""); } function fwLink(index,enable) { getOPMode(g_sysOPMode); lWidth=(100-oWidth*g_showFwLink.length); document.write(""); if(enable==0){document.write(""); document.write(""); document.write('');} else{for(i=1;i<=g_showFwLink.length;i++){ var picStr=(index==g_showFwLink[i-1])?"on":"off"; if(index==g_showFwLink[i-1]){document.write("");} else{document.write("");} document.write(""+g_showFwStr[i-1]+"");} document.write("");} document.write(""); } function toolboxLink(index,opmode) { getOPMode(opmode); if(opmode==0) oWidth=12; if(oWidth*g_showToolBoxLink.length > 100) oWidth=100/g_showToolBoxLink.length; lWidth=(100-(oWidth*g_showToolBoxLink.length)); document.write(""); for(i=1;i<=g_showToolBoxLink.length;i++){ var picStr=(index==g_showToolBoxLink[i-1])?"on":"off"; if(index==g_showToolBoxLink[i-1]){document.write("");} else{document.write("");} document.write(""+g_showToolBoxStr[i-1]+""); } document.write(""); document.write(""); } function engineeringLink(index,opmode) { getOPMode(opmode); if(opmode==0) oWidth=12; lWidth=(100-(oWidth*g_showEngineeringLink.length)); document.write(""); for(i=1;i<=g_showEngineeringLink.length;i++){ var picStr=(index==g_showEngineeringLink[i-1])?"on":"off"; if(index==g_showEngineeringLink[i-1]){document.write("");} else{document.write("");} document.write(""+g_showEngineeringStr[i-1]+""); } document.write(""); document.write(""); } function upperEverFirst(str){ var upperStr = str.replace(/\s[a-z]/g,function($1){return $1.toLocaleUpperCase()}).replace(/^[a-z]/,function($1){return $1.toLocaleUpperCase()}); return upperStr; } function wanTypeList(index) { var selectArry=new Array(); for(i=1;i<=4;i++) { selectArry[i]=(i==index)?"selected":""; } document.write(""); document.write(""); document.write(""); document.write(""); document.write(""); //document.write(""); } function advSettingLink(index,enable,opmode) { getOPMode(opmode); if(g_showAdvSetLink.length>=8) oWidth--; if(oWidth<10) oWidth=10; lWidth=(100-oWidth*g_showAdvSetLink.length); document.write(""); if(enable==0){document.write(""); document.write(""); document.write(""); document.write("Routing"); document.write('');} else{ for(i=1;i<=g_showAdvSetLink.length;i++){ var picStr=(index==g_showAdvSetLink[i-1])?"on":"off"; if(index==g_showAdvSetLink[i-1]){document.write("");} else{document.write("");} document.write(""+g_showAdvSetStr[i-1]+""); } } document.write(""); document.write(""); } var FIRMWAREVER=[ {model:"NetComm NP121 AP",clonedMac:"false",webtitle:"EnGenius Wireless 11n Broadband Router",hasAutoChan:"1",pwrEth:"0",showDhcpcName:"0",portbaseQoS:"1"} ]; var g_modeTbl = new Array("AP Router","Station-Ad Hoc","Station-Infrastructure","AP Bridge-Point to Point","AP Bridge-Point to Multi-Point","WDS","AP Repeater"); var s_modeTbl = new Array("AP Router","AP Repeater","AP","Client Bridge"); var MULTICAST_IP_REGX = new RegExp("^(22[4-9]|2[3-4][0-9]|25[0-5])\\.(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])$"); function setFocus(field) { field.value = field.defaultValue; field.focus(); return; } function showSpacedText(str) { str=str.replace(/ /g," "); return str; } function dw(str) { document.write(str+'\n'); } function checkStaRoutingIPAddr(field) { if ( validateKey(field.value) == 0) return false; if ( !checkDigitRange(field.value,1,1,254)) return false; if ( !checkDigitRange(field.value,2,0,254)) return false; if ( !checkDigitRange(field.value,3,0,254)) return false; if ( !checkDigitRange(field.value,4,0,254)) return false; return true; } function checkMaskAddr(field) { if ( validateKey(field.value) == 0) return false; if ( !checkDigitRange(field.value,1,1,255)) return false; if ( !checkDigitRange(field.value,2,0,255)) return false; if ( !checkDigitRange(field.value,3,0,255)) return false; if ( !checkDigitRange(field.value,4,0,255)) return false; return true; } function checkIPAddr(field) { if ( validateKey(field.value) == 0) return false; if ( !checkDigitRange(field.value,1,1,255)) return false; if ( !checkDigitRange(field.value,2,0,255)) return false; if ( !checkDigitRange(field.value,3,0,255)) return false; if ( !checkDigitRange(field.value,4,1,254)) return false; return true; } function isRange(value, minValue, maxValue) { if(value <= maxValue && value >= minValue) return true; else return false; } function calcDHCPMaxIP(str) { var num; var zero=""; var bin=""; for(var i=1;i<=4;i++) { zero = ""; num = getDigit(str,i); var length = (rvt(num)).length; if(length < 8) { for(var j=1;j<=(8-length);j++) { zero = zero + '0'; } } bin = bin + zero + rvt(num); } return Math.pow(2,32 - bin.lastIndexOf('1') - 1) - 2; } function wlanTitlefor5G(band) { if(band==0) // 2.4G wireless dw('2.4G Setting:'); else if(band==1) // 5G wireless dw('5G Setting:'); } function checkPincodeFormat(str) { var PIN = 0; for(i=0;i<8;i++) PIN = PIN + parseInt(str.charAt(i)) * Math.pow(10,7-i); var accum = 0; accum += 3 * parseInt((PIN / 10000000) % 10); accum += 1 * parseInt((PIN / 1000000) % 10); accum += 3 * parseInt((PIN / 100000) % 10); accum += 1 * parseInt((PIN / 10000) % 10); accum += 3 * parseInt((PIN / 1000) % 10); accum += 1 * parseInt((PIN / 100) % 10); accum += 3 * parseInt((PIN / 10) % 10); accum += 1 * parseInt((PIN / 1) % 10); return (0 == parseInt((accum % 10))); } function checkMACAddress(str) { if(str.length < 12) return false; if(str.charAt(0) != '0' || str.charAt(1) != '0') return false; if(str.length == 12) { for(var i=2;i= '0' && str.charAt(i) <= '9') || (str.charAt(i) >= 'a' && str.charAt(i) <= 'f') || (str.charAt(i) >= 'A' && str.charAt(i) <= 'F') ) continue; else return false; } } else if(str.length == 17) { for(var i=2;i= '0' && str.charAt(i) <= '9') || (str.charAt(i) >= 'a' && str.charAt(i) <= 'f') || (str.charAt(i) >= 'A' && str.charAt(i) <= 'F') ) { continue; } else if(i!=2 && i!= 5 && i != 8 && i != 11 && i != 14) { return false; } } } else return false; return true; } function FullMACFormat(str) { var mac=""; for(var i=0;i