// JavaScript Document

function listtoselect(menuID)
{
	var menudiv = document.getElementById(menuID);
	var theUL = menudiv.getElementsByTagName('UL');
	theUL = theUL[0];
	var theLIs = theUL.getElementsByTagName('LI');
	
	var s = document.createElement('select');
	s.id = menuID+"select";
	s.name = menuID;
	s.onchange = function(){
		window.location.href=this.options[this.selectedIndex].value
		};
	
	s.options[s.length] = new Option("--Please select a course--","");
	
	for (var i = 0; i<theLIs.length; i++) {
		var link = theLIs[i].childNodes[0];
		if (link && link.href) s.options[s.options.length] = new Option(link.innerHTML.replace('&amp;','&'),link.href)
	}
	  menudiv.removeChild(theUL);
	  menudiv.appendChild(s);		
}


