	/*The validation of the Add Image Page*/

function checkAdmin(){

	var username=document.getElementById('username').value;	

	var pass=document.getElementById('pass').value;	

	var RePassword=document.getElementById('RePassword').value;	

	var email=document.getElementById('email').value;		

	var fname=document.getElementById('fname').value;	
	var phone=document.getElementById('phone').value;	
	var re_email=document.getElementById('re_email').value;

	

	var validation_flag=1

	var border_style="#FF0000 #FF0000";	



	if(username == '' || username == null) {		

		document.getElementById("username").style.borderColor=border_style;	

		validation_flag=0	

	}

	if(pass == '' || pass == null) {		

		document.getElementById("pass").style.borderColor=border_style;	

		validation_flag=0			

	}

	if(RePassword == '' || RePassword == null) {		

		document.getElementById("RePassword").style.borderColor=border_style;	

		validation_flag=0			

	}

	if(pass != RePassword) {		

		document.getElementById("RePassword").style.borderColor=border_style;	

		validation_flag=0	

		alert('Please, Your password and Re-password do not match.');			

	}


	

	if(phone == '' || phone == null) {		

		document.getElementById("phone").style.borderColor=border_style;	

		validation_flag=0			

	}

	

	if(fname == '' || fname == null) {		

		document.getElementById("fname").style.borderColor=border_style;	

		validation_flag=0			

	}



	if(email == '' || email == null) {		
		
		document.getElementById("email").style.borderColor=border_style;	

		validation_flag=0			

	}else{	

		if(job_offer_(email)==false) {		

			//alert('Please, enter valid emial address.');

			document.getElementById("email").style.borderColor=border_style;	

			validation_flag=0

		}

	}

	
if(re_email == '' || re_email == null) {		
		
		document.getElementById("re_email").style.borderColor=border_style;	

		validation_flag=0			

	}else{	

		if(job_offer_(re_email)==false) {		

			//alert('Please, enter valid emial address.');

			document.getElementById("re_email").style.borderColor=border_style;	

			validation_flag=0

		}

	}
	

	if(validation_flag==0){	

	alert('* Marked field(s) are mendatory.')

	return false

}	

	return true;

}





function forgot_password(){

	var email=document.getElementById('email').value;		

	if(email == '' || email == null) {		

		return showErrMsg('Please, Enter your email id.','email');			

	}

	if(is_valid_email(email)==false) {		

		return showErrMsg('Please, Enter valid email id.','email');			

	}

}

function sendRequest(){

	var amount=document.getElementById('amount').value;		

	if(amount == '' || amount == null) {		

		return showErrMsg('Please, Enter amount.','amount');			

	}

}



function showErrMsg(msg,fieldName){

		document.getElementById('errContainerDiv').style.display='block';	

		document.getElementById('errMsgContainerDiv').innerHTML=msg;	

		document.getElementById(fieldName).focus();

		return false;

}

function hideErrMsg(){

		document.getElementById('errContainerDiv').style.display='none';

		return true;

}





function job_offer_(email){   



     return /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(email);   

}



function job_offer_form_validation(){

	

	var job_title = document.getElementById('job_title').value;

			

	if(job_title == '' || job_title == null) {		

		return showErrMsg('Please, Enter job title.','job_title');			

	}

	return hideErrMsg();

}







function contact_form_validation(){

	var name = document.getElementById('name').value;

	var email = document.getElementById('email').value;

	var comments = document.getElementById('comments').value;

	var captcha = document.getElementById('captcha').value;

	var cap_code = document.getElementById('cap_code').value;

	var status = document.getElementById('status').value;

	

	

	if(name == "" || name == null) {

		return showErrMsg('Please, Enter your name.','name');

	}

	

	if(email == "" || email == null) {

		return showErrMsg('Please, Enter your email.','email');

		return false;

	}

	

	if(status == ""  || status == null) {

		return showErrMsg('Please, Enter your status.','status');

	}

	

	if(comments == ""  || comments == null) {

		return showErrMsg('Please, Enter your message.','comments');

	}

	

/*########### Captcha Validation Part [ START ] ###############*/

	if(captcha == ""  || captcha == null) {

		return showErrMsg('Please, Enter verification Code.','captcha');

	}

		

	if(document.getElementById('cap_code').value != document.getElementById('captcha').value) {

		return showErrMsg('OOPs !! Verification Code Mismatch.','captcha');

	}	

	

/*########### Captcha Validation Part [ END ] ###############*/

	return hideErrMsg();



}







function employee_satisfaction_survey_form_validation() {

	var name 	= document.getElementById('name').value;

	var email 	= document.getElementById('email').value;

	

	var a1		= document.getElementById('a1').checked;

	var a2 		= document.getElementById('a2').checked;

	var a3 		= document.getElementById('a3').checked;

	var a4 		= document.getElementById('a4').checked;

	var a5 		= document.getElementById('a5').checked;

	var a6 		= document.getElementById('a6').checked;

	var a7 		= document.getElementById('a7').checked;

	var a8 		= document.getElementById('a8').checked;

	var a9 		= document.getElementById('a9').checked;

	var a10 	= document.getElementById('a10').checked;

	var a11 	= document.getElementById('a11').checked;

	var a12 	= document.getElementById('a12').checked;

	var a13 	= document.getElementById('a13').checked;

	var a14 	= document.getElementById('a14').value;

	var a15 	= document.getElementById('a15').value;

	

	if(name == "" || name == null) {

		return showErrMsg('Please, Enter your name.','name');

	}

	

	if(email == "" || email == null) {

		return showErrMsg('Please, Enter your email address.','email');

	}

	

	if(job_offer_(email) == false) {

		return showErrMsg('Please, Enter a valid email address.','email');

	}

	

	if(a1 == false && a2 == false && a3 == false && a4 == false && a5 == false && a6 == false && a7 == false && a8 == false && a9 == false && a11 == "" && a12 == "") {

		return showErrMsg('Please, Answer at least one question please.','a1');

	}

	

	return hideErrMsg();

}





function employer_satisfaction_survey_form_validation() {

	

	var a1		= document.getElementById('a1').checked;

	var a2 		= document.getElementById('a2').checked;

	var a3 		= document.getElementById('a3').checked;

	var a4 		= document.getElementById('a4').checked;

	var a5 		= document.getElementById('a5').checked;

	var a6 		= document.getElementById('a6').checked;

	var a7 		= document.getElementById('a7').checked;

	var a8 		= document.getElementById('a8').checked;

	var a9 		= document.getElementById('a9').checked;

	var a10 	= document.getElementById('a10').checked;

	

	if(a1 == false && a2 == false && a3 == false && a4 == false && a5 == false && a6 == false && a7 == false && a8 == false && a9 == false && a10 == false) {

		return showErrMsg('Please, Answer at least one question please.','a1');

	}

	

	return hideErrMsg();

}





function checkEmployeeForgetPassword(){

	var username=document.getElementById('username').value;	

	var email=document.getElementById('email').value;	

	

	if((username == '' || username == null) && (email == '' || email == null)) {		

		return showErrMsg('Please, Enter your username or email.','username');			

	}

	



return hideErrMsg();

}