function jobseekerreg()
{
	 if(job_seeker_reg.jobskr_username.value=="")
	   {
		alert("Please enter user name");
		job_seeker_reg.jobskr_username.focus();
		return false;
	   }
	
   if(job_seeker_reg.jobskr_password.value=="")
	{
		alert("Please enter password");
		job_seeker_reg.jobskr_password.focus();
		return false;
	}
	
	if(job_seeker_reg.jobskr_password.value.length<6)
	{
		
		alert("Password length shoulb be 6 characters or more");
		job_seeker_reg.jobskr_password.focus();
		return false;
	}
	
	if(job_seeker_reg.jobskr_password1.value=="")
	{
		alert("Please re-enter password");
		job_seeker_reg.jobskr_password1.focus();
		return false;
	}
	
	if(job_seeker_reg.jobskr_password.value!=job_seeker_reg.jobskr_password1.value)
	{
		alert("Password and confirm password wants to be the same");
		job_seeker_reg.jobskr_password1.focus();
		return false;
	}
	
	if(job_seeker_reg.jobskr_name.value=="")
	{
		alert("Please enter name");
		job_seeker_reg.jobskr_name.focus();
		return false;
	}
	
	if(job_seeker_reg.jobskr_email.value=="")
	{
		alert("Please enter email");
		job_seeker_reg.jobskr_email.focus();
		return false;
	}
	
	if(!checkEmail(document.job_seeker_reg.jobskr_email.value))
	{
		document.job_seeker_reg.jobskr_email.focus();
	    return false;
	}
	
	if(job_seeker_reg.jobskr_email1.value=="")
	{
		alert("Please re-enter email");
		job_seeker_reg.jobskr_email1.focus();
		return false;
	}
	
	if(job_seeker_reg.jobskr_email.value!=job_seeker_reg.jobskr_email1.value)
	{
		alert("Email and confirm email wants to be the same");
		job_seeker_reg.jobskr_email.focus();
		return false;
	}
	
	if(job_seeker_reg.jobskr_country.selectedIndex<=0)
  	{ 
	 	alert("Please select country");
		job_seeker_reg.jobskr_country.focus();
		return false;
	}
	
	if(job_seeker_reg.jobskr_cur_location.selectedIndex<=0)
  	{ 
	 	alert("Please select current location");
		job_seeker_reg.jobskr_cur_location.focus();
		return false;
	}
	
	if(job_seeker_reg.jobskr_address.value=="")
	{
		alert("Please enter address");
		job_seeker_reg.jobskr_address.focus();
		return false;
	}
	
	if(job_seeker_reg.jobskr_tel_no.value=="" && job_seeker_reg.jobskr_mobile_no.value=="")
	{
		alert("Please enter land line or mobile number");
		job_seeker_reg.jobskr_mobile_no.focus();
		return false;
	}
	
	if(job_seeker_reg.jobskr_exp_year.selectedIndex<=0 && job_seeker_reg.jobskr_exp_months.selectedIndex<=0)
	{   
	    alert("second check");
		alert("Please select total experience");
		job_seeker_reg.jobskr_exp_year.focus();
		return false;
	}
	
	if(job_seeker_reg.jobskr_key_skills.value=="")
	{
		alert("Please enter key skills");
		job_seeker_reg.jobskr_key_skills.focus();
		return false;
	}
	
	if(job_seeker_reg.jobskr_resume_head.value=="")
	{
		alert("Please enter resume head line");
		job_seeker_reg.jobskr_resume_head.focus();
		return false;
	}
	
	/*if(job_seeker_reg.jobskr_funct_area.selectedIndex<=0)
	{
		alert("Please select functional area");
		job_seeker_reg.jobskr_funct_area.focus();
		return false;
	}*/
	
	/*if(job_seeker_reg.jobskr_industry_type.selectedIndex<=0)
	{
		alert("Please select current industry type");
		job_seeker_reg.jobskr_industry_type.focus();
		return false;
	}*/
	
	
	/*if(job_seeker_reg.jobskr_ugcourse.selectedIndex<=0)
  	{ 
	 	alert("Please select country");
		job_seeker_reg.jobskr_ugcourse.focus();
		return false;
	}*/
	
	if(job_seeker_reg.jobskr_ugcourse.selectedIndex<=0)
	{
		  
		alert("Please select basic qualification");
		job_seeker_reg.jobskr_ugcourse.focus();
		return false;
	}
	return true;
}

// To check is number only	
	function numbersonly(myfield, e, dec)
	{
	var key;
	var keychar;
	if (window.event)
		key = window.event.keyCode;
	else if (e)
		key = e.which;
	else
	return true;
	keychar = String.fromCharCode(key);
	
	// control keys
	if 
	((key==null)	|| 
	(key==0) 		|| 
	(key==8) 		||
	(key==9) 		|| 
	(key==13) 		|| 
	
	(key==27) )
	return true;
	
	// numbers
	else if ((("0123456789").indexOf(keychar) > -1))
	return true;
	
	// decimal point jump
	else if (dec && (keychar == "."))
	{
	//myfield.form.elements[dec].focus();
	return true;
	}
	else
	return false;
	}


function trimSpaces(stringValue) {
	// Checks the first occurance of spaces and removes them
	for(i = 0; i < stringValue.length; i++) {
		if(stringValue.charAt(i) != " ") {
			break;
		}
	}
	if(i > 0) {
		stringValue = stringValue.substring(i);
	}
	
	// Checks the last occurance of spaces and removes them
	strLength = stringValue.length - 1;
	for(i = strLength; i >= 0; i--) {
		if(stringValue.charAt(i) != " ") {
			break;
		}
	}
	if(i < strLength) {
		stringValue = stringValue.substring(0, i + 1);
	}
	
	// Returns the string after removing leading and trailing spaces.
	return stringValue;
}

function checkEmail(emailString) {
	splitVal = emailString.split('@');
	if(splitVal.length <= 1) {
		alert("Please enter a valid email address");
		return false;
	}
	if(splitVal[0].length <= 0 || splitVal[1].length <= 0) {
		alert("Please enter a valid email address");
		return false;
	}
	
	splitDomain = splitVal[1].split('.');
	if(splitDomain.length <= 1) {
		alert("Please enter a valid email address");
		return false;
	}
	if(splitDomain[0].length <= 0 || splitDomain[1].length <= 1) {
		alert("Please enter a valid email address");
		return false;
	}
	return true;
}


//-personal Information-//
function checkrecruiter()
{
if(frm.recrtr_username.value=="")
{
alert("Please enter user name");
frm.recrtr_username.focus();
return false;
}

if(frm.recrtr_password.value=="")
{
alert("Please enter password");
frm.recrtr_password.focus();
return false;
}
if(frm.recrtr_password.value.length<6)
{
		
	alert("Password length shoulb be 6 characters or more");
	frm.recrtr_password.focus();
	return false;
}

if(frm.recrtr_confirm_password.value=="")
{
alert("Please enter confirm  password");
frm.recrtr_confirm_password.focus();
return false;
}

	if(frm.recrtr_password.value!=frm.recrtr_confirm_password.value)
	{
		alert("Password and confirm password wants to be the same");
		frm.recrtr_confirm_password.focus();
		return false;
	}




if(frm.recrtr_compname.value=="")
{
alert("Please enter Company name");
frm.recrtr_compname.focus();
return false;
}

/*
if(frm.txtemail.value.indexOf("@")==-1)
{
alert("Invalid email ! Enter @");
frm.txtemail.focus();
return false;
}
if(frm.txtemail.value.indexOf(".")==-1)
{
alert("Invalid email ! Enter .");
frm.txtemail.focus();
return false;
}
*/
    if(frm.recrtr_email.value=="")
    {
	alert("Please Enter email");
	frm.recrtr_email.focus();
	return false;
	}
    var emailString=frm.recrtr_email.value;
    splitVal = emailString.split('@');
	if(splitVal.length <= 1) {
		alert("Please enter a valid email address");
		frm.recrtr_email.focus();
		return false;
	}
	if(splitVal[0].length <= 0 || splitVal[1].length <= 0) {
		alert("Please enter a valid email address");
		frm.recrtr_email.focus();
		return false;
	}
	
	splitDomain = splitVal[1].split('.');
	if(splitDomain.length <= 1) {
		alert("Please enter a valid email address");
		frm.recrtr_email.focus();
		return false;
	}
	if(splitDomain[0].length <= 0 || splitDomain[1].length <= 1) {
		alert("Please enter a valid email address");
		frm.recrtr_email.focus();
		return false;
	}

else
{
return true;
}

}
//-personal Information-//
function checkrecruiter1()
{

if(frm.recrtr_password.value=="")
{
alert("Please enter password");
frm.recrtr_password.focus();
return false;
}

if(frm.recrtr_password.value.length<6)
{
		
	alert("Password length shoulb be 6 characters or more");
	frm.recrtr_password.focus();
	return false;
}

if(frm.recrtr_confirm_password.value=="")
{
alert("Please enter confirm  password");
frm.recrtr_confirm_password.focus();
return false;
}

	if(frm.recrtr_password.value!=frm.recrtr_confirm_password.value)
	{
		alert("Password and confirm password wants to be the same");
		frm.recrtr_confirm_password.focus();
		return false;
	}





if(frm.recrtr_compname.value=="")
{
alert("Please enter Company name");
frm.recrtr_compname.focus();
return false;
}

/*
if(frm.txtemail.value.indexOf("@")==-1)
{
alert("Invalid email ! Enter @");
frm.txtemail.focus();
return false;
}
if(frm.txtemail.value.indexOf(".")==-1)
{
alert("Invalid email ! Enter .");
frm.txtemail.focus();
return false;
}
*/
    if(frm.recrtr_email.value=="")
    {
	alert("Please Enter email");
	frm.recrtr_email.focus();
	return false;
	}
    var emailString=frm.recrtr_email.value;
    splitVal = emailString.split('@');
	if(splitVal.length <= 1) {
		alert("Please enter a valid email address");
		frm.recrtr_email.focus();
		return false;
	}
	if(splitVal[0].length <= 0 || splitVal[1].length <= 0) {
		alert("Please enter a valid email address");
		frm.recrtr_email.focus();
		return false;
	}
	
	splitDomain = splitVal[1].split('.');
	if(splitDomain.length <= 1) {
		alert("Please enter a valid email address");
		frm.recrtr_email.focus();
		return false;
	}
	if(splitDomain[0].length <= 0 || splitDomain[1].length <= 1) {
		alert("Please enter a valid email address");
		frm.recrtr_email.focus();
		return false;
	}

else
{
return true;
}

}

function checkjobdetails()
{

if(frm.job_company_name.value=="")
{
alert("Please enter company name");
frm.job_company_name.focus();
return false;
}

/*if(frm.job_industry_type.value==0)
{
alert("Please select  an industry");
frm.job_industry_type.focus();
return false;
}
if(frm.job_sub_industry_type.value==0)
{
alert("Please select a sub industry");
frm.job_sub_industry_type.focus();
return false;
} */

if(frm.job_title.value=="")
{
alert("Please enter job title");
frm.job_title.focus();
return false;
}

if(frm.job_designation.value=="")
{
alert("Please enter job designation");
frm.job_designation.focus();
return false;
}



if(frm.job_region_id.value==0)
{
alert("Please select  a region");
frm.job_region_id.focus();
return false;
}
if(frm.job_subregion_id.value==0)
{
alert("Please select a sub region");
frm.job_subregion_id.focus();
return false;
}

if(frm.job_contact_name.value=="")
{
alert("Please enter contact name");
frm.job_contact_name.focus();
return false;
}
if(frm.job_contact_address.value=="")
{
alert("Please enter contact address");
frm.job_contact_address.focus();
return false;
}


   if(frm.job_contact_email.value=="")
    {
	alert("Please Enter email");
	frm.job_contact_email.focus();
	return false;
	}
    var emailString=frm.job_contact_email.value;
    splitVal = emailString.split('@');
	if(splitVal.length <= 1) {
		alert("Please enter a valid email address");
		frm.job_contact_email.focus();
		return false;
	}
	if(splitVal[0].length <= 0 || splitVal[1].length <= 0) {
		alert("Please enter a valid email address");
		frm.job_contact_email.focus();
		return false;
	}
	
	splitDomain = splitVal[1].split('.');
	if(splitDomain.length <= 1) {
		alert("Please enter a valid email address");
		frm.job_contact_email.focus();
		return false;
	}
	if(splitDomain[0].length <= 0 || splitDomain[1].length <= 1) {
		alert("Please enter a valid email address");
		frm.job_contact_email.focus();
		return false;
	}



else
{
return true;
}
}

function chksearch()
{
if(document.frm.key.value=="")
{
	alert("Please enter a keyword for the search"); 
//document.forms[0].lprice.value="";
document.frm.key.focus();
return false;
}
}




function jobseekerregedit()
{
	if(job_seeker_reg.jobskr_username.value=="")
	{
		alert("Please enter user name");
		job_seeker_reg.jobskr_username.focus();
		return false;
	}
	
	if(job_seeker_reg.jobskr_password.value=="")
	{
		alert("Please enter password");
		job_seeker_reg.jobskr_password.focus();
		return false;
	}
	
	if(job_seeker_reg.jobskr_password.value.length<6)
	{
		
		alert("Password length shoulb be 6 characters or more");
		job_seeker_reg.jobskr_password.focus();
		return false;
	}
	
	if(job_seeker_reg.jobskr_password1.value=="")
	{
		alert("Please re-enter password");
		job_seeker_reg.jobskr_password1.focus();
		return false;
	}
	
	if(job_seeker_reg.jobskr_password.value!=job_seeker_reg.jobskr_password1.value)
	{
		alert("Password and confirm password wants to be the same");
		job_seeker_reg.jobskr_password1.focus();
		return false;
	}
	
	if(job_seeker_reg.jobskr_name.value=="")
	{
		alert("Please enter name");
		job_seeker_reg.jobskr_name.focus();
		return false;
	}
	
	if(job_seeker_reg.jobskr_email.value=="")
	{
		alert("Please enter email");
		job_seeker_reg.jobskr_email.focus();
		return false;
	}
	
	if(!checkEmail(document.job_seeker_reg.jobskr_email.value))
	{
		document.job_seeker_reg.jobskr_email.focus();
	    return false;
	}
	
	if(job_seeker_reg.jobskr_email1.value=="")
	{
		alert("Please re-enter email");
		job_seeker_reg.jobskr_email1.focus();
		return false;
	}
	
	if(job_seeker_reg.jobskr_email.value!=job_seeker_reg.jobskr_email1.value)
	{
		alert("Email and confirm email wants to be the same");
		job_seeker_reg.jobskr_email.focus();
		return false;
	}
	
	if(job_seeker_reg.jobskr_country.selectedIndex<=0)
  	{ 
	 	alert("Please select country");
		job_seeker_reg.jobskr_country.focus();
		return false;
	}
	
	if(job_seeker_reg.jobskr_cur_location.selectedIndex<=0)
  	{ 
	 	alert("Please select current location");
		job_seeker_reg.jobskr_cur_location.focus();
		return false;
	}
	
	if(job_seeker_reg.jobskr_address.value=="")
	{
		alert("Please enter address");
		job_seeker_reg.jobskr_address.focus();
		return false;
	}
	
	if(job_seeker_reg.jobskr_tel_no.value=="" && job_seeker_reg.jobskr_mobile_no.value=="")
	{
		alert("Please enter land line or mobile number");
		job_seeker_reg.jobskr_mobile_no.focus();
		return false;
	}
	

	
	if(job_seeker_reg.jobskr_key_skills.value=="")
	{
		alert("Please enter key skills");
		job_seeker_reg.jobskr_key_skills.focus();
		return false;
	}
	
	if(job_seeker_reg.jobskr_resume_head.value=="")
	{
		alert("Please enter resume head line");
		job_seeker_reg.jobskr_resume_head.focus();
		return false;
	}
	
	
	if(job_seeker_reg.jobskr_industry_type.selectedIndex<=0)
	{
		alert("Please select current industry type");
		job_seeker_reg.jobskr_industry_type.focus();
		return false;
	}

	return true;
}


