function validEmailAddress(business_email)
{
		invalidChars = " /:,;~"
		if (business_email == "") 
		{
			return (false);
		}
		for (i=0; i<invalidChars.length;i++) 
		{
			badChar = invalidChars.charAt(i)
			if (business_email.indexOf(badChar,0) != -1) 
			{
				return (false);
			}
		}
		atPos = business_email.indexOf("@",1)
		if (atPos == -1) 
		{
			return (false);
		}
		if (business_email.indexOf("@",atPos+1) != -1) 
		{
			return (false);
		}
		periodPos = business_email.indexOf(".",atPos)
		if (periodPos == -1) 
		{
			return (false);
		}
		if (periodPos+3 > business_email.length)	
		{
			return (false);
		}
		return (true);
}



function NewBus(frm)
{		
	var urlRegxp = /^((http:\/\/www|HTTP:\/\/WWW)|(www|WWW)).([A-Za-z0-9])+\.(([A-Za-z]{2,3})|[A-Za-z]{2,3}\.[A-Za-z]{2,3})$/i;

		var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";

		if(trim(frm.business_name.value)=="")
		{   
			visitor +=  "\n - Please enter your business name.";
	    }

		if(trim(frm.business_address1.value)=="")
		{   
			visitor +=  "\n - Please enter your business address.";
	    }

		if(trim(frm.business_city.value)=="")
		{   
			visitor +=  "\n - Please enter your business city.";
	    }

		if(trim(frm.business_state.value)=="")
		{   
			visitor +=  "\n - Please enter your business state.";
	    }

		if(trim(frm.business_zip.value)=="")
		{   
			visitor +=  "\n - Please enter your business zipcode.";
	    }

		if(trim(frm.business_phone.value)=="")
		{   
			visitor +=  "\n - Please enter your business phone number.";
	    }
		
		if(trim(frm.business_web.value)!="")
		{   
			if(urlRegxp.test(trim(frm.business_web.value))!=true)
			{
				visitor +=  "\n - Please enter valid web address.";
			}
	    }
		
		if(trim(frm.business_first_name.value)=="")
		{   
			visitor +=  "\n - Please enter your first name.";
	    }
		if(trim(frm.business_last_name.value)=="")
		{   
			visitor +=  "\n - Please enter your last name.";
	    }
		if(trim(frm.business_email.value)=="")
		{   
			//visitor +=  "\n - Please enter email.";
	    }

		if(!validEmailAddress(frm.business_email.value))
		{
			visitor += "\n - Please enter a valid email Address.";
			
		}
		
		/*if(trim(frm.business_pasword.value)=="")
		{   
			visitor +=  "\n - Please enter your password.";
	    }
		if(frm.business_pasword.value!=frm.business_pasword_confirm.value)
		{
			visitor += "\n - Password is not confirmed. Please fill it again.";
		}
		*/
		if(frm.business_own.checked==false)
		{
			visitor += "\n - Please agree with legal agreement before proceeding.";
		}	
		
		if(visitor != "") {
			MasterString = MasterString + visitor;
			flag=true;
		}
		if (flag == true) {
		 alert(MasterString);
		 return false;
		}	
		
		else
		{
		return true;
		}

}


function businessMember(frm)
{		

		var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";
		var urlRegxp = /^((http:\/\/www|HTTP:\/\/WWW)|(www|WWW)).([A-Za-z0-9])+\.(([A-Za-z]{2,3})|[A-Za-z]{2,3}\.[A-Za-z]{2,3})$/i;
		
		/*if(trim(frm.business_address1.value)=="")
		{   
			visitor +=  "\n - Please enter your business address.";
	    }*/
		if(trim(frm.business_city.value)=="")
		{   
			visitor +=  "\n - Please enter your business city.";
	    }
	
		if(trim(frm.business_state.value)=="")
		{   
			visitor +=  "\n - Please select your business state.";
	    }
		if(trim(frm.business_zip.value)=="")
		{   
			visitor +=  "\n - Please enter your business zip.";
	    }
		
		if(trim(frm.business_phone.value)=="")
		{   
			visitor +=  "\n - Please enter your business phone.";
	    }
				
				
		if(!validEmailAddress(frm.business_email.value))
		{
			visitor += "\n - Please enter a valid email address.";
			
		}
		
	
		if(trim(frm.business_pasword.value)=="")
		{   
			visitor +=  "\n - Please enter your password.";
	    }
		
		if(frm.business_pasword.value!=frm.business_pasword_confirm.value)
		{
			visitor += "\n - Password is not confirmed. Please fill it again.";
		}
	

		if(trim(frm.business_first_name.value)=="")
		{   
			visitor +=  "\n - Please enter your contact first name.";
	    }
				
		if(trim(frm.business_last_name.value)=="")
		{   
			visitor +=  "\n - Please enter your contact last name.";
	    }
		if(trim(frm.business_title.value)=="")
		{   
			visitor +=  "\n - Please enter contact position.";
	    }
		
		if(trim(frm.contact_phone.value)=="" && trim(frm.contact_email.value)=="")
		{   
			visitor +=  "\n - Please enter contact phone.";
	    }
		
		if(trim(frm.contact_email.value)!="" && !validEmailAddress(frm.contact_email.value))
		{
			visitor += "\n - Please enter a valid contact email address.";
			
		}
		/*if(trim(frm.contact_address.value)=="")
		{   
			visitor +=  "\n - Please enter contact address.";
	    }*/
		
		if(trim(frm.contact_city.value)=="")
		{   
			visitor +=  "\n - Please enter contact city.";
	    }
		
		if(trim(frm.contact_state.value)=="")
		{   
			visitor +=  "\n - Please enter contact state.";
	    }
		
		if(trim(frm.contact_zip.value)=="")
		{   
			visitor +=  "\n - Please enter contact zip code.";
	    }

		if(frm.business_own.checked==false)
		{
			visitor += "\n - Please agree with legal agreement before proceeding.";
		}	
		
		if(trim(frm.business_web.value)!="")
		{   
			if(urlRegxp.test(trim(frm.business_web.value))!=true)
			{
				visitor +=  "\n - Please enter valid web address in the following format: ";
				visitor += "\n    www.youraddress.com";
			}
	    }
		
		if(visitor != "") {
			MasterString = MasterString + visitor;
			flag=true;
		}
		if (flag == true) {
		 alert(MasterString);
		 return false;
		}	
		
		
}



function businessMember2(frm)
{		

		var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";
		var urlRegxp = /^((http:\/\/www|HTTP:\/\/WWW)|(www|WWW)).([A-Za-z0-9])+\.(([A-Za-z]{2,3})|[A-Za-z]{2,3}\.[A-Za-z]{2,3})$/i;
		
		if(trim(frm.business_address1.value)=="")
		{   
			visitor +=  "\n - Please enter your business address.";
	    }
		if(trim(frm.business_city.value)=="")
		{   
			visitor +=  "\n - Please enter your business city.";
	    }
	
		if(trim(frm.business_state.value)=="")
		{   
			visitor +=  "\n - Please select your business state.";
	    }
		if(trim(frm.business_zip.value)=="")
		{   
			visitor +=  "\n - Please enter your business zip.";
	    }
		
		if(trim(frm.business_phone.value)=="")
		{   
			visitor +=  "\n - Please enter your business phone.";
	    }
		
		if(trim(frm.business_web.value)!="")
		{   
			if(urlRegxp.test(trim(frm.business_web.value))!=true)
			{
				visitor +=  "\n - Please enter valid web address in the following format: ";
				visitor += "\n    www.youraddress.com";
			}
	    }
		
		if(visitor != "") {
			MasterString = MasterString + visitor;
			flag=true;
		}
		if (flag == true) {
		 alert(MasterString);
		 return false;
		}	
		
		
}


function businessMemberNew(frm)
{		

		var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";
		var urlRegxp = /^((http:\/\/www|HTTP:\/\/WWW)|(www|WWW)).([A-Za-z0-9])+\.(([A-Za-z]{2,3})|[A-Za-z]{2,3}\.[A-Za-z]{2,3})$/i;
		
		if(trim(frm.business_name.value)=="")
		{   
			visitor +=  "\n - Please enter business name.";
	    }
		/*if(trim(frm.business_address1.value)=="")
		{   
			visitor +=  "\n - Please enter your business address.";
	    }*/
		
		if(trim(frm.business_city.value)=="")
		{   
			visitor +=  "\n - Please enter your business city.";
	    }
	
		if(trim(frm.business_state.value)=="")
		{   
			visitor +=  "\n - Please select your business state.";
	    }
		if(trim(frm.business_zip.value)=="")
		{   
			visitor +=  "\n - Please enter your business zip.";
	    }
		
		if(trim(frm.business_phone.value)=="")
		{   
			visitor +=  "\n - Please enter your business phone.";
	    }
				
				
		if(!validEmailAddress(frm.business_email.value))
		{
			visitor += "\n - Please enter a valid email address.";
			
		}
		
	
		if(trim(frm.business_pasword.value)=="")
		{   
			visitor +=  "\n - Please enter your password.";
	    }
		
		if(frm.business_pasword.value!=frm.business_pasword_confirm.value)
		{
			visitor += "\n - Password is not confirmed. Please fill it again.";
		}
	

		if(trim(frm.business_first_name.value)=="")
		{   
			visitor +=  "\n - Please enter your contact first name.";
	    }
				
		if(trim(frm.business_last_name.value)=="")
		{   
			visitor +=  "\n - Please enter your contact last name.";
	    }
		if(trim(frm.business_title.value)=="")
		{   
			visitor +=  "\n - Please enter contact position.";
	    }
		
		if(trim(frm.contact_phone.value)=="" && trim(frm.contact_email.value)=="")
		{   
			visitor +=  "\n - Please enter contact phone.";
	    }
		
		if(trim(frm.contact_email.value)!="" && !validEmailAddress(frm.contact_email.value))
		{
			visitor += "\n - Please enter a valid contact email address.";
			
		}
		/*if(trim(frm.contact_address.value)=="")
		{   
			visitor +=  "\n - Please enter contact address.";
	    }*/
		
		if(trim(frm.contact_city.value)=="")
		{   
			visitor +=  "\n - Please enter contact city.";
	    }
		
		if(trim(frm.contact_state.value)=="")
		{   
			visitor +=  "\n - Please enter contact state.";
	    }
		
		if(trim(frm.contact_zip.value)=="")
		{   
			visitor +=  "\n - Please enter contact zip code.";
	    }

		if(frm.business_own.checked==false)
		{
			visitor += "\n - Please agree with legal agreement before proceeding.";
		}	
		
		if(trim(frm.business_web.value)!="")
		{   
			if(urlRegxp.test(trim(frm.business_web.value))!=true)
			{
				visitor +=  "\n - Please enter valid web address in the following format: ";
				visitor += "\n    www.youraddress.com";
			}
	    }
		
		if(visitor != "") {
			MasterString = MasterString + visitor;
			flag=true;
		}
		if (flag == true) {
		 alert(MasterString);
		 return false;
		}	
		
		
}

function searchBusiness()
{		
		var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";
		if(trim(document.SearchBusForm.business_name.value)=="")
		{   
			visitor +=  "\n - Please enter your business name.";
	    }
		
		/*if(trim(document.SearchBusForm.business_state.value)=="")
		{   
			visitor +=  "\n - Please enter business state.";
	    }*/

		if(visitor != "") {
			MasterString = MasterString + visitor;
			flag=true;
		}
		if (flag == true) {
		 alert(MasterString);
		 return false;
		}	
		
		else
		{
		document.SearchBusForm.submit();
		}

}

function GoldBus(frm)
{
		var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";
		
		if(trim(frm.business_city.value)!="" || trim(frm.business_state.value)!="")
		{   
		  if(trim(frm.business_city_area.value)=="")
			{
				if(trim(frm.business_city.value)=="")
				visitor +=  "\n - Please enter city.";
				else
				visitor +=  "\n - Please select state.";
			}
	    }

		if(trim(frm.business_cat.value)=="")
		{   
			visitor +=  "\n - Please enter your business category.";
	    }
		
		if(trim(frm.business_high1.value)=="")
		{   
			visitor +=  "\n - Please enter highlights #1.";
	    }
		if(trim(frm.business_high2.value)=="")
		{   
			visitor +=  "\n - Please enter highlights #2.";
	    }
		if(trim(frm.business_high3.value)=="")
		{   
			visitor +=  "\n - Please enter highlights #3.";
	    }
		if(trim(frm.business_slogan.value)=="")
		{   
			visitor +=  "\n - Please enter marketing slogan.";
	    }
		if(trim(frm.business_message.value)=="")
		{   
			visitor +=  "\n - Please enter marketing message.";
	    }
		if(frm.business_message.value.length>5000)
		{   
			visitor +=  "\n - Marketing message should not be more than 5000 chars.";
	    }
		if(trim(frm.ad_text1.value)=="" || trim(frm.ad_text2.value)=="")
		{   
			visitor +=  "\n - Please enter featured ad text.";
	    }
		
		var ll=location.href;
		var str=ll.indexOf("bad=1");
		if(trim(frm.gold_image.value)=="" &&  trim(frm.gold_logo.value)=="" && str<1)
		{   
			visitor +=  "\n - You must either upload a custom listing image or a logo.";
	    }
		if(visitor != "") {
			MasterString = MasterString + visitor;
			flag=true;
		}
		if (flag == true) {
		 alert(MasterString);
		 return false;
		}	
		

}


function GoldBus2(frm)
{
		var new_flag=0;
		var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";
				
		if(trim(frm.business_city.value)!="" || trim(frm.business_state.value)!="")
		{   
		  if(trim(frm.business_city_area.value)=="")
			{
				if(trim(frm.business_city.value)=="")
				visitor +=  "\n - Please enter city.";
				else if(trim(frm.business_state.value)=="")
				visitor +=  "\n - Please select state.";
			}
	    }


		if(trim(frm.business_cat.value)=="")
		{   
			visitor +=  "\n - Please enter your business category.";
	    }
		
		if(trim(frm.business_high1.value)=="")
		{   
			visitor +=  "\n - Please enter highlights #1.";
	    }
		if(trim(frm.business_high2.value)=="")
		{   
			visitor +=  "\n - Please enter highlights #2.";
	    }
		if(trim(frm.business_high3.value)=="")
		{   
			visitor +=  "\n - Please enter highlights #3.";
	    }
		if(trim(frm.business_slogan.value)=="" || trim(frm.business_slogan.value)=="(e.g. Excellent customer service!)")
		{   
			visitor +=  "\n - Please enter marketing slogan.";
	    }
		if(trim(frm.business_message.value)=="" || trim(frm.business_message.value)=="Enter marketing message text.")
		{   
			visitor +=  "\n - Please enter marketing message.";
	    }
	
		if(frm.business_message.value.length>5000)
		{   
			visitor +=  "\n - Marketing message should not be more than 5000 chars.";
	    }
		if(trim(frm.ad_text1.value)=="" || trim(frm.ad_text1.value)=="(e.g. Best in The City.)" || trim(frm.ad_text1.value)=="(e.g. Visit us today!)" || trim(frm.ad_text2.value)=="" || trim(frm.ad_text2.value)=="(e.g. Visit us today!)" || trim(frm.ad_text2.value)=="(e.g. Best in The City.)"  )
		{   
			visitor +=  "\n - Please enter featured ad text.";
	    }
	
		var ll=location.href;
		var str=ll.indexOf("bad=1");
		if(frm.NoReqImg.value=='0')
		{
			if(trim(frm.gold_image.value)=="" &&  trim(frm.gold_logo.value)=="" && str<1)
			{   
			visitor +=  "\n - You must either upload a custom listing image or a logo.";
			}
		}
				
		if(trim(frm.business_special_title.value)!='' && trim(frm.business_special_title.value)!='(e.g. 25% off First Grooming Visit!)' )
		{
			if(trim(frm.business_special_description.value)=='' || trim(frm.business_special_description.value)=='(e.g. Mention Yapstar when you contact us and receive %25 off of your 1st Grooming Visit)')
			{
				visitor += "\n - Please enter special offer description";
				
			}
			if(trim(frm.business_special_terms.value)=='' || trim(frm.business_special_terms.value)=='Not valid with any other offer.')
			{
				visitor += "\n - Please enter special offer terms";
				
			}
		}
		else if(trim(frm.business_special_description.value)!='' && trim(frm.business_special_description.value)!='(e.g. Mention Yapstar when you contact us and receive %25 off of your 1st Grooming Visit)' )
		{
			if(trim(frm.business_special_title.value)=='' || trim(frm.business_special_title.value)=='(e.g. 25% off First Grooming Visit!)')
			{
				visitor += "\n - Please enter special offer title";
				
			}
			if(trim(frm.business_special_terms.value)=='' || trim(frm.business_special_terms.value)=='Not valid with any other offer.')
			{
				visitor += "\n - Please enter special offer terms";
				
			}
		}
		else if(trim(frm.business_special_terms.value)!='' && trim(frm.business_special_terms.value)!='Not valid with any other offer.' )
		{
			if(trim(frm.business_special_title.value)=='' || trim(frm.business_special_title.value)=='(e.g. 25% off First Grooming Visit!)')
			{
				visitor += "\n - Please enter special offer title";
				
			}
			if(trim(frm.business_special_description.value)=='' || trim(frm.business_special_description.value)=='(e.g. Mention Yapstar when you contact us and receive %25 off of your 1st Grooming Visit)')
			{
				visitor += "\n - Please enter special offer description";
				
			}
		}
		else
		{
			new_flag=1;
		}
		if(visitor != "") {
			MasterString = MasterString + visitor;
			flag=true;
		}
		if (flag == true) {
		 alert(MasterString);
		 return false;
		}	
		if(new_flag==1)
		{
			frm.business_special_title.value='';
			frm.business_special_description.value='';
			frm.business_special_terms.value='';			
			return true;
		}		

}



function PayBus(frm)
{
		var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";

		if(trim(document.PayBusForm.business_name.value)=="")
		{   
			visitor +=  "\n - Please enter your business name.";
	    }
		if(trim(document.PayBusForm.bus_bill_firstname.value)=="")
		{   
			visitor +=  "\n - Please enter your first name.";
	    }

		if(trim(document.PayBusForm.bus_bill_lastname.value)=="")
		{   
			visitor +=  "\n - Please enter your last name.";
	    }
		if(trim(document.PayBusForm.bus_credit_number.value)=="")
		{   
			visitor +=  "\n - Please enter your credit card number.";
	    }

		if(trim(document.PayBusForm.bus_credit_type.value)=="")
		{   
			visitor +=  "\n - Please enter type of your credit card.";
	    }

		if(trim(document.PayBusForm.bus_cvc_code.value)=="")
		{   
			visitor +=  "\n - Please enter your cvc code.";
	    }


		if(trim(document.PayBusForm.bus_exp_month.value)=="")
		{   
			visitor +=  "\n - Please enter your credit card expiration month.";
	    }

		if(trim(document.PayBusForm.bus_exp_year.value)=="")
		{   
			visitor +=  "\n - Please enter your credit card expiration year.";
	    }
		today = new Date();
		expiry = new Date("20"+document.PayBusForm.bus_exp_year.value, document.PayBusForm.bus_exp_month.value);
		if (today.getTime() > expiry.getTime())
		{
			visitor +=  "\n - Your credit card has expired.";
		
		}
		if(window.location.hostname!='mwb-200'){
		if (!checkCreditCard(document.PayBusForm.bus_credit_number.value,document.PayBusForm.bus_credit_type.value)) {
			 visitor +="\n - "+ ccErrors[ccErrorNo];
		} 
		}



		if(trim(document.PayBusForm.bus_bill_address.value)=="")
		{   
			visitor +=  "\n - Please enter your billing address.";
	    }
		if(trim(document.PayBusForm.bus_bill_city.value)=="")
		{   
			visitor +=  "\n - Please enter your billing city.";
	    }
		if(trim(document.PayBusForm.bus_bill_state.value)=="")
		{   
			visitor +=  "\n - Please enter your billing state.";
	    }
		if(trim(document.PayBusForm.bus_bill_zip.value)=="")
		{   
			visitor +=  "\n - Please enter your billing zipcode.";
	    }
		if(trim(document.PayBusForm.bus_bill_phone.value)=="")
		{   
			visitor +=  "\n - Please enter your phone number.";
	    }
	
		if(document.PayBusForm.terms_accept.checked==false)
		{		   
			visitor +=  "\n - Please accept terms and conditions before proceeding.";
	    }
		if(visitor != "") {
			MasterString = MasterString + visitor;
			flag=true;
		}


		if (flag == true) {
		 alert(MasterString);
		 return false;
		}	
		
		else
		{
		document.PayBusForm.submit();
		}


}

function searchManufacture()
{		
//alert("test");
		var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";
		if(trim(document.search_product.product_name.value)=="" && trim(document.search_product.manuf_name.value)=="")
		{   
			visitor +=  "\n - Please enter product name or manufacturer name.";
	    }
		/*if(trim(document.search_product.manuf_name.value)=="")
		{   
			visitor +=  "\n - Please enter manufacturer name.";
	    }*/
	
		if(visitor != "") {
			MasterString = MasterString + visitor;
			flag=true;
		}
		if (flag == true) {
		 alert(MasterString);
		 return false;
		}	
		
		else
		{
		document.search_product.submit();
		}

}


function manufSuggest(frm)
{		
		
		var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";
		
		if(trim(frm.product_name.value) == "")
		{   
			visitor +=  "\n - Please enter product name.";
	    }
		
		
		if(trim(frm.manuf_name.value)=="")
		{   
			visitor +=  "\n - Please enter manufacturer name.";
	    }
				if(trim(frm.manuf_first_name.value)=="")
		{   
			visitor +=  "\n - Please enter contact first name.";
	    }
	

		if(trim(frm.manuf_last_name.value)=="")
		{   
			visitor +=  "\n - Please enter contact last name.";
	    }
	

		if(trim(frm.manuf_title.value)=="")
		{   
			visitor +=  "\n - Please enter contact position.";
	    }
	

		if(trim(frm.manuf_address1.value)=="")
		{   
			visitor +=  "\n - Please enter address.";
	    }
	

		if(trim(frm.manuf_city.value)=="")
		{   
			visitor +=  "\n - Please enter city.";
	    }
	

		if(trim(frm.manuf_state.value)=="")
		{   
			visitor +=  "\n - Please select state.";
	    }
	

		if(trim(frm.manuf_zip.value)=="")
		{   
			visitor +=  "\n - Please enter zipcode.";
	    }
	

		if(trim(frm.manuf_phone.value)=="" && trim(frm.business_email.value)=="")
		{   
			visitor +=  "\n - Please enter phone number or email address.";
	    }
	
		if(trim(frm.business_email.value)!="" && !validEmailAddress(document.manuf_suggest.business_email.value))
		{
			visitor += "\n - Please enter a valid email address.";
			
		}
	

		if(trim(frm.prod_main.value)=="")
		{   
			visitor +=  "\n - Please enter main category .";
	    }
	

		if(trim(frm.prod_child.value)=="")
		{   
			visitor +=  "\n - Please enter sub category .";
	    }
	

		/*if(trim(frm.prod_photo.value)=="")
		{   
			visitor +=  "\n - Please enter product photo.";
	    }*/
	

		if(trim(frm.prod_price.value)=="")
		{   
			visitor +=  "\n - Please enter product price.";
	    }
	
		if(visitor != "") {
			MasterString = MasterString + visitor;
			flag=true;
		}
		if (flag == true) {
		 alert(MasterString);
		 return false;
		}	
		

}



function ClaimProd()
{		
//alert("test");
		var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";


		
		if(trim(document.ClaimProdForm.manuf_first_name.value)=="")
		{   
			visitor +=  "\n - Please enter manufacturer first name.";
	    }
		
		if(trim(document.ClaimProdForm.prod_price.value)=="")
		{   
			visitor +=  "\n - Please enter product price range.";
	    }

		if(trim(document.ClaimProdForm.manuf_last_name.value)=="")
		{   
			visitor +=  "\n - Please enter manufacturer last name.";
	    }
	

		if(trim(document.ClaimProdForm.manuf_title.value)=="")
		{   
			visitor +=  "\n - Please enter your position.";
	    }
	

		if(trim(document.ClaimProdForm.manuf_address1.value)=="")
		{   
			visitor +=  "\n - Please enter manufacturer address.";
	    }
	

		if(trim(document.ClaimProdForm.manuf_city.value)=="")
		{   
			visitor +=  "\n - Please enter manufacturer city.";
	    }
	

		if(trim(document.ClaimProdForm.manuf_state.value)=="")
		{   
			visitor +=  "\n - Please enter manufacturer state.";
	    }
	

		if(trim(document.ClaimProdForm.manuf_zip.value)=="")
		{   
			visitor +=  "\n - Please enter manufacturer zipcode.";
	    }
	

		if(trim(document.ClaimProdForm.manuf_phone.value)=="")
		{   
			visitor +=  "\n - Please enter manufacturer phone number.";
	    }
		
		if(trim(document.ClaimProdForm.manuf_web.value)=="")
		{   
			visitor +=  "\n - Please enter web address.";
	    }

		if(trim(document.ClaimProdForm.business_email.value)=="")
		{   
			//visitor +=  "\n - Please enter manufacturer name.";
	    }
	

		if(!validEmailAddress(document.ClaimProdForm.business_email.value))
		{
			visitor += "\n - Please enter a valid email Address.";
			
		}
	
			
		if(trim(document.ClaimProdForm.business_pasword.value)=="")
		{   
			visitor +=  "\n - Please enter your password.";
	    }
		if(document.ClaimProdForm.business_pasword.value!=document.ClaimProdForm.business_pasword_confirm.value)
		{
			visitor += "\n - Password is not confirmed. Please fill it again.";
		}

		if(document.ClaimProdForm.business_own.checked==false)
		{		   
			visitor +=  "\n - Please accept terms and conditions before proceeding.";
	    }

		
		if(visitor != "") {
			MasterString = MasterString + visitor;
			flag=true;
		}
		if (flag == true) {
		 alert(MasterString);
		 return false;
		}	
		
		else
		{
		document.ClaimProdForm.submit();
		}

}

function ClaimProd11()
{		
//alert("test");
		var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";

		
		if(trim(document.ClaimProdForm.prod_price.value)=="")
		{   
			visitor +=  "\n - Please enter product price range.";
	    }
		
		if(trim(document.ClaimProdForm.manuf_first_name.value)=="")
		{   
			visitor +=  "\n - Please enter manufacturer first name.";
	    }
		
		if(trim(document.ClaimProdForm.manuf_last_name.value)=="")
		{   
			visitor +=  "\n - Please enter manufacturer last name.";
	    }
	

		if(trim(document.ClaimProdForm.manuf_title.value)=="")
		{   
			visitor +=  "\n - Please enter your position.";
	    }
	

		if(trim(document.ClaimProdForm.manuf_address1.value)=="")
		{   
			visitor +=  "\n - Please enter manufacturer address.";
	    }
	

		if(trim(document.ClaimProdForm.manuf_city.value)=="")
		{   
			visitor +=  "\n - Please enter manufacturer city.";
	    }
	

		if(trim(document.ClaimProdForm.manuf_state.value)=="")
		{   
			visitor +=  "\n - Please enter manufacturer state.";
	    }
	

		if(trim(document.ClaimProdForm.manuf_zip.value)=="")
		{   
			visitor +=  "\n - Please enter manufacturer zipcode.";
	    }
	

		if(trim(document.ClaimProdForm.manuf_phone.value)=="")
		{   
			visitor +=  "\n - Please enter manufacturer phone number.";
	    }
		
		if(trim(document.ClaimProdForm.manuf_web.value)=="")
		{   
			visitor +=  "\n - Please enter web address.";
	    }

		if(trim(document.ClaimProdForm.business_email.value)=="")
		{   
			//visitor +=  "\n - Please enter manufacturer name.";
	    }
	

		if(!validEmailAddress(document.ClaimProdForm.business_email.value))
		{
			visitor += "\n - Please enter a valid email Address.";
			
		}
	
			
		if(trim(document.ClaimProdForm.business_pasword.value)=="")
		{   
			visitor +=  "\n - Please enter your password.";
	    }
		if(document.ClaimProdForm.business_pasword.value!=document.ClaimProdForm.business_pasword_confirm.value)
		{
			visitor += "\n - Password is not confirmed. Please fill it again.";
		}

		if(document.ClaimProdForm.business_own.checked==false)
		{		   
			visitor +=  "\n - Please accept terms and conditions before proceeding.";
	    }

		
		if(visitor != "") {
			MasterString = MasterString + visitor;
			flag=true;
		}
		if (flag == true) {
		 alert(MasterString);
		 return false;
		}	
		
		else
		{
		document.ClaimProdForm.submit();
		}

}

function ProdCat()
{
//alert("test");
		var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";
		if(trim(document.BronzeProdForm.prod_main.value)=="")
		{   
			visitor +=  "\n - Please enter category name.";
	    }
		if(trim(document.BronzeProdForm.prod_child.value)=="")
		{   
			visitor +=  "\n - Please enter subcategory name.";
	    }
	

		if(visitor != "") {
			MasterString = MasterString + visitor;
			flag=true;
		}
		if (flag == true) {
		 alert(MasterString);
		 return false;
		}	
		
		else
		{
		document.BronzeProdForm.submit();
		}


}





function PayProd()
{
//alert("test");
		var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";

		if(trim(document.PayBusForm.bus_bill_firstname.value)=="")
		{   
			visitor +=  "\n - Please enter your first name.";
	    }

		if(trim(document.PayBusForm.bus_bill_lastname.value)=="")
		{   
			visitor +=  "\n - Please enter your last name.";
	    }


		if(trim(document.PayBusForm.bus_credit_number.value)=="")
		{   
			visitor +=  "\n - Please enter your credit card number.";
	    }

		if(trim(document.PayBusForm.bus_credit_type.value)=="")
		{   
			visitor +=  "\n - Please enter type of your credit card.";
	    }

		if(trim(document.PayBusForm.bus_cvc_code.value)=="")
		{   
			visitor +=  "\n - Please enter your cvc code.";
	    }


		if(trim(document.PayBusForm.bus_exp_month.value)=="")
		{   
			visitor +=  "\n - Please enter your credit card expiration month.";
	    }

		if(trim(document.PayBusForm.bus_exp_year.value)=="")
		{   
			visitor +=  "\n - Please enter your credit card expiration year.";
	    }
		if(trim(document.PayBusForm.bus_bill_address.value)=="")
		{   
			visitor +=  "\n - Please enter your billing address.";
	    }
		if(trim(document.PayBusForm.bus_bill_city.value)=="")
		{   
			visitor +=  "\n - Please enter your billing city.";
	    }
		if(trim(document.PayBusForm.bus_bill_state.value)=="")
		{   
			visitor +=  "\n - Please enter your billing state.";
	    }
		if(trim(document.PayBusForm.bus_bill_zip.value)=="")
		{   
			visitor +=  "\n - Please enter your billing zipcode.";
	    }
		if(trim(document.PayBusForm.bus_bill_phone.value)=="")
		{   
			visitor +=  "\n - Please enter your phone number.";
	    }
	
		if(document.PayBusForm.terms_accept.checked==false)
		{		   
			visitor +=  "\n - Please accept terms and conditions before proceeding.";
	    }

		if(visitor != "") {
			MasterString = MasterString + visitor;
			flag=true;
		}
		if (flag == true) {
		 alert(MasterString);
		 return false;
		}	
	else
		{

	document.PayBusForm.submit();
	}

}

function recordRating(input,Rating)
{
	document.getElementById(input).value=Rating;
}



function busReview()
{

		var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";

		if(trim(document.busReviewForm.rating_10617815.value)=="0")
		{   
			visitor +=  "\n - Please rate 'Great With My Pet'.";
	    }

		
		if(trim(document.busReviewForm.rating_10617814.value)=="0")
		{   
			visitor +=  "\n - Please rate 'Customer Services'.";
	    }

		if(trim(document.busReviewForm.rating_10617813.value)=="0")
		{   
			visitor +=  "\n - Please rate 'Fair Price'.";
	    }

		if(trim(document.busReviewForm.review_write.value)=="")
		{   
			visitor +=  "\n - Please write review.";
	    }

		if(visitor != "") 
		{
			MasterString = MasterString + visitor;
			flag=true;
		}
		if (flag == true)
		{
		 alert(MasterString);
		 return false;
		}	
	

	}


function busCorrection()
{
//alert("test");
		var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";

		if(trim(document.correctForm.business_name.value)=="")
		{   
			visitor +=  "\n - Please enter a business name.";
	    }

		if(trim(document.correctForm.business_address1.value)=="")
		{   
			visitor +=  "\n - Please enter address.";
	    }


		if(trim(document.correctForm.business_phone.value)=="")
		{   
			visitor +=  "\n - Please enter business phone.";
	    }

		if(trim(document.correctForm.business_cat.value)=="")
		{   
			visitor +=  "\n - Please enter a business category.";
	    }


		if(trim(document.correctForm.business_city.value)=="")
		{   
			visitor +=  "\n - Please enter a business city.";
	    }


		if(trim(document.correctForm.business_state.value)=="")
		{   
			visitor +=  "\n - Please enter a business state.";
	    }


		if(trim(document.correctForm.business_zip.value)=="")
		{   
			visitor +=  "\n - Please enter a business zip code.";
	    }


		/*if(trim(document.correctForm.business_cat_suggest.value)=="")
		{   
			visitor +=  "\n - Please suggest  business category.";
	    }
	    */
	    
		if(visitor != "") 
		{
			MasterString = MasterString + visitor;
			flag=true;
		}
		if (flag == true)
		{
		 alert(MasterString);
		 return false;
		}	
		else
		{
		document.correctForm.submit();
		}

	}


function prodReview()
{
//alert("test");
		var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";

		
		if(trim(document.prodReviewForm.rating_10617815.value)=="0")
		{   
			visitor +=  "\n - Please give rating to my pet love it.";
	    }

		if(trim(document.prodReviewForm.rating_10617814.value)=="0")
		{   
			visitor +=  "\n - Please give rating to quality of product.";
	    }


		if(trim(document.prodReviewForm.rating_10617813.value)=="0")
		{   
			visitor +=  "\n - Please give rating to fair price.";
	    }

		if(trim(document.prodReviewForm.review_write.value)=="")
		{   
			visitor +=  "\n - Please write product review.";
	    }

		if(visitor != "") 
		{
			MasterString = MasterString + visitor;
			flag=true;
		}
		if (flag == true)
		{
		 alert(MasterString);
		 return false;
		}	
		
	}


function prodCorrection()
{
//alert("test");
		var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";

		if(trim(document.correctprodForm.product_name.value)=="")
		{   
			visitor +=  "\n - Please enter a product name.";
	    }

		if(trim(document.correctprodForm.prod_price.value)=="")
		{   
			visitor +=  "\n - Please enter price range.";
	    }


		if(trim(document.correctprodForm.manuf_name.value)=="")
		{   
			visitor +=  "\n - Please enter manufacturer name.";
	    }


		if(visitor != "") 
		{
			MasterString = MasterString + visitor;
			flag=true;
		}
		if (flag == true)
		{
		 alert(MasterString);
		 return false;
		}	
		
	}


function show_busName(bus_name)
{
	var bus_name;
	document.getElementById('bus_name').innerHTML=bus_name;
	document.getElementById('bus_name2').innerHTML=bus_name;
	document.getElementById('bus_name3').innerHTML=bus_name;
}

function single_selection(frm)
{
	var frm;
	if(frm=="freeform")
	{
		window.document.freeform.plan_type.checked="true";
		window.document.bronzeform.plan_type.checked=false;
		window.document.goldform.plan_type.checked=false;
		window.document.silverform.plan_type.checked=false;
	}
	else if(frm=="bronzeform")
	{
		window.document.freeform.plan_type.checked=false;
		window.document.goldform.plan_type.checked=false;
		window.document.silverform.plan_type.checked=false;
		window.document.bronzeform.plan_type.checked="true";
	}
	else if(frm=="goldform")
	{
		window.document.freeform.plan_type.checked=false;
		window.document.goldform.plan_type.checked="true";
		window.document.silverform.plan_type.checked=false;
		window.document.bronzeform.plan_type.checked=false;
	}
	else if(frm=="silverform")
	{
		window.document.freeform.plan_type.checked=false;
		window.document.goldform.plan_type.checked=false;
		window.document.silverform.plan_type.checked="true";
		window.document.bronzeform.plan_type.checked=false;
	}
}


function single_selectionProd(frm)
{
	var frm;
	//alert(frm);


	 if(frm=="bronzeform")
	{
		window.document.silverform.prodplan_type.checked=false;
		window.document.bronzeform.prodplan_type.checked="true";
	}

	else if(frm=="silverform")
	{
		window.document.silverform.prodplan_type.checked="true";
		window.document.bronzeform.prodplan_type.checked=false;
	}
	
}


function chkForm2(frm)
{
	if(!frm.prodplan_type.checked)
	{
		alert("You did not select this plan.");
		return false;
	}
	return true;
}




function chkForm(frm)
{
	if(!frm.plan_type.checked)
	{
		alert("You did not select this plan.");
		return false;
	}
	return true;
}

function EditPayBus(frm)
{
	//alert(document.PayBusForm.business_name.value);
		var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";

		
		if(frm.bus_bill_firstname.value=="")
		{   
			visitor +=  "\n - Please enter your first name.";
	    }

		if(frm.bus_bill_lastname.value=="")
		{   
			visitor +=  "\n - Please enter your last name.";
	    }
		
		if(frm.bus_bill_address.value=="")
		{   
			visitor +=  "\n - Please enter your billing address.";
	    }
		if(frm.bus_bill_city.value=="")
		{   
			visitor +=  "\n - Please enter your billing city.";
	    }
		if(frm.bus_bill_state.value=="")
		{   
			visitor +=  "\n - Please enter your billing state.";
	    }
		if(frm.bus_bill_zip.value=="")
		{   
			visitor +=  "\n - Please enter your billing zipcode.";
	    }
		if(frm.bus_bill_email.value=="")
		{   
			visitor +=  "\n - Please enter your email address.";
	    }
		if(frm.bus_bill_phone.value=="")
		{   
			visitor +=  "\n - Please enter your phone number.";
	    }
	
		
		if(visitor != "") {
			MasterString = MasterString + visitor;
			flag=true;
		}


		if (flag == true) {
		 alert(MasterString);
		 return false;
		}	
		
		


}

function EditPayBus2(frm)
{
	
	var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";

			
		if(trim(frm.bus_credit_type.value)=="")
			visitor +=  "\n - Please enter type of your credit card.";
		
		if(trim(frm.bus_credit_number.value)=="")
			visitor +=  "\n - Please enter your credit card number.";

		if(trim(frm.bus_cvc_code.value)=="")
			visitor +=  "\n - Please enter your ccv code.";
			
		if(trim(frm.bus_exp_month.value)=="")
			visitor +=  "\n - Please enter your credit card expiration month.";
		
		if(trim(frm.bus_exp_year.value)=="")
			visitor +=  "\n - Please enter your credit card expiration year.";
		today = new Date();
		expiry = new Date("20"+frm.bus_exp_year.value, frm.bus_exp_month.value);
		if (today.getTime() > expiry.getTime())
			visitor +=  "\n - Your credit card has expired.";

		if(window.location.hostname!='mwb-200'){
		if (!checkCreditCard(frm.bus_credit_number.value,frm.bus_credit_type.value)) {
			 visitor +="\n - "+ ccErrors[ccErrorNo];
		} 
		}
				
		if(visitor != "") {
			MasterString = MasterString + visitor;
			flag=true;
		}


		if (flag == true) {
		 alert(MasterString);
		 return false;
		}	
	
}

function chkCreateNewListing(frm)
{
	var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";
		var urlRegxp = /^((http:\/\/www|HTTP:\/\/WWW)|(www|WWW)).([A-Za-z0-9])+\.(([A-Za-z]{2,3})|[A-Za-z]{2,3}\.[A-Za-z]{2,3})$/i;
		
		if(frm.business_name.value=="")
		{   
			visitor +=  "\n - Please enter business name.";
	    }
		if(frm.business_address1.value=="")
		{   
			visitor +=  "\n - Please enter address.";
	    }

		if(frm.business_city.value=="")
		{   
			visitor +=  "\n - Please enter city.";
	    }
		
		if(frm.business_zip.value=="")
		{   
			visitor +=  "\n - Please enter zip code.";
	    }
		if(frm.business_phone.value=="")
		{   
			visitor +=  "\n - Please enter phone number.";
	    }
		
		if(trim(frm.business_web.value)!="")
		{   
			if(urlRegxp.test(trim(frm.business_web.value))!=true)
			{
				visitor +=  "\n - Please enter valid web address.";
			}
	    }
				
		if(!frm.business_own.checked)
		{   
			visitor +=  "\n - Please check terms & conditions.";
	    }

		
		
		if(visitor != "") {
			MasterString = MasterString + visitor;
			flag=true;
		}


		if (flag == true) {
		 alert(MasterString);
		 return false;
		}	
		
}

function chkCreateNewListing_2(frm)
{
	var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";
		var urlRegxp = /^((http:\/\/www|HTTP:\/\/WWW)|(www|WWW)).([A-Za-z0-9])+\.(([A-Za-z]{2,3})|[A-Za-z]{2,3}\.[A-Za-z]{2,3})$/i;
		
		if(frm.business_name.value=="")
		{   
			visitor +=  "\n - Please enter business name.";
	    }
		if(frm.business_address1.value=="")
		{   
			visitor +=  "\n - Please enter address.";
	    }

		if(frm.business_city.value=="")
		{   
			visitor +=  "\n - Please enter city.";
	    }
		if(frm.business_state.value=="")
		{   
			visitor +=  "\n - Please select state.";
	    }		
		if(frm.business_zip.value=="")
		{   
			visitor +=  "\n - Please enter zip code.";
	    }
		if(frm.business_phone.value=="")
		{   
			visitor +=  "\n - Please enter phone number.";
	    }
		
		if(trim(frm.business_web.value)!="")
		{   
			if(urlRegxp.test(trim(frm.business_web.value))!=true)
			{
				visitor +=  "\n - Please enter valid web address.";
			}
	    }
				
		if(!frm.business_own.checked)
		{   
			visitor +=  "\n - Please check terms & conditions.";
	    }

		
		
		if(visitor != "") {
			MasterString = MasterString + visitor;
			flag=true;
		}


		if (flag == true) {
		 alert(MasterString);
		 return false;
		}	
		
}

function PayPlusGift2(frm)
{
	//alert(document.PayPlusForm.business_name.value);
		var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";
		
		if(trim(frm.bus_bill_firstname.value)=="")
		{
			visitor +=  "\n - Please enter your first name.";
		}
		if(trim(frm.bus_bill_lastname.value)=="")
			visitor +=  "\n - Please enter your last name.";
		if(trim(frm.bus_credit_number.value)=="")
			visitor +=  "\n - Please enter your credit card number.";
		if(trim(frm.bus_credit_type.value)=="")
			visitor +=  "\n - Please enter type of your credit card.";
		if(trim(frm.bus_cvc_code.value)=="")
			visitor +=  "\n - Please enter your ccv code.";
		if(trim(frm.bus_exp_month.value)=="")
			visitor +=  "\n - Please enter your credit card expiration month.";
		if(trim(frm.bus_exp_year.value)=="")
			visitor +=  "\n - Please enter your credit card expiration year.";
		today = new Date();
		expiry = new Date("20"+frm.bus_exp_year.value, frm.bus_exp_month.value);
		if (today.getTime() > expiry.getTime())
			visitor +=  "\n - Your credit card has expired.";
		if(window.location.hostname!='mwb-200'){
		if (!checkCreditCard(frm.bus_credit_number.value,frm.bus_credit_type.value)) {
			 visitor +="\n - "+ ccErrors[ccErrorNo];
		} 
		}
		if(trim(frm.bus_bill_address.value)=="")
			visitor +=  "\n - Please enter your billing address.";
		if(trim(frm.bus_bill_city.value)=="")
			visitor +=  "\n - Please enter your billing city.";
		if(trim(frm.bus_bill_state.value)=="")
			visitor +=  "\n - Please enter your billing state.";
		if(trim(frm.bus_bill_zip.value)=="")
			visitor +=  "\n - Please enter your billing zipcode.";
		if(trim(frm.bus_bill_phone.value)=="")
			visitor +=  "\n - Please enter your phone number.";
		if(trim(frm.bus_bill_email.value)=="")
			visitor +=  "\n - Please enter  email.";
		if(frm.terms_accept.checked==false)
			visitor +=  "\n - Please accept terms and conditions before proceeding.";
		
		if(visitor != "") {
			MasterString = MasterString + visitor;
			flag=true;
		}
		if (flag == true) {
		 alert(MasterString);
		 return false;
		}	
		
		
}

function PayPlusGift_payDetail(frm)
{
	//alert(document.PayPlusForm.business_name.value);
		var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";
		
		if(trim(frm.bus_bill_firstname.value)=="")
		{
			visitor +=  "\n - Please enter your first name.";
		}
		if(trim(frm.bus_bill_lastname.value)=="")
			visitor +=  "\n - Please enter your last name.";
		if(trim(frm.bus_credit_number.value)=="")
			visitor +=  "\n - Please enter your credit card number.";
		if(trim(frm.bus_credit_type.value)=="")
			visitor +=  "\n - Please enter type of your credit card.";
		if(trim(frm.bus_cvc_code.value)=="")
			visitor +=  "\n - Please enter your ccv code.";
		if(trim(frm.bus_exp_month.value)=="")
			visitor +=  "\n - Please enter your credit card expiration month.";
		if(trim(frm.bus_exp_year.value)=="")
			visitor +=  "\n - Please enter your credit card expiration year.";
		today = new Date();
		expiry = new Date("20"+frm.bus_exp_year.value, frm.bus_exp_month.value);
		if (today.getTime() > expiry.getTime())
			visitor +=  "\n - Your credit card has expired.";
		if(window.location.hostname!='mwb-200'){
		if (!checkCreditCard(frm.bus_credit_number.value,frm.bus_credit_type.value)) {
			 visitor +="\n - "+ ccErrors[ccErrorNo];
		} 
		}
		if(trim(frm.bus_bill_address.value)=="")
			visitor +=  "\n - Please enter your billing address.";
		if(trim(frm.bus_bill_city.value)=="")
			visitor +=  "\n - Please enter your billing city.";
		if(trim(frm.bus_bill_state.value)=="")
			visitor +=  "\n - Please enter your billing state.";
		if(trim(frm.bus_bill_zip.value)=="")
			visitor +=  "\n - Please enter your billing zipcode.";
		if(trim(frm.bus_bill_phone.value)=="")
			visitor +=  "\n - Please enter your phone number.";
		
		if(frm.terms_accept.checked==false)
			visitor +=  "\n - Please accept terms and conditions before proceeding.";
		
		if(visitor != "") {
			MasterString = MasterString + visitor;
			flag=true;
		}
		if (flag == true) {
		 alert(MasterString);
		 return false;
		}	
		
		
}

function trim(s) {
  while (s.substring(0,1) == ' ') {
    s = s.substring(1,s.length);
  }
  while (s.substring(s.length-1,s.length) == ' ') {
    s = s.substring(0,s.length-1);
  }
  return s;
}

function businessMember2()
{		
//alert("test");
		var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";
		
		if(document.ClaimBusForm.business_address1.value=='')
		{
			visitor += "\n - Please enter business address.";
		}	
		if(document.ClaimBusForm.business_city.value=='')
		{
			visitor += "\n - Please enter city.";
		}	
		if(document.ClaimBusForm.business_zip.value=='')
		{
			visitor += "\n - Please enter zip code.";
		}	
		if(document.ClaimBusForm.business_phone.value=='')
		{
			visitor += "\n - Please enter phone.";
		}	
		if(visitor != "") {
			MasterString = MasterString + visitor;
			flag=true;
		}
		
		if (flag == true) {
		 alert(MasterString);
		 return false;
		}	
		
		else
		{
		document.ClaimBusForm.submit();
		}

}

function validateListing(frm)
{
	var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";
       var flg=0;
		//var urlRegxp = /http:\/\/[A-Za-z0-9\.-]{3,}\.[A-Za-z]{3}/;

		var urlRegxp = /^((http:\/\/www|HTTP:\/\/WWW)|(www|WWW)).([A-Za-z0-9])+\.(([A-Za-z]{2,3})|[A-Za-z]{2,3}\.[A-Za-z]{2,3})$/i;


		if(frm.prod_main.value=="")
		{   
			visitor +=  "\n - Please select main category.";
	    }

		if(frm.prod_child.value=="")
		{   
			visitor +=  "\n - Please select subcategory.";
	    }
		if(trim(frm.business_slogan.value)=="(e.g. Elegant, Classic and Unique)" || trim(frm.business_slogan.value)=="")
		{   
			visitor +=  "\n - Please enter marketing slogan.";
	    }
		if(trim(frm.business_message.value)=="Enter marketing message text." || trim(frm.business_message.value)=="")
		{   
			visitor +=  "\n - Please enter marketing message.";
	    }
		if(frm.business_message.value.length>5000)
		{
			visitor +=  "\n - Marketing Message should not more than 5000 characters.";
		}
		
		if(frm.store1_web.value!='')
		{
			if(urlRegxp.test(trim(frm.store1_web.value)) != true)
			{
				flg=1;
			}
		}
		if(frm.store2_web.value!='')
		{
			if(urlRegxp.test(trim(frm.store2_web.value)) != true)
			{
				flg=1;
			}
		}
		if(frm.store3_web.value!='')
		{
			if(urlRegxp.test(trim(frm.store3_web.value)) != true)
			{
				flg=1;
			}
		}
		if(frm.store4_web.value!='')
		{
			if(urlRegxp.test(trim(frm.store4_web.value)) != true)
			{
				flg=1;
			}
		}
		if(frm.store5_web.value!='')
		{
			if(urlRegxp.test(trim(frm.store5_web.value)) != true)
			{
				flg=1;
			}
		}
		if(flg==1)
		{
			visitor +=  "\n - Website addresses should be in the following format: www.store.com.";
		}

		if(visitor != "") {
			MasterString = MasterString + visitor;
			flag=true;
		}


		if (flag == true) {
		 alert(MasterString);
		 return false;
		}	
}

function PayBus2(frm)
{
	
		var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";

		if(trim(document.PayBusForm.manuf_name.value)=="")
		{   
			visitor +=  "\n - Please enter your manufacturer name.";
	    }
		if(trim(document.PayBusForm.bus_bill_firstname.value)=="")
		{   
			visitor +=  "\n - Please enter your first name.";
	    }

		if(trim(document.PayBusForm.bus_bill_lastname.value)=="")
		{   
			visitor +=  "\n - Please enter your last name.";
	    }
		if(trim(document.PayBusForm.bus_credit_number.value)=="")
		{   
			visitor +=  "\n - Please enter your credit card number.";
	    }

		if(trim(document.PayBusForm.bus_credit_type.value)=="")
		{   
			visitor +=  "\n - Please enter type of your credit card.";
	    }

		if(trim(document.PayBusForm.bus_cvc_code.value)=="")
		{   
			visitor +=  "\n - Please enter your cvc code.";
	    }


		if(trim(document.PayBusForm.bus_exp_month.value)=="")
		{   
			visitor +=  "\n - Please enter your credit card expiration month.";
	    }

		if(trim(document.PayBusForm.bus_exp_year.value)=="")
		{   
			visitor +=  "\n - Please enter your credit card expiration year.";
	    }
		today = new Date();
		expiry = new Date("20"+document.PayBusForm.bus_exp_year.value, document.PayBusForm.bus_exp_month.value);
		if (today.getTime() > expiry.getTime())
		{
			visitor +=  "\n - Your credit card has expired.";
		
		}
		if(window.location.hostname!='mwb-200'){
		if (!checkCreditCard(document.PayBusForm.bus_credit_number.value,document.PayBusForm.bus_credit_type.value)) {
			 visitor +="\n - "+ ccErrors[ccErrorNo];
		} 
		}



		if(trim(document.PayBusForm.bus_bill_address.value)=="")
		{   
			visitor +=  "\n - Please enter your billing address.";
	    }
		if(trim(document.PayBusForm.bus_bill_city.value)=="")
		{   
			visitor +=  "\n - Please enter your billing city.";
	    }
		if(trim(document.PayBusForm.bus_bill_state.value)=="")
		{   
			visitor +=  "\n - Please enter your billing state.";
	    }
		if(trim(document.PayBusForm.bus_bill_zip.value)=="")
		{   
			visitor +=  "\n - Please enter your billing zipcode.";
	    }
		/*if(trim(document.PayBusForm.bus_bill_email.value)=="" || !validEmailAddress(document.PayBusForm.bus_bill_email.value))
		{   
			visitor +=  "\n - Please enter your email address or enter valid email address.";
	    }*/
		if(trim(document.PayBusForm.bus_bill_phone.value)=="")
		{   
			visitor +=  "\n - Please enter your phone number.";
	    }
	
		if(document.PayBusForm.terms_accept.checked==false)
		{		   
			visitor +=  "\n - Please accept terms and conditions before proceeding.";
	    }
		if(visitor != "") {
			MasterString = MasterString + visitor;
			flag=true;
		}


		if (flag == true) {
		 alert(MasterString);
		 return false;
		}	
		
		else
		{
		document.PayBusForm.submit();
		}


}

function PayBus_payment(frm)
{
	
		var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";

		if(frm.business_name.value=="")
		{   
			visitor +=  "\n - Please enter your business name.";
	    }
		if(frm.bus_bill_firstname.value=="")
		{   
			visitor +=  "\n - Please enter your first name.";
	    }

		if(frm.bus_bill_lastname.value=="")
		{   
			visitor +=  "\n - Please enter your last name.";
	    }
		if(frm.bus_credit_type.value=="")
		{   
			visitor +=  "\n - Please enter type of your credit card.";
	    }
		if(frm.bus_credit_number.value=="")
		{   
			visitor +=  "\n - Please enter your credit card number.";
	    }

		if(frm.bus_cvc_code.value=="")
		{   
			visitor +=  "\n - Please enter your cvc code.";
	    }


		if(frm.bus_exp_month.value=="")
		{   
			visitor +=  "\n - Please enter your credit card expiration month.";
	    }

		if(frm.bus_exp_year.value=="")
		{   
			visitor +=  "\n - Please enter your credit card expiration year.";
	    }
		today = new Date();
		expiry = new Date("20"+frm.bus_exp_year.value, frm.bus_exp_month.value);
		if (today.getTime() > expiry.getTime())
		{
			visitor +=  "\n - Your credit card has expired.";
		
		}
		/*
		if(window.location.hostname!='mwb-200'){
		if (!checkCreditCard(frm.bus_credit_number.value,frm.bus_credit_type.value)) {
			 visitor +="\n - "+ ccErrors[ccErrorNo];
		} 
		}*/



		if(frm.bus_bill_address.value=="")
		{   
			visitor +=  "\n - Please enter your billing address.";
	    }
		if(frm.bus_bill_city.value=="")
		{   
			visitor +=  "\n - Please enter your billing city.";
	    }
		if(frm.bus_bill_state.value=="")
		{   
			visitor +=  "\n - Please enter your billing state.";
	    }
		if(frm.bus_bill_zip.value=="")
		{   
			visitor +=  "\n - Please enter your billing zipcode.";
	    }
		if(frm.bus_bill_phone.value=="")
		{   
			visitor +=  "\n - Please enter your phone number.";
	    }
	
		if(frm.terms_accept.checked==false)
		{		   
			visitor +=  "\n - Please accept terms and conditions before proceeding.";
	    }

		if(visitor != "") {
			MasterString = MasterString + visitor;
			flag=true;
		}


		if (flag == true) {
		 alert(MasterString);
		 return false;
		}	
		
		

}

function checkFormEmailPreference(frm)
{
	
		var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";

		if(frm.business_email_new.value!="")
		{   
			if(!validEmailAddress(frm.business_email_new.value))
			{   
				visitor +=  "\n - Please enter valid new email address.";
		    }
	    }
		

		if(visitor != "") {
			MasterString = MasterString + visitor;
			flag=true;
		}


		if (flag == true) {
		 alert(MasterString);
		 return false;
		}	
		
}


function GoldBus_Bro_Sil(frm)
{

		var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";
		
		if(trim(frm.business_city.value)!="" || trim(frm.business_state.value)!="")
		{   
		  if(trim(frm.business_city_area.value)=="")
			{
				if(trim(frm.business_city.value)=="")
				visitor +=  "\n - Please enter city.";
				if(trim(frm.business_state.value)=="")
				visitor +=  "\n - Please select state.";
			}
	    }

		if(trim(frm.business_cat.value)=="")
		{   
			visitor +=  "\n - Please enter your business category.";
	    }
		
		if(trim(frm.business_slogan.value)=="" || trim(frm.business_slogan.value)=="(e.g. Excellent customer service!)")
		{   
			visitor +=  "\n - Please enter marketing slogan.";
	    }
		
		if(trim(frm.business_message.value)=="" || trim(frm.business_message.value)=="Enter marketing message text.")
		{   
			visitor +=  "\n - Please enter marketing message.";
	    }
		if(frm.business_message.value.length>5000)
		{   
			visitor +=  "\n - Marketing message should not be more than 5000 chars.";
	    }
		
		var ll=location.href;
		var str=ll.indexOf("bad=1");
		if(frm.NoReqImg.value=='0')
		{
			if(trim(frm.silver_image.value)=="" &&  trim(frm.silver_logo.value)=="" && str<1)
			{   
			visitor +=  "\n - You must either upload a custom listing image or a logo.";
			}
		}
			if(trim(frm.business_special_title.value)!='' && trim(frm.business_special_title.value)!='(e.g. 25% off First Grooming Visit!)' )
		{
			if(trim(frm.business_special_description.value)=='' || trim(frm.business_special_description.value)=='(e.g. Mention Yapstar when you contact us and receive %25 off of your 1st Grooming Visit)')
			{
				visitor += "\n - Please enter special offer description";
				
			}
			if(trim(frm.business_special_terms.value)=='' || trim(frm.business_special_terms.value)=='Not valid with any other offer.')
			{
				visitor += "\n - Please enter special offer terms";
				
			}
		}
		else if(trim(frm.business_special_description.value)!='' && trim(frm.business_special_description.value)!='(e.g. Mention Yapstar when you contact us and receive %25 off of your 1st Grooming Visit)' )
		{
			if(trim(frm.business_special_title.value)=='' || trim(frm.business_special_title.value)=='(e.g. 25% off First Grooming Visit!)')
			{
				visitor += "\n - Please enter special offer title";
				
			}
			if(trim(frm.business_special_terms.value)=='' || trim(frm.business_special_terms.value)=='Not valid with any other offer.')
			{
				visitor += "\n - Please enter special offer terms";
				
			}
		}
		else if(trim(frm.business_special_terms.value)!='' && trim(frm.business_special_terms.value)!='Not valid with any other offer.' )
		{
			if(trim(frm.business_special_title.value)=='' || trim(frm.business_special_title.value)=='(e.g. 25% off First Grooming Visit!)')
			{
				visitor += "\n - Please enter special offer title";
				
			}
			if(trim(frm.business_special_description.value)=='' || trim(frm.business_special_description.value)=='(e.g. Mention Yapstar when you contact us and receive %25 off of your 1st Grooming Visit)')
			{
				visitor += "\n - Please enter special offer description";
				
			}
		}
		else
		{
			new_flag=1;
		}
		
		if(visitor != "") {
			MasterString = MasterString + visitor;
			flag=true;
		}
		
		if (flag == true) {
		 alert(MasterString);
		 return false;
		}	
		
		if(new_flag==1)
		{
			frm.business_special_title.value='';
			frm.business_special_description.value='';
			frm.business_special_terms.value='';			
			return true;
		}		

}


function GoldBus_Bro_Sil2(frm)
{
//alert("frm.business_city.value");
var new_flag=0;
		var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";
		
		if(trim(frm.business_city.value)!="" || trim(frm.business_state.value)!="")
		{   
		  if(trim(frm.business_city_area.value)=="")
			{
				if(trim(frm.business_city.value)=="")
				visitor +=  "\n - Please enter city.";
				if(trim(frm.business_state.value)=="")
				visitor +=  "\n - Please select state.";
			}
	    }

		if(trim(frm.business_cat.value)=="")
		{   
			visitor +=  "\n - Please enter your business category.";
	    }
		
		if(trim(frm.business_high1.value)=="")
		{   
			visitor +=  "\n - Please enter highlights #1.";
	    }
		if(trim(frm.business_high2.value)=="")
		{   
			visitor +=  "\n - Please enter highlights #2.";
	    }
		if(trim(frm.business_high3.value)=="")
		{   
			visitor +=  "\n - Please enter highlights #3.";
	    }
		if(trim(frm.business_slogan.value)=="" || trim(frm.business_slogan.value)=="(e.g. Excellent customer service!)")
		{   
			visitor +=  "\n - Please enter marketing slogan.";
	    }
		if(trim(frm.business_message.value)=="" || trim(frm.business_message.value)=="Enter marketing message text.")
		{   
			visitor +=  "\n - Please enter marketing message.";
	    }
		if(frm.business_message.value.length>5000)
		{   
			visitor +=  "\n - Marketing message should not be more than 5000 chars.";
	    }
		
		if(frm.NoReqImg.value=='0')
		{
			if(trim(frm.silver_image.value)=="" &&  trim(frm.silver_logo.value)=="")
			{   
			visitor +=  "\n - You must either upload a custom listing image or a logo.";
			}
		}
		if(trim(frm.business_special_title.value)!='' && trim(frm.business_special_title.value)!='(e.g. 25% off First Grooming Visit!)' )
		{
			if(trim(frm.business_special_description.value)=='' || trim(frm.business_special_description.value)=='(e.g. Mention Yapstar when you contact us and receive %25 off of your 1st Grooming Visit)')
			{
				visitor += "\n - Please enter special offer description";
				
			}
			if(trim(frm.business_special_terms.value)=='' || trim(frm.business_special_terms.value)=='Not valid with any other offer.')
			{
				visitor += "\n - Please enter special offer terms";
				
			}
		}
		else if(trim(frm.business_special_description.value)!='' && trim(frm.business_special_description.value)!='(e.g. Mention Yapstar when you contact us and receive %25 off of your 1st Grooming Visit)' )
		{
			if(trim(frm.business_special_title.value)=='' || trim(frm.business_special_title.value)=='(e.g. 25% off First Grooming Visit!)')
			{
				visitor += "\n - Please enter special offer title";
				
			}
			if(trim(frm.business_special_terms.value)=='' || trim(frm.business_special_terms.value)=='Not valid with any other offer.')
			{
				visitor += "\n - Please enter special offer terms";
				
			}
		}
		else if(trim(frm.business_special_terms.value)!='' && trim(frm.business_special_terms.value)!='Not valid with any other offer.' )
		{
			if(trim(frm.business_special_title.value)=='' || trim(frm.business_special_title.value)=='(e.g. 25% off First Grooming Visit!)')
			{
				visitor += "\n - Please enter special offer title";
				
			}
			if(trim(frm.business_special_description.value)=='' || trim(frm.business_special_description.value)=='(e.g. Mention Yapstar when you contact us and receive %25 off of your 1st Grooming Visit)')
			{
				visitor += "\n - Please enter special offer description";
				
			}
		}
		else
		{
			new_flag=1;
		}
			
		if(visitor != "") {
			MasterString = MasterString + visitor;
			flag=true;
		}
		if (flag == true) {
		 alert(MasterString);
		 return false;
		}	
		if(new_flag==1)
		{
			frm.business_special_title.value='';
			frm.business_special_description.value='';
			frm.business_special_terms.value='';			
			return true;
		}

}



function bronzeValid(frm)
{
var new_flag=0;
		var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";
		
		if(trim(frm.business_cat.value)=="")
		{   
			visitor +=  "\n - Please enter your business category.";
	    }
		

		if(trim(frm.business_city.value)!="" || trim(frm.business_state.value)!="")
		{   
		  if(trim(frm.business_city_area.value)=="")
			{
				if(trim(frm.business_city.value)=="")
				visitor +=  "\n - Please enter city.";
				if(trim(frm.business_state.value)=="")
				visitor +=  "\n - Please select state.";
			}
	    }
		
		if(trim(frm.business_slogan.value)=="" || trim(frm.business_slogan.value)=="(e.g. Excellent customer service!)")
		{   
			visitor +=  "\n - Please enter marketing slogan.";
	    }
		if(trim(frm.business_message.value)=="" || trim(frm.business_message.value)=="Enter marketing message text.")
		{   
			visitor +=  "\n - Please enter marketing message.";
	    }
		if(frm.business_message.value.length>5000)
		{   
			visitor +=  "\n - Marketing message should not be more than 5000 chars.";
	    }

		if(trim(frm.business_special_title.value)!='' && trim(frm.business_special_title.value)!='(e.g. 25% off First Grooming Visit!)' )
		{
			if(trim(frm.business_special_description.value)=='' || trim(frm.business_special_description.value)=='(e.g. Mention Yapstar when you contact us and receive %25 off of your 1st Grooming Visit)')
			{
				visitor += "\n - Please enter special offer description";
				
			}
			if(trim(frm.business_special_terms.value)=='' || trim(frm.business_special_terms.value)=='Not valid with any other offer.')
			{
				visitor += "\n - Please enter special offer terms";
				
			}
		}

		else if(trim(frm.business_special_description.value)!='' && trim(frm.business_special_description.value)!='(e.g. Mention Yapstar when you contact us and receive %25 off of your 1st Grooming Visit)' )
		{
			if(trim(frm.business_special_title.value)=='' || trim(frm.business_special_title.value)=='(e.g. 25% off First Grooming Visit!)')
			{
				visitor += "\n - Please enter special offer title";
				
			}
			if(trim(frm.business_special_terms.value)=='' || trim(frm.business_special_terms.value)=='Not valid with any other offer.')
			{
				visitor += "\n - Please enter special offer terms";
				
			}
		}
		else if(trim(frm.business_special_terms.value)!='' && trim(frm.business_special_terms.value)!='Not valid with any other offer.' )
		{
			if(trim(frm.business_special_title.value)=='' || trim(frm.business_special_title.value)=='(e.g. 25% off First Grooming Visit!)')
			{
				visitor += "\n - Please enter special offer title";
				
			}
			if(trim(frm.business_special_description.value)=='' || trim(frm.business_special_description.value)=='(e.g. Mention Yapstar when you contact us and receive %25 off of your 1st Grooming Visit)')
			{
				visitor += "\n - Please enter special offer description";
				
			}
		}
		else
		{
			new_flag=1;
		}
		if(visitor != "") {
			MasterString = MasterString + visitor;
			flag=true;
		}
		if (flag == true) {
		 alert(MasterString);
		 return false;
		}	
		if(new_flag==1)
		{
			frm.business_special_title.value='';
			frm.business_special_description.value='';
			frm.business_special_terms.value='';			
			return true;
		}

}



function checkBusInfo(frm)
{
	
		var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";
	var urlRegxp = /^((http:\/\/www|HTTP:\/\/WWW)|(www|WWW)).([A-Za-z0-9])+\.(([A-Za-z]{2,3})|[A-Za-z]{2,3}\.[A-Za-z]{2,3})$/i;

		
		if(trim(document.ClaimProdForm.prod_price.value)=="")
		{   
			visitor +=  "\n - Please enter price range.";
	    }
		if(trim(document.ClaimProdForm.manuf_first_name.value)=="")
		{   
			visitor +=  "\n - Please enter manufacturer first name.";
	    }

		if(trim(document.ClaimProdForm.manuf_last_name.value)=="")
		{   
			visitor +=  "\n - Please enter manufacturer last name.";
	    }
	

		if(trim(document.ClaimProdForm.manuf_title.value)=="")
		{   
			visitor +=  "\n - Please enter your position.";
	    }
	

		if(trim(document.ClaimProdForm.manuf_address1.value)=="")
		{   
			visitor +=  "\n - Please enter manufacturer address.";
	    }
	

		if(trim(document.ClaimProdForm.manuf_city.value)=="")
		{   
			visitor +=  "\n - Please enter manufacturer city.";
	    }
	

		if(trim(document.ClaimProdForm.manuf_state.value)=="")
		{   
			visitor +=  "\n - Please enter manufacturer state.";
	    }
	

		if(trim(document.ClaimProdForm.manuf_zip.value)=="")
		{   
			visitor +=  "\n - Please enter manufacturer zipcode.";
	    }
	

		if(trim(document.ClaimProdForm.manuf_phone.value)=="")
		{   
			visitor +=  "\n - Please enter manufacturer phone number.";
	    }
		
		if(trim(document.ClaimProdForm.manuf_web.value)=="")
		{   
			visitor +=  "\n - Please enter web address.";
	    }
		if(trim(document.ClaimProdForm.manuf_web.value)!='')
		{
			if(urlRegxp.test(trim(document.ClaimProdForm.manuf_web.value)) != true)
			{
				visitor +=  "\n - Please enter valid web address.";
			}
		}
	
		if(visitor != "") {
			MasterString = MasterString + visitor;
			flag=true;
		}
		if (flag == true) {
		 alert(MasterString);
		 return false;
		}	
		
		
}

function checkForm_EmailPref(frm)
{
		var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";


		if(visitor != "") {
			MasterString = MasterString + visitor;
			flag=true;
		}
		if (flag == true) {
		 alert(MasterString);
		 return false;
		}	
}

function contact_info(frm)
{
		
		var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";
		
		if(trim(frm.business_first_name.value)=="")
		{   
			visitor +=  "\n - Please enter your contact first name.";
			flag=true;
	    }
				
		if(trim(frm.business_last_name.value)=="")
		{   
			visitor +=  "\n - Please enter your contact last name.";
			flag=true;
	    }
		if(trim(frm.business_title.value)=="")
		{   
			visitor +=  "\n - Please enter contact position.";
			flag=true;
	    }
		
		if(trim(frm.contact_phone.value)=="")
		{   
			visitor +=  "\n - Please enter contact phone.";
			flag=true;
	    }
				
		if(trim(frm.contact_address.value)=="")
		{   
			visitor +=  "\n - Please enter contact address.";
			flag=true;
	    }
		
		if(trim(frm.contact_city.value)=="")
		{   
			visitor +=  "\n - Please enter contact city.";
			flag=true;
	    }
		
		if(trim(frm.contact_state.value)=="")
		{   
			visitor +=  "\n - Please enter contact state.";
			flag=true;
	    }
		
		if(trim(frm.contact_zip.value)=="")
		{   
			visitor +=  "\n - Please enter contact zip code.";
			flag=true;
	    }
		
		if (flag == true) {
			MasterString=MasterString+visitor;
		 alert(MasterString);
		 return false;
		}	
}

function business_info(frm)
{
		
		var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";

	if(trim(frm.business_address1.value)=="")
		{   
			visitor +=  "\n - Please enter your business address.";
			flag=true;
	    }
	if(trim(frm.business_city.value)=="")
		{   
			visitor +=  "\n - Please enter your business city.";
			flag=true;
	    }
	
		if(trim(frm.business_state.value)=="")
		{   
			visitor +=  "\n - Please select your business state.";
			flag=true;
	    }
		if(trim(frm.business_zip.value)=="")
		{   
			visitor +=  "\n - Please enter your business zip.";
			flag=true;
	    }
	
		if(trim(frm.business_phone.value)=="")
		{   
			visitor +=  "\n - Please enter your business phone.";
			flag=true;
	    }
			
		if (flag == true)
		{
			MasterString=MasterString+visitor;
			alert(MasterString);
			 return false;
		}
	
}
function feedback(frm)
{
	var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";
		
		if(trim(frm.email.value)=="")
		{   
			visitor +=  "\n - Please enter your email address.";
			flag=true;
	    }
		if(trim(frm.comments.value)=="")
		{   
			visitor +=  "\n - Please enter your comment.";
			flag=true;
	    }
		if (flag == true)
		{
			MasterString=MasterString+visitor;
			alert(MasterString);
			 return false;
		}
		
	
}

function suggestReview(frm)
{
		
		var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";
		
		if(trim(frm.business_name.value)=="")
		{   
			visitor +=  "\n - Please enter your business name.";
			flag=true;
	    }
				
		if(trim(frm.business_address1.value)=="")
		{   
			visitor +=  "\n - Please enter business address.";
			flag=true;
	    }
		
		if(trim(frm.business_city.value)=="")
		{   
			visitor +=  "\n - Please enter business city.";
			flag=true;
	    }
		
		if(trim(frm.business_state.value)=="")
		{   
			visitor +=  "\n - Please enter business state.";
			flag=true;
	    }

		if(trim(frm.business_zip.value)=="")
		{   
			visitor +=  "\n - Please enter business zip code.";
			flag=true;
	    }

		if(trim(frm.business_phone.value)=="")
		{   
			visitor +=  "\n - Please enter business phone.";
			flag=true;
	    }

		if(trim(frm.business_email.value)!="")
		{   
			if(!validEmailAddress(frm.business_email.value))
			{   
			visitor +=  "\n - Please enter valid email.";
			flag=true;
			}
	    }		
		
		if(trim(frm.business_cat.value)=="")
		{   
			visitor +=  "\n - Please enter business category.";
			flag=true;
	    }
		
		if(trim(frm.rating_10617815.value)=="0")
		{   
			visitor +=  "\n - Please enter greate with my pet rating.";
			flag=true;
	    }
		
		if(trim(frm.rating_10617814.value)=="0")
		{   
			visitor +=  "\n - Please enter customer service rating.";
			flag=true;
	    }
		
		if(trim(frm.rating_10617813.value)=="0")
		{   
			visitor +=  "\n - Please enter fair price rating.";
			flag=true;
	    }
		
		if(trim(frm.business_review.value)=="")
		{   
			visitor +=  "\n - Please enter business review.";
			flag=true;
	    }
		
		if (flag == true) {
				MasterString=MasterString+visitor;
				alert(MasterString);
		 return false;
		}	
}

function validate(frm)
{	

		var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";
		var urlRegxp = /^((http:\/\/www|HTTP:\/\/WWW)|(www|WWW)).([A-Za-z0-9])+\.(([A-Za-z]{2,3})|[A-Za-z]{2,3}\.[A-Za-z]{2,3})$/i;
		
		/*if(frm.business_address1.value=="")
		{   
			visitor +=  "\n - Please enter your business address.";
	    }*/
		
		if(frm.business_city.value=="")
		{   
			visitor +=  "\n - Please enter your business city.";
	    }
	
		if(frm.business_state.value=="")
		{   
			visitor +=  "\n - Please select your business state.";
	    }
		if(frm.business_zip.value=="")
		{   
			visitor +=  "\n - Please enter your business zip.";
	    }
		if(frm.business_phone.value=="")
		{   
			visitor +=  "\n - Please enter your business phone.";
	    }
			
		
		if(frm.business_web.value!="")
		{   
			if(urlRegxp.test(frm.business_web.value)!=true)
			{
				visitor +=  "\n - Please enter valid web address.";
			}
	    }
				
		if(visitor != "") {
			MasterString = MasterString + visitor;
			flag=true;
		}
		if (flag == true) {
		 alert(MasterString);
		 return false;
		}	
		
		
}


///////////////////////////////////////////////////////////////////////////////
function check_contact(frm)
{		

		var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";
		var urlRegxp = /^((http:\/\/www|HTTP:\/\/WWW)|(www|WWW)).([A-Za-z0-9])+\.(([A-Za-z]{2,3})|[A-Za-z]{2,3}\.[A-Za-z]{2,3})$/i;
		
		if(trim(frm.advfirst_name.value)=="")
		{   
			visitor +=  "\n - Please enter your first name.";
	    }
		
		if(trim(frm.advlast_name.value)=="")
		{   
			visitor +=  "\n - Please enter your last name.";
	    }
	
		if(trim(frm.advcompany.value)=="")
		{   
			visitor +=  "\n - Please select your company.";
	    }
		if(trim(frm.advURL.value)!="")
		{   
			if(urlRegxp.test(trim(frm.advURL.value))!=true)
			{
				visitor +=  "\n - Please enter valid web address.";
			}
	    }
		if(trim(frm.advemail.value)!="" && !validEmailAddress(frm.advemail.value))
		{   
			visitor +=  "\n - Please enter a valid email.";
	    }
		if(trim(frm.advphone.value)=="")
		{   
			visitor +=  "\n - Please enter your phone.";
	    }
		if(trim(frm.advstreet.value)=="")
		{   
			visitor +=  "\n - Please enter your address.";
	    }
		if(trim(frm.advcity.value)=="")
		{   
			visitor +=  "\n - Please enter your city.";
	    }
		if(trim(frm.advstate.value)=="")
		{   
			visitor +=  "\n - Please enter your state.";
	    }
				
		if(trim(frm.advzip.value)=="")
		{   
			visitor +=  "\n - Please enter your zip.";
	    }
		
		if(visitor != "") {
			MasterString = MasterString + visitor;
			flag=true;
		}
		if (flag == true) {
		 alert(MasterString);
		 return false;
		}	
		
		
}

function check_email(frm)
{
	var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";

		if(!validEmailAddress(frm.business_email.value))
		{   
			visitor +=  "\n - Please enter a valid email.";
	    }
		
		if(visitor != "") {
			MasterString = MasterString + visitor;
			flag=true;
		}
		if (flag == true) {
		 alert(MasterString);
		 return false;
		}	
		
}


function validateListingEdit(frm)
{
	var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";
       var flg=0;
		
var urlRegxp = /^((http:\/\/www|HTTP:\/\/WWW)|(www|WWW)).([A-Za-z0-9])+\.(([A-Za-z]{2,3})|[A-Za-z]{2,3}\.[A-Za-z]{2,3})$/i;

		if(trim(frm.product_name.value) == "")
		{   
			visitor +=  "\n - Please enter product name.";
	    }
	
		if(trim(frm.manuf_web.value) == "")
		{   
			visitor +=  "\n - Please enter website name.";
	    }
		if(trim(frm.manuf_name.value)=="")
		{   
			visitor +=  "\n - Please enter manufacturer name.";
	    }
		if(trim(frm.prod_price.value)=="")
		{   
			visitor +=  "\n - Please enter product price.";
	    }
		
		if(trim(frm.prod_short_comment.value)=="")
		{   
			visitor +=  "\n - Please enter short comments.";
	    }
		
		if(trim(frm.prod_comment.value)=="")
		{   
			visitor +=  "\n - Please enter comments.";
	    }
		if(frm.prod_main.value=="")
		{   
			visitor +=  "\n - Please select main category.";
	    }

		if(frm.prod_child.value=="")
		{   
			visitor +=  "\n - Please select subcategory.";
	    }
		
		if(trim(frm.business_slogan.value)=="(e.g. Elegant, Classic and Unique)" || trim(frm.business_slogan.value)=="")
		{   
			visitor +=  "\n - Please enter marketing slogan.";
	    }
		if(trim(frm.business_message.value)=="Enter marketing message text." || trim(frm.business_message.value)=="")
		{   
			visitor +=  "\n - Please enter marketing message.";
	    }
		if(frm.business_message.value.length>5000)
		{
			visitor +=  "\n - Marketing Message should not more than 5000 characters.";
		}
		
		if(frm.store1_web.value!='')
		{
			if(urlRegxp.test(trim(frm.store1_web.value)) != true)
			{
				flg=1;
			}
		}
		if(frm.store2_web.value!='')
		{
			if(urlRegxp.test(trim(frm.store2_web.value)) != true)
			{
				flg=1;
			}
		}
		if(frm.store3_web.value!='')
		{
			if(urlRegxp.test(trim(frm.store3_web.value)) != true)
			{
				flg=1;
			}
		}
		if(frm.store4_web.value!='')
		{
			if(urlRegxp.test(trim(frm.store4_web.value)) != true)
			{
				flg=1;
			}
		}
		if(frm.store5_web.value!='')
		{
			if(urlRegxp.test(trim(frm.store5_web.value)) != true)
			{
				flg=1;
			}
		}
		if(flg==1)
		{
			visitor +=  "\n - Website addresses should be in the following format: www.store.com.";
		}

		if(visitor != "") {
			MasterString = MasterString + visitor;
			flag=true;
		}


		if (flag == true) {
		 alert(MasterString);
		 return false;
		}	
}


function changeOther(tpe)
{
  var tpe;
  if(tpe=="plan_type")
	{
		document.PlanBusForm.plan_type2.checked=false;
		document.PlanBusForm.plan_type3.checked=false;
		document.PlanBusForm.plan_type4.checked=false;
	}
  else if(tpe=="plan_type2")
	{
		document.PlanBusForm.plan_type.checked=false;
		document.PlanBusForm.plan_type3.checked=false;
		document.PlanBusForm.plan_type4.checked=false;
	}
	else if(tpe=="plan_type3")
	{
		document.PlanBusForm.plan_type.checked=false;
		document.PlanBusForm.plan_type2.checked=false;
		document.PlanBusForm.plan_type4.checked=false;
	}
	else if(tpe=="plan_type4")
	{
		document.PlanBusForm.plan_type.checked=false;
		document.PlanBusForm.plan_type2.checked=false;
		document.PlanBusForm.plan_type3.checked=false;
	}
}

function CheckOther(tpe)
{
  var tpe;
  
  var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";

  if(tpe=="plan_type")
	{
		if(!document.PlanBusForm.plan_type.checked)
		{
		alert('You did not select this plan.');
		return false;
		}
	}
	if(tpe=="plan_type2")
	{
		if(!document.PlanBusForm.plan_type2.checked)
		{
		alert('You did not select this plan.');
		return false;
		}
	}
	if(tpe=="plan_type3")
	{
		if(!document.PlanBusForm.plan_type3.checked)
		{
		alert('You did not select this plan.');
		return false;
		}
	}
	if(tpe=="plan_type4")
	{
		if(!document.PlanBusForm.plan_type4.checked)
		{
		alert('You did not select this plan.');
		return false;
		}
	}
return true;  
  
}



function GoldBus3(frm)
{
		var new_flag=0;
		var MasterString = "Sorry, we cannot complete your request.\nKindly provide us the missing or incorrect information enclosed below.\n";
		var flag=false;
    	var visitor="";
				
		if(trim(frm.business_city.value)!="" || trim(frm.business_state.value)!="")
		{   
		  if(trim(frm.business_city_area.value)=="")
			{
				if(trim(frm.business_city.value)=="")
				visitor +=  "\n - Please enter city.";
				else if(trim(frm.business_state.value)=="")
				visitor +=  "\n - Please select state.";
			}
	    }

		if(trim(frm.business_cat.value)=="")
		{   
			visitor +=  "\n - Please enter your business category.";
	    }
		
		if(trim(frm.business_high1.value)=="")
		{   
			visitor +=  "\n - Please enter highlights #1.";
	    }
		if(trim(frm.business_high2.value)=="")
		{   
			visitor +=  "\n - Please enter highlights #2.";
	    }
		if(trim(frm.business_high3.value)=="")
		{   
			visitor +=  "\n - Please enter highlights #3.";
	    }
		if(trim(frm.business_slogan.value)=="" || trim(frm.business_slogan.value)=="(e.g. Excellent customer service!)")
		{   
			visitor +=  "\n - Please enter marketing slogan.";
	    }
		if(trim(frm.business_message.value)=="" || trim(frm.business_message.value)=="Enter marketing message text.")
		{   
			visitor +=  "\n - Please enter marketing message.";
	    }
		if(frm.business_message.value.length>5000)
		{   
			visitor +=  "\n - Marketing message should not be more than 5000 chars.";
	    }
		/*if(trim(frm.ad_text1.value)=="" || trim(frm.ad_text2.value)=="")
		{   
			visitor +=  "\n - Please enter featured ad text.";
	    }*/
		if(trim(frm.ad_text1.value)=="" || trim(frm.ad_text1.value)=="(e.g. Best in The City.)" || trim(frm.ad_text1.value)=="(e.g. Visit us today!)" || trim(frm.ad_text2.value)=="" || trim(frm.ad_text2.value)=="(e.g. Visit us today!)" || trim(frm.ad_text2.value)=="(e.g. Best in The City.)"  )
		{   
			visitor +=  "\n - Please enter featured ad text.";
	    }
		if(frm.NoReqImg.value=='0')
		{
			if(trim(frm.gold_image.value)=="" &&  trim(frm.gold_logo.value)=="")
			{   
			visitor +=  "\n - You must either upload a custom listing image or a logo.";
			}
		}
		/*var ll=location.href;
		var str=ll.indexOf("bad=1");
		if(trim(frm.gold_image.value)=="" &&  trim(frm.gold_logo.value)=="" && str<1)
		{   
			visitor +=  "\n - You must either upload a custom listing image or a logo.";
	    }*/
		if(trim(frm.business_special_title.value)!='' && trim(frm.business_special_title.value)!='(e.g. 25% off First Grooming Visit!)' )
		{
			if(trim(frm.business_special_description.value)=='' || trim(frm.business_special_description.value)=='(e.g. Mention Yapstar when you contact us and receive %25 off of your 1st Grooming Visit)')
			{
				visitor += "\n - Please enter special offer description";
				
			}
			if(trim(frm.business_special_terms.value)=='' || trim(frm.business_special_terms.value)=='Not valid with any other offer.')
			{
				visitor += "\n - Please enter special offer terms";
				
			}
		}
		else if(trim(frm.business_special_description.value)!='' && trim(frm.business_special_description.value)!='(e.g. Mention Yapstar when you contact us and receive %25 off of your 1st Grooming Visit)' )
		{
			if(trim(frm.business_special_title.value)=='' || trim(frm.business_special_title.value)=='(e.g. 25% off First Grooming Visit!)')
			{
				visitor += "\n - Please enter special offer title";
				
			}
			if(trim(frm.business_special_terms.value)=='' || trim(frm.business_special_terms.value)=='Not valid with any other offer.')
			{
				visitor += "\n - Please enter special offer terms";
				
			}
		}
		else if(trim(frm.business_special_terms.value)!='' && trim(frm.business_special_terms.value)!='Not valid with any other offer.' )
		{
			if(trim(frm.business_special_title.value)=='' || trim(frm.business_special_title.value)=='(e.g. 25% off First Grooming Visit!)')
			{
				visitor += "\n - Please enter special offer title";
				
			}
			if(trim(frm.business_special_description.value)=='' || trim(frm.business_special_description.value)=='(e.g. Mention Yapstar when you contact us and receive %25 off of your 1st Grooming Visit)')
			{
				visitor += "\n - Please enter special offer description";
				
			}
		}
		else
		{
			new_flag=1;
		}
		if(visitor != "") {
			MasterString = MasterString + visitor;
			flag=true;
		}
		if (flag == true) {
		 alert(MasterString);
		 return false;
		}	
		if(new_flag==1)
		{
			frm.business_special_title.value='';
			frm.business_special_description.value='';
			frm.business_special_terms.value='';			
			return true;
		}		

}


function changeValue(frm)
		{
			
			frm.business_cityS.value = frm.business_city.value;
			frm.business_stateS.value = frm.business_state.value;
		}
		
		
function chkCtSt(frm)
{
	if(frm.business_zip.value=='')
	{
		 if(trim(frm.business_city.value)!="" && trim(frm.business_state.value)=="")
		 {
				alert('Please select state.');
				return false;
		}
		else if(trim(frm.business_city.value)=="" && trim(frm.business_state.value)!="")
		{
				alert('Please enter city.');
				return false;
		}
	}
	if(frm.business_zip.value!='')
	{
		frm.business_city.value = '';
		frm.business_state.value = '';
	}
	else
	{
	frm.business_city.value = trim(frm.business_city.value);
	}
return true;			
}

function chkCtSt2(frm)
{
	 if(trim(frm.business_cityS.value)=="")
	 {
	 		alert('Please enter city.');
			return false;
	}
	if(trim(frm.business_stateS.value)=="")
	{
			alert('Please select state.');
			return false;
	}
	frm.business_cityS.value = trim(frm.business_cityS.value);
return true;			
}

var newwindow = '';

function popitup(url) {
	if (!newwindow.closed && newwindow.location) {
		newwindow.location.href = url;
	}
	else {
		newwindow=window.open(url,'name','height=600,width=432,scrollbars=yes,resizable=yes');
		if (!newwindow.opener) newwindow.opener = self;
	}
	if (window.focus) {newwindow.focus()}
	return false;
}
function popitup_99(url) {
	if (!newwindow.closed && newwindow.location) {
		newwindow.location.href = url;
	}
	else {
		newwindow=window.open(url,'name','height=700,width=432,scrollbars=yes,resizable=yes');
		if (!newwindow.opener) newwindow.opener = self;
	}
	if (window.focus) {newwindow.focus()}
	return false;
}
