// JavaScript Document
	var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i 
	var regexp=/^\s+/;

			// Employer Validate Function 
			
		
function employerValidate() {
	
	password=frmEmployer.txtPassword.value.length;
	
	if(document.frmEmployer.txtUser.value.replace(regexp,"")=="")	{
		alert("Please enter user name");
		document.frmEmployer.txtUser.focus()
		return false;
	}
	else if(document.frmEmployer.txtEmail.value.replace(regexp,"")=="")	{
		alert("Please enter email address");
		document.frmEmployer.txtEmail.focus()
		return false;
	}
	else if(!document.frmEmployer.txtEmail.value.match(filter)) {
		alert("Please enter a valid email address");
		document.frmEmployer.txtEmail.focus()
		return false;
	}
	if(document.frmEmployer.txtReEmail.value.replace(regexp,"")=="")	{
		alert("Please enter email address again");
		document.frmEmployer.txtReEmail.focus()
		return false;
	}
	else if(!document.frmEmployer.txtReEmail.value.match(filter)) {
		alert("Please enter a valid email address");
		document.frmEmployer.txtReEmail.focus()
		return false;
	}
	else if(document.frmEmployer.txtEmail.value!=document.frmEmployer.txtReEmail.value)	{
		alert("Please enter same email address ");
		document.frmEmployer.txtReEmail.focus()
		return false;
	}
	else if(document.frmEmployer.txtPassword.value.replace(regexp,"")=="")	{
		alert("Please enter password");
		document.frmEmployer.txtPassword.focus()
		return false;
	}
	else if(password < 6 || password > 50 )	{
		alert("Please enter password between 6 to 50 characters");
		document.frmEmployer.txtPassword.focus()
		return false;
	}
	else if(document.frmEmployer.txtRePass.value.replace(regexp,"")=="")	{
		alert("Please enter password again");
		document.frmEmployer.txtRePass.focus()
		return false;
	}
	else if(document.frmEmployer.txtPassword.value!=document.frmEmployer.txtRePass.value)	{
		alert("Please enter same password");
		document.frmEmployer.txtRePass.focus()
		return false;
	}
	else if(document.frmEmployer.industry.value==0)	{
		alert("Please select industry");
		document.frmEmployer.industry.focus()
		return false;
	}
	else if(document.frmEmployer.txtCName.value.replace(regexp,"")=="")	{
		alert("Please enter company name");
		document.frmEmployer.txtCName.focus()
		return false;
	}
	else if(document.frmEmployer.txtDescription.value.replace(regexp,"")=="")	{
		alert("Please enter company description");
		document.frmEmployer.txtDescription.focus()
		return false;
	}
	else if(document.frmEmployer.txtContact.value.replace(regexp,"")=="")	{
		alert("Please enter contact person");
		document.frmEmployer.txtContact.focus()
		return false;
	}
	else if(document.frmEmployer.country.value==0)	{
		alert("Please select country");
		document.frmEmployer.country.focus()
		return false;
	}
	else if(document.frmEmployer.txtCity.value.replace(regexp,"")=="")	{
		alert("Please enter city");
		document.frmEmployer.txtCity.focus()
		return false;
	}
	else if(document.frmEmployer.txtAddress.value.replace(regexp,"")=="")	{
		alert("Please enter address");
		document.frmEmployer.txtAddress.focus()
		return false;
	}
	else if(document.frmEmployer.txtPhone.value.replace(regexp,"")=="")	{
		alert("Please enter phone");
		document.frmEmployer.txtPhone.focus()
		return false;
	}
	
}

function SeekersLogin() {
	if(document.frmEmp.txtEmp.value.replace(regexp,"")=="") {
		alert("Pleae enter user name");
		document.frmEmp.txtEmp.focus()
		return false;
	}
	else if(document.frmEmp.txtPass.value.replace(regexp,"")=="") {
		alert("Pleae enter password");
		document.frmEmp.txtPass.focus()
		return false;
	}
}

function SeekersLogin2() {
	if(document.frmSeeker.txtSeeker.value.replace(regexp,"")=="") {
		alert("Pleae enter user name");
		document.frmSeeker.txtSeeker.focus()
		return false;
	}
	else if(document.frmSeeker.txtSPass.value.replace(regexp,"")=="") {
		alert("Pleae enter password");
		document.frmSeeker.txtSPass.focus()
		return false;
	}
}


function forGetPass() {
	
	if(document.frmForget.txtEmp.value=="") {
		alert("Pleae enter email address");
		document.frmForget.txtEmp.focus()
		return false;
	}
	else if(!document.frmForget.txtEmp.value.match(filter)) {
		alert("Please enter a valid email address");
		document.frmForget.txtEmp.focus()
		return false;
	}
} 

function forGetPass2() {
	
	if(document.frmForgetS.txtSeeker.value=="") {
		alert("Pleae enter email address");
		document.frmForgetS.txtSeeker.focus()
		return false;
	}
	else if(!document.frmForgetS.txtSeeker.value.match(filter)) {
		alert("Please enter a valid email address");
		document.frmForgetS.txtSeeker.focus()
		return false;
	}
} 



function seekerValidate() {
	password=frmJobSeeker.txtPassword.value.length;
	var regexp=/^\s+/;
	
	if(document.frmJobSeeker.txtUser.value.replace(regexp,"")=="")	{
		alert("Please enter user name");
		document.frmJobSeeker.txtUser.focus()
		return false;
	}
	
	else if(document.frmJobSeeker.txtEmail.value=="")	{
		alert("Please enter email address");
		document.frmJobSeeker.txtEmail.focus()
		return false;
	}
	else if(!document.frmJobSeeker.txtEmail.value.match(filter)) {
		alert("Please enter a valid email address");
		document.frmJobSeeker.txtEmail.focus()
		return false;
	}
	if(document.frmJobSeeker.txtReEmail.value=="")	{
		alert("Please enter email address again");
		document.frmJobSeeker.txtReEmail.focus()
		return false;
	}
	else if(!document.frmJobSeeker.txtReEmail.value.match(filter)) {
		alert("Please enter a valid email address");
		document.frmJobSeeker.txtReEmail.focus()
		return false;
	}
	else if(document.frmJobSeeker.txtEmail.value!=document.frmJobSeeker.txtReEmail.value)	{
		alert("Please enter same email address ");
		document.frmJobSeeker.txtReEmail.focus()
		return false;
	}
	else if(document.frmJobSeeker.txtPassword.value=="")	{
		alert("Please enter password");
		document.frmJobSeeker.txtPassword.focus()
		return false;
	}
	else if(password < 6 || password > 50 )	{
		alert("Please enter password between 6 to 50 characters");
		document.frmJobSeeker.txtPassword.focus()
		return false;
	}
	else if(document.frmJobSeeker.txtRePass.value=="")	{
		alert("Please enter password again");
		document.frmJobSeeker.txtRePass.focus()
		return false;
	}
	else if(document.frmJobSeeker.txtPassword.value!=document.frmJobSeeker.txtRePass.value)	{
		alert("Please enter same password");
		document.frmJobSeeker.txtRePass.focus()
		return false;
	}
	
	else if(document.frmJobSeeker.txtFName.value.replace(regexp,"")=="")	{
		alert("Please enter first name");
		document.frmJobSeeker.txtFName.focus()
		return false;
	}
	else if(document.frmJobSeeker.txtLName.value.replace(regexp,"")=="")	{
		alert("Please enter last name");
		document.frmJobSeeker.txtLName.focus()
		return false;
	}
	
	else if(document.frmJobSeeker.ddlGender.value=="")	{
		alert("Please select gender");
		document.frmJobSeeker.ddlGender.focus()
		return false;
	}
	else if(document.frmJobSeeker.nEndMonth.value=="" && document.frmJobSeeker.nEndDay.value=="" && document.frmJobSeeker.nEndYear.value=="") {
		alert("Please select date of birth");
		document.frmJobSeeker.nEndMonth.focus()
		return false;
	}
	else if(document.frmJobSeeker.nEndMonth.value=="") {
		alert("Please select date of month");
		document.frmJobSeeker.nEndMonth.focus()
		return false;
	}
	else if(document.frmJobSeeker.nEndDay.value=="") {
		alert("Please select date of day");
		document.frmJobSeeker.nEndDay.focus()
		return false;
	}
	else if(document.frmJobSeeker.nEndYear.value=="") {
		alert("Please select date of year");
		document.frmJobSeeker.nEndYear.focus()
		return false;
	}
	else if(document.frmJobSeeker.country.value==0)	{
		alert("Please select country");
		document.frmJobSeeker.country.focus()
		return false;
	}
	else if(document.frmJobSeeker.txtCity.value=="")	{
		alert("Please enter city");
		document.frmJobSeeker.txtCity.focus()
		return false;
	}
	else if(document.frmJobSeeker.txtAddress.value=="")	{
		alert("Please enter address");
		document.frmJobSeeker.txtAddress.focus()
		return false;
	}
	else if(document.frmJobSeeker.txtPhone.value=="")	{
		alert("Please enter phone");
		document.frmJobSeeker.txtPhone.focus()
		return false;
	}
	
}

// tell a friend

function tellaFriend() {
	if(document.frmTell.txtyName.value.replace(regexp,"")=="")	{
		alert("Please enter your name");
		document.frmTell.txtyName.focus()
		return false;
	}
	else if(document.frmTell.txtyEmail.value.replace(regexp,"")=="")	{
		alert("Please enter your email address");
		document.frmTell.txtyEmail.focus()
		return false;
	}
	else if(!document.frmTell.txtyEmail.value.match(filter)) {
		alert("Please enter a valid your email address");
		document.frmTell.txtyEmail.focus()
		return false;
	}
	
	else if(document.frmTell.txtfName.value.replace(regexp,"")=="")	{
		alert("Please enter friend name");
		document.frmTell.txtfName.focus()
		return false;
	}
	else if(document.frmTell.txtfEmail.value.replace(regexp,"")=="")	{
		alert("Please enter friend email address");
		document.frmTell.txtfEmail.focus()
		return false;
	}
	else if(!document.frmTell.txtfEmail.value.match(filter)) {
		alert("Please enter a valid friend email address");
		document.frmTell.txtfEmail.focus()
		return false;
	}
	
	}
	


