
function CheckLogin(webSite){	

	var SelectMemberType=CheckSelectMember(document.getElementsByName("radUserType"));
	if (SelectMemberType){
		if (document.all.Unicorn_UserName.value==''){			
			alert("请输入用户名！");
			document.all.Unicorn_UserName.focus();
			return false;
		}
		if (document.all.Unicorn_Password.value==''){
			alert("请输入密码！");
			document.all.Unicorn_Password.focus();
			return false;
		}
		var sUserName=document.all.Unicorn_UserName.value;
		var sPassword=document.all.Unicorn_Password.value;
		switch(SelectMemberType){
			case 'JobSeeker':
				window.open('Login.asp?SiteType='+webSite+'&UserName='+sUserName+'&Password='+sPassword,'','width=750,height=506, toolbar=no, menubar=no, scrollbars=no, resizable=yes,location=no, status=no');
				break;
			case 'Recruiter':
				window.open('Login.asp?SiteType='+webSite+'&UserName='+sUserName+'&Password='+sPassword,'','width=750,height=506, toolbar=no, menubar=no, scrollbars=no, resizable=yes,location=no, status=no');
				break;
			default:
		}
	
	}	
	return false;
		
}
function CheckSelectMember(obj) {
	if (obj[0].checked){
        return obj[0].value
        
      }
    else if(obj[1].checked){
        return obj[1].value
        
      }            
    else{
        alert("请先选择您的会员身份！");
        obj[0].focus();
        return false;
      }
}

function CheckData()
{ 
var usertype=document.getElementsByName("renUserType")
var SelectMemberType=CheckSelectMember(usertype)
if(SelectMemberType=="Rent_Person")
{	

	if(document.getElementById("renUserName").value=="")
	{
		alert("请输入身份证号码.")
		document.getElementById("renUserName").focus()
		return false
	}
	if(document.getElementById("renPassword").value=="")
	{
		alert("请输入社保号.")
		document.getElementById("renPassword").focus()
		return false
	}
	jobForm.action="login.asp"
	return true
}
else if(SelectMemberType=="Rent_Company")
{
	if(document.getElementById("renUserName").value=="")
	{
		alert("请输入用户名.")
		document.getElementById("renUserName").focus()
		return false
	}
	if(document.getElementById("renPassword").value=="")
	{
		alert("请输入密码.")
		document.getElementById("renPassword").focus()
		return false
	}
	 jobForm.action="login.asp"
	 return true;
}
return false
}	
function CheckTrainData()
{
	if(document.getElementById("txtUserName").value=="")
	{
		alert("请输入用户名.")
		document.getElementById("txtUserName").focus()
		return false
	}
	if(document.getElementById("txtPassword").value=="")
	{
		alert("请输入密码.")
		document.getElementById("txtPassword").focus()
		return false
	}
	jobForm.action="login.asp?radUserType=TrainOrg"
	return true
}

function CheckSearchData()
{
/*
	if(document.getElementById("txtKeyWord").value=="")
	{
		alert("请输入关键字");
		document.getElementById("txtKeyWord").focus();
		return false;
	}
*/	

	if(document.getElementById("txtKeyWord").value=="职位名称或描述、公司名称等关键字")
	{
		document.getElementById("txtKeyWord").value="";
	}
	
	if(document.getElementById("sltArea").value=="城市或地区")
	{
		document.getElementById("sltArea").value="";
	}
	return true;
}
