
//Resize radEditor to right size. The problem is when shifting from wysiwyg mode to html mode with a text containing long lines.
//If necessary, add this atribute to the radEditor-control:  EditControlWidth="390px" 
function OnClientModeChange(editor)
{
    var htmlArea = document.getElementById("RadEContentTextarea" + editor.Id); 
    htmlArea.style.width = (editor.GetWidth()-12) + "px"; 
}

function showDHTMLMenu(div2show) {
    var divs = document.getElementById('rightDHTMLMenu').getElementsByTagName('DIV');
    for(var i=0;i<divs.length;i++)
        if (divs[i].className == 'content redlink')
            divs[i].style.display = 'none'; 
    div2show.getElementsByTagName('DIV')[0].style.display = 'block';
}

// Script from external supplier
// Used in the red search banner from Danish Exporters
function BlokerNavn_Soegord(form,felt)
{
	if (felt == 'person')
		var A = new Array("Varemaerke","agentur","Faggruppe","nace","nacefra","nacetil","person","navn","soegeord","Stikord", "POSTNR_FRA", "POSTNR_TIL", "omraade", "BY", "vej");	
	else
		var A = new Array("Varemaerke","agentur","Faggruppe","nace","nacefra","nacetil","person","navn","soegeord","Stikord");
	index = 0;
	ny = false;
	farve = "WHITE";
	if (eval("document.forms." + form.name + "." + felt + ".value.length > 0"))
	{	
		ny = true;
		farve = "BDBEBD";
	}
	for (i = index; i < A.length; i++)
	{
		//alert(eval("form.elements['" + A[i] + "']") ? true : false);
		if(eval("form.elements['" + A[i] + "']"))
			if (A[i] != felt && A[i].indexOf(felt.substring(0,4)) == '-1')
			{
				alert(eval("form.elements['" + A[i] + "']"));
				//eval(form.name + "." + A[i] + ".disabled = " + ny);
				//eval(form.name + "." + A[i] + ".value = ''");
				//eval(form.name + "." + A[i] + ".style.background = '" + farve + "'");
				eval("form.elements['" + A[i] + "'].disabled = " + ny);
				eval("form.elements['" + A[i] + "'].value = ''");
				eval("form.elements['" + A[i] + "'].style.background = '" + farve + "'");
			}
	}
}

function submitform()
{

  var url = "http://www.danishexporters.dk/scripts/soegning/krakdk_soegning_resultatside.asp?";
  url=url +"data=k&pub_id=EDEW&avanceretleverandsoeg=danishexporters&omraade=&landekode=GB";
  url=url +"&soegeord="+document.getElementById('idsoegeord').value;
  url=url +"&navn=&select=&tlf=&exportarea=";
 window.open(url);

}
// ******* END Danish Exporters script *******