// uses event handlers
// wrap in object
var JumpMenu =
{
	// get reference to element
	// set up even handler
	init: function()
	{
		var button = document.getElementById("gobutton");
		button.onclick = JumpMenu.clickHandler;
	},

	clickHandler: function()
	{
		// get reference to 'option' selected by user
		var select = this.form.productlist
		var i = select.selectedIndex;
		var selection = select.options[i].value;
		var url;
		if (i === 0)
		{
			//if not valid option - tell user to select a valid product option
			alert("Please select a product.");
		}
		else
		{
			// if valid option - construct url and send user to that location
			url = "http://www.gmvista.com/product_line/" + selection + ".html";
			location.href = url;
		}
	}
};

Core.start(JumpMenu);