function openlink(a){hideBaseframe();document.getElementById("basefrm").src=a}function openlinkHidden(a){if(document.getElementById("basefrmHidden").src.indexOf(a)=="-1"){document.getElementById("basefrmHidden").src=a}}function refreshpage(){}jQuery.fn.visible=function(){return this.css("visibility","visible")};jQuery.fn.invisible=function(){return this.css("visibility","hidden")};jQuery.fn.visibilityToggle=function(){return this.css("visibility",function(b,a){return(a=="visible")?"hidden":"visible"})};function showBaseframe(){$("#basefrm").visible()}function hideBaseframe(){$("#basefrm").invisible()}var lastheight=0;function autoResize(c){var b=500;var a;if(document.getElementById){b=document.getElementById(c).contentWindow.document.body.scrollHeight;newheightVisible=b+30}if(b!=lastheight){document.getElementById(c).height=(newheightVisible)+"px";lastheight=newheightVisible}}var loopcnt=0;function applystyle(){try{document.getElementById("basefrm").height="500px";$("#basefrm").contents().click(function(){autoResize("basefrm")});addScript("/js/common.js")}catch(a){if(loopcnt==10){loopcnt=0;return}else{loopcnt++;setTimeout("applystyle()",100)}}}function addScript(c){var b=document.getElementById("basefrm");var a=b.contentDocument.createElement("script");a.src=c;a.type="text/javascript";b.contentDocument.body.appendChild(a)}function addCss(c){var b=document.getElementById("basefrm");var a=document.createElement("link");a.href=c;a.rel="stylesheet";a.type="text/css";frames.basefrm.document.body.appendChild(a)}var loopcnt2=0;function iFrameLoaded(){try{document.getElementById("basefrm").contentWindow.onFrameLoad()}catch(a){if(loopcnt2==10){loopcnt2=0;return}else{loopcnt2++;setTimeout("iFrameLoaded()",1)}}}function updateStatus(){var a="aztech_quickinfo.json.html";$.getJSON(a,function(b){if(b.wanstatus=="Connected"){$("#LED-NET").removeClass("led-off").addClass("led-on");$("#ND_WANlink").removeClass("ND_WANlink_OFF").addClass("ND_WANlink_ON")}else{$("#LED-NET").removeClass("led-on").addClass("led-off");$("#ND_WANlink").removeClass("ND_WANlink_ON").addClass("ND_WANlink_OFF")}if(b.voipstatus=="Connected"){$("#LED-VOIP").removeClass("led-off").addClass("led-on")}else{$("#LED-VOIP").removeClass("led-on").addClass("led-off")}if(b.iptvstatus=="Connected"){$("#LED-IPTV").removeClass("led-off").addClass("led-on")}else{$("#LED-IPTV").removeClass("led-on").addClass("led-off")}});NetworkDiagram()}function toggleMainmenu(){$("#az-tabs-outer").slideToggle(300)}function NetworkDiagram(){$.get("dhcpinfo.ajax.html",function(a){$("#tblClientHidden").html(a);NetworkDiagram_Draw()})}function NetworkDiagram_Draw(){var a=Array();var b=0;$("#tblClientHidden tr").each(function(){var c=0;a[b]=Array();$("td",this).each(function(){a[b][c]=$(this).text();c++});b++});$("#tblClient").html('<tr><td class="firsttd"></td></tr>');for(b=0;b<a.length;b++){switch(a[b][4]){case"LAN":$("#tblClient").append('<tr><td><img src="image/monitor.png"><b>				'+a[b][0]+"</b><br>MAC: "+a[b][1]+"<br>IP: "+a[b][2]+"</td></tr>");break;case"Wifi 2.4G":$("#tblClient").append('<tr><td><img src="image/mobile.png"><b>				'+a[b][0]+"</b><br>MAC: "+a[b][1]+"<br>IP: "+a[b][2]+"</td></tr>");break;case"Wifi 5G":$("#tblClient").append('<tr><td><img src="image/mobile.png"><b>				'+a[b][0]+"</b><br>MAC: "+a[b][1]+"<br>IP: "+a[b][2]+"</td></tr>");break;default:$("#tblClient").append('<tr><td><img src="image/monitor.png"><b>				'+a[b][0]+"</b><br>MAC: "+a[b][1]+"<br>IP: "+a[b][2]+"</td></tr>");break}}};