//This function is executed when each page is accessed.
function loader() {

	//
	//Update BreadCrumb Information
	//
	if (document.all && document.BreadCrumb)
	{
		if (!document.BreadCrumb.text.value == "")
			breadcrumb.innerHTML = "You are here: " + document.BreadCrumb.text.value;
	}
	else if (document.layers)
	{
		if (document.layerBreadCrumb)
		{
			document.layerBreadCrumb.
			document.write("You are here: " + document.BreadCrumb.text.value);
			document.layerBreadCrumb.
			document.close();
		}
	}

}


//Function to open an external window
function windowOpener(strType, strLink)
{

	if (strType == "kennel")
	{
		window.open(strLink, strType, "height=500,width=400,left=80,top=80,scrollbars=yes,menubar=no,status=no");
	}
	else if (strType == "police")
	{
		window.open(strLink, strType, "height=600,width=600,left=80,top=80,scrollbars=yes,menubar=no,status=no");
	}
	else
	{
		window.open(strLink, strType, "height=600,width=800,left=80,top=80,scrollbars=yes,menubar=yes,status=yes");
	}

}

function checknumber(val){
var x=val
var anum=/(^\d+$)|(^\d+\.\d+$)/
if (x.value.length != 0)
	{if (anum.test(x.value))
		testresult=true
	else{
		alert("Please input a valid number! Dollar sign is not necessary.")		
		x.value = "";
		x.focus();
		testresult=false
	}
	
	if (x.value >= 1000)
		{alert("Cost appears to be too high!");
		x.value="";
		x.focus();
		testresult=false}
	else
		testresult=true
		
	return (testresult)
	}
}
