// JavaScript Document
/*if (document.images) {
	NavOn1 = new Image()
	NavOn1.src = "images/logos/vertviewslabs_on.gif"
	NavOn2 = new Image()
	NavOn2.src = "images/logos/vertviewtiles_on.gif"
	NavOn3 = new Image()
	NavOn3.src = "images/logos/horzviewslabs_on.gif"
	NavOn4 = new Image()
	NavOn4.src = "images/logos/horzviewtiles_on.gif"
	
	NavOff1 = new Image()
	NavOff1.src = "images/logos/vertviewslabs.gif"
	NavOff2 = new Image()
	NavOff2.src = "images/logos/vertviewtiles.gif"
	NavOff3 = new Image()
	NavOff3.src = "images/logos/horzviewslabs.gif"
	NavOff4 = new Image()
	NavOff4.src = "images/logos/horzviewtiles.gif"
					  }
function changeNav(tnav,state)
	{
	theImage = ("tnav" + tnav);
	theState = (state) ? ("NavOn"+tnav) : ("NavOff"+tnav);
	SwapImage(theImage,theState);
	}	*/
function ItemPopUp(item,itemtype,hgt,wdth)
	{
	features = "location=no,toolbar=no,menubar=no,resizeable=no,scrollbars=no"
	if (navigator.appName == "Netscape") features += ",screenX=125,screenY=178"
	else features += ",left=125,top=210"
	window.open("zoom.cfm?ssID="+item+"&type="+itemtype,"ItemPop"+item,features+",height="+hgt+",width="+wdth);
	}
function RoomPopUp(item,itmtype,hgt,wdth)
	{
	features = "location=no,toolbar=no,menubar=no,resizeable=no,scrollbars=no"
	if (navigator.appName == "Netscape") features += ",screenX=125,screenY=178"
	else features += ",left=125,top=210"
	window.open("zoomroom.cfm?room="+item+"&type="+itmtype,"RoomPop",features+",height="+hgt+",width="+wdth);
	}	
function UsageGuidePopUp(series,hgt,wdth)
	{
	features = "location=no,toolbar=no,menubar=no,resizeable=no,scrollbars=yes"
	if (navigator.appName == "Netscape") features += ",screenX=125,screenY=178"
	else features += ",left=125,top=210"
	window.open("zoomusageguide.cfm?sID="+series,"UsageGuidePop",features+",height="+hgt+",width="+wdth);
	}	
function MapPopUp(map,hgt,wdth)
	{
	features = "location=no,toolbar=no,menubar=no,resizeable=no,scrollbars=yes"
	if (navigator.appName == "Netscape") features += ",screenX=125,screenY=178"
	else features += ",left=125,top=178"
	window.open("stonecenters.cfm?sy="+map,"MapPop"+map,features+",height="+hgt+",width="+wdth);
	}	
function CrumbNavItem(iName, iLocation)
	{
		this.NavLocation = iLocation;
		this.NavName = iName;
	}
function BuildNav()
	{
		var output = "";
		for (var x=0; x<arCrumbs.length; ++x)
		{
			if (arCrumbs[x].NavLocation != null)
				output += '<a href="' + arCrumbs[x].NavLocation + '" class="crumbnav">' + arCrumbs[x].NavName + '</a>';
			else
				output += arCrumbs[x].NavName;
			if (x < arCrumbs.length - 1)
			{
				output += "&nbsp;&nbsp;&#0187;&nbsp;&nbsp;";
			}
		}
		document.write(output);
	}
function Keyword()
	{
	if(document.keywordsrch.srchkw.value == "")
		{
		alert("Please provide a Keyword.")
		document.keywordsrch.srchkw.focus();
		return false;
		}
	}
function checkSeriesSearch()
	{
	if(document.seriessearch.srchTleSeries[document.seriessearch.srchTleSeries.selectedIndex].value == "" && document.seriessearch.srchSlbSeries[document.seriessearch.srchSlbSeries.selectedIndex].value == "")
		{
		alert("Please select a Slab or Stone Tile Series.")
		document.seriessearch.srchTleSeries.focus();
		return false;
		}
	if(document.seriessearch.srchTleSeries[document.seriessearch.srchTleSeries.selectedIndex].value != "" && document.seriessearch.srchSlbSeries[document.seriessearch.srchSlbSeries.selectedIndex].value != "")	
		{
		alert("Please select only one Slab or Stone Tile Series.")
		document.seriessearch.srchTleSeries.focus();
		return false;
		}
	}
function checkStoneSrch()
	{
	var Xtype = document.stnesrch.srchPType[document.stnesrch.srchPType.selectedIndex].value;
	var Xapp = document.stnesrch.srchApp[document.stnesrch.srchApp.selectedIndex].value;
	var Xcolor = document.stnesrch.srchColor[document.stnesrch.srchColor.selectedIndex].value;
	var Xsize = document.stnesrch.srchSize[document.stnesrch.srchSize.selectedIndex].value;
		
	if(Xtype == "" && Xapp == "" && Xcolor == "" && Xsize == "")
		{
		alert("Please select at least 1 search criteria before performing your search.")
		document.stnesrch.srchPType.focus();
		return false;
		}
	else
		{
		if (Xtype == "")
			{
			alert("Please select the Product Type.")
			document.stnesrch.srchPType.focus();
			return false;
			}
		else
			{
			if (Xtype == 2)
				{
				/*if (Xapp != "")
					{
					alert("Application does not apply to Stone Slabs.")
					document.stnesrch.srchApp.value = "";
					return false;
					}*/
				if ((Xsize != "")&&(Xsize != "0"))
					{
					alert("Invalid Size selection for Stone Slabs.")
					document.stnesrch.srchSize.value = "";
					return false;
					}					
				}
			if (Xtype == 1)
				{
				if (Xsize == "0")
					{
					alert("Invalid Size selection for Stone Tiles.")
					document.stnesrch.srchSize.value = "";
					return false;
					}					
				}	
			}
		}
	document.stnesrch.UFsrchPType.value = document.stnesrch.srchPType[document.stnesrch.srchPType.selectedIndex].text
	document.stnesrch.UFsrchColor.value = document.stnesrch.srchColor[document.stnesrch.srchColor.selectedIndex].text
	document.stnesrch.UFsrchApp.value = document.stnesrch.srchApp[document.stnesrch.srchApp.selectedIndex].text
	document.stnesrch.UFsrchSize.value = document.stnesrch.srchSize[document.stnesrch.srchSize.selectedIndex].text
	document.stnesrch.submit();		
	}
function checkContactform(){

	if (document.contact_daltile.customer_FName.value == "")
		{
		alert("Please provide your First Name.")
		document.contact_daltile.customer_FName.focus();
		return false;
		}
	if (document.contact_daltile.customer_LName.value == "")
		{
		alert("Please provide your Last Name.")
		document.contact_daltile.customer_LName.focus();
		return false;
		}	
	if (document.contact_daltile.customer_Address1.value == "")
		{
		alert("Please provide your Address.")
		document.contact_daltile.customer_Address1.focus();
		return false;
		}	
	if (document.contact_daltile.customer_City.value == "")
		{
		alert("Please provide your City so the proper Representative can be contacted.")
		document.contact_daltile.customer_City.focus();
		return false;
		}	
	if (document.contact_daltile.customer_State[document.contact_daltile.customer_State.selectedIndex].value == "")
		{
		alert("Please provide your State so the proper Representative can be contacted.")
		document.contact_daltile.customer_State.focus();
		return false;
		}	
	if (document.contact_daltile.customer_Zip.value == "")
		{
		alert("Please provide your Zipcode.")
		document.contact_daltile.customer_Zip.focus();
		return false;
		}	
	if (document.contact_daltile.customer_Email.value == "")
		{
		alert("Please provide your Email Address.")
		document.contact_daltile.customer_Email.focus();
		return false;
		}	
	else
		{	
		var who = document.contact_daltile.customer_Email.value;
		var email=/^[A-Za-z0-9][\w-.]+[A-Za-z0-9]@[A-Za-z0-9]([\w-.]+[A-Za-z0-9]\.)+([A-Za-z]){2,4}$/i;
		if(!email.test(who))
			{
			alert('Please enter a valid Email Address (name@domain.com).')
			document.contact_daltile.customer_Email.focus();
			return false;
			}
		}		
	if (document.contact_daltile.customer_Phone.value == "")
		{
		alert("Please provide your Phone number.")
		document.contact_daltile.customer_Phone.focus();
		return false;
		}	

	if (document.contact_daltile.contactus_CustomerType[document.contact_daltile.contactus_CustomerType.selectedIndex].value == "")
		{
		alert("Please select the 'Customer Type' that best represents you.")
		document.contact_daltile.contactus_CustomerType.focus();
		return false;
		}	
		
	if (document.contact_daltile.contactus_Message.value.length < 10)
		{
		alert("Please provide a message.")
		document.contact_daltile.contactus_Message.focus();
		return false;
		}	
		document.contact_daltile.contactus_CustomerTypeText.value = document.contact_daltile.contactus_CustomerType[document.contact_daltile.contactus_CustomerType.selectedIndex].text
		return true;
	}
