var _file_creatAjax = '<script language="JavaScript"  src="javascript/CreatHttpRequest.js"></script>';
document.write(_file_creatAjax);

function vConvert(str){
	str = str.replace(/\+/g, "%2B");
	str = str.replace(/\&/g, "%26");
	return str;
	
}

function reqlogin(){
	var username=document.getElementById("username").value;
	var pwds=document.getElementById("pwd").value;
	if(username==""){
		alert("User name can not be empty")
		return false
	}

	if(pwds==""){
		alert("Password can not be empty");
		return false;
	}
	
	username=vConvert(username);
	pwds=vConvert(pwds);

	urlRequest="ons_logon.php";
	strPost="username="+username+"&password="+pwds+"&cmd_login=accLogin";
	useAjax(urlRequest,strPost);
	return true;


}





function handler(){

	if(strRep=="1"){
		//alert(strRep)
		window.location.href="usrMemberSearch.php";
		return;
	}else{
		if(strRep=="3001"){
			alert("The User Name and Password combination you have entered is invalid. Please try again.");
			return;
		}

		if(strRep=="2202(2)" || strRep=="2202(3)" ){
			//alert("用户未通过邮件验证");
			window.location.href="pmt_Activation.php?";
			return;
		}


		//document.getElementById("loading").innerHTML="";
		alert(strRep);
	}

}
