var combodropimage='/skin/frontend/default/modern/images/filter-arrow.png' //path to "drop down" image
var combodropoffsetY=2 //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" />'
combodropimage=""
function dhtmlbrandselect(selectid, selectwidth, optionwidth){
	var selectbox=document.getElementById(selectid)
	document.write('<div id="dhtml_'+selectid+'" class="dhtmlbrandselect">'+selectbox.title+" "+combodropimage+'<div class="dropdown">')
	//document.write('<div id="dhtml_'+selectid+'" class="dhtmlselect">'+selectbox.title+'<div class="dropdown">')
	for (var i=0; i<selectbox.options.length; i++)
		document.write('<a href="'+selectbox.options[i].value+'">'+selectbox.options[i].text+'</a>')
	document.write('</div></div>')
	selectbox.style.display="none"
	var dhtmlbrandselectbox=document.getElementById("dhtml_"+selectid)
	dhtmlbrandselectbox.style.zIndex=combozindex
	combozindex--
	if (typeof selectwidth!="undefined")
		dhtmlbrandselectbox.style.width=selectwidth
	if (typeof optionwidth!="undefined")
		dhtmlbrandselectbox.getElementsByTagName("div")[0].style.width=optionwidth
	dhtmlbrandselectbox.getElementsByTagName("div")[0].style.top=dhtmlbrandselectbox.offsetHeight-combodropoffsetY+"px"
	if (combodropimage!="")
		dhtmlbrandselectbox.getElementsByTagName("img")[0].style.left=dhtmlbrandselectbox.offsetWidth+3+"px"
	dhtmlbrandselectbox.onmouseover=function(){
		this.getElementsByTagName("div")[0].style.display="block"
	}
	dhtmlbrandselectbox.onmouseout=function(){
		this.getElementsByTagName("div")[0].style.display="none"
	}
}
