function Options(){
	$("#options").toggle();
}
//开始生成页面文件
function make(){
	document.writeln("<div id=\"Login\">");
	//document.writeln("  <div id=\"Title\">&nbsp;用户登陆<\/div>");
	document.writeln("  <div id=\"Content\"><\/div>");
	//document.writeln("  <div id=\"Foot\"><img src=\"\" widht=\"1xp\" 	height=\"1xp\"><\/div>");
	document.writeln("<\/div>");
	$("#Content").append( $("#login_form")[0]);
	moveLayer();
}
function moveLayer() {
 var o=document.getElementById("Login");
 var windowWidth, windowHeight;
 if (self.innerHeight) {
  windowWidth=self.innerWidth;
  windowHeight=self.innerHeight;
 } else if (document.documentElement&&document.documentElement.clientHeight) {
  windowWidth=document.documentElement.clientWidth;
  windowHeight=document.documentElement.clientHeight;
 } else if (document.body) {
  windowWidth=document.body.clientWidth;
  windowHeight=document.body.clientHeight;
 }
 o.style.left=(windowWidth-$("#Login").width())/2+"px";
 o.style.top=(windowHeight-$("#Login").height())/2+"px";
}//
function complete(){
	$("#err").removeClass();
	$("#err").addClass("on");
	$("#err").html("登陆成功！正在跳转……");
	top.location = "default.asp";
}
function err(s){
	var str;
	if (s==0) str ="对不起，您的用户名或密码错误！";
	if (s==-1)str ="对不起，请不要填写非法用户名！";
	if (s==-2)str ="对不起，您的账户已被禁用，请与管理员联系！";
	if (s==-3)str ="对不起，您的填写验证码错误，请重新填写！";
	$("#password").val("");
	$("#getcode").val("");
	$("#code_img").attr("src","Core/base/Safety.VerifyCode.asp");
	$("#Submit").attr("disabled","");
	$("#err").html(str);
	$("#err").show();
}
function checkform(){
	if ($("#username").val()==""){
		$("#username").focus();
		$("#err").html("用户名不能为空!");
		$("#err").show();
		return false ;
		}else $("#err").hide();
	if ($("#password").val()==""){
		$("#password").focus();
		$("#err").html("密码不能为空！");
		$("#err").show();
		return false ;
		}else $("#err").hide();
	if ($("#getcode").val()==""){
		$("#getcode").focus();
		$("#err").html("验证码不能为空！");
		$("#err").show();
		return false ;
		}else $("#err").hide();
	$("#Submit").attr("disabled","true");
	$("#err").html("<font color='#000000'>正在登录……</font>");
	$("#Execute").attr("src","Login.asp?action=check&username="+$("#username").val()+"&password="+$("#password").val()+"&checkcode="+$("#getcode").val());
	return false ;
}
