function showOptions(which,whichDD)
{
	document.getElementById(which).style.display = "block";
	if(which == "machineOptions")
	{
		document.getElementById(whichDD).style.backgroundImage = "url(/images/dts/btnMachine2_on.png)"
	}
	else
	{
		document.getElementById(whichDD).style.backgroundImage = "url(/images/dts/btnSoil_on.png)"
	}
	document.getElementById(whichDD).style.color = "#ffffff";
}

function hideOptions(which,whichDD)
{
	document.getElementById(which).style.display = "none";
	if(which == "machineOptions")
	{
		document.getElementById(whichDD).style.backgroundImage = "url(/images/dts/btnMachine2_off.png)"
	}
	else
	{
		document.getElementById(whichDD).style.backgroundImage = "url(/images/dts/btnSoil_off.png)"
	}
	document.getElementById(whichDD).style.color = "#4e4e4e";
}

function menuOver(which)
{
	document.getElementById(which).style.backgroundImage = "url(/images/menuOn.png)"
	document.getElementById(which).style.color = "#000000"
}

function menuOff(which)
{
	document.getElementById(which).style.backgroundImage = "url(/images/menuOff.png)"
	document.getElementById(which).style.color = "#ffffff"
}

function showHand(which)
{
	document.getElementById(which).style.cursor = "pointer";
}

function changePage(which)
{
	window.location.href = which;
}

function changeLoc(which)
{
	for(x=0;x<11;x++)
	{
		document.getElementById("cur" + x).style.display = "none";
	}
	document.getElementById("cur" + which).style.display = "block";
}

function validate()
{
	if(document.forms.email.firstName.value == "")
	{
		alert("Please enter your first name.");
		document.forms.email.firstName.focus();
		return;
	}
	if(document.forms.email.lastName.value == "")
	{
		alert("Please enter your last name.");
		document.forms.email.lastName.focus();
		return;
	}
	if(document.forms.email.address1.value == "")
	{
		alert("Please enter your the address.");
		document.forms.email.address1.focus();
		return;
	}
	if(document.forms.email.city.value == "")
	{
		alert("Please enter your city.");
		document.forms.email.city.focus();
		return;
	}
	if(document.forms.email.state.value == "")
	{
		alert("Please select your state (or choose 'Other').");
		document.forms.email.state.focus();
		return;
	}
	if(document.forms.email.zip.value == "")
	{
		alert("Please enter your zip code.");
		document.forms.email.zip.focus();
		return;
	}
	if(document.forms.email.province.value == "" && document.forms.email.state.value == "Other")
	{
		alert("Please enter your province.");
		document.forms.email.province.focus();
		return;
	}
	if(document.forms.email.country.value == "" && document.forms.email.state.value == "Other")
	{
		alert("Please select your country (or choose 'Other').");
		document.forms.email.country.focus();
		return;
	}
	if(document.forms.email.countryname.value == "" && document.forms.email.country.value == "Other")
	{
		alert("Please enter your country name.");
		document.forms.email.countryname.focus();
		return;
	}
	if(document.forms.email.email.value == "")
	{
		alert("Please enter your e-mail address.");
		document.forms.email.email.focus();
		return;
	}
	document.forms.email.action.value = "post"
	document.forms.email.submit();
}
function toggleProvince()
{
	if (document.forms.email.state.value == "Other")
	{
		document.getElementById("provinceRow").style.display="block";
		document.getElementById("countryRow").style.display="block";
		document.forms.email.useProvinceCountry.value = "use"
	}
	else
	{
		document.getElementById("provinceRow").style.display="none";
		document.getElementById("countryRow").style.display="none";
		document.forms.email.useProvinceCountry.value = ""
	}
}
function toggleCountry()
{
	if (document.forms.email.country.value == "Other")
	{
		document.getElementById("countryNameRow").style.display="block";
		document.forms.email.useCountryName.value = "use"
	}
	else
	{
		document.getElementById("countryNameRow").style.display="none";
		document.forms.email.useCountryName.value = ""
	}
}
