function dhtmlselect(selectid, countrymsg, langmsg, closemsg)
{
	var selectbox=document.getElementById(selectid)
		var a=0;
	var selectcountry=document.getElementById("other_countries");
	var selectlang=document.getElementById("countries_lang");

	document.write('<form id="siteselector" action="#" onsubmit="if (countries.options[countries.selectedIndex]!=null) window.open(countries.options[countries.selectedIndex].value.concat(language.options[language.selectedIndex].value), \'_self\');return false" name="other_countries">');

	document.write('<div id="dhtml_'+selectid+'" class="dhtmlselect">'+selectbox.title+'');document.write('</div>')

	document.write('<div id="drop_box" class="dropdown" >');
		/*country selectbox*/	
		document.write('<label>'+countrymsg+'</label>');
		document.write('<select id="countries" onchange="update_langlist(this);">');
			for (var i=0; i<selectcountry.options.length; i++)
			document.write('<option  value="'+selectcountry.options[i].value+'">'+selectcountry.options[i].text+'</option>');
		document.write('</select>');
	
		/*lang selectbox*/
		document.write('<label>'+langmsg+'</label>');
		document.write('<select id="language">');
				for (var i=0; i<selectlang.options.length; i++)
			document.write('<option  value="'+selectlang.options[i].value+'">'+selectlang.options[i].text+'</option>');
	
		document.write('</select>');
	
		/*Bottons GO and CLOSE*/
		document.write('<input id="close" onclick="document.getElementById(\'drop_box\').style.visibility=\'hidden\'; document.getElementById(\'dhtml_network\').className=\'dhtmlselect closed_box\'; return false" value='+closemsg+' type="button" class="button"/>');
		document.write('<input type="submit" value="GO" class="button" id="go"/>');

	document.write('</div>') //fim div class=dropdown
	document.write('</form>');

	selectbox.style.display="none"
	var dhtmlselectbox=document.getElementById("dhtml_"+selectid)
	dhtmlselectbox.onclick=function()
	{
		document.getElementById('drop_box').style.visibility='visible';
		document.getElementById('dhtml_network').className="dhtmlselect opened_box";
	}


}