﻿function sss(){
document.getElementById('table1').style.height=(window.document.body.clientHeight>window.document.body.scrollHeight)?window.document.body.clientHeight:window.document.body.scrollHeight;
document.getElementById('table1').style.width="100%";
document.getElementById('table1').style.display='block';
document.getElementById('table1').style.zindex=100;

document.getElementById('table2').style.left=window.screen.width/2-250;
document.getElementById('table2').style.top=window.screen.height/2-200;
document.getElementById('table2').style.display='block';
document.getElementById('table2').style.zIndex=200;
document.getElementById('default1').style.zIndex=-1;
document.getElementById('default2').style.zIndex=-1;
document.getElementById('default3').style.zIndex=-1;
document.getElementById('default4').style.zIndex=-1;
}

function ddd(){
table1.style.height=(window.document.body.clientHeight>window.document.body.scrollHeight)?window.document.body.clientHeight:window.document.body.scrollHeight;
table1.style.width="100%";
table1.style.display='block';
document.getElementById('table1').style.zindex=100;
table2.style.left=window.screen.width/2-250;
table2.style.top=window.document.body.scrollHeight-400;
table2.style.display='block';
document.getElementById('table2').style.zIndex=200;
document.getElementById('default1').style.zIndex=-1;
document.getElementById('default2').style.zIndex=-1;
document.getElementById('default3').style.zIndex=-1;
document.getElementById('default4').style.zIndex=-1;
}

function freset(){
//document.all.aa.value=document.all.mm.value;
table1.style.display='none';
table2.style.display='none';
document.getElementById('default1').style.zIndex=1;
document.getElementById('default2').style.zIndex=1;
document.getElementById('default3').style.zIndex=1;
document.getElementById('default4').style.zIndex=1;
document.getElementById('table1').style.zIndex=-1;
document.getElementById('table2').style.zIndex=-1;
}

function login(){
  if(document.formx.username.value == ""){
      alert("请输入用户名！");
      document.formx.username.focus();
      return false;
  }
  else if(document.formx.password.value == ""){
      alert("请输入密码！");
      document.formx.password.focus();
      return false;
  }
  else if(document.formx.code.value == ""){
      alert("请输入验证码！");
      document.formx.code.focus();
      return false;
  }else{
      formx.submit();
  }
}

function exit(){
	if (window.confirm('确定要退出登录么？')){
		  $.ajax({
              type: "POST",
              url: "Exit.aspx",
              data: "",
              success: function(msg){
				 if(msg=="1"){
				   window.parent.location.href="Default.aspx";
                 }
              },
			  error: function(msg){
			       alert(msg.value);
			  }
          });
	}
}
