function Email(str)
		{
			var supported = 0;
			if (window.RegExp)
			{
			var tStr = "a";
			var tReg = new RegExp(tStr);
			if (tReg.test(tStr)) supported = 1;
			}
			if (!supported)
			return (str.indexOf(".") <= 5) || (str.indexOf("@") < 0);
			var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
			var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
			return (r1.test(str) || !r2.test(str));
		}
function EmailAddr(str) 
		{
		    return str.match(/^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/);
		}
function IsNumeric(strString)
   //  check for valid numeric strings 
   {
   var strValidChars = "0123456789.-";
   var strChar;
   var blnResult = true;

   if (strString.length == 0) return false;

   //  test strString consists of valid characters listed above
   for (i = 0; i < strString.length && blnResult == true; i++)
      {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
         blnResult = false;
         }
      }
   return blnResult;
   }
   function Isalpha(strCharacter)
   //  check for valid numeric strings 
   {
   var strValidAlpha = "ABCDEFGHIJKLMNOPQRSTWXYZ.abcdefghijklmnopqrstuvwxyz.-";
   var strAlpha;
   var blnResult = true;

   if (strCharacter.length == 0) return false;

   //  test strString consists of valid characters listed above
   for (i = 0; i < strCharacter.length && blnResult == true; i++)
      {
      strAlpha = strCharacter.charAt(i);
      if (strValidAlpha.indexOf(strAlpha) == -1)
         {
         blnResult = false;
         }
      }
   return blnResult;
   }
   function jsregister()
{	
 	if  (Email(document.frmjsreg.email.value))
	{
		alert("Please enter your Email Id");
		document.frmjsreg.email.focus();
		document.frmjsreg.email.select();
		return false;
	}	
  	if (document.frmjsreg.password.value==0)
	{
		alert("Please enter your Choose Password");
		document.frmjsreg.password.focus();
		document.frmjsreg.password.select();
		return false;
	}	
	
		if (document.frmjsreg.password1.value==0)
	{
		alert("Please enter your Re-entry Password");
		document.frmjsreg.password1.focus();
		document.frmjsreg.password1.select();
		return false;
	}
	if(document.frmjsreg.password.value!=document.frmjsreg.password1.value)
	{
	alert("Both Passwords are mismatch");
		document.frmjsreg.password2.focus();
		document.frmjsreg.password2.select();
		return false;
	}	
	if(document.frmjsreg.password.value.length < 6)

	{ 

	alert ('Password should be 6 characters Long.!');

	document.frmjsreg.password.focus();

	document.frmjsreg.password.select();

	return false;

	}	
					
	
		
		
		if (document.frmjsreg.first_name.value==0)
	{
		alert("Please enter your First Name");
		document.frmjsreg.first_name.focus();
		document.frmjsreg.first_name.select();
		return false;
	}		
	
		if (document.frmjsreg.last_name.value==0)
	{
		alert("Please enter your Lasr Name");
		document.frmjsreg.last_name.focus();
		document.frmjsreg.last_name.select();
		return false;
	}		
		
			if (document.frmjsreg.mobile.value==0)
	{
		alert("Please enter your Mobile Number");
		document.frmjsreg.mobile.focus();
		document.frmjsreg.mobile.select();
		return false;
	}	

 	document.frmjsreg.submit();
} 





function user_login()
{	
 	if (Email(document.frm_login.user_id.value))
	{
		alert("Please enter your Login Id");
		document.frm_login.user_id.focus();
		document.frm_login.user_id.select();
		return false;
	}	
  	if (document.frm_login.password.value==0)
	{
		alert("Please enter your Correct Password");
		document.frm_login.password.focus();
		document.frm_login.password.select();
		return false;
	}		
 	document.frm_login.submit();
} 


 function changepwd1()
{		
	if(document.frmchangepwd.current_password.value==0)
	{ 
	alert("Please enter your Current password");
	document.frmchangepwd.current_password.focus();
	document.frmchangepwd.current_password.select();
	return false;
	}
	if(document.frmchangepwd.password.value==0)
	{ 
	alert("Please enter your new password");
	document.frmchangepwd.password.focus();
	document.frmchangepwd.password.select();
	return false;
	}

	if (document.frmchangepwd.confirm_password.value==0)
	{
	alert("Please enter confirm Password");
	document.frmchangepwd.confirm_password.focus();
	document.frmchangepwd.confirm_password.select();
	return false;
	}

	if ((document.frmchangepwd.password.value) != (document.frmchangepwd.confirm_password.value))
   {
	alert("Password mismatch retype your password");
	document.frmchangepwd.confirm_password.focus();
	document.frmchangepwd.confirm_password.select();
	return false;
	}

	if(document.frmchangepwd.password.value.length < 6)

	{ 

	alert('Password should be 6 characters Long.!');

	document.frmchangepwd.password.focus();

	document.frmchangepwd.password.select();

	return false;

	}	

	document.frmchangepwd.submit();

}		


function empcontact()
{	
 	if (document.emp_resume_contact.subject.value==0)
	{
		alert("Please enter your Subject");
		document.emp_resume_contact.subject.focus();
		document.emp_resume_contact.subject.select();
		return false;
	}	
  	if (document.emp_resume_contact.comment.value==0)
	{
		alert("Please enter your Comment");
		document.emp_resume_contact.comment.focus();
		document.emp_resume_contact.comment.select();
		return false;
	}		
 	document.emp_resume_contact.submit();
} 



function rcregister()
{	
 	if (document.emp_registration.contact_person.value==0)
	{
		alert("Please enter your Contact Name");
		document.emp_registration.contact_person.focus();
		document.emp_registration.contact_person.select();
		return false;
	}	
  	if (document.emp_registration.company_name.value==0)
	{
		alert("Please enter your Company Name");
		document.emp_registration.company_name.focus();
		document.emp_registration.company_name.select();
		return false;
	}	
	
		if (document.emp_registration.company_profile.value==0)
	{
		alert("Please enter your Company Profile");
		document.emp_registration.company_profile.focus();
		document.emp_registration.company_profile.select();
		return false;
	}		
	
		if (Email(document.emp_registration.email_id.value))
	{
		alert("Please enter your Email Id");
		document.emp_registration.email_id.focus();
		document.emp_registration.email_id.select();
		return false;
	}		
	
		if (document.emp_registration.address.value==0)
	{
		alert("Please enter your Address");
		document.emp_registration.address.focus();
		document.emp_registration.address.select();
		return false;
	}		

	
		if (document.emp_registration.mobile.value==0)
	{
		alert("Please enter your Mobile Phone");
		document.emp_registration.mobile.focus();
		document.emp_registration.mobile.select();
		return false;
	}			
		
 	
	document.emp_registration.submit();
} 


function contactus_form()
{	
    
  	if (document.cntform.contact_name.value==0)
	{
		alert("Please enter your Contact Name");
		document.cntform.contact_name.focus();
		document.cntform.contact_name.select();
		return false;
	}	
	
		if (Email(document.cntform.emailid.value))
	{
		alert("Please enter your Email Id");
		document.cntform.emailid.focus();
		document.cntform.emailid.select();
		return false;
	}	
	
		
	
		if (document.cntform.cont_subject.value==0)
	{
		alert("Please enter your Subject");
		document.cntform.cont_subject.focus();
		document.cntform.cont_subject.select();
		return false;
	}		

	if (document.cntform.comment.value==0)
	{
		alert("Please enter your Comment");
		document.cntform.comment.focus();
		document.cntform.comment.select();
		return false;
	}
	 	document.cntform.submit();
} 


function forgotpassword()
{
				if(Email (document.frmforgot.user_id.value))
		{
			alert("Please enter your Email Id");
			document.frmforgot.user_id.focus();
			document.frmforgot.user_id.select();
			return false;
		}	
	
		document.frmforgot.submit();
	} 
	
function rcaddnewjobs()
{	
 	if (document.emp_addnew_job.job_tittle.value==0)
	{
		alert("Please enter your Job Tittle");
		document.emp_addnew_job.job_tittle.focus();
		document.emp_addnew_job.job_tittle.select();
		return false;
	}	
  	if (document.emp_registration.job_description.value==0)
	{
		alert("Please enter your Job Dsecription");
		document.emp_addnew_job.job_description.focus();
		document.emp_addnew_job.job_description.select();
		return false;
	}	
	
		if (document.emp_registration.key_skills.value==0)
	{
		alert("Please enter your Key Skills");
		document.emp_addnew_job.key_skills.focus();
		document.emp_addnew_job.key_skills.select();
		return false;
	}	
	
	
		if (document.emp_registration.no_vacancy.value==0)
	{
		alert("Please enter your Number Vacancy");
		document.emp_addnew_job.no_vacancy.focus();
		document.emp_addnew_job.no_vacancy.select();
		return false;
	}		
	
		if (document.emp_registration.experience.value==0)
	{
		alert("Please enter your Experience");
		document.emp_addnew_job.experience.focus();
		document.emp_addnew_job.experience.select();
		return false;
	}		

	if (document.emp_registration.anual_salary.value==0)
	{
		alert("Please enter your Anual Salary");
		document.emp_addnew_job.anual_salary.focus();
		document.emp_addnew_job.anual_salary.select();
		return false;
	}
	
	 	document.emp_addnew_job.submit();
} 		

	
	
	
