function GE(a)
{
return document.getElementById(a);
} 
function regInput(reg){
	var srcElem	= event.srcElement
	var oSel	= document.selection.createRange()
	var srcRange	= srcElem.createTextRange()
	oSel.setEndPoint("StartToStart", srcRange)
	var num = oSel.text + String.fromCharCode(event.keyCode) + srcRange.text.substr(oSel.text.length)
	event.returnValue = reg.test(num)
}
function checkForm(form){
	with(form){
		if(UserName.value==""){
			alert("用户名不能为空！");
			UserName.focus();
			return false;
		}
		else if(Password.value == ""){
			alert("密码不能为空！");
			Password.focus();
			return false;
		}
		else{
			return true;
		}
	}
}
function mobilphone(sMobile){
	var pattern = /^13\d{9}$/; 
	return pattern.test(sMobile);
}
function wordLen(sWord){
	var i = 0;
	for(var j = 0; j < sWord.length; j ++){
		if(sWord.charAt(j) > "~"){
			i += 2;
		}
		else{
			i ++;
		}
	}
	return i;
}
function wordCheck(sWord){
	var pattern = /[`~ !　（）！·#￥%……—*——、；‘’”：“，。《》？`@#\$%;':\^&*()-\=+\\|\[\]\{\}\/?\.]/
	return pattern.test(sWord)
}
function hord(){
	if(advanceArea.style.display == "none"){
		advanceArea.style.display = "";
	}
	else{
		advanceArea.style.display = "none";
	}
}
function checkUser(){
	showModalDialog("CheckUser.asp?UserName=" + regform.UserName.value, "CheckUser", "status:no;dialogWidth:250px;dialogHeight:150px;help:no")
}
	
function showCity(strtype)
{
document.getElementById(strtype).style.display="block";
document.getElementById("td_"+strtype).style.backgroundImage="url(/image/blank_01.gif)";
}
function hideCity(strtype)
{
document.getElementById(strtype).style.display="none";
document.getElementById("td_"+strtype).style.backgroundImage="url(/image/blank_02.gif)";
}
function showCity1(strtype)
{
document.getElementById(strtype).style.display="block";
document.getElementById("td_"+strtype).style.backgroundColor="#F9F9F9";
}
function hideCity1(strtype)
{
document.getElementById(strtype).style.display="none";
document.getElementById("td_"+strtype).style.backgroundColor="#D7D7D7";
}


