﻿// JScript 文件

function goCertLogin()
{
	//alert(location.host);
	var url,s;
	url = "https://" + location.host;
	s= location.href.substr(location.href.indexOf("://")+3);
	url+=s.substr(s.indexOf("/"));
	location.href = url;
	
	return (false);
}

function goRegister()
{
	var url;
	url = "default.aspx?m=reg_userinfo";
	parent.document.location.href = url;
	return (false);
}

function goLogin()
{
	var txtUserCode = document.all["txtUserCode"];
	var txtPassword = document.all["txtPassword"];
	var txtValidateCode = document.all["txtValidateCode"];
//	alert(Trim(txtValidateCode.value) == "" || Trim(txtUserCode.value) == "" || Trim(txtPassword.value) == "")
	if(txtValidateCode.value == "" || txtUserCode.value == "" || txtPassword.value == "")
	{
		alert("请输入用户名，密码，验证码后再登陆！");
		return false
	}

	document.all["OkButton"].click();
	return false;
}

function goCheckKeyForLogin()
{
	if(event.keyCode == 13)
	{
		return goLogin();
	}
	else
	{
		return true;
	}
}

function Enter()
{
	if(event.keyCode == 13)
	{
		event.keyCode ==9
	}
	
}
  function onOk() {
   // document.getElementById('Paragraph1').className = styleToSelect;
    }
