//sedn email
function compute() {
	//alert('asas');
with (document.paycheck) {
otrate.value = rate.value * otpercent.value;
if (hours.value > 40) ot.value = hours.value - 40;
if (hours.value > 40) hours.value = 40;
gross.value = (rate.value * hours.value) + otrate.value * ot.value;
tax.value = gross.value * taxrate.value;
total.value = gross.value - tax.value - other.value;
   }
}
function add_job_details()
{
if(document.getElementById('images').value == '')
{
alert("First Upload Company Logo From Dashbaord");
document.loginform.image.focus();
document.getElementById('images').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('images').style.borderColor = '';
}

if(document.getElementById('company_name').value =='')
{
alert("Enter Company Name");
document.loginform.company_name.focus();
document.getElementById('company_name').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('company_name').style.borderColor = '';
}
if(document.getElementById('job_title').value == '')
{
alert("Enter Job Title");
document.loginform.job_title.focus();
document.getElementById('job_title').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('job_title').style.borderColor = '';
}

if(document.getElementById('job_des').value == '')
{
alert("Enter Job Details");
document.loginform.job_des.focus();
document.getElementById('job_des').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('job_des').style.borderColor = '';
}

if(document.getElementById('job_refernce').value == '')
{
alert("Enter Job Refernce Number");
document.loginform.job_refernce.focus();
document.getElementById('job_refernce').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('job_refernce').style.borderColor = '';
}

if(document.getElementById('exp_date').value == '')
{
alert("Enter Date");
document.loginform.exp_date.focus();
document.getElementById('exp_date').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('exp_date').style.borderColor = '';
}
/*var date_value=document.getElementById('exp_date').value	
if(!date_value.match(/^[0-9]{4}\/(0[1-9]|1[012])\/(0[1-9]|[12][0-9]|3[01])/))
{
alert("Enter Valid date");
document.loginform.exp_date.focus();
document.getElementById('exp_date').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('exp_date').style.borderColor = '';
}*/
if(document.getElementById('job_salary_from').value == '')
{
document.getElementById('job_salary_from').style.borderColor = '#F00';
alert("Enter Salary From");
document.loginform.job_salary_from.focus();
return false;
}
else
{
document.getElementById('job_salary_from').style.borderColor = '';
}
if(document.getElementById('job_salary_to').value == '')
{
document.getElementById('job_salary_to').style.borderColor = '#F00';
alert("Enter Salary From");
document.loginform.job_salary_to.focus();
return false;
}
else
{
document.getElementById('job_salary_to').style.borderColor = '';
}
if(document.getElementById('job_contact_fname').value == '')
{
document.getElementById('job_contact_fname').style.borderColor = '#F00';
alert("Enter First Name");
document.loginform.job_contact_fname.focus();
return false;
}
else
{
document.getElementById('job_contact_fname').style.borderColor = '';
}
if(document.getElementById('job_contact_lname').value == '')
{
document.getElementById('job_contact_lname').style.borderColor = '#F00';
alert("Enter Last Name");
document.loginform.job_contact_lname.focus();
return false;
}
else
{
document.getElementById('job_contact_lname').style.borderColor = '';
}
if(document.getElementById('job_contact_email').value == '')
{
document.getElementById('job_contact_email').style.borderColor = '#F00';
alert("Enter Email Address");
document.loginform.job_contact_email.focus();
return false;
}
else
{
document.getElementById('job_contact_email').style.borderColor = '';
}
var ck_email=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/;
var email_address =loginform.job_contact_email.value;
if (!ck_email.test(email_address) && document.getElementById('job_contact_email').value!='') 
{
alert("Enter Valid Email Address");
document.getElementById('job_contact_email').style.borderColor = '#F00';
return false;
}
if(document.getElementById('secters').value == '')
{
document.getElementById('secters').style.borderColor = '#F00';
alert("Enter Industry Secters");
document.loginform.secters.focus();
return false;
}
else
{
document.getElementById('secters').style.borderColor = '';
}
return true;
}
function add_job_details3()
{

if(document.getElementById('job_title').value == '')
{
alert("Enter Job Title");
document.loginform.job_title.focus();
document.getElementById('job_title').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('job_title').style.borderColor = '';
}

if(document.getElementById('job_des').value == '')
{
alert("Enter Job Details");
document.loginform.job_des.focus();
document.getElementById('job_des').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('job_des').style.borderColor = '';
}

if(document.getElementById('job_refernce').value == '')
{
alert("Enter Job Refernce Number");
document.loginform.job_refernce.focus();
document.getElementById('job_refernce').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('job_refernce').style.borderColor = '';
}

if(document.getElementById('exp_date').value == '')
{
alert("Enter Date");
document.loginform.exp_date.focus();
document.getElementById('exp_date').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('exp_date').style.borderColor = '';
}
/*var date_value=document.getElementById('exp_date').value	
if(!date_value.match(/^[0-9]{4}\/(0[1-9]|1[012])\/(0[1-9]|[12][0-9]|3[01])/))
{
alert("Enter Valid date");
document.loginform.exp_date.focus();
document.getElementById('exp_date').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('exp_date').style.borderColor = '';
}*/
if(document.getElementById('job_salary_from').value == '')
{
document.getElementById('job_salary_from').style.borderColor = '#F00';
alert("Enter Salary From");
document.loginform.job_salary_from.focus();
return false;
}
else
{
document.getElementById('job_salary_from').style.borderColor = '';
}
if(document.getElementById('job_salary_to').value == '')
{
document.getElementById('job_salary_to').style.borderColor = '#F00';
alert("Enter Salary From");
document.loginform.job_salary_to.focus();
return false;
}
else
{
document.getElementById('job_salary_to').style.borderColor = '';
}
if(document.getElementById('job_contact_fname').value == '')
{
document.getElementById('job_contact_fname').style.borderColor = '#F00';
alert("Enter First Name");
document.loginform.job_contact_fname.focus();
return false;
}
else
{
document.getElementById('job_contact_fname').style.borderColor = '';
}
if(document.getElementById('job_contact_lname').value == '')
{
document.getElementById('job_contact_lname').style.borderColor = '#F00';
alert("Enter Last Name");
document.loginform.job_contact_lname.focus();
return false;
}
else
{
document.getElementById('job_contact_lname').style.borderColor = '';
}
if(document.getElementById('job_contact_email').value == '')
{
document.getElementById('job_contact_email').style.borderColor = '#F00';
alert("Enter Email Address");
document.loginform.job_contact_email.focus();
return false;
}
else
{
document.getElementById('job_contact_email').style.borderColor = '';
}
var ck_email=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/;
var email_address =loginform.job_contact_email.value;
if (!ck_email.test(email_address) && document.getElementById('job_contact_email').value!='') 
{
alert("Enter Valid Email Address");
document.getElementById('job_contact_email').style.borderColor = '#F00';
return false;
}
if(document.getElementById('secters').value == '')
{
document.getElementById('secters').style.borderColor = '#F00';
alert("Enter Industry Secters");
document.loginform.secters.focus();
return false;
}
else
{
document.getElementById('secters').style.borderColor = '';
}
return true;
}
function send_emails()
{
if(document.getElementById('email').value == '')
{
document.sendemails.email.focus();
document.getElementById('email').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('email').style.borderColor = '';
}
var ck_email=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/;
var email_address =sendemails.email.value;
if (!ck_email.test(email_address)) 
{
document.sendemails.email.focus();
document.getElementById('email').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('email').style.borderColor = '';	
}	
if(document.getElementById('message').value == '')
{
document.sendemails.message.focus();
document.getElementById('message').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('message').style.borderColor = '';
}
}
//code fro cvbuild
function cv_build_fun()
{
if(document.getElementById('email_can').value == '')
{
document.cvbuild.email.focus();
document.getElementById('email_can').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('email_can').style.borderColor = '';
}
var ck_email=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/;
var email_address =cvbuild.email_can.value;
if (!ck_email.test(email_address)) 
{
document.cvbuild.email_can.focus();
document.getElementById('email_can').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('email').style.borderColor = '';	
}	
var fup = document.getElementById('file');
var fileName = fup.value;
var filesize=fup.size;
var ext = fileName.substring(fileName.lastIndexOf('.') + 1);

if(ext == "doc" || ext == "docx" || ext == "pdf" || ext == "rtf" || ext == "txt")
{
return true;
} 
else
{
alert("Upload Only doc,docx,pdf,rtf,txt");
fup.focus();
return false;
}
if(filesize > 1024000)
{
return true;
} 
else
{
alert("Max File Upload size is 1 MB");
fup.focus();
return false;
}
}
//code for validatoion profile
function account_details()
{
if(document.getElementById('email').value !='')
{	
if(document.getElementById('email').value == '')
{
document.account_detailsfrom.email.focus();
document.getElementById('email').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('email').style.borderColor = '';
}
var ck_email=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/;
var email_address =account_detailsfrom.email.value;
if (!ck_email.test(email_address)) 
{
document.account_detailsfrom.email.focus();
document.getElementById('email').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('email').style.borderColor = '';	
}	
}
if(document.getElementById('password').value != '')
{
if(document.getElementById('password').value == '')
{
document.change_password_from.password.focus();
document.getElementById('password').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('password').style.borderColor = '';
}
}
if(document.getElementById('cpassword').value != '')
{
if(document.getElementById('cpassword').value == '')
{
document.change_password_from.cpassword.focus();
document.getElementById('cpassword').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('cpassword').style.borderColor = '';
}
}
if(document.getElementById('cpassword').value != '' && document.getElementById('password').value != '')
{
if(document.getElementById('cpassword').value != document.getElementById('password').value)
{
alert('Password does not match!');	
document.change_password_from.cpassword.focus();
document.getElementById('cpassword').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('cpassword').style.borderColor = '';
}
}
return true;
}
//code for change email
function change_email()
{
if(document.getElementById('email').value == '')
{
document.changeemail.email.focus();
document.getElementById('email').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('email').style.borderColor = '';
}
var ck_email=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/;
var email_address =changeemail.email.value;
if (!ck_email.test(email_address)) 
{
document.changeemail.email.focus();
document.getElementById('email').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('email').style.borderColor = '';	
}		
}
//code for subcribe email alert
function subcriberemail()
{
if(document.getElementById('email_alert').value == '')
{
alert("Enter email address");
document.email_alertfrom.email_alert.focus();
document.getElementById('email_alert').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('email_alert').style.borderColor = '';
}
var ck_email=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/;
var email_address =email_alertfrom.email_alert.value;
if (!ck_email.test(email_address)) 
{
alert("Enter valid email address");	
document.email_alertfrom.email_alert.focus();
document.getElementById('email_alert').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('email_alert').style.borderColor = '';	
}		
}
function change_password()
{

if(document.getElementById('password').value == '')
{
document.change_password_from.password.focus();
document.getElementById('password').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('password').style.borderColor = '';
}
if(document.getElementById('cpassword').value == '')
{
document.change_password_from.cpassword.focus();
document.getElementById('cpassword').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('cpassword').style.borderColor = '';
}
if(document.getElementById('cpassword').value != document.getElementById('password').value)
{
alert('Password does not match!');	
document.change_password_from.cpassword.focus();
document.getElementById('cpassword').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('cpassword').style.borderColor = '';
}	
}

//code for checcking file size
function Checkfiles()
{	
if(document.getElementById('filename').value == '' && document.getElementById('cv_file').value== '')
{
alert("Select File To Uplaod Max File Size:1MB");
return false;
}
else
{
document.getElementById('image').style.borderColor = '';
}

var fup = document.getElementById('image');
var fileName = fup.value;

var filesize=fup.size;
var ext = fileName.substring(fileName.lastIndexOf('.') + 1);

if(ext == "doc" || ext == "docx" || ext == "pdf" || ext == "rtf" || ext == "txt")
{
return true;
} 
else
{
alert("Upload Only doc,docx,pdf,rtf,txt");
fup.focus();
return false;
}
if(filesize > 1024000)
{
return true;
} 
else
{
alert("Max File Upload size is 1 MB");
fup.focus();
return false;
}
}

function hide_workhistory()
{
document.getElementById('looking-for').style.display='none';	
document.getElementById('work-history').style.display='block';
document.getElementById('qualifications').style.display='none';
document.getElementById('skills').style.display='none';
document.getElementById('languages').style.display='none';
document.getElementById('license').style.display='none';
}

function hide_qualifications()
{
document.getElementById('looking-for').style.display='none';	
document.getElementById('work-history').style.display='none';
document.getElementById('qualifications').style.display='block';
document.getElementById('skills').style.display='none';
document.getElementById('languages').style.display='none';
document.getElementById('license').style.display='none';
}
function hide_skills()
{
document.getElementById('looking-for').style.display='none';	
document.getElementById('work-history').style.display='none';
document.getElementById('qualifications').style.display='none';
document.getElementById('skills').style.display='block';
document.getElementById('languages').style.display='none';
document.getElementById('license').style.display='none';
}
function hide_languages()
{
document.getElementById('looking-for').style.display='none';	
document.getElementById('work-history').style.display='none';
document.getElementById('qualifications').style.display='none';
document.getElementById('skills').style.display='none';
document.getElementById('languages').style.display='block';
document.getElementById('license').style.display='none';
}
function hide_license()
{
document.getElementById('looking-for').style.display='none';	
document.getElementById('work-history').style.display='none';
document.getElementById('qualifications').style.display='none';
document.getElementById('skills').style.display='none';
document.getElementById('languages').style.display='none';
document.getElementById('license').style.display='block';
}
//code for contact us
function contact_us()
{
	
if(document.getElementById('name').value == '')
{
document.contactus.name.focus();
document.getElementById('name').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('name').style.borderColor = '';
}
if(document.getElementById('emails').value == '')
{
document.contactus.emails.focus();
document.getElementById('emails').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('emails').style.borderColor = '';
}
var ck_email=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/;
var email_address =contactus.emails.value;
if (!ck_email.test(email_address)) 
{
document.contactus.emails.focus();
document.getElementById('emails').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('emails').style.borderColor = '';	
}
if(document.getElementById('category').value == '')
{
document.contactus.category.focus();
document.getElementById('category').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('category').style.borderColor = '';
}
if(document.getElementById('subject').value == '')
{
document.contactus.subject.focus();
document.getElementById('subject').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('subject').style.borderColor = '';
}
if(document.getElementById('exampleTextarea').value == '')
{
document.contactus.message.focus();
document.getElementById('exampleTextarea').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('exampleTextarea').style.borderColor = '';
}
return true;
}

function skills_dataform()
{	
if(document.getElementById('job_skills').value == '')
{
document.getElementById('job_skills').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('job_skills').style.borderColor = '';
}
return true;
}
//code for lookig for form
function lookingforjob()
{	
if(document.getElementById('salary_from').value == '' || document.getElementById('salary_from').value ==0)
{
document.looking_for.salary_from.focus();
document.getElementById('salary_from').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('salary_from').style.borderColor = '';
}
if(document.getElementById('salary_to').value == '' || document.getElementById('salary_to').value ==0)
{
document.looking_for.salary_to.focus();
document.getElementById('salary_to').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('salary_to').style.borderColor = '';
}
if(document.getElementById('sectors_counter').value == 0)
{
alert("Select Sectors");	
document.looking_for.secters.focus();
document.getElementById('secters').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('secters').style.borderColor = '';
}
if(document.getElementById('sectors_counter').value ==3 && document.getElementById('sectors').value!='')
{
alert("you can only add 3 locations");	
document.looking_for.secters.focus();
document.getElementById('secters').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('secters').style.borderColor = '';
}
return true;
}
//code for work  history from

function qualification_work()
{
if(document.getElementById('type').value == '')
{
document.getElementById('type').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('type').style.borderColor = '';
}
if(document.getElementById('school_name').value == '')
{
document.getElementById('school_name').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('school_name').style.borderColor = '';
}
if(document.getElementById('subject').value == '')
{
document.getElementById('subject').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('subject').style.borderColor = '';
}
if(document.getElementById('qualifications_details').value == '')
{
document.getElementById('qualifications_details').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('qualifications_details').style.borderColor = '';
}
return true;
}

//code for qulafications
function fromwork()
{	
if(document.getElementById('job_title1').value == '')
{
document.getElementById('job_title1').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('job_title1').style.borderColor = '';
}
if(document.getElementById('cname').value == '')
{

document.getElementById('cname').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('cname').style.borderColor = '';
}
if(!document.getElementById('currently').checked)
{
if(document.getElementById('fmonth').value == '')
{

document.getElementById('fmonth').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('fmonth').style.borderColor = '';
}
if(document.getElementById('fyear').value == '')
{

document.getElementById('fyear').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('fyear').style.borderColor = '';
}
if(document.getElementById('tmonth').value == '')
{

document.getElementById('tmonth').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('tmonth').style.borderColor = '';
}
if(document.getElementById('tyear').value == '')
{

document.getElementById('tyear').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('tyear').style.borderColor = '';
}
}
if(document.getElementById('exampleTextarea').value == '')
{
document.getElementById('exampleTextarea').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('exampleTextarea').style.borderColor = '';
}
return true;
}
function fromwork_add()
{	
if(document.getElementById('job_title12').value == '')
{
document.getElementById('job_title12').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('job_title12').style.borderColor = '';
}
if(document.getElementById('cname').value == '')
{

document.getElementById('cname').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('cname').style.borderColor = '';
}
if(!document.getElementById('currently').checked)
{
if(document.getElementById('fmonth').value == '')
{

document.getElementById('fmonth').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('fmonth').style.borderColor = '';
}
if(document.getElementById('fyear').value == '')
{

document.getElementById('fyear').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('fyear').style.borderColor = '';
}
if(document.getElementById('tmonth').value == '')
{

document.getElementById('tmonth').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('tmonth').style.borderColor = '';
}
if(document.getElementById('tyear').value == '')
{

document.getElementById('tyear').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('tyear').style.borderColor = '';
}
}
if(document.getElementById('exampleTextarea').value == '')
{
document.getElementById('exampleTextarea').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('exampleTextarea').style.borderColor = '';
}
return true;
}
function address_from()
{
if(document.getElementById('address_can').value == '')
{
document.loginform.address_can.focus();
document.getElementById('address_can').style.borderColor = '#F00';
document.getElementById('address_can_error').style.display='block';
return false;
}
else
{
document.getElementById('address_can').style.borderColor = '';
document.getElementById('address_can_error').style.display='none';
}

if(document.getElementById('phone').value == '')
{
document.loginform.phone.focus();
document.getElementById('phone').style.borderColor = '#F00';
document.getElementById('phone_error').style.display='block';
return false;
}
else
{
document.getElementById('phone').style.borderColor = '';
document.getElementById('phone_error').style.display='none';
}

if(document.getElementById('email').value == '')
{
document.loginform.email.focus();
document.getElementById('email').style.borderColor = '#F00';
document.getElementById('email_error').style.display='block';
return false;
}
else
{
document.getElementById('email').style.borderColor = '';
document.getElementById('email_error').style.display='none';
}
var ck_email=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/;
var email_address =loginform.email.value;
if (!ck_email.test(email_address)) 
{
document.loginform.email.focus();
document.getElementById('email').style.borderColor = '#F00';
document.getElementById('email_error_valid').style.display='block';
return false;
}
else
{
document.getElementById('email').style.borderColor = '';
document.getElementById('email_error_valid').style.display='none';	
}

return true;
}

//code for fname
function signupfirstname()
{	
if(document.getElementById('fname').value == '')
{
document.signupform.fname.focus();
document.getElementById('fname').style.borderColor = '#F00';
document.getElementById('fname_error').style.display='block';
return false;
}
else
{
document.getElementById('fname').style.borderColor = '';
document.getElementById('fname_error').style.display='none';
}
}
function recruitersfirstname()
{	

if(document.getElementById('recfname').value == '')
{
document.recruiters.recfname.focus();
document.getElementById('recfname').style.borderColor = '#F00';
document.getElementById('recfname_error').style.display='block';
return false;
}
else
{
document.getElementById('recfname').style.borderColor = '';
document.getElementById('recfname_error').style.display='none';
}
}

//code for last name
function signuplastname()
{	
if(document.getElementById('lname').value == '')
{
document.signupform.lname.focus();
document.getElementById('lname').style.borderColor = '#F00';
document.getElementById('lname_error').style.display='block';
return false;
}
else
{
document.getElementById('lname').style.borderColor = '';
document.getElementById('lname_error').style.display='none';
}
}
function recruiterslastname()
{	
if(document.getElementById('reclname').value == '')
{
document.recruiters.reclname.focus();
document.getElementById('reclname').style.borderColor = '#F00';
document.getElementById('reclname_error').style.display='block';
return false;
}
else
{
document.getElementById('reclname').style.borderColor = '';
document.getElementById('reclname_error').style.display='none';
}
}
function recruiterscname()
{	
if(document.getElementById('reccname').value == '')
{
document.recruiters.reccname.focus();
document.getElementById('reccname').style.borderColor = '#F00';
document.getElementById('reccname_error').style.display='block';
return false;
}
else
{
document.getElementById('reccname').style.borderColor = '';
document.getElementById('reccname_error').style.display='none';
}
}
//phone

function recruitersphone()
{	
if(document.getElementById('recphone').value == '')
{
document.recruiters.recphone.focus();
document.getElementById('recphone').style.borderColor = '#F00';
document.getElementById('recphone_error').style.display='block';
return false;
}
else
{
document.getElementById('recphone').style.borderColor = '';
document.getElementById('recphone_error').style.display='none';
}
}

function recruiterspassword()
{	
if(document.getElementById('rec1password').value == '')
{
document.recruiters.rec1password.focus();
document.getElementById('rec1password').style.borderColor = '#F00';
document.getElementById('recpass_error').style.display='block';
return false;
}
else
{
document.getElementById('rec1password').style.borderColor = '';
document.getElementById('recpass_error').style.display='none';
}
}

function recruiterscpassword()
{	
if(document.getElementById('reccpassword').value == '')
{
document.recruiters.reccpassword.focus();
document.getElementById('reccpassword').style.borderColor = '#F00';
document.getElementById('reccpass_error').style.display='block';
return false;
}
else
{
document.getElementById('reccpassword').style.borderColor = '';
document.getElementById('reccpass_error').style.display='none';
}
}

//code for email
function signupemail()
{	
if(document.getElementById('email').value == '')
{
document.signupform.email.focus();
document.getElementById('email').style.borderColor = '#F00';
document.getElementById('email_error').style.display='block';
return false;
}
else
{
document.getElementById('email').style.borderColor = '';
document.getElementById('email_error').style.display='none';
}
var ck_email=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/;
var email_address =signupform.email.value;
if (!ck_email.test(email_address)) 
{
document.signupform.email.focus();
document.getElementById('email').style.borderColor = '#F00';
document.getElementById('email_error_valid').style.display='block';
return false;
}
else
{
document.getElementById('email').style.borderColor = '';
document.getElementById('email_error_valid').style.display='none';	
}
}
function recruitersemail()
{	
if(document.getElementById('recemail').value == '')
{
document.recruiters.recemail.focus();
document.getElementById('recemail').style.borderColor = '#F00';
document.getElementById('recemail_error').style.display='block';
return false;
}
else
{
document.getElementById('recemail').style.borderColor = '';
document.getElementById('recemail_error').style.display='none';
}
var ck_email=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/;
var email_address1 =recruiters.recemail.value;
if (!ck_email.test(email_address1)) 
{
document.recruiters.recemail.focus();
document.getElementById('recemail').style.borderColor = '#F00';
document.getElementById('recemail_error_valid').style.display='block';
return false;
}
else
{
document.getElementById('recemail').style.borderColor = '';
document.getElementById('recemail_error_valid').style.display='none';	
}
}

function loginemail()
{	
if(document.getElementById('email_login').value == '')
{
document.logincan.email.focus();
document.getElementById('email_login').style.borderColor = '#F00';
document.getElementById('email_error').style.display='block';
return false;
}
else
{
document.getElementById('email_login').style.borderColor = '';
document.getElementById('email_error').style.display='none';
}
var ck_email=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/;
var email_address =logincan.email.value;
if (!ck_email.test(email_address)) 
{
document.logincan.email.focus();
document.getElementById('email_login').style.borderColor = '#F00';
document.getElementById('email_error_valid').style.display='block';
return false;
}
else
{
document.getElementById('email_login').style.borderColor = '';
document.getElementById('email_error_valid').style.display='none';	
}
}
function loginemail2()
{	
if(document.getElementById('email_login1').value == '')
{
document.logincan2.email.focus();
document.getElementById('email_login1').style.borderColor = '#F00';
document.getElementById('email_error1').style.display='block';
return false;
}
else
{
document.getElementById('email_login1').style.borderColor = '';
document.getElementById('email_error1').style.display='none';
}
var ck_email=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/;
var email_address =logincan2.email.value;
if (!ck_email.test(email_address)) 
{
document.logincan2.email.focus();
document.getElementById('email_login1').style.borderColor = '#F00';
document.getElementById('email_error_valid1').style.display='block';
return false;
}
else
{
document.getElementById('email_login1').style.borderColor = '';
document.getElementById('email_error_valid1').style.display='none';	
}
}
function signuppassword()
{
if(document.getElementById('password').value == '')
{
document.signupform.password.focus();
document.getElementById('password').style.borderColor = '#F00';
document.getElementById('pass_error').style.display='block';
return false;
}
else
{
document.getElementById('password').style.borderColor = '';
document.getElementById('pass_error').style.display='none';
}
}
function loginpassword()
{
if(document.getElementById('password_login').value == '')
{
document.logincan.password.focus();
document.getElementById('password_login').style.borderColor = '#F00';
document.getElementById('pass_error').style.display='block';
return false;
}
else
{
document.getElementById('password_login').style.borderColor = '';
document.getElementById('pass_error').style.display='none';
}
}
function loginpassword2()
{
if(document.getElementById('password_login1').value == '')
{
document.logincan2.password.focus();
document.getElementById('password_login1').style.borderColor = '#F00';
document.getElementById('pass_error1').style.display='block';
return false;
}
else
{
document.getElementById('password_login1').style.borderColor = '';
document.getElementById('pass_error1').style.display='none';
}
}
function signupplocation()
{
if(document.getElementById('p_location').value == '')
{
document.signupform.p_location.focus();
document.getElementById('p_location').style.borderColor = '#F00';
document.getElementById('location_error').style.display='block';
return false;
}
else
{
document.getElementById('p_location').style.borderColor = '';
document.getElementById('location_error').style.display='none';
}
}
function signupjobtitle()
{
if(document.getElementById('job_title').value == '')
{
document.signupform.job_title.focus();
document.getElementById('job_title').style.borderColor = '#F00';
document.getElementById('job_title_error').style.display='block';
return false;
}
else
{
document.getElementById('job_title').style.borderColor = '';
document.getElementById('job_title_error').style.display='none';
}	
}
function signupjsecters()
{
if(document.getElementById('secters').value == '')
{

document.getElementById('secters').style.borderColor = '#F00';
document.getElementById('secters_error').style.display='block';
return false;
}
else
{
document.getElementById('secters').style.borderColor = '';
document.getElementById('secters_error').style.display='none';
}	
}
	
	
	
function isNumberKey(evt,f)
{
	
          var charCode = (evt.which) ? evt.which : event.keyCode;
          if (charCode != 46 && charCode > 31
            && (charCode < 48 || charCode > 57))
             return false;


          return true;
}
//show llcoation
function show_location()
{
document.getElementById('p_location').style.display='block';
document.getElementById('add_location').style.display='block';
}
//validation for location
function add_location_form()
{
if(document.getElementById('p_location').value == '')
{
document.getElementById('p_location').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('p_location').style.borderColor = '';
}
return true;
}

function add_language_form()
{
if(document.getElementById('p_language').value == '')
{
document.getElementById('p_language').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('p_language').style.borderColor = '';
}
return true;
}
function update_language_form()
{
if(document.getElementById('p_languageupdate').value == '')
{
document.getElementById('p_languageupdate').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('p_languageupdate').style.borderColor = '';
}
return true;
}

//update location code
function update_location_form()
{
if(document.getElementById('p_locationupdate').value == '')
{
document.getElementById('p_locationupdate').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('p_locationupdate').style.borderColor = '';
}
return true;
}
//code for to check personl inform field
function update_personalinfro_form()
{
if(document.getElementById('exampleTextarea').value == '')
{
document.getElementById('exampleTextarea').style.borderColor = '#F00';
return false;
}
else
{
document.getElementById('exampleTextarea').style.borderColor = '';
}
return true;
}
function alphaOnly(evt) 
{ 
    var charCode = (evt.which) ? evt.which : window.event.keyCode; 
 
    if (charCode <= 13) 
    { 
        return true; 
    } 
    else 
    { 
        var keyChar = String.fromCharCode(charCode); 
        var re = /[a-zA-Z ]/ 
        return re.test(keyChar); 
    }

}
//date validation for search
function report_form()
{	
 var fromdate=document.getElementById('fromdate').value;
 if(!fromdate.match(/^[0-9]{4}\/(0[1-9]|1[012])\/(0[1-9]|[12][0-9]|3[01])/) && document.getElementById('fromdate').value !='')
 {

	document.getElementById('fromdate').style.borderColor = '#F00';

	//alert("Last Name Required");

		//document.form1.LastNamec.focus();

		return false;
 }
 else
 {
document.getElementById('fromdate').style.borderColor = '';
 }	
  var todate=document.getElementById('todate').value;
   if(!todate.match(/^[0-9]{4}\/(0[1-9]|1[012])\/(0[1-9]|[12][0-9]|3[01])/)&& document.getElementById('todate').value !='')
 {

	document.getElementById('todate').style.borderColor = '#F00';

	//alert("Last Name Required");

		//document.form1.LastNamec.focus();

		return false;
 }
 else
 {
document.getElementById('todate').style.borderColor = '';
 }

 return true;
}
//facy box code



