var combodropimage=''; //path to "drop down" image
var combodropoffsetY=42; //offset of drop down menu vertically from default location (in px)
var combozindex=100;
var menucount=0;
if (combodropimage!="")
	combodropimage='<img class="downimage" src="'+combodropimage+'" title="Select an option" />';

function dhtmlselect(selectid, count){
    menucount++;
	var selectbox=document.getElementById(selectid);
	if(selectbox.id == 'theme_dropdown'){
	  var dropdownname = 'Occasion';
	}else{
	  dropdownname = selectbox.id;
	}
	document.write('<td><div id="dhtml_'+count+'" class="dhtmlselect"><span class="menutitletext">'+dropdownname +" "+combodropimage+'</span><div class="dropdown">');
	if(selectbox.id == 'theme_dropdown'){
	for (var i=1; i<selectbox.options.length; i++)
		document.write('<a href="/store/search/theme/'+selectbox.options[i].value+'/">'+selectbox.options[i].text+'</a>');

	}else{
	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></td>');
	selectbox.style.display="none";
	var dhtmlselectbox=document.getElementById("dhtml_"+count);
	dhtmlselectbox.style.zIndex=combozindex;
	combozindex--;
	dhtmlselectbox.onmouseover=function(){
		this.getElementsByTagName("div")[0].style.display="block";
		this.style.color="#990100";
		this.style.background="#999999";
	}
	dhtmlselectbox.onmouseout=function(){
		this.getElementsByTagName("div")[0].style.display="none";
		this.style.background="#990100";
		this.style.color="#ffffff";
	}

}