function validateForm(Obj,Msg,DisplayAreaId)
	{
				//alert('1');
				document.getElementById(DisplayAreaId).innerHTML = '';
				var IsEmptyValue = Obj.value;
				if(IsEmptyValue == '')
				{
					//alert(Msg);
					document.getElementById(DisplayAreaId).innerHTML = Msg;
					//Obj.focus();
					//alert('5');
					return false;
				}
				else
				{
					if(Obj.id == 'emailId')
					{
						
						
						var EmailAdd = document.getElementById('emailId').value;
						
						if (!mailCheck_JQ(EmailAdd))
						{
							
							document.getElementById(DisplayAreaId).innerHTML = " Email address not valid.";
							//Obj.focus();
							//return false;
						}
												
					}
					if(Obj.id == 'txtCEmail')
					{
						
						document.getElementById(DisplayAreaId).innerHTML ='';
						var mainEmail = document.getElementById('txtEmail').value;
						var confEmail = document.getElementById('txtCEmail').value;
						
						
						if (!mailCheck_JQ(confEmail))
						{
							document.getElementById(DisplayAreaId).innerHTML = " Confirm email address not valid.";
							Obj.focus();
							//return false;
						}
						
						if(mainEmail != confEmail)
						{
							document.getElementById(DisplayAreaId).innerHTML = " Email address doesn't match.";
							//Obj.focus();
							//return false;
						}
						
						
					}
					
					if(Obj.id == 'txtCPassword')
						{
							
							//document.getElementById(DisplayAreaId).innerHTML ='';
							var mainPass = document.getElementById('txtRegPassword').value;
							var confPass = document.getElementById('txtCPassword').value;
							if(mainPass != confPass)
							{
								
								document.getElementById(DisplayAreaId).innerHTML = " Passwords doesn't match.";
								//Obj.focus();
								//return false;
							}
							
						}
					
				  if(Obj.id == 'username')
				  {
					return true;
					  
				  }
				   if(Obj.id == 'teamname')
				  {
					
					return true;
					  
				  }
				   if(Obj.id == 'txtTeamName')
				  {
					
					return true;
					  
				  }
				
				
				}
				//alert('2');
			return true;
		
	}
	

				
				
				
				//alert("aaaaaaa");
				//$("#selRgisterAs_error").empty().hide();
				
//				$("#val_username").empty().hide();
//				$("#val_email").empty().hide();
//				$("#val_password").empty().hide();
//				$("#val_password1").empty().hide();
//				
//				$("#val_first_name").empty().hide();
//				$("#val_last_name").empty().hide();
//				$("#val_address").empty().hide();
//				$("#val_city").empty().hide();
//				$("#val_state").empty().hide();
//				$("#val_country").empty().hide();
//				$("#val_zip").empty().hide();
//				$("#val_phone_1_3").empty().hide();
//				$("#val_phone_2_3").empty().hide();
//				$("#val_mobile_3").empty().hide();
//				$("#val_fax_3").empty().hide();
//				$("#professions").empty().hide();
//				
//				//$("#textEmail_error").show().append("<img src='Img/invalid'>");
//				//$("#textFirstName_error").show().append("<img src='Img/invalid'>");
//				
//				//var selRgisterAsVal = $("#selRgisterAs").val();
//				
//				var txtEmailVal = $("#txtEmail").val();
//				//alert(txtEmailVal);
//				
//				var txtCEmailVal = $("#txtCEmail").val();
//				
//				var txtPasswordVal = $("#txtRegPassword").val();
//				var txtCPasswordVal = $("#txtCPassword").val();
//				
//				var txtFNameVal = $("#txtFName").val();
//				var txtLNameVal = $("#txtLName").val();
//				
//				var txtAddressVal = $("#txtAddress").val();
//				var txtCityVal = $("#txtCity").val();
//				var ddlStateVal = $("#ddlState").val();
//				var ddlCountryVal = $("#ddlCountry").val();
//				var txtZipVal = $("#txtZip").val();
//				var phone_1_1Val = $("#phone_1_1").val();
//				var phone_1_2Val = $("#phone_1_2").val();
//				var phone_1_3Val = $("#phone_1_3").val();
//				
//				var phone_2_1Val = $("#phone_2_1").val();
//				
//				var phone_2_2Val = $("#phone_2_2").val();
//				var phone_2_3Val = $("#phone_2_3").val();
//				
//				var mobile_1Val = $("#mobile_1").val();
//				var mobile_2Val = $("#mobile_2").val();
//				var mobile_3Val = $("#mobile_3").val();
//				var fax_1Val = $("#fax_1").val();
//				var fax_2Val = $("#fax_2").val();
//				var fax_3Val = $("#fax_3").val();
//				var professionsVal = $("#professions").val();
//				
//				
//				
//				var errors = 0;
//				var st=0;
//				
//				if (txtEmailVal == null || txtEmailVal == '')
//				{
//					st='txtEmail';
//					$("#val_username").show().append(" No email address entered.<br />");
//					errors++;
//					$("#txtEmail").focus();
//					return false;
//					
//				}
//				
//				if(txtEmailVal)
//				{
//					if (!mailCheck_JQ(txtEmailVal))
//					{
//						st='txtEmail2';
//						$("#val_username").show().append(" Email address not valid.<br />");
//						errors++;
//						$("#txtEmail").select();
//						$("#txtEmail").focus();
//						return false;
//						
//					}
//					
//				}
//				
//				if (txtCEmailVal == null || txtCEmailVal == '')
//				{
//					
//					st='txtCEmail';
//					$("#val_email").show().append(" No confirm email address entered.<br />");
//					errors++;
//					$("#txtCEmail").focus();
//					return false;
//					
//				}
//				if(txtCEmailVal)
//				{
//					if (!mailCheck_JQ(txtCEmailVal))
//					{
//						st='txtCEmail2';
//						$("#val_email").show().append(" Confirm email address not valid.<br />");
//						errors++;
//						$("#txtCEmail").select();
//						$("#txtCEmail").focus();
//						return false;
//						
//					}
//				}
//				if(trim(txtEmailVal)!=trim(txtCEmailVal))
//				 {
//					st='txtCEmail3';
//					$("#val_email").show().append(" Email Addresses don't match.<br />");
//					errors++;
//					$("#txtCEmail").select();
//					$("#txtCEmail").focus();
//					return false;
//				 }
//				 if (txtPasswordVal == null || txtPasswordVal == '')
//				{
//					st='txtRegPassword';
//					$("#val_password").show().append(" No password entered.<br />");
//					errors++;
//					$("#txtRegPassword").focus(); 
//					return false;
//					
//				}
//				else
//				{
//					if(!checkPassword(trim(txtPasswordVal),$("#val_password")))
//					{
//						st='txtPassword2';
//						errors++;
//						$("#txtRegPassword").focus();
//						return false;
//					}
//				}
//				if (txtCPasswordVal == null || txtCPasswordVal == '')
//				{
//					st='txtCPassword';
//					$("#val_password1").show().append(" No confirm password entered.<br />");
//					errors++;
//					$("#txtCPassword").focus();
//					return false;
//					
//				}	
//				
//				if(trim(txtPasswordVal)!=trim(txtCPasswordVal))
//				 {
//					st='txtCPassword2';
//					$("#val_password1").show().append(" Passwords don't match.<br />");
//					errors++;
//					$("#txtCPassword").focus();
//					return false;
//				 }
//				
//				
//				
//				if (txtFNameVal == null || txtFNameVal == '')
//				{
//					st='txtFName';
//					$("#val_first_name").show().append(" No first name entered.<br />");
//					errors++;
//					$("#txtFName").focus();
//					return false;
//					
//				}				
//				if (txtLNameVal == null || txtLNameVal == '')
//				{
//					st='txtLName';
//					$("#val_last_name").show().append(" No last name entered.<br />");
//					errors++;
//					$("#txtLName").focus(); 
//					return false;
//				}	
//				if (txtAddressVal == null || txtAddressVal == '')
//				{
//					st='txtAddress';
//					$("#val_address").show().append(" No address entered.<br />");
//					errors++;
//					$("#txtAddress").focus(); 
//					return false;
//				}	
//				if (txtCityVal == null || txtCityVal == '')
//				{
//					st='txtCity';
//					$("#val_city").show().append(" No city entered.<br />");
//					errors++;
//					$("#txtCity").focus(); 
//					return false;
//				}	
//				if (ddlStateVal == null || ddlStateVal == '')
//				{
//					st='ddlState';
//					$("#val_state").show().append(" No state selected.<br />");
//					errors++;
//					$("#ddlState").focus(); 
//					return false;
//				}	
//				if (ddlCountryVal == null || ddlCountryVal == '')
//				{
//					st='ddlCountry';
//					$("#val_country").show().append(" No country selected.<br />");
//					errors++;
//					$("#ddlCountry").focus(); 
//					return false;
//				}	
//				if (txtZipVal == null || txtZipVal == '')
//				{
//					st='txtZip';
//					$("#val_zip").show().append(" No zip entered.<br />");
//					errors++;
//					$("#txtZip").focus(); 
//					return false;
//				}	
//				if (phone_1_1Val == null || phone_1_1Val == '')
//				{
//					st='phone_1_1';
//					$("#val_phone_1_3").show().append(" No daytime phone number entered.<br />");
//					errors++;
//					$("#phone_1_1").focus(); 
//					return false;
//				}	
//				if (phone_1_2Val == null || phone_1_2Val == '')
//				{
//					st='phone_1_2';
//					$("#val_phone_1_3").show().append(" No daytime phone number entered.<br />");
//					errors++;
//					$("#phone_1_2").focus(); 
//					return false;
//				}	
//				if (phone_1_3Val == null || phone_1_3Val == '')
//				{
//					st='phone_1_3';
//					$("#val_phone_1_3").show().append(" No daytime phone number entered.<br />");
//					errors++;
//					$("#phone_1_3").focus(); 
//					return false;
//				}	
//				if (phone_2_1Val == null || phone_2_1Val == '')
//				{
//					st='phone_2_1';
//					$("#val_phone_2_3").show().append(" No evening phone number entered.<br />");
//					errors++;
//					$("#phone_2_1").focus(); 
//					return false;
//				}	
//				if (phone_2_2Val == null || phone_2_2Val == '')
//				{
//					st='phone_2_2';
//					$("#val_phone_2_3").show().append(" No evening phone number entered.<br />");
//					errors++;
//					$("#phone_2_2").focus(); 
//					return false;
//				}	
//				if (phone_2_3Val == null || phone_2_3Val == '')
//				{
//					st='phone_2_3';
//					$("#val_phone_2_3").show().append(" No evening phone number entered.<br />");
//					errors++;
//					$("#phone_2_3").focus(); 
//					return false;
//				}	
//				if (mobile_1Val == null || mobile_1Val == '')
//				{
//					st='mobile_1';
//					$("#val_mobile_3").show().append(" No cell phone number entered.<br />");
//					errors++;
//					$("#mobile_1").focus(); 
//					return false;
//				}	
//				if (mobile_2Val == null || mobile_2Val == '')
//				{
//					st='mobile_2';
//					$("#val_mobile_3").show().append(" No cell phone number entered.<br />");
//					errors++;
//					$("#mobile_2").focus(); 
//					return false;
//				}	
//				if (mobile_3Val == null || mobile_3Val == '')
//				{
//					st='mobile_3';
//					$("#val_mobile_3").show().append(" No cell phone number entered.<br />");
//					errors++;
//					$("#mobile_3").focus(); 
//					return false;
//				}
//				if (fax_1Val == null || fax_1Val == '')
//				{
//					st='fax_1';
//					$("#val_fax_3").show().append(" No fax number entered.<br />");
//					errors++;
//					$("#fax_1").focus(); 
//					return false;
//				}
//				if (fax_2Val == null || fax_2Val == '')
//				{
//					st='fax_2';
//					$("#val_fax_3").show().append(" No fax number entered.<br />");
//					errors++;
//					$("#fax_2").focus(); 
//					return false;
//				}
//				if (fax_3Val == null || fax_3Val == '')
//				{
//					st='fax_3';
//					$("#val_fax_3").show().append(" No fax number entered.<br />");
//					errors++;
//					$("#fax_3").focus(); 
//					return false;
//				}
//				if (professionsVal == null || professionsVal == '')
//				{
//					st='professions';
//					$("#professions").show().append(" No profession selected.<br />");
//					errors++;
//					$("#professions").focus(); 
//					return false;
//				}
//				
//				if(st=='txtFName')
//				{
//				$("#txtFName").focus();
//				return false;
//				}
//				if(st=='txtLName')
//				{
//				$("#txtLName").focus();
//				return false;
//				}
//				if(st=='txtCPassword2')
//				{
//				$("#txtCPassword").focus();
//				return false;
//				}
//				if(st=='txtCPassword')
//				{
//				$("#txtCPassword").focus();
//				return false;
//				}
//				if(st=='txtPassword')
//				{
//				$("#txtRegPassword").focus();
//				return false;
//				}
//				if(st=='txtPassword2')
//				{
//				$("#txtRegPassword").focus();
//				return false;
//				}
//				if(st=='txtEmail')
//				{
//				$("#txtEmail").focus();
//				return false;
//				}
//				if(st=='txtEmail2')
//				{
//				$("#txtEmail").focus();
//				return false;
//				}
//				if(st=='txtCEmail2')
//				{
//				$("#txtCEmail").focus();
//				return false;
//				}
//				if(st=='txtCEmail3')
//				{
//				$("#txtCEmail").focus();
//				return false;
//				}
//				if(st=='txtAddress')
//				{
//				$("#txtAddress").focus();
//				return false;
//				}
//				if(st=='txtCity')
//				{
//				$("#txtCity").focus();
//				return false;
//				}
//				if(st=='ddlState')
//				{
//				$("#ddlState").focus();
//				return false;
//				}
//				if(st=='ddlCountry')
//				{
//				$("#ddlCountry").focus();
//				return false;
//				}
//				if(st=='txtZip')
//				{
//				$("#txtZip").focus();
//				return false;
//				}
//				if(st=='phone_1_1')
//				{
//				$("#phone_1_1").focus();
//				return false;
//				}
//				if(st=='phone_1_2')
//				{
//				$("#phone_1_2").focus();
//				return false;
//				}
//				if(st=='phone_1_3')
//				{
//				$("#phone_1_3").focus();
//				return false;
//				}
//				if(st=='phone_2_1')
//				{
//				$("#phone_2_1").focus();
//				return false;
//				}
//				if(st=='phone_2_2')
//				{
//				$("#phone_2_2").focus();
//				return false;
//				}
//				if(st=='phone_2_3')
//				{
//				$("#phone_2_3").focus();
//				return false;
//				}
//				if(st=='mobile_1')
//				{
//				$("#mobile_1").focus();
//				return false;
//				}
//				if(st=='mobile_2')
//				{
//				$("#mobile_2").focus();
//				return false;
//				}
//				if(st=='mobile_3')
//				{
//				$("#mobile_3").focus();
//				return false;
//				}
//				if(st=='fax_1')
//				{
//				$("#fax_1").focus();
//				return false;
//				}
//				if(st=='fax_2')
//				{
//				$("#fax_2").focus();
//				return false;
//				}
//				if(st=='fax_3')
//				{
//				$("#fax_3").focus();
//				return false;
//				}
//				if(st=='professions')
//				{
//				$("#professions").focus();
//				return false;
//				}
				
			//document.formReg.submit(); 
			//return true;			
//}

//function getAvailable()
//{
//	$("#val_username").empty().hide();
//	var txtEmailVal = $("#txtEmail").val();
//	//var hidEmailVal = $("#hidEmail").val();
//	//alert(hidEmailVal);
//	
//	var errors = 0;
//	var st=0;
//	
//	if(txtEmailVal)
//	{
//		if (mailCheck_JQ(txtEmailVal))
//		{
//			var isExist="0";
//			ajaxCheckAvailability('include/getData.php','nrs_registration','Email',txtEmailVal,isExist);
//					//alert(ajaxCheckAvailability('include/getData.php','nrs_registration','Email',txtEmailVal,isExist));
//		//alert(hidEmailVal);
//		
//			if (isExist!="0")
//			{
//				$("#val_username").show().append(" Email address already exists.<br />");
//				//errors++;
//				$("#txtEmail").focus();
//				return false;
//				
//			}
//		}
//	}
//}

