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" />'

function View_News(id)
{
 news_url = "news.php?id="+id
 contentframe.location = id
 // alert(news_url)
}

function dhtmlselect(selectid, selectwidth, optionwidth){
	var selectbox=document.getElementById(selectid)
	/*
	document.write('<div id="dhtml_'+selectid+'" class="dhtmlselect">'+selectbox.title+" "+combodropimage+'<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>')
	*/
	document.write('<div id="dhtml_'+selectid+'" class="dhtmlselect">'+selectbox.title+" "+combodropimage+'<div class="dropdown">')
	
		document.write('<form name="frm_select"><select name="selectbox" size=4 style="width:224px;" onChange="javascript:View_News(this.value)">');
		
		for (var i=0; i<selectbox.options.length; i++)
		document.write('<option value="'+selectbox.options[i].value+'" >'+selectbox.options[i].text+'</option>')
		
		document.write('</select></form>');
	
		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
	
	
		 try
		      {
		      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		      dhtmlselectbox.getElementsByTagName("div")[0].style.left=dhtmlselectbox.offsetWidth-5+"px"
		      dhtmlselectbox.getElementsByTagName("div")[0].style.top=dhtmlselectbox.offsetHeight+18+"px"
		      }
		    catch (e)
		      {
		      try
		        {
		        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		        dhtmlselectbox.getElementsByTagName("div")[0].style.left=dhtmlselectbox.offsetWidth-5+"px"
		        dhtmlselectbox.getElementsByTagName("div")[0].style.top=dhtmlselectbox.offsetHeight+18+"px"
		        }
		      catch (e)
		        {
		         
		         dhtmlselectbox.getElementsByTagName("div")[0].style.left=dhtmlselectbox.offsetWidth-168+"px"
		         dhtmlselectbox.getElementsByTagName("div")[0].style.top=dhtmlselectbox.offsetHeight+1+"px"
		        }
		      }
		 
		
	dhtmlselectbox.onmouseover=function(){
		this.getElementsByTagName("div")[0].style.display="block"
	}
	dhtmlselectbox.onmouseout=function(){
		this.getElementsByTagName("div")[0].style.display="none"
	}
}