function checkEmployer()
{
	var Chars = "0123456789!@#$%^&*+=[]\\\';,.-()/{}|\":<>?";
	
	if(document.frm_employer.txtassociation.value.replace(/^\s+|\s+$/g, '') == "")
	{
		alert("Please Enter Association Name.");
		document.frm_employer.txtassociation.select();
		return false;
	}
	// for (var a = 0; a < document.frm_employer.txtassociation.value.length; a++) 
	// {
		// if (Chars.indexOf(document.frm_employer.txtassociation.value.charAt(a)) != -1) 
		// {
			// alert("Digits And Special Characters Are Not Allowed In Association Name.");
			// document.frm_employer.txtassociation.select();
			// return false;
		// }
	// }
	
	if(document.frm_employer.cboassociation.value == "")
	{
		alert("Please Select Association Category.");
		document.frm_employer.cboassociation.focus();
		return false;
	}
	
	if(document.frm_employer.txtcountry.value.replace(/^\s+|\s+$/g, '') == "")
	{
		alert("Please Enter Country.");
		document.frm_employer.txtcountry.select();
		return false;
	}
	for (var c = 0; c < document.frm_employer.txtcountry.value.length; c++) 
	{
		if (Chars.indexOf(document.frm_employer.txtcountry.value.charAt(c)) != -1) 
		{
			alert("Special Characters Are Not Allowed In Country Name.");
			document.frm_employer.txtcountry.select();
			return false;
		}
	}
	
	if(document.frm_employer.txtemail.value.replace(/^\s+|\s+$/g, '') == "")
	{
		alert("Please Enter E-mail.");
		document.frm_employer.txtemail.select();
		return false;
	}
	else
	{
		var mail_val = document.frm_employer.txtemail.value;
		var mail_flag = 0;
		if(mail_val.indexOf("@") == -1 || mail_val.indexOf(".") == -1)
		{
			mail_flag++; 
		}
		else
		{ 
			var len=mail_val.length; 
			if(len <= 2)
			{
				mail_flag++;
			}	 
			var first=mail_val.substring(0,mail_val.indexOf("@")); 
						
			var second=mail_val.substring(mail_val.indexOf("@")+1,mail_val.lastIndexOf(".")); 
			
			var third=mail_val.substring(mail_val.indexOf(".")+1,len);  
			
			var firstarray=new Array("q","w","e","r","t","y","u","i","o","p","a","s","d","f","g","h","j","k","l","z","x","c","v","b","n","m","Q","W","R","T","Y","U","I","O","P","A","S","D","F","G","H","J","K","L","Z","X","C","V","B","N","M","E");
			var f_len=firstarray.length;
			
			var count=0;
			var len=first.length; 
			for(var i=0;i<=len;i++)
			{
				var ch=first.charAt(i);
				for(var j=0;j<=f_len;j++)
				{
					if(ch == firstarray[j])
					{
						count++;
						break;
					}
				}
			}
			if(count == 0)
			{
				mail_flag++; 
			}
			if(!isNaN(parseInt(second)))
			{
				mail_flag++; 	 
			}
			if(!isNaN(parseInt(third)))
			{
				mail_flag++; 	 
			}
			if(first.length < 2 || second.length < 2 || third.length <=1)
			 {
				 mail_flag++;   
			 }
		} 
		if(mail_flag > 0)
		{
			alert("Please Enter An Exact Email Address.\n" + "'" +
					document.frm_employer.txtemail.value + "'" + " Is Invalid.");
			document.frm_employer.txtemail.select();
			return false;	
		}
	}
	var eChars = "! #$%^&*+=[]\\\';,-()/{}|\":<>?";
	for (var e = 0; e < document.frm_employer.txtemail.value.length; e++) 
	{
		if (eChars.indexOf(document.frm_employer.txtemail.value.charAt(e)) != -1) 
		{
			alert("Please Enter An Exact Email Address.\n" + "'" +
					document.frm_employer.txtemail.value + "'" + " Is Invalid.");
			document.frm_employer.txtemail.select();
			return false;
		}
	}
	
	var pChars = "!@#$%^&*+=[]\\\';,.-()/{}|\":<>?";
	if(document.frm_employer.txtuserpwd.value.replace(/^\s+|\s+$/g, '') == "")
	{
		alert("Please Enter Password.");
		document.frm_employer.txtuserpwd.select();
		return false;
	}
	for (var p = 0; p < document.frm_employer.txtuserpwd.value.length; p++) 
	{
		if (pChars.indexOf(document.frm_employer.txtuserpwd.value.charAt(p)) != -1) 
		{
			alert("Special Characters Are Not Allowed In Password.");
			document.frm_employer.txtuserpwd.select();
			return false;
		}
	}
	if(document.frm_employer.txtuserpwd.value.length <= 4)
	{
		alert("Password Length Must be 4 Characters Long.");
		document.frm_employer.txtuserpwd.select();
		return false;
	}
	if(document.frm_employer.txtuserpwd.value != document.frm_employer.txtuserconpwd.value)
	{
		alert("Password And Confirm Password Must Be Same.");
		document.frm_employer.txtuserconpwd.select();
		return false;
	}
	
	// if(document.frm_employer.cboempcat.value == "")
	// {
		// alert("Please Select Employer Category.");
		// document.frm_employer.cboempcat.focus();
		// return false;
	// }
	
	// if(document.frm_employer.txtresume.value != "")
	// {
		// if(document.frm_employer.txtresume.value.indexOf(".")<=0)
		// {
			// alert("Invalid PDF / DOC File.");
			// document.frm_employer.txtresume.select();
			// return false;
		// }
		// else
		// {
			// if(document.frm_employer.txtresume.value.indexOf(".") > 0)
			// {
				// var index = document.frm_employer.txtresume.value.indexOf(".");
				// var len = document.frm_employer.txtresume.value.length;
				// var extn = (document.frm_employer.txtresume.value.substring(index+1 ,len)).toUpperCase();
				
				// if(extn != "PDF" && extn != "DOC")
				// {
					// alert("Please Select PDF / DOC File.");
					// document.frm_employer.txtresume.select();
					// return false;
				// }
			// }
		// }
	// } 
	// else 
	// { 
		// alert ("Please Select Upload File.");
		// document.frm_employer.txtresume.select();
		// return false;
	// }
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////
function checkEmployerM()
{
	// var Chars = "0123456789!@#$%^&*+=[]\\\';,.-()/{}|\":<>?";
	
	if(document.edit_employer.txtassociation.value.replace(/^\s+|\s+$/g, '') == "")
	{
		alert("Please Enter Association Name.");
		document.edit_employer.txtassociation.select();
		return false;
	}
	// for (var a = 0; a < document.edit_employer.txtassociation.value.length; a++) 
	// {
		// if (Chars.indexOf(document.edit_employer.txtassociation.value.charAt(a)) != -1) 
		// {
			// alert("Digits And Special Characters Are Not Allowed In Association Name.");
			// document.edit_employer.txtassociation.select();
			// return false;
		// }
	// }
	
	if(document.edit_employer.cboassociation.value == "")
	{
		alert("Please Select Association Category.");
		document.edit_employer.cboassociation.focus();
		return false;
	}
	
	if(document.edit_employer.cboempcat.value == "")
	{
		alert("Please Select Employer Category.");
		document.edit_employer.cboempcat.focus();
		return false;
	}
	
	if(document.edit_employer.txtcountry.value.replace(/^\s+|\s+$/g, '') == "")
	{
		alert("Please Enter Country.");
		document.edit_employer.txtcountry.select();
		return false;
	}
	for (var c = 0; c < document.edit_employer.txtcountry.value.length; c++) 
	{
		if (Chars.indexOf(document.edit_employer.txtcountry.value.charAt(c)) != -1) 
		{
			alert("Special Characters Are Not Allowed In Country Name.");
			document.edit_employer.txtcountry.select();
			return false;
		}
	}
	
	if(document.edit_employer.txtemail.value.replace(/^\s+|\s+$/g, '') == "")
	{
		alert("Please Enter E-mail.");
		document.edit_employer.txtemail.select();
		return false;
	}
	else
	{
		var mail_val = document.edit_employer.txtemail.value;
		var mail_flag = 0;
		if(mail_val.indexOf("@") == -1 || mail_val.indexOf(".") == -1)
		{
			mail_flag++; 
		}
		else
		{ 
			var len=mail_val.length; 
			if(len <= 2)
			{
				mail_flag++;
			}	 
			var first=mail_val.substring(0,mail_val.indexOf("@")); 
						
			var second=mail_val.substring(mail_val.indexOf("@")+1,mail_val.lastIndexOf(".")); 
			
			var third=mail_val.substring(mail_val.indexOf(".")+1,len);  
			
			var firstarray=new Array("q","w","e","r","t","y","u","i","o","p","a","s","d","f","g","h","j","k","l","z","x","c","v","b","n","m","Q","W","R","T","Y","U","I","O","P","A","S","D","F","G","H","J","K","L","Z","X","C","V","B","N","M","E");
			var f_len=firstarray.length;
			
			var count=0;
			var len=first.length; 
			for(var i=0;i<=len;i++)
			{
				var ch=first.charAt(i);
				for(var j=0;j<=f_len;j++)
				{
					if(ch == firstarray[j])
					{
						count++;
						break;
					}
				}
			}
			if(count == 0)
			{
				mail_flag++; 
			}
			if(!isNaN(parseInt(second)))
			{
				mail_flag++; 	 
			}
			if(!isNaN(parseInt(third)))
			{
				mail_flag++; 	 
			}
			if(first.length < 2 || second.length < 2 || third.length <=1)
			 {
				 mail_flag++;   
			 }
		} 
		if(mail_flag > 0)
		{
			alert("Please Enter An Exact Email Address.\n" + "'" +
					document.edit_employer.txtemail.value + "'" + " Is Invalid.");
			document.edit_employer.txtemail.select();
			return false;	
		}
	}
	
	var pChars = "!@#$%^&*+=[]\\\';,.-()/{}|\":<>?";
	if(document.edit_employer.txtuserpwd.value.replace(/^\s+|\s+$/g, '') == "")
	{
		alert("Please Enter Password.");
		document.edit_employer.txtuserpwd.select();
		return false;
	}
	for (var p = 0; p < document.edit_employer.txtuserpwd.value.length; p++) 
	{
		if (pChars.indexOf(document.edit_employer.txtuserpwd.value.charAt(p)) != -1) 
		{
			alert("Special Characters Are Not Allowed In Password.");
			document.edit_employer.txtuserpwd.select();
			return false;
		}
	}
	if(document.edit_employer.txtuserpwd.value.length <= 4)
	{
		alert("Password Length Must be 4 Characters Long.");
		document.edit_employer.txtuserpwd.select();
		return false;
	}
}
