// JavaScript Document
//var siteURLHTTPS = "https://www.bizkingdom.com";
//var siteURL = "http://www.bizkingdom.com";

function loadSubCat()
{
	document.getElementById("subcat").innerHTML = "<img src='https://www.bizkingdom.com/images/loader.gif'>";
	sortit(document.frmSearch.ddlBusinessCategory.value);
}
function loadCounty()
{
	document.getElementById("county").innerHTML = "<img src='https://www.bizkingdom.com/images/loader.gif'>";
	sortit_county(document.frmSearch.ddlBusinessLocation.value);
}

function chkSearch()
{
	var dom = document.frmSearch;
	if(dom.txtFromPrice.value != "")
	{
		if(isNaN(dom.txtFromPrice.value))
		{
			alert("Please Enter Only Numeric Values");	
			dom.txtFromPrice.value = "";
			dom.txtFromPrice.focus();
			return false;
		}
	}
	
	if(dom.txtToPrice.value != "")
	{
		if(isNaN(dom.txtToPrice.value))
		{
			alert("Please Enter Only Numeric Values");	
			dom.txtToPrice.value = "";
			dom.txtToPrice.focus();
			return false;
		}
	}
	
	if(parseInt(dom.txtFromPrice.value) > parseInt(dom.txtToPrice.value))
	{
		alert("From Price Must Be Smaller Than Or Equal To To Price");	
		dom.txtToPrice.focus();
		return false;
	}
}
function chkNewsletterForm()
{
	var dom5 = document.frmNewsletter;
	if(trim(dom5.txtNewsletterEmail.value) == "")
	{
		alert("Please Enter Email Address");
		dom5.txtNewsletterEmail.focus();
		return false;	
	}
	var validate5 = email_valid(trim(dom5.txtNewsletterEmail.value));
	if(validate5 == false)
	{
		alert("Please Enter Valid Email Address");
		dom5.txtNewsletterEmail.focus();
		return false;	
	}
}
