/*
	page.js -- Thad Wheeler Transit ID LLC. created - Feb,2007
	
	Gets the selected item from a list an checks the value against a test - 
	if the test value exists  call a function to set the display property else do nothing 
	
	Requires 2 Arguments:
	select box to use  and the ID of the object to change the view state of.


*/

function setSelector(obj, id) 
{
	len = obj.length;
	i = 0;
	chosen = "none";
	for (i = 0; i < len; i++) 
	{
		if (obj[i].selected) {
		chosen = obj[i].value;
		}
	}

	if (chosen == "18")
		{setStyle(id,'display','block');}
	else
		{setStyle(id,'display','none');}
	return chosen;
} 
               
function setStyle(obj,style,value)
{
		getRef(obj).style[style]= value;
}
                    
function getRef(obj)
{
		return (typeof obj == "string") ? 
			document.getElementById(obj) : obj;
}
