function TabNext(obj,event,len,next_field) {
	  if (event == "down") {
	    phone_field_length=obj.value.length;	
	  }
	  else if (event == "up") {
	  	if (obj.value) {
			if (obj.value.length != phone_field_length) {
			  phone_field_length = obj.value.length;
			  if (phone_field_length == len) {
				next_field.focus();
			  }
		    }
		}
	  }
	}
	
	function validatesearch()
	{
		i=0;
		status1="";
		while(i<6)
		{
		
		if(document.form1.category[i].checked==true)
		status1="yes";
		
		i++;
			
		}
		if(status1=="")
		{
			alert("Select the Category");
			document.form1.category[0].focus();
			return false;
		}
		
		if(document.form1.state.value=="")
		{
			alert("Select the State");
			document.form1.state.focus();
			return false;
		}
		
		return true;
	}
	function loginvalidate()
	{
		if(document.form1.email.value=="")	{
						alert("Enter Username");
						document.form1.email.focus();
						return false;
				}  
				
				/*else
				{    
					if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.form1.email.value))
					{
					} 
					else 
					{
						alert("Invalid E-mail Address! Enter Correct Email Format.");
						document.form1.email.focus();
						document.form1.email.select();
						return false;
					}
				}*/
				if(document.form1.password.value == "")	{
						alert("Enter the Password");
						document.form1.password.focus();
						return false;
				}  else {    
						val = document.form1.password.value;	
						leng = document.form1.password.value.length;
						cht = val.charAt(0);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.password.focus();
							return false;
						} 
						/*else  
						{  
								var valid = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				
								{
										temp = "" + document.form1.password.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") 
								{
									alert("Invalid Input! \"Special Characters\" Not Allowed.");
									document.form1.password.focus();
									document.form1.password.select();
									return false; 
							  }
					   }  */
				}
		return true;
	}
	
	function forgotvalidate()
	{
		if(document.form1.email.value=="")	{
						alert("Enter your Email Address");
						document.form1.email.focus();
						return false;
				}  else {    
					if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.form1.email.value)) {
					} else {
						alert("Invalid E-mail Address! Enter Correct Email Format.");
						document.form1.email.focus();
						document.form1.email.select();
						return false;
					}
				}
				
		return true;
	}
	
	function uservalidate()
	{
		if(document.form1.email.value=="")	{
						alert("Enter your Email");
						document.form1.email.focus();
						return false;
				}  
				else {    
						val = document.form1.email.value;	
						leng = document.form1.email.value.length;
						cht = val.charAt(0);
						trial = val.charAt(leng-1);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.email.focus();
							return false;
						} 
				else {    
					if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.form1.email.value)) {
					} else {
						alert("Invalid E-mail Address! Enter Correct Email Format.");
						document.form1.email.focus();
						document.form1.email.select();
						return false;
					}
				}
				   if(trial == " ") {
					alert("Remove the Trailing Spaces");
					document.form1.email.focus();
					return false;
				  } 
					   }  
				
				 if(document.form1.name.value == "")
				 {
					alert("Enter the Name");
					document.form1.name.focus();
					return false;
				} 
				
				else
				{    
						val = document.form1.name.value;	
						leng = document.form1.name.value.length;
						cht = val.charAt(0);
						trial = val.charAt(leng-1);
						if(cht == " ") 
						{
							alert("Dont Leave any Space at First!....");
							document.form1.name.focus();
							return false;
						}  
						
						if(trial == " ")
						{
						alert("Remove the Trailing Spaces");
						document.form1.name.focus();
						return false;
					   }  
				}
				
				
				if(document.form1.password.value == "")	{
						alert("Enter the Create Password");
						document.form1.password.focus();
						return false;
				}  else {    
						val = document.form1.password.value;	
						leng = document.form1.password.value.length;
						cht = val.charAt(0);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.password.focus();
							return false;
						}  else  {  
								var valid = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.password.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Invalid Input! \"Special Characters\" Not Allowed.");
									document.form1.password.focus();
									document.form1.password.select();
									return false; 
							  }
					   }  
				}
			
				if(document.form1.password.value.length < 6) {
					alert("Create Password Should be minimum 6 Characters.");
					document.form1.password.focus();
					document.form1.password.select();
					return false; 
				}
			
				if(document.form1.cpassword.value=="")	{
						alert("Retype Create Password");
						document.form1.cpassword.focus();
						return false;
				} 
			
				if((document.form1.password.value)!=(document.form1.cpassword.value)) {
					alert("The Create Password Retyped does not match with the Create Password. Once again Retype the Create Password");
					document.form1.cpassword.focus();
					document.form1.cpassword.value="";
					return false;
				}
				
				return true;
	}
	
	
	function passwordvalidate()
	{
				
				if(document.form1.password.value == "")	{
						alert("Enter the Create Password");
						document.form1.password.focus();
						return false;
				}  else {    
						val = document.form1.password.value;	
						leng = document.form1.password.value.length;
						cht = val.charAt(0);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.password.focus();
							return false;
						}  else  {  
								var valid = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.password.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Invalid Input! \"Special Characters\" Not Allowed.");
									document.form1.password.focus();
									document.form1.password.select();
									return false; 
							  }
					   }  
				}
			
				if(document.form1.password.value.length < 6) {
					alert("Create Password Should be minimum 6 Characters.");
					document.form1.password.focus();
					document.form1.password.select();
					return false; 
				}
			
				if(document.form1.cpassword.value=="")	{
						alert("Retype Create Password");
						document.form1.cpassword.focus();
						return false;
				} 
			
				if((document.form1.password.value)!=(document.form1.cpassword.value)) {
					alert("The Create Password Retyped does not match with the Create Password. Once again Retype the Create Password");
					document.form1.cpassword.focus();
					document.form1.cpassword.value="";
					return false;
				}
				
				return true;
	}
	
	function checkvalidate()
	{
		i=0;
		status1="";
		totallst=0;
		lisytypes="";
		while(i<6)
		{
		if(document.form1.listing[i].checked==true)
		{
		status1="yes";
		if(lisytypes!="")
		lisytypes=lisytypes+"@"+document.form1.listing[i].value;
		else
		lisytypes=document.form1.listing[i].value;
		totallst++;
		}
		i++;
		}
		document.getElementById("listingtypes").value=lisytypes;
		document.getElementById("noflisting").innerHTML=totallst;
		document.getElementById("payamt").value=totallst * 36;
		yearlst="$ " + totallst * 36 + " / year";
		document.getElementById("payamount").innerHTML=yearlst;
	}
	
	function postingvalidate()
	{
		
		//alert("Posting validate")
		  if(document.form1.plstate.value == "") {
					alert("Select the Posting State");
					document.form1.plstate.focus();
					return false;
				} 
				
		i=0;
		status1="";
		
		while(i<6)
		{
		if(document.form1.listing[i].checked==true)
		{
		status1="yes";
		
		}
		i++;
		}
		
		if(status1=="")
		{
			alert("Select the Listing");
			document.form1.listing[0].focus();
			return false;
		}
		 if(document.form1.nop.value == "") {
					alert("Enter the Name of Practice or Business");
					document.form1.nop.focus();
					return false;
				} 
								else {    
						val = document.form1.nop.value;	
						leng = document.form1.nop.value.length;
						cht = val.charAt(0);
						trial = val.charAt(leng-1);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.nop.focus();
							return false;
						}  
						
								}
								
							   if(trial == " ") {
					alert("Remove the Trailing Spaces");
					document.form1.nop.focus();
					return false;
					   }  
				
				
				
				
				
		 if(document.form1.contact.value == "") {
					alert("Enter the Contact Person");
					document.form1.contact.focus();
					return false;
				} 
								else {    
						val = document.form1.contact.value;	
						leng = document.form1.contact.value.length;
						cht = val.charAt(0);
						trial = val.charAt(leng-1);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.contact.focus();
							return false;
						}  else  {  
								var valid = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.#/,'@: "
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.contact.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Invalid Input! \"Special Characters\" Not Allowed.");
									document.form1.contact.focus();
									document.form1.contact.select();
									return false; 
							  }
							   if(trial == " ") {
					alert("Remove the Trailing Spaces");
					document.form1.contact.focus();
					return false;
				  } 
					   }  
				}
		 if(document.form1.address.value == "") {
					alert("Enter the Address");
					document.form1.address.focus();
					return false;
				} 
								/*else {    
						val = document.form1.address.value;	
						leng = document.form1.address.value.length;
						cht = val.charAt(0);
						trial = val.charAt(leng-1);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.address.focus();
							return false;
						}  else  {  
								var valid = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.#/,'@:- "
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.address.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Invalid Input! \"Special Characters\" Not Allowed.");
									document.form1.address.focus();
									document.form1.address.select();
									return false; 
							  }
							   if(trial == " ") {
					alert("Remove the Trailing Spaces");
					document.form1.address.focus();
					return false;
				  } 
					   }  
				}*/
				 if(document.form1.address2.value == "") {
					//alert("Enter the Address 2");
					//document.form1.address2.focus();
					//return false;
				} 
								/*else {    
						val = document.form1.address2.value;	
						leng = document.form1.address2.value.length;
						cht = val.charAt(0);
						trial = val.charAt(leng-1);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.address2.focus();
							return false;
						}  else  {  
								var valid = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.#/,'@:- "
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.address2.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Invalid Input! \"Special Characters\" Not Allowed.");
									document.form1.address2.focus();
									document.form1.address2.select();
									return false; 
							  }
							   if(trial == " ") {
					alert("Remove the Trailing Spaces");
					document.form1.address2.focus();
					return false;
				  } 
					   }  
				}*/
				
				  if(document.form1.city.value == "") {
					alert("Enter the City");
					document.form1.city.focus();
					return false;
				} 
				else {    
						val = document.form1.city.value;	
						leng = document.form1.city.value.length;
						cht = val.charAt(0);
						trial = val.charAt(leng-1);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.city.focus();
							return false;
						}  else  {  
								var valid = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ./,'@: "
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.city.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Invalid Input! \"Special Characters\" Not Allowed.");
									document.form1.city.focus();
									document.form1.city.select();
									return false; 
							  }
							   if(trial == " ") {
					alert("Remove the Trailing Spaces");
					document.form1.city.focus();
					return false;
				  } 
					   }  
				}
				  if(document.form1.state.value == "") {
					alert("Select the State");
					document.form1.state.focus();
					return false;
				} 
				
				  if(document.form1.zip.value == "") {
					alert("Enter Zip Code");
					document.form1.zip.focus();
					return false;
				} 
				else  { 
				val = document.form1.zip.value;	
						leng = document.form1.zip.value.length;
						cht = val.charAt(0);
						trial = val.charAt(leng-1);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.zip.focus();
							return false;
						}  else  {  
						var valid = "0123456789"
						var ok = "yes";	
						var temp;
						for (var ii=0; ii<document.form1.zip.value.length; ii++)				{
								temp = "" + document.form1.zip.value.substring(ii,ii+1);
								if (valid.indexOf(temp) == "-1") ok = "no";	
						}
						if (ok == "no") {
							alert("Enter Numbers Only");
							document.form1.zip.focus();
							document.form1.zip.select();
							return false; 
					  }
				 if(trial == " ") {
					alert("Remove the Trailing Spaces");
					document.form1.zip.focus();
					return false;
				  } 
					   }  
				}

				
				
				if(document.form1.phone_area.value=="")	{
						alert("Enter the Phone No");
						document.form1.phone_area.focus();
						return false;
				}  else {    
						val = document.form1.phone_area.value;	
						leng = document.form1.phone_area.value.length;
						if(leng!=3)
						{
							alert("Invalid Phone No");
							document.form1.phone_area.focus();
							return false;
						}
						cht = val.charAt(0);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.phone_area.focus();
							return false;
						}  else  {  
								var valid = "0123456789"
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.phone_area.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Enter Numbers Only");
									document.form1.phone_area.focus();
									document.form1.phone_area.select();
									return false; 
							  }
					   }  
				}
				
				if(document.form1.phone_pref.value=="")	{
						alert("Enter the Phone No");
						document.form1.phone_pref.focus();
						return false;
				}  else {    
						val = document.form1.phone_pref.value;	
						leng = document.form1.phone_pref.value.length;
						if(leng!=3)
						{
							alert("Invalid Phone No");
							document.form1.phone_pref.focus();
							return false;
						}
						cht = val.charAt(0);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.phone_pref.focus();
							return false;
						}  else  {  
								var valid = "0123456789"
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.phone_pref.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Enter Numbers Only");
									document.form1.phone_pref.focus();
									document.form1.phone_pref.select();
									return false; 
							  }
					   }  
				}
				
				
				if(document.form1.phone_suff.value=="")	{
						alert("Enter the Phone No");
						document.form1.phone_suff.focus();
						return false;
				}  else {    
						val = document.form1.phone_suff.value;	
						leng = document.form1.phone_suff.value.length;
						if(leng!=4)
						{
							alert("Invalid Phone No");
							document.form1.phone_suff.focus();
							return false;
						}
						cht = val.charAt(0);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.phone_suff.focus();
							return false;
						}  else  {  
								var valid = "0123456789"
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.phone_suff.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Enter Numbers Only");
									document.form1.phone_suff.focus();
									document.form1.phone_suff.select();
									return false; 
							  }
					   }  
				}
				
				
				
		/*		if(document.form1.fax_area.value=="")	{
						//alert("Enter the Fax No");
						//document.form1.fax_area.focus();
						//return false;
				}  else {    
						val = document.form1.fax_area.value;	
						leng = document.form1.fax_area.value.length;
						if(leng!=3)
						{
							alert("Invalid Fax No");
							document.form1.fax_area.focus();
							return false;
						}
						cht = val.charAt(0);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.fax_area.focus();
							return false;
						}  else  {  
								var valid = "0123456789"
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.fax_area.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Enter Numbers Only");
									document.form1.fax_area.focus();
									document.form1.fax_area.select();
									return false; 
							  }
					   }  
				}
				
				if(document.form1.fax_pref.value=="")	{
						//alert("Enter the Fax No");
						//document.form1.fax_pref.focus();
						//return false;
				}  else {    
						val = document.form1.fax_pref.value;	
						leng = document.form1.fax_pref.value.length;
						if(leng!=3)
						{
							alert("Invalid Fax No");
							document.form1.fax_pref.focus();
							return false;
						}
						cht = val.charAt(0);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.fax_pref.focus();
							return false;
						}  else  {  
								var valid = "0123456789"
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.fax_pref.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Enter Numbers Only");
									document.form1.fax_pref.focus();
									document.form1.fax_pref.select();
									return false; 
							  }
					   }  
				}
				
				
				if(document.form1.fax_suff.value=="")	{
						//alert("Enter the Fax No");
						//document.form1.fax_suff.focus();
						//return false;
				}  else {    
						val = document.form1.fax_suff.value;	
						leng = document.form1.fax_suff.value.length;
						if(leng!=4)
						{
							alert("Invalid Fax No");
							document.form1.fax_suff.focus();
							return false;
						}
						cht = val.charAt(0);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.fax_suff.focus();
							return false;
						}  else  {  
								var valid = "0123456789"
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.fax_suff.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Enter Numbers Only");
									document.form1.fax_suff.focus();
									document.form1.fax_suff.select();
									return false; 
							  }
					   }  
				}
				*/
				
				if(document.form1.message.value=="")	{
						alert("Enter the Description");
						document.form1.message.focus();
						return false;
				}  else {    
						val = document.form1.message.value;	
						leng = document.form1.message.value.length;
						if(leng>250)
						{
							alert("Description should not exceed 250 characters");
							document.form1.message.focus();
							return false;
						}
				}
				
				if(document.form1.email.value == "") {
					alert("Enter the Username");
					document.form1.email.focus();
					return false;
				}
				
				if(document.form1.user_email.value =="")
				{
					alert("Enter the Email Address");
					document.form1.user_email.focus();
					return false;
				}
				
				if(document.form1.user_email.value!="")	{
						    
						val = document.form1.user_email.value;	
						leng = document.form1.user_email.value.length;
						cht = val.charAt(0);
						trial = val.charAt(leng-1);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.user_email.focus();
							return false;
						} 
				else {    
					if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.form1.user_email.value)) {
					} else {
						alert("Invalid E-mail Address! Enter Correct Email Format.");
						document.form1.user_email.focus();
						document.form1.user_email.select();
						return false;
					}
				}
				   if(trial == " ") {
					alert("Remove the Trailing Spaces");
					document.form1.user_email.focus();
					return false;
				  } 
					   }  
				
				
				 
				  
				 if(document.form1.name.value == "") {
					alert("Enter the Name");
					document.form1.name.focus();
					return false;
				} 
								else 
								{    
						val = document.form1.name.value;	
						leng = document.form1.name.value.length;
						cht = val.charAt(0);
						trial = val.charAt(leng-1);
								if(cht == " ")
								{
									alert("Dont Leave any Space at First!....");
									document.form1.name.focus();
									return false;
								}  
						
						}
								
							   if(trial == " ") 
							   {
					alert("Remove the Trailing Spaces");
					document.form1.name.focus();
					return false;
				  } 
				
				
				
				if(document.form1.password.value == "")	{
						alert("Enter the Create Password");
						document.form1.password.focus();
						return false;
				}  else {    
						val = document.form1.password.value;	
						leng = document.form1.password.value.length;
						cht = val.charAt(0);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.password.focus();
							return false;
						}  else  {  
								var valid = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.password.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Invalid Input! \"Special Characters\" Not Allowed.");
									document.form1.password.focus();
									document.form1.password.select();
									return false; 
							  }
					   }  
				}
			
				if(document.form1.password.value.length < 6) {
					alert("Create Password Should be minimum 6 Characters.");
					document.form1.password.focus();
					document.form1.password.select();
					return false; 
				}
			
				if(document.form1.cpassword.value=="")	{
						alert("Retype Create Password");
						document.form1.cpassword.focus();
						return false;
				} 
			
				if((document.form1.password.value)!=(document.form1.cpassword.value)) {
					alert("The Create Password Retyped does not match with the Create Password. Once again Retype the Create Password");
					document.form1.cpassword.focus();
					document.form1.cpassword.value="";
					return false;
				}
				
				 /*if(document.form1.website.value!="")
				 {
				 if(document.form1.website.value.match(/^\w+(\.\w+)*\.(\w{2}|com|net|org|mil|int|edu|gov|info|biz|coop|aero|pro|name|museum)(\/[\w\-\.])*$/) == null && document.form1.website.value.match(/^\w+(\.\w+)*\.(\w{2}|com|net|org|mil|int|edu|gov|info|biz|coop|aero|pro|name|museum)(\/[\w\-\.])*$/) == null) {
					  alert("Enter Valid URL");
						document.form1.website.focus();
						return false;
					  
					  }
				 }*/
				
		
		return true;
	}
	
	function postingvalidateadmin()
	{
		
		  if(document.form1.plstate.value == "") {
					alert("Select the Posting State");
					document.form1.plstate.focus();
					return false;
				} 
				
		i=0;
		status1="";
		
		while(i<6)
		{
		if(document.form1.listing[i].checked==true)
		{
		status1="yes";
		
		}
		i++;
		}
		
		if(status1=="")
		{
			alert("Select the Listing");
			document.form1.listing[0].focus();
			return false;
		}
		 if(document.form1.nop.value == "") {
					alert("Enter the Name of Practice or Business");
					document.form1.nop.focus();
					return false;
				} 
								else {    
						val = document.form1.nop.value;	
						leng = document.form1.nop.value.length;
						cht = val.charAt(0);
						trial = val.charAt(leng-1);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.nop.focus();
							return false;
						}  
						
								}
								
							   if(trial == " ") {
					alert("Remove the Trailing Spaces");
					document.form1.nop.focus();
					return false;
					   }  
				
				
				
				
				
		 if(document.form1.contact.value == "") {
					alert("Enter the Contact Person");
					document.form1.contact.focus();
					return false;
				} 
								else {    
						val = document.form1.contact.value;	
						leng = document.form1.contact.value.length;
						cht = val.charAt(0);
						trial = val.charAt(leng-1);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.contact.focus();
							return false;
						}  else  {  
								var valid = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.#/,'@: "
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.contact.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Invalid Input! \"Special Characters\" Not Allowed.");
									document.form1.contact.focus();
									document.form1.contact.select();
									return false; 
							  }
							   if(trial == " ") {
					alert("Remove the Trailing Spaces");
					document.form1.contact.focus();
					return false;
				  } 
					   }  
				}
		/* if(document.form1.address.value == "") {
					alert("Enter the Address");
					document.form1.address.focus();
					return false;
				} 
								else {    
						val = document.form1.address.value;	
						leng = document.form1.address.value.length;
						cht = val.charAt(0);
						trial = val.charAt(leng-1);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.address.focus();
							return false;
						}  else  {  
								var valid = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.#/,'@:- "
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.address.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Invalid Input! \"Special Characters\" Not Allowed.");
									document.form1.address.focus();
									document.form1.address.select();
									return false; 
							  }
							   if(trial == " ") {
					alert("Remove the Trailing Spaces");
					document.form1.address.focus();
					return false;
				  } 
					   }  
				}
				 if(document.form1.address2.value == "") {
					//alert("Enter the Address 2");
					//document.form1.address2.focus();
					//return false;
				} 
								/*else {    
						val = document.form1.address2.value;	
						leng = document.form1.address2.value.length;
						cht = val.charAt(0);
						trial = val.charAt(leng-1);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.address2.focus();
							return false;
						}  else  {  
								var valid = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.#/,'@:- "
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.address2.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Invalid Input! \"Special Characters\" Not Allowed.");
									document.form1.address2.focus();
									document.form1.address2.select();
									return false; 
							  }
							   if(trial == " ") {
					alert("Remove the Trailing Spaces");
					document.form1.address2.focus();
					return false;
				  } 
					   }  
				}*/
				
				  if(document.form1.city.value == "") {
					alert("Enter the City");
					document.form1.city.focus();
					return false;
				} 
				else {    
						val = document.form1.city.value;	
						leng = document.form1.city.value.length;
						cht = val.charAt(0);
						trial = val.charAt(leng-1);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.city.focus();
							return false;
						}  else  {  
								var valid = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ./,'@: "
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.city.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Invalid Input! \"Special Characters\" Not Allowed.");
									document.form1.city.focus();
									document.form1.city.select();
									return false; 
							  }
							   if(trial == " ") {
					alert("Remove the Trailing Spaces");
					document.form1.city.focus();
					return false;
				  } 
					   }  
				}
				  if(document.form1.state.value == "") {
					alert("Select the State");
					document.form1.state.focus();
					return false;
				} 
				
				/*  if(document.form1.zip.value == "") {
					alert("Enter Zip Code");
					document.form1.zip.focus();
					return false;
				} 
				else  { 
				val = document.form1.zip.value;	
						leng = document.form1.zip.value.length;
						cht = val.charAt(0);
						trial = val.charAt(leng-1);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.zip.focus();
							return false;
						}  else  {  
						var valid = "0123456789"
						var ok = "yes";	
						var temp;
						for (var ii=0; ii<document.form1.zip.value.length; ii++)				{
								temp = "" + document.form1.zip.value.substring(ii,ii+1);
								if (valid.indexOf(temp) == "-1") ok = "no";	
						}
						if (ok == "no") {
							alert("Enter Numbers Only");
							document.form1.zip.focus();
							document.form1.zip.select();
							return false; 
					  }
				 if(trial == " ") {
					alert("Remove the Trailing Spaces");
					document.form1.zip.focus();
					return false;
				  } 
					   }  
				}
*/
				
				
				if(document.form1.phone_area.value=="")	{
						alert("Enter the Phone No");
						document.form1.phone_area.focus();
						return false;
				}  else {    
						val = document.form1.phone_area.value;	
						leng = document.form1.phone_area.value.length;
						if(leng!=3)
						{
							alert("Invalid Phone No");
							document.form1.phone_area.focus();
							return false;
						}
						cht = val.charAt(0);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.phone_area.focus();
							return false;
						}  else  {  
								var valid = "0123456789"
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.phone_area.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Enter Numbers Only");
									document.form1.phone_area.focus();
									document.form1.phone_area.select();
									return false; 
							  }
					   }  
				}
				
				if(document.form1.phone_pref.value=="")	{
						alert("Enter the Phone No");
						document.form1.phone_pref.focus();
						return false;
				}  else {    
						val = document.form1.phone_pref.value;	
						leng = document.form1.phone_pref.value.length;
						if(leng!=3)
						{
							alert("Invalid Phone No");
							document.form1.phone_pref.focus();
							return false;
						}
						cht = val.charAt(0);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.phone_pref.focus();
							return false;
						}  else  {  
								var valid = "0123456789"
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.phone_pref.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Enter Numbers Only");
									document.form1.phone_pref.focus();
									document.form1.phone_pref.select();
									return false; 
							  }
					   }  
				}
				
				
				if(document.form1.phone_suff.value=="")	{
						alert("Enter the Phone No");
						document.form1.phone_suff.focus();
						return false;
				}  else {    
						val = document.form1.phone_suff.value;	
						leng = document.form1.phone_suff.value.length;
						if(leng!=4)
						{
							alert("Invalid Phone No");
							document.form1.phone_suff.focus();
							return false;
						}
						cht = val.charAt(0);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.phone_suff.focus();
							return false;
						}  else  {  
								var valid = "0123456789"
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.phone_suff.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Enter Numbers Only");
									document.form1.phone_suff.focus();
									document.form1.phone_suff.select();
									return false; 
							  }
					   }  
				}
				
				
				if(document.form1.message.value=="")	{
						alert("Enter the Description");
						document.form1.message.focus();
						return false;
				}  else {    
						val = document.form1.message.value;	
						leng = document.form1.message.value.length;
						if(leng>250)
						{
							alert("Description should not exceed 250 characters");
							document.form1.message.focus();
							return false;
						}
				}
				
				if(document.form1.email.value == "") {
					alert("Enter the Username");
					document.form1.email.focus();
					return false;
				}
				
				/*if(document.form1.user_email.value =="")
				{
					alert("Enter the Email Address");
					document.form1.user_email.focus();
					return false;
				}*/
				
				if(document.form1.user_email.value!="")	{
						    
						val = document.form1.user_email.value;	
						leng = document.form1.user_email.value.length;
						cht = val.charAt(0);
						trial = val.charAt(leng-1);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.user_email.focus();
							return false;
						} 
				else {    
					if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(document.form1.user_email.value)) {
					} else {
						alert("Invalid E-mail Address! Enter Correct Email Format.");
						document.form1.user_email.focus();
						document.form1.user_email.select();
						return false;
					}
				}
				   if(trial == " ") {
					alert("Remove the Trailing Spaces");
					document.form1.user_email.focus();
					return false;
				  } 
					   }  
				
				
				 
				  
				 if(document.form1.name.value == "") {
					alert("Enter the Name");
					document.form1.name.focus();
					return false;
				} 
								else 
								{    
						val = document.form1.name.value;	
						leng = document.form1.name.value.length;
						cht = val.charAt(0);
						trial = val.charAt(leng-1);
								if(cht == " ")
								{
									alert("Dont Leave any Space at First!....");
									document.form1.name.focus();
									return false;
								}  
						
						}
								
							   if(trial == " ") 
							   {
					alert("Remove the Trailing Spaces");
					document.form1.name.focus();
					return false;
				  } 
				
				
				
				if(document.form1.password.value == "")	{
						alert("Enter the Create Password");
						document.form1.password.focus();
						return false;
				}  else {    
						val = document.form1.password.value;	
						leng = document.form1.password.value.length;
						cht = val.charAt(0);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.password.focus();
							return false;
						}  else  {  
								var valid = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.password.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Invalid Input! \"Special Characters\" Not Allowed.");
									document.form1.password.focus();
									document.form1.password.select();
									return false; 
							  }
					   }  
				}
			
				if(document.form1.password.value.length < 6) {
					alert("Create Password Should be minimum 6 Characters.");
					document.form1.password.focus();
					document.form1.password.select();
					return false; 
				}
			
				if(document.form1.cpassword.value=="")	{
						alert("Retype Create Password");
						document.form1.cpassword.focus();
						return false;
				} 
			
				if((document.form1.password.value)!=(document.form1.cpassword.value)) {
					alert("The Create Password Retyped does not match with the Create Password. Once again Retype the Create Password");
					document.form1.cpassword.focus();
					document.form1.cpassword.value="";
					return false;
				}
		
		return true;
	}
	
	
	
	
	
	
	
	function postingvalidated()
	{
		
		   if(document.form1.plstate.value == "") {
					alert("Select the Posting State");
					document.form1.plstate.focus();
					return false;
				} 
				
		i=0;
		status1="";
		while(i<6)
		{
		if(document.form1.listing[i].checked==true)
		status1="yes";
		i++;
		}
		if(status1=="")
		{
			alert("Select the Listing");
			document.form1.listing[0].focus();
			return false;
		}
		
		 if(document.form1.nop.value == "") {
					alert("Enter the Name of Practice or Business");
					document.form1.nop.focus();
					return false;
				} 
								else {    
						val = document.form1.nop.value;	
						leng = document.form1.nop.value.length;
						cht = val.charAt(0);
						trial = val.charAt(leng-1);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.nop.focus();
							return false;
						} 
						
						
								}
								
								
							   if(trial == " ") {
					alert("Remove the Trailing Spaces");
					document.form1.nop.focus();
					return false;
				  } 
					   
				
				
				
				
				
		 if(document.form1.contact.value == "") {
					alert("Enter the Contact Person");
					document.form1.contact.focus();
					return false;
				} 
								else {    
						val = document.form1.contact.value;	
						leng = document.form1.contact.value.length;
						cht = val.charAt(0);
						trial = val.charAt(leng-1);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.contact.focus();
							return false;
						}  else  {  
								var valid = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.#/,'@: "
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.contact.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Invalid Input! \"Special Characters\" Not Allowed.");
									document.form1.contact.focus();
									document.form1.contact.select();
									return false; 
							  }
							   if(trial == " ") {
					alert("Remove the Trailing Spaces");
					document.form1.contact.focus();
					return false;
				  } 
					   }  
				}
		
		/* if(document.form1.address.value == "") {
					alert("Enter the Address");
					document.form1.address.focus();
					return false;
				} 
								else {    
						val = document.form1.address.value;	
						leng = document.form1.address.value.length;
						cht = val.charAt(0);
						trial = val.charAt(leng-1);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.address.focus();
							return false;
						}  else  {  
								var valid = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.#/,'@: "
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.address.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Invalid Input! \"Special Characters\" Not Allowed.");
									document.form1.address.focus();
									document.form1.address.select();
									return false; 
							  }
							   if(trial == " ") {
					alert("Remove the Trailing Spaces");
					document.form1.address.focus();
					return false;
				  } 
					   }  
				}
				 if(document.form1.address2.value == "") {
					//alert("Enter the Address 2");
					//document.form1.address2.focus();
					//return false;
				} 
								/*else {    
						val = document.form1.address2.value;	
						leng = document.form1.address2.value.length;
						cht = val.charAt(0);
						trial = val.charAt(leng-1);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.address2.focus();
							return false;
						}  else  {  
								var valid = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.#/,'@:- "
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.address2.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Invalid Input! \"Special Characters\" Not Allowed.");
									document.form1.address2.focus();
									document.form1.address2.select();
									return false; 
							  }
							   if(trial == " ") {
					alert("Remove the Trailing Spaces");
					document.form1.address2.focus();
					return false;
				  } 
					   }  
				}*/
				  if(document.form1.city.value == "") {
					alert("Enter the City");
					document.form1.city.focus();
					return false;
				} 
				else {    
						val = document.form1.city.value;	
						leng = document.form1.city.value.length;
						cht = val.charAt(0);
						trial = val.charAt(leng-1);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.city.focus();
							return false;
						}  else  {  
								var valid = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ./,'@: "
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.city.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Invalid Input! \"Special Characters\" Not Allowed.");
									document.form1.city.focus();
									document.form1.city.select();
									return false; 
							  }
							   if(trial == " ") {
					alert("Remove the Trailing Spaces");
					document.form1.city.focus();
					return false;
				  } 
					   }  
				}
				  if(document.form1.state.value == "") {
					alert("Select the State");
					document.form1.state.focus();
					return false;
				} 
				
				/*
				  if(document.form1.zip.value == "") {
					alert("Enter Zip Code");
					document.form1.zip.focus();
					return false;
				} 
				else  { 
				val = document.form1.zip.value;	
						leng = document.form1.zip.value.length;
						cht = val.charAt(0);
						trial = val.charAt(leng-1);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.zip.focus();
							return false;
						}  else  {  
						var valid = "0123456789"
						var ok = "yes";	
						var temp;
						for (var ii=0; ii<document.form1.zip.value.length; ii++)				{
								temp = "" + document.form1.zip.value.substring(ii,ii+1);
								if (valid.indexOf(temp) == "-1") ok = "no";	
						}
						if (ok == "no") {
							alert("Enter Numbers Only");
							document.form1.zip.focus();
							document.form1.zip.select();
							return false; 
					  }
				 if(trial == " ") {
					alert("Remove the Trailing Spaces");
					document.form1.zip.focus();
					return false;
				  } 
					   }  
				}

				*/
				
				if(document.form1.phone_area.value=="")	{
						alert("Enter the Phone No");
						document.form1.phone_area.focus();
						return false;
				}  else {    
						val = document.form1.phone_area.value;	
						leng = document.form1.phone_area.value.length;
						if(leng!=3)
						{
							alert("Invalid Phone No");
							document.form1.phone_area.focus();
							return false;
						}
						cht = val.charAt(0);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.phone_area.focus();
							return false;
						}  else  {  
								var valid = "0123456789"
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.phone_area.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Enter Numbers Only");
									document.form1.phone_area.focus();
									document.form1.phone_area.select();
									return false; 
							  }
					   }  
				}
				
				if(document.form1.phone_pref.value=="")	{
						alert("Enter the Phone No");
						document.form1.phone_pref.focus();
						return false;
				}  else {    
						val = document.form1.phone_pref.value;	
						leng = document.form1.phone_pref.value.length;
						if(leng!=3)
						{
							alert("Invalid Phone No");
							document.form1.phone_pref.focus();
							return false;
						}
						cht = val.charAt(0);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.phone_pref.focus();
							return false;
						}  else  {  
								var valid = "0123456789"
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.phone_pref.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Enter Numbers Only");
									document.form1.phone_pref.focus();
									document.form1.phone_pref.select();
									return false; 
							  }
					   }  
				}
				
				
				if(document.form1.phone_suff.value=="")	{
						alert("Enter the Phone No");
						document.form1.phone_suff.focus();
						return false;
				}  else {    
						val = document.form1.phone_suff.value;	
						leng = document.form1.phone_suff.value.length;
						if(leng!=4)
						{
							alert("Invalid Phone No");
							document.form1.phone_suff.focus();
							return false;
						}
						cht = val.charAt(0);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.phone_suff.focus();
							return false;
						}  else  {  
								var valid = "0123456789"
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.phone_suff.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Enter Numbers Only");
									document.form1.phone_suff.focus();
									document.form1.phone_suff.select();
									return false; 
							  }
					   }  
				}
				
				/*
				
				if(document.form1.fax_area.value=="")	{
						//alert("Enter the Fax No");
						//document.form1.fax_area.focus();
						//return false;
				}  else {    
						val = document.form1.fax_area.value;	
						leng = document.form1.fax_area.value.length;
						if(leng!=3)
						{
							alert("Invalid Fax No");
							document.form1.fax_area.focus();
							return false;
						}
						cht = val.charAt(0);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.fax_area.focus();
							return false;
						}  else  {  
								var valid = "0123456789"
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.fax_area.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Enter Numbers Only");
									document.form1.fax_area.focus();
									document.form1.fax_area.select();
									return false; 
							  }
					   }  
				}
				
				if(document.form1.fax_pref.value=="")	{
						//alert("Enter the Fax No");
						//document.form1.fax_pref.focus();
						//return false;
				}  else {    
						val = document.form1.fax_pref.value;	
						leng = document.form1.fax_pref.value.length;
						if(leng!=3)
						{
							alert("Invalid Fax No");
							document.form1.fax_pref.focus();
							return false;
						}
						cht = val.charAt(0);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.fax_pref.focus();
							return false;
						}  else  {  
								var valid = "0123456789"
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.fax_pref.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Enter Numbers Only");
									document.form1.fax_pref.focus();
									document.form1.fax_pref.select();
									return false; 
							  }
					   }  
				}
				
				
				if(document.form1.fax_suff.value=="")	{
						//alert("Enter the Fax No");
						//document.form1.fax_suff.focus();
						//return false;
				}  else {    
						val = document.form1.fax_suff.value;	
						leng = document.form1.fax_suff.value.length;
						if(leng!=4)
						{
							alert("Invalid Fax No");
							document.form1.fax_suff.focus();
							return false;
						}
						cht = val.charAt(0);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.fax_suff.focus();
							return false;
						}  else  {  
								var valid = "0123456789"
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.fax_suff.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Enter Numbers Only");
									document.form1.fax_suff.focus();
									document.form1.fax_suff.select();
									return false; 
							  }
					   }  
				}
				
				*/
				 /*if(document.form1.website.value!="")
				 {
				 if(document.form1.website.value.match(/^http:\/\/\w+(\.\w+)*\.(\w{2}|com|net|org|mil|int|edu|gov|info|biz|coop|aero|pro|name|museum)(\/[\w\-\.])*$/) == null && document.form1.website.value.match(/^https:\/\/\w+(\.\w+)*\.(\w{2}|com|net|org|mil|int|edu|gov|info|biz|coop|aero|pro|name|museum)(\/[\w\-\.])*$/) == null) {
					  alert("Enter Valid URL");
						document.form1.website.focus();
						return false;
					  
					  }
				 }*/
				if(document.form1.message.value=="")	{
						alert("Enter the Description");
						document.form1.message.focus();
						return false;
				}  else {    
						val = document.form1.message.value;	
						leng = document.form1.message.value.length;
						if(leng>250)
						{
							alert("Description should not exceed 250 characters");
							document.form1.message.focus();
							return false;
						}
				}
				
				
		return true;
	}
	
	
	
	function lpostingvalidate()
	{
		
		 if(document.form1.plstate.value == "") {
					alert("Select the Posting State");
					document.form1.plstate.focus();
					return false;
				} 
		i=0;
		status1="";
		while(i<6)
		{
		if(document.form1.listing[i].checked==true)
		status1="yes";
		i++;
		}
		if(status1=="")
		{
			alert("Select the Listing");
			document.form1.listing[0].focus();
			return false;
		}
		
		
		 if(document.form1.nop.value == "") {
					alert("Enter the Name of Practice or Business");
					document.form1.nop.focus();
					return false;
				} 
								else {    
						val = document.form1.nop.value;	
						leng = document.form1.nop.value.length;
						cht = val.charAt(0);
						trial = val.charAt(leng-1);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.nop.focus();
							return false;
						}
						
						
						  }  
								
							   if(trial == " ") {
					alert("Remove the Trailing Spaces");
					document.form1.nop.focus();
					return false;
				  } 
					 
				
				
				
				
				
		 if(document.form1.contact.value == "") {
					alert("Enter the Contact Person");
					document.form1.contact.focus();
					return false;
				} 
								else {    
						val = document.form1.contact.value;	
						leng = document.form1.contact.value.length;
						cht = val.charAt(0);
						trial = val.charAt(leng-1);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.contact.focus();
							return false;
						}  else  {  
								var valid = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.#/,'@: "
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.contact.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Invalid Input! \"Special Characters\" Not Allowed.");
									document.form1.contact.focus();
									document.form1.contact.select();
									return false; 
							  }
							   if(trial == " ") {
					alert("Remove the Trailing Spaces");
					document.form1.contact.focus();
					return false;
				  } 
					   }  
				}
		
		 if(document.form1.address.value == "") {
					alert("Enter the Address");
					document.form1.address.focus();
					return false;
				} 
								/*else {    
						val = document.form1.address.value;	
						leng = document.form1.address.value.length;
						cht = val.charAt(0);
						trial = val.charAt(leng-1);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.address.focus();
							return false;
						}  else  {  
								var valid = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.#/,'@: "
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.address.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Invalid Input! \"Special Characters\" Not Allowed.");
									document.form1.address.focus();
									document.form1.address.select();
									return false; 
							  }
							   if(trial == " ") {
					alert("Remove the Trailing Spaces");
					document.form1.address.focus();
					return false;
				  } 
					   }  
				}*/
				 if(document.form1.address2.value == "") {
					//alert("Enter the Address 2");
					//document.form1.address2.focus();
					//return false;
				} 
								/*else {    
						val = document.form1.address2.value;	
						leng = document.form1.address2.value.length;
						cht = val.charAt(0);
						trial = val.charAt(leng-1);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.address2.focus();
							return false;
						}  else  {  
								var valid = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.#/,'@:- "
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.address2.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Invalid Input! \"Special Characters\" Not Allowed.");
									document.form1.address2.focus();
									document.form1.address2.select();
									return false; 
							  }
							   if(trial == " ") {
					alert("Remove the Trailing Spaces");
					document.form1.address2.focus();
					return false;
				  } 
					   }  
				}*/
				  if(document.form1.city.value == "") {
					alert("Enter the City");
					document.form1.city.focus();
					return false;
				} 
				else {    
						val = document.form1.city.value;	
						leng = document.form1.city.value.length;
						cht = val.charAt(0);
						trial = val.charAt(leng-1);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.city.focus();
							return false;
						}  else  {  
								var valid = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ./,'@: "
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.city.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Invalid Input! \"Special Characters\" Not Allowed.");
									document.form1.city.focus();
									document.form1.city.select();
									return false; 
							  }
							   if(trial == " ") {
					alert("Remove the Trailing Spaces");
					document.form1.city.focus();
					return false;
				  } 
					   }  
				}
				  if(document.form1.state.value == "") {
					alert("Select the State");
					document.form1.state.focus();
					return false;
				} 
				
				  if(document.form1.zip.value == "") {
					alert("Enter Zip Code");
					document.form1.zip.focus();
					return false;
				} 
				else  { 
				val = document.form1.zip.value;	
						leng = document.form1.zip.value.length;
						cht = val.charAt(0);
						trial = val.charAt(leng-1);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.zip.focus();
							return false;
						}  else  {  
						var valid = "0123456789"
						var ok = "yes";	
						var temp;
						for (var ii=0; ii<document.form1.zip.value.length; ii++)				{
								temp = "" + document.form1.zip.value.substring(ii,ii+1);
								if (valid.indexOf(temp) == "-1") ok = "no";	
						}
						if (ok == "no") {
							alert("Enter Numbers Only");
							document.form1.zip.focus();
							document.form1.zip.select();
							return false; 
					  }
				 if(trial == " ") {
					alert("Remove the Trailing Spaces");
					document.form1.zip.focus();
					return false;
				  } 
					   }  
				}

				
				
				if(document.form1.phone_area.value=="")	{
						alert("Enter the Phone No");
						document.form1.phone_area.focus();
						return false;
				}  else {    
						val = document.form1.phone_area.value;	
						leng = document.form1.phone_area.value.length;
						if(leng!=3)
						{
							alert("Invalid Phone No");
							document.form1.phone_area.focus();
							return false;
						}
						cht = val.charAt(0);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.phone_area.focus();
							return false;
						}  else  {  
								var valid = "0123456789"
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.phone_area.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Enter Numbers Only");
									document.form1.phone_area.focus();
									document.form1.phone_area.select();
									return false; 
							  }
					   }  
				}
				
				if(document.form1.phone_pref.value=="")	{
						alert("Enter the Phone No");
						document.form1.phone_pref.focus();
						return false;
				}  else {    
						val = document.form1.phone_pref.value;	
						leng = document.form1.phone_pref.value.length;
						if(leng!=3)
						{
							alert("Invalid Phone No");
							document.form1.phone_pref.focus();
							return false;
						}
						cht = val.charAt(0);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.phone_pref.focus();
							return false;
						}  else  {  
								var valid = "0123456789"
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.phone_pref.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Enter Numbers Only");
									document.form1.phone_pref.focus();
									document.form1.phone_pref.select();
									return false; 
							  }
					   }  
				}
				
				
				if(document.form1.phone_suff.value=="")	{
						alert("Enter the Phone No");
						document.form1.phone_suff.focus();
						return false;
				}  else {    
						val = document.form1.phone_suff.value;	
						leng = document.form1.phone_suff.value.length;
						if(leng!=4)
						{
							alert("Invalid Phone No");
							document.form1.phone_suff.focus();
							return false;
						}
						cht = val.charAt(0);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.phone_suff.focus();
							return false;
						}  else  {  
								var valid = "0123456789"
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.phone_suff.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Enter Numbers Only");
									document.form1.phone_suff.focus();
									document.form1.phone_suff.select();
									return false; 
							  }
					   }  
				}
				
				
				
				/*if(document.form1.fax_area.value=="")	{
						//alert("Enter the Fax No");
						//document.form1.fax_area.focus();
						//return false;
				}  else {    
						val = document.form1.fax_area.value;	
						leng = document.form1.fax_area.value.length;
						if(leng!=3)
						{
							alert("Invalid Fax No");
							document.form1.fax_area.focus();
							return false;
						}
						cht = val.charAt(0);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.fax_area.focus();
							return false;
						}  else  {  
								var valid = "0123456789"
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.fax_area.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Enter Numbers Only");
									document.form1.fax_area.focus();
									document.form1.fax_area.select();
									return false; 
							  }
					   }  
				}
				
				if(document.form1.fax_pref.value=="")	{
						//alert("Enter the Fax No");
						//document.form1.fax_pref.focus();
						//return false;
				}  else {    
						val = document.form1.fax_pref.value;	
						leng = document.form1.fax_pref.value.length;
						if(leng!=3)
						{
							alert("Invalid Fax No");
							document.form1.fax_pref.focus();
							return false;
						}
						cht = val.charAt(0);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.fax_pref.focus();
							return false;
						}  else  {  
								var valid = "0123456789"
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.fax_pref.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Enter Numbers Only");
									document.form1.fax_pref.focus();
									document.form1.fax_pref.select();
									return false; 
							  }
					   }  
				}
				
				
				if(document.form1.fax_suff.value=="")	{
						//alert("Enter the Fax No");
						//document.form1.fax_suff.focus();
						//return false;
				}  else {    
						val = document.form1.fax_suff.value;	
						leng = document.form1.fax_suff.value.length;
						if(leng!=4)
						{
							alert("Invalid Fax No");
							document.form1.fax_suff.focus();
							return false;
						}
						cht = val.charAt(0);
						if(cht == " ") {
							alert("Dont Leave any Space at First!....");
							document.form1.fax_suff.focus();
							return false;
						}  else  {  
								var valid = "0123456789"
								var ok = "yes";	
								var temp;
								for (var ii=0; ii<leng; ii++)				{
										temp = "" + document.form1.fax_suff.value.substring(ii,ii+1);
										if (valid.indexOf(temp) == "-1") ok = "no";	
								}
								if (ok == "no") {
									alert("Enter Numbers Only");
									document.form1.fax_suff.focus();
									document.form1.fax_suff.select();
									return false; 
							  }
					   }  
				}
				*/
				
				/* if(document.form1.website.value!="")
				 {
				 if(document.form1.website.value.match(/^http:\/\/\w+(\.\w+)*\.(\w{2}|com|net|org|mil|int|edu|gov|info|biz|coop|aero|pro|name|museum)(\/[\w\-\.])*$/) == null && document.form1.website.value.match(/^https:\/\/\w+(\.\w+)*\.(\w{2}|com|net|org|mil|int|edu|gov|info|biz|coop|aero|pro|name|museum)(\/[\w\-\.])*$/) == null) {
					  alert("Enter Valid URL");
						document.form1.website.focus();
						return false;
					  
					  }
				 }*/
				if(document.form1.message.value=="")	{
						alert("Enter the Description");
						document.form1.message.focus();
						return false;
				}  else {    
						val = document.form1.message.value;	
						leng = document.form1.message.value.length;
						if(leng>250)
						{
							alert("Description should not exceed 250 characters");
							document.form1.message.focus();
							return false;
						}
				}
		
		return true;
	}