var bb1_003 = true;  // 霈� status.htm �䰻�栞�撠𤾸�� start.htm
function sgLM(){
dw("<TABLE BORDER=0 WIDTH=600 HEIGHT='350' CELLPADDING=0 CELLSPACING=0 align=center class='loginbg'>")
golink = "sslvpnportal.htm"
dw("<TR>")
if ("0" == 99) { //amit logo
dw("<td WIDTH=30% class=adminbox_3><img border=0 src=Logo.png></td>");
} else { //摰Ｘ�logo
dw("<td WIDTH=30% class=adminbox_3><img border=0 src=Logo.png></td>")
}
dw("<TD colspan=2 style='text-align:left'>");
dw("<div class='adminbox' align=left>");
dw("<span id=_x style='font-weight:500;'>LOGIN TO YOUR DEVICE</span><br><br>")
dw("<span id=_x style='font-size:small;font-weight:500'>Welcome to the router configuration page, enter</span><br>")
if ("1" == 1) {
dw("<span id=_x style='font-size:small;font-weight:500;margin-top:5px;display:inline-block;'>your username and password and click Login.</span>")
} else {
dw("<span id=_x style='font-size:small;font-weight:500;margin-top:5px;display:inline-block;'>your password and click Login.</span>")
}
dw("<table border=0 cellpadding=0 cellspacing=0 class=adminbox_2>")
if ("1" == 1) {
dw("<tr><td align=center><span id=_wary_0 style='font-weight:500;font-family:Arial;margin-right:10px;'>Username</span></td><td colspan=7><div style='margin:5px 0px 5px 0px'><input type=text name=un size=32 maxlength=15 id='name'></div></td></tr>")
}
dw("<tr>")
dw("<td align=left><span id=_wary_0 style='font-family:Arial;margin-right:10px;font-weight:500;'>Password</span></td><td align='right'>")
dw("<input type=password name=pw size=32 maxlength=15 id='password'>")
dw("<input type=hidden name=rd value=/uir/start.htm><input type=hidden name=rd2 value=/uir/start.htm><input type=hidden name=Nrd value=1>")
dw("<input type='hidden' name='Ntime' id='Ntime' value=''>")
dw("<span style='display:none' ><input type='submit' value='hsbmit' id=hsbmit></span>")
dw("</td>")
dw("<tr align=right><td colspan='2'><br><input type='button' class=login_button value='Login >' onclick='check_password()'></td></tr>")
if (swm_s_sslvpn){  //show SSL VPN button
dw("<td class=login_button1></td>")
dw("<td class=login_button2 onclick='window.location=golink'><span id=_sslvpn_0>Link to SSL VPN</span></td>")
dw("<td class=login_button3></td>")
}
dw("</tr>")
dw("</TABLE>");
dw("</div>");
dw("</TD>");
dw("</TR>");
dw("</TABLE>");
}

var is_wrong=0;

function check_password(){
	
	if(document.getElementById("name").value!="root" || document.getElementById("password").value!="admin")
    {
	  if(is_wrong==0)	
	  {alert("username/password is wrong");}	  
		
	  if(is_wrong==0)
	  {is_wrong=1;}
	  else	
	  {is_wrong=0;}
       return;
    }
	location.href='dash_network.htm';	
}

var enter = document.getElementById("enter");
enter.addEventListener("keyup", function(event) {
  if (event.keyCode === 13) {
    check_password();
  }
}); 

	