var combodropimage='' //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 dhtmlselect(selectid, selectwidth, optionwidth, function_name)
{
	var selectbox=document.getElementById(selectid)
	document.write('<div id="dhtml_'+selectid+'" class="dhtmlselect"><span id="span_'+selectid+'">'+selectbox.title+"</span> "+combodropimage+'<div class="dropdown"><!--[if lte IE 6]><iframe frameborder="0" class="ie6_iframe" marginheight="0" marginwidth="0" src="http://www.silvercrossdaysout.co.uk/wp-content/themes/days-out/scripts/css/ie6.html"></iframe><![endif]-->')
	
	for (var i=0; i<selectbox.options.length; i++)
	//for (var i=1; i<selectbox.options.length; i++) // ignor inital select option (Select a ...)
		document.write('<a href="#" onclick="'+ function_name +'(\''+selectbox.options[i].value+'\');">'+selectbox.options[i].text+'</a>')
		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
		dhtmlselectbox.getElementsByTagName("div")[0].style.top=dhtmlselectbox.offsetHeight-combodropoffsetY+"px"
	
	if (combodropimage!="")
		dhtmlselectbox.getElementsByTagName("img")[0].style.left=dhtmlselectbox.offsetWidth+3+"px"
		
	dhtmlselectbox.onmouseover=function()
	{	
		this.getElementsByTagName("div")[0].style.display="block"
	}
	dhtmlselectbox.onmouseout=function()
	{
		this.getElementsByTagName("div")[0].style.display="none"
	}
		/**/
}
