	function goToPage(element)
	{
		if(element.options[element.selectedIndex].value == "Custom-Tanks.html")
		{
			document.location = "/products/" + element.options[element.selectedIndex].value;
		}
		else
		{
			document.location = "/models/" + element.options[element.selectedIndex].value;
		}
	}
	function setValue(element)
	{
		app = element.options[element.selectedIndex].value
		document.location = "/results/searchResults.html?search=" + app;
	}
	function getFlash(flash)
	{
		document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="742" height="70">')
		document.write('<param name="movie" value="' + flash + '">')
		document.write('<param name="quality" value="high">')
		document.write('<param name="wmode" value="transparent">')
		document.write('<embed src="' + flash + '" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" width="742" height="70"></embed>')
		document.write('</object>')
	}
	
	
	
/*	
	function getNextStep(element)
	{
		if(document.getElementById("first"))
		{
			if(!document.getElementById("first").checked && !document.getElementById("second").checked)
			{
				alert("Please select one option!");
				return false;
			}
		}
		
		
		if(document.getElementById('step').value == "")
		{
			document.getElementById('step').value = 1			
		}
		else
		{
			document.getElementById('step').value = parseInt(document.getElementById('step').value) + 1
		}
		currentStep = parseInt(document.getElementById('step').value)
		if(currentStep != "")
		{
			document.getElementById("previous").style.visibility = 'visible'
		}
		if(currentStep == 1)
		{
			document.getElementById("conf").innerHTML = "<label for='first'>Cylindrical</label>" + 
															"<input type='radio' id='first' name='first' onclick='document.getElementById(\"shape\").value=\"Cylindrical\";'/><br/>" +
														"<label for='second'>Rectangular</label>" +
															"<input type='radio' id='second' name='first' onclick='document.getElementById(\"shape\").value=\"Rectangular\";' /><br/>"
			document.getElementById("config").innerHTML = "2.&nbsp;&nbsp; Shape?";
		}
		if(currentStep == 2)
		{
			document.getElementById("conf").innerHTML = "<label for='first'>Horizontal</label>" + 
															"<input type='radio' id='first' name='first' onclick='document.getElementById(\"orientation\").value=\"Horizontal\";'/><br/>" +
														"<label for='second'>Vertical</label>" +
															"<input type='radio' id='second' name='first' onclick='document.getElementById(\"orientation\").value=\"Vertical\";' /><br/>"
			document.getElementById("config").innerHTML = "3.&nbsp;&nbsp; Orientation?";
		}
		if(currentStep == 3)
		{
			document.getElementById("conf").innerHTML = "<label for='first'>Single Wall</label>" + 
															"<input type='radio' id='first' name='first' onclick='document.getElementById(\"wall_type\").value=\"Single Wall\";'/><br/>" +
														"<label for='second'>Double Wall</label>" +
															"<input type='radio' id='second' name='first' onclick='document.getElementById(\"wall_type\").value=\"Double Wall\";' /><br/>"
			document.getElementById("config").innerHTML = "4.&nbsp;&nbsp; Wall Type?";
		}
		var tank_type = document.getElementById("type").value
		var tank_orientation = document.getElementById("orientation").value
		var tank_shape = document.getElementById("shape").value
		var tank_wall = document.getElementById("wall_type").value
		
		if(currentStep == 4)
		{
			document.location = "/results/configuratorResults.html?tank_type=" + tank_type + "&tank_orientation=" + tank_orientation + "&tank_shape=" + tank_shape + "&wall_type=" + tank_wall 
		}
	}
	function getPreviousStep(step)
	{
		if(document.getElementById('step').value == "")
		{
			return false;			
		}
		else
		{
			document.getElementById('step').value = parseInt(document.getElementById('step').value) - 1
		}
		currentStep = document.getElementById('step').value
		
		if(parseInt(currentStep) <= 0)
		{
			document.getElementById("previous").style.visibility = 'hidden'
		}
		
		if(currentStep == 0)
		{
			document.getElementById("conf").innerHTML = "<label for='first'>Aboveground</label>" + 
															"<input type='radio' id='first' name='first' onclick='document.getElementById(\"type\").value=\"Aboveground\";'/><br/>" +
														"<label for='second'>Underground</label>" +
															"<input type='radio' id='second' name='first' onclick='document.getElementById(\"type\").value=\"Underground\";' /><br/>"
			document.getElementById("config").innerHTML = "1.&nbsp;&nbsp; Type?";
		}
		if(currentStep == 1)
		{
			document.getElementById("conf").innerHTML = "<label for='first'>Cylindrical</label>" + 
															"<input type='radio' id='first' name='first' onclick='document.getElementById(\"shape\").value=\"Cylindrical\";'/><br/>" +
														"<label for='second'>Rectangular</label>" +
															"<input type='radio' id='second' name='first' onclick='document.getElementById(\"shape\").value=\"Rectangular\";' /><br/>"
			document.getElementById("config").innerHTML = "2.&nbsp;&nbsp; Shape?";
		}
		if(currentStep == 2)
		{
			document.getElementById("conf").innerHTML = "<label for='first'>Horizontal</label>" + 
															"<input type='radio' id='first' name='first' onclick='document.getElementById(\"orientation\").value=\"Horizontal\";'/><br/>" +
														"<label for='second'>Vertical</label>" +
															"<input type='radio' id='second' name='first' onclick='document.getElementById(\"orientation\").value=\"Vertical\";' /><br/>"
			document.getElementById("config").innerHTML = "3.&nbsp;&nbsp; Orientation?";
		}
		if(currentStep == 3)
		{
			document.getElementById("conf").innerHTML = "<label for='first'>Single Wall</label>" + 
															"<input type='radio' id='first' name='first' onclick='document.getElementById(\"wall_type\").value=\"Single Wall\";'/><br/>" +
														"<label for='second'>Double Wall</label>" +
															"<input type='radio' id='second' name='first' onclick='document.getElementById(\"wall_type\").value=\"Double Wall\";' /><br/>"
			document.getElementById("config").innerHTML = "4.&nbsp;&nbsp; Wall Type?";
		}
	}
*/	
	function setDivs(element)
	{
		
			document.getElementById("left_box_r").style.backgroundImage='url(/slices/left_box.jpg)'
			document.getElementById("left_box_r").style.height='183px'
			document.getElementById("previous").style.visibility = 'visible'
		
	}
	
	
	function setChecked(gallons, diameter, tankLenght, shape)
	{
		document.getElementById("gallons").value = gallons
		document.getElementById("diameter").value = diameter
		document.getElementById("lenght").value = tankLenght
		document.getElementById("shape2").value = shape
	//	alert(document.getElementById("lenght").value);
		document.forms['checkedEls'].submit();
	}
	function goToPage2()
	{
		var tank_type = document.getElementById("type").value
		var tank_orientation = document.getElementById("orientation").value
		var tank_shape = document.getElementById("shape").value
		var tank_wall = document.getElementById("wall_type").value
		var discharge = document.getElementById('discharge').value
		var steps = document.getElementById('step').value
		
//	alert("/results/configuratorResults.html?step="+ steps +"&tank_type=" + tank_type + "&tank_orientation=" + tank_orientation + "&tank_shape=" + tank_shape + "&wall_type=" + tank_wall + "&discharge=" + discharge )	
		document.location = "/results/configuratorResults.html?step="+ steps +"&tank_type=" + tank_type + "&tank_orientation=" + tank_orientation + "&tank_shape=" + tank_shape + "&wall_type=" + tank_wall + "&discharge=" + discharge 
	}