/***********************************************
* DHTML Select Menu- by JavaScript Kit (www.javascriptkit.com)
* Menu interface credits: http://www.dynamicdrive.com/style/csslibrary/item/glossy-vertical-menu/ 
* This notice must stay intact for usage
* Visit JavaScript Kit at http://www.javascriptkit.com/ for this script and 100s more
***********************************************/
var combodropimage='/inc/downbox.gif' //path to "drop down" image
var combodropoffsetY=22 //offset of drop down menu vertically from default location (in px)
var combozindex=100

if (combodropimage!="")
	combodropimage='<img class="downimage" src="'+combodropimage+'" title="Select an option" />'

function dhtmlselect(selectid, selectwidth, optionwidth){
	var selectbox=document.getElementById(selectid)
	listArray = selectbox.getElementsByTagName("li");
	if(listArray.length>0){
		document.write('<div id="dhtml_'+selectid+'" class="dhtmlselect">'+combodropimage);
		var startIndex = 1;
		if(listArray.length>1){
			document.write(selectbox.title+'<div class="dropdown">');
		}else{
			startIndex = 0;
			document.write('<div class="dropdown1">');
		}
		for (var i=startIndex; i<listArray.length; i++){
			document.write(listArray[i].innerHTML);
		}
		document.write('</div></div>')
	}
	selectbox.style.display="none"
	var dhtmlselectbox=document.getElementById("dhtml_"+selectid)
	dhtmlselectbox.style.zIndex=combozindex
	combozindex--
	if (typeof selectwidth!="undefined")
		dhtmlselectbox.style.width=selectwidth
	if (typeof optionwidth!="undefined")
		dhtmlselectbox.getElementsByTagName("div")[0].style.width=optionwidth

	if(listArray.length>1){
		dhtmlselectbox.getElementsByTagName("div")[0].style.top=combodropoffsetY+"px"
		dhtmlselectbox.onmouseover=function(){
			this.getElementsByTagName("div")[0].style.display="block"
		}
		dhtmlselectbox.onmouseout=function(){
			this.getElementsByTagName("div")[0].style.display="none"
		}
	}
}

