function _Onload() 
{
    try
    {
	    nulstil();
	    pageIsLoaded = true; 
	}
   catch(err)
  {
  txt="There was an error on  this page.\n\n"
  txt+="Error description: " + err.description + "\n\n"
  txt+="Click OK to continue.\n\n"
  //alert(txt)
  }
  if(selectedMenuPointItemIndex != "") {
        menuPlace = "venstre";
        setLeftMenuPointSelected(selectedMenuPointItemIndex, 3);
    }
}

function pviiClassNew(obj, new_style) {
	document.getElementById(obj).className = new_style;
}
var isDOM = (document.getElementById ? true : false);
var menuActive = 0
var menuOn = 0
var onLayer = "";
var onImgName = "";
var layerName = "";
var onOutSrc = "";
var timeOn = null;	
var undermenuActive = 0
var menuOn = 0
var onLayerUndermenu = "";
var timeOnUndermenu = null;
var org_menuSrc_over = "";
var org_menuSrc = "";
var org_menuName = "";
var menuPlace = "";

function showLayer(layerName,imgName,imgOutSrc,imgOverSrc,menuPlacering,place) {
	if(pageIsLoaded) {
		imgX = document.getElementById(imgName);
		imgY = imgX;
		
		x = imgX.offsetLeft || 0;
		while(imgX = imgX.offsetParent){
		    x += imgX.offsetLeft;
		}
		
		// Calcualte y offset by traversing parent elements and accumulate their top offsets along the way.
		y = imgY.offsetTop || 0;
		while(imgY = imgY.offsetParent) {
		    y += imgY.offsetTop;
		}
		
		menuPlace = place;
		if(place == 'venstre') {
		    try {
                if (document.getElementById("subMenuPodDiv").currentStyle) {
                    menuHorizon = parseInt(document.getElementById("subMenuPodDiv").currentStyle["width"].replace("px","")) - 1;
                    /* RFC 3003 - menuVertical = parseInt(document.getElementById("subMenuPodDiv").currentStyle["height"].replace("px","")) - 21;*/
                    menuVertical = parseInt(document.getElementById("subMenuPodDiv").currentStyle["height"].replace("px","")) - 1;
                } else if (window.getComputedStyle) {
                    var elstyle = window.getComputedStyle(document.getElementById("subMenuPodDiv"), "");
                    menuHorizon = parseInt(elstyle.getPropertyValue("width").replace("px","")) - 1;
                    /* RFC 3003 - menuVertical = parseInt(elstyle.getPropertyValue("height").replace("px","")) - 21; */
                    menuVertical = parseInt(elstyle.getPropertyValue("height").replace("px","")) - 1;
                }
                if(isNaN(menuHorizon)) {
                    menuHorizon = 0;
                    menuVertical = 0;
                }
            } catch(err) {
                menuHorizon = 0;
                menuVertical = 0;
            }
			menuTop = y + 30 + menuVertical;
			menuLeften = x + 0 + menuHorizon;
			
		} else if( place == 'serviceMenu'){
			menuTop = y;
			menuLeften = x;
		} else {
			menuTop = y + 30;
			menuLeften = x + 17;
		}
		if(timeOn != null) {
			clearTimeout(timeOn);
			hideLayer(onLayer,onImgName,onOutSrc);
			hideLayerUndermenu(onLayerUndermenu);
		}
		if(place=="venstre") {
			menuTop = menuTop-31;
			menuLeften = menuLeften+25;
		}
		document.getElementById(layerName).style.visibility = "visible";
		document.getElementById(layerName).style.top = menuTop +"px";
		document.getElementById(layerName).style.left = menuLeften +"px";
		//iframeløsning
		document.getElementById(layerName+"B").style.visibility = "visible";
		document.getElementById(layerName+"B").style.top = menuTop +"px";		
		document.getElementById(layerName+"B").style.left = menuLeften +"px";

		if(imgOutSrc != "") document.getElementById(imgName).src = imgOverSrc;
		if((imgName != org_menuName) && (org_menuName != "")) document.getElementById(org_menuName).src = org_menuSrc;
		onLayer = layerName;
		onOutSrc = imgOutSrc;
		onImgName = imgName;
	}
}

function hideLayer(layerName,imgName,imgOutSrc){
	if(pageIsLoaded) {
		if((layerName != "") && (menuActive == 0)) {
			document.getElementById(layerName).style.visibility = "hidden";

			//iframeløsning
			document.getElementById(layerName+"B").style.visibility = "hidden";

			if(imgOutSrc != "") document.getElementById(imgName).src = imgOutSrc;
			nulstil();

	        //IE6 vis dropdown igen
	        if(navigator.userAgent.indexOf("MSIE 6")!=-1) {
		        sels = document.getElementsByTagName('SELECT');
		        for(var i=0;sels.length>i;i++) sels[i].style.visibility = 'visible';
	        }
		}
	}
}

function menuOver() {
	clearTimeout(timeOn)
	menuActive = 1;
}

function menuOut() {
	menuActive = 0;
	timeOn = setTimeout("hideLayer(onLayer,onImgName,onOutSrc)", 200);
}

function nulstil() {
	if(org_menuName != "") document.getElementById(org_menuName).src = org_menuSrc_over;
}

function visMenu(imgName,imgOverSrc,imgOutSrc,divNavn,menuPlacering,place) {
	if(pageIsLoaded) showLayer(divNavn,imgName,imgOutSrc,imgOverSrc,menuPlacering,place);

	//opera, msie på mac, skjul flash, løsning
	if((navigator.userAgent.indexOf("Opera")!=-1) || (navigator.appVersion.indexOf("Mac")!=-1)) {
		sels = document.getElementsByTagName('OBJECT');
		for(var i=0;sels.length>i;i++) sels[i].style.visibility = 'visible';
		sels = document.getElementsByTagName('EMBED');
		for(var i=0;sels.length>i;i++) sels[i].style.visibility = 'visible';
	}
	//IE6 skjul dropdown
	if(navigator.userAgent.indexOf("MSIE 6")!=-1) {
		sels = document.getElementsByTagName('SELECT');
		for(var i=0;sels.length>i;i++)
		{
		    if (sels[i].className.indexOf('dontHideOnMenu') == -1)
        		sels[i].style.visibility = 'hidden';
        }
	}

}

function visUndermenu(imgName,divNavn,type) {
	showLayerUnder(divNavn,imgName,type);
}

function visUndermenuVenstre(imgName,divNavn) {
	showLayerUnderVenstre(divNavn,imgName);
}

function showLayerUnder(layerName,imgName,type){
	imgX = document.getElementById(imgName);
	imgY = imgX;
	x = imgX.offsetLeft || 0;
	while(imgX = imgX.offsetParent) x += imgX.offsetLeft;
	y = imgY.offsetTop || 0;
	while(imgY = imgY.offsetParent) y += imgY.offsetTop;
	menuTop = y-1;
	menuLeften = x - 1;
	if(timeOnUndermenu != null) {
		clearTimeout(timeOnUndermenu);
		hideLayerUndermenu(onLayerUndermenu);
	}
	
    try {
        if (document.getElementById("subMenuPodDiv").currentStyle) {
            menuHorizon = parseInt(document.getElementById("subMenuPodDiv").currentStyle["width"].replace("px",""));
            menuVertical = parseInt(document.getElementById("subMenuPodDiv").currentStyle["height"].replace("px",""));
        } else if (window.getComputedStyle) {
            var elstyle = window.getComputedStyle(document.getElementById("subMenuPodDiv"), "");
            menuHorizon = parseInt(elstyle.getPropertyValue("width").replace("px",""));
            menuVertical = parseInt(elstyle.getPropertyValue("height").replace("px",""));
        }
        ekstraLeftHorizon = -5; //This has been changed from 35 to -5 according to message in greenstyles.css. When changing topMenuItemWidth from 200 to 185.
        if(isNaN(menuHorizon)) {
            menuHorizon = 0;
            menuVertical = 0;
            ekstraLeftHorizon = 0;
        }
    } catch(err) {
        menuHorizon = 0;
        menuVertical = 0;
        ekstraLeftHorizon = 0;
    }
    
	//Fix width problem for 2nd level
	bredde = document.body.offsetWidth-22-968;
	bredde = bredde/2;
	if( (bredde+968) < (menuLeften+184) ) {
		menuLeften = menuLeften - 367 - menuHorizon - ekstraLeftHorizon;
	} else {
	    menuLeften = menuLeften + menuHorizon;
	}

	document.getElementById(layerName).style.visibility = "visible";
	document.getElementById(layerName).style.top = (menuTop - menuVertical) +"px";
	document.getElementById(layerName).style.left = menuLeften +"px";

	//iframeløsning
	document.getElementById(layerName+"B").style.visibility = "visible";
	document.getElementById(layerName+"B").style.top = (menuTop - menuVertical) +"px";
	document.getElementById(layerName+"B").style.left = menuLeften +"px";

	onLayerUndermenu = layerName;
}

function showLayerUnderVenstre(layerName,imgName){
	imgX = document.getElementById(imgName);
	imgY = imgX;
	x = imgX.offsetLeft || 0;
	while(imgX = imgX.offsetParent) x += imgX.offsetLeft;
	y = imgY.offsetTop || 0;
	while(imgY = imgY.offsetParent) y += imgY.offsetTop;
	menuTop = y ;
	menuLeften = x + 5;
	if (timeOnUndermenu != null) {
		clearTimeout(timeOnUndermenu)
		hideLayerUndermenu(onLayerUndermenu)
	}
	document.getElementById(layerName).style.visibility = "visible";
	document.getElementById(layerName).style.top = menuTop +"px";
	document.getElementById(layerName).style.left = menuLeften +"px";

	//iframeløsning
	document.getElementById(layerName+"B").style.visibility = "visible";
	document.getElementById(layerName+"B").style.top = menuTop +"px";
	document.getElementById(layerName+"B").style.left = menuLeften +"px";

	onLayerUndermenu = layerName;
}

function undermenuOver() {
	clearTimeout(timeOnUndermenu);
	undermenuActive = 1;
}
function undermenuOut() {
	undermenuActive = 0;
	timeOnUndermenu = setTimeout("hideLayerUndermenu(onLayerUndermenu)", 0);
}
function hideLayerUndermenu(layerName){
	if ((layerName != "") && (undermenuActive == 0)) document.getElementById(layerName).style.visibility = "hidden";
	if ((layerName != "") && (undermenuActive == 0)) document.getElementById(layerName+"B").style.visibility = "hidden";
}

function menuItem(tekst, url, harUnderSider) 
{
	this.tekst = tekst;
	this.url = url;
	this.harUnderSider = harUnderSider;
}

var save_i;
function setMenuPointColor(i, bgColorClass, pil, type) {
	var typeExt = '';
	if( type != undefined && type != ''){
		typeExt = type;
	}
 
    if(bgColorClass == "darkGreenSelectedColor") {
        save_i = i;
        var typeExt2 = typeExt;
        pviiClassNew("BottomRightDiv" + i, 'darkGreenBottomRightDiv'+typeExt2);
        pviiClassNew("BottomLeftDiv" + i, 'darkGreenBottomLeftDiv'+typeExt2);
        pviiClassNew("TopRightDiv" + i, 'darkGreenTopRightDiv'+typeExt2);
        pviiClassNew("TopLeftDiv" + i, 'darkGreenTopLeftDiv'+typeExt2);
        if(pil == "medpil") {
            pviiClassNew("cell1MenuTop" + i, 'cellDropdownOver topMenuBorder dropDown');
        } else if(pil == "udenpil") {
            pviiClassNew("cell1MenuTop" + i, 'cellDropdownOverUdenPil'+typeExt2+' topMenuBorder dropDown');
        }
    } else if(bgColorClass == "lightGreenColor") {
	//	alert('hej' + bgColorClass + ' / ' +type + ' / ' +typeExt);
    
        pviiClassNew("BottomRightDiv" + i, 'lightGreenBottomRightDiv'+typeExt);
        pviiClassNew("BottomLeftDiv" + i, 'lightGreenBottomLeftDiv'+typeExt);
        pviiClassNew("TopRightDiv" + i, 'lightGreenTopRightDiv'+typeExt);
        pviiClassNew("TopLeftDiv" + i, 'lightGreenTopLeftDiv'+typeExt);
        if(pil == "medpil") {
            pviiClassNew("cell1MenuTop" + i, 'cellDropdown topMenuBorder dropDown');
        } else if(pil == "udenpil") {
            pviiClassNew("cell1MenuTop" + i, 'cellDropdownUdenPil'+typeExt+' topMenuBorder dropDown');
        }
    }
    
    pviiClassNew("BottomRightTD" + i, bgColorClass+typeExt);
    pviiClassNew("BottomLeftTD" + i, bgColorClass+typeExt);
    pviiClassNew("TopRightTD" + i, bgColorClass+typeExt);
    pviiClassNew("TopLeftTD" + i, bgColorClass+typeExt);
}

function setLock(l) {
    lock = l;
}

function LavTopMenu(arrayMenuItems, navn, unikID, harUnderSider, type) {
	//OUTPUT
	var str = ' <div id="subMenuPodDiv" style="display: none;" class="topSubMenuGreenPosition"></div>';
	try
    {
	if (harUnderSider) {

		var element = document.getElementById(navn);
		var isNoImageChannelImage = false;
		var isChannelImage = false;
		var typeExt = '';
		var subMenusEnabled = true;
		var mainTableStyle;		
		if(element != null){
			//Text Element From NoImageTD
			if(			(navn.lastIndexOf("NoImageChannelImage") != -1) && 
						(document.getElementById(navn.substr(0, navn.lastIndexOf("NoImageChannelImage"))+'NoImageTD') != null) ){
							isNoImageChannelImage = true;
			//Image Element From ImageTD
			}else if(	(navn.lastIndexOf("ChannelImage") != -1) && 
						(document.getElementById(navn.substr(0, navn.lastIndexOf("ChannelImage"))+'ImageTD') != null  )){
							isChannelImage = true;
			}else{
				//alert('No Element');
			}
		}

		//USED FOR SPECIAL MENU TYPES LIKE LANGUAGE CHOOSER
		if( type =='LC' ){
			subMenusEnabled = false;
			if(isNoImageChannelImage)
				mainTableStyle = "position:relative; left:-4px; top:1px;";
		}
		
		if(type != undefined && type != ''){
			typeExt = type;
		}

		var testvar = "";
	    str += '<table style="'+mainTableStyle+'" cellpadding="0" cellspacing="0" border="0" onmouseover="setLeftMenuPointSelected('+currentSelectedMenuPointItemIndex+', 2); setLock(true); undermenuOver();" onmouseout="setLock(false); setLeftMenuPointDeSelected('+currentSelectedMenuPointItemIndex+', 2); undermenuOut();">';
	        str += '<tr class="hideTag">';
	            str += '<td class="roundBoxTopLeft'+typeExt+'"></td><td class="darkGreenColor'+typeExt+' roundBoxTopMiddle'+typeExt+'"></td><td class="roundBoxTopRight'+typeExt+'"></td>';
	        str += '</tr>';
			
			//Used for copying the servicemenu button into the onOver menu box
			if(type == 'LC'){
				//var myItem = 'top' + unikID + '_' + (i) + '_items';
				var primaryName = navn.substr(0, navn.lastIndexOf("NoImageChannelImage"));
				var source = "";
				var content="";
				
				var imgX = element;
				var imgY = element;
				x = imgX.offsetLeft || 0;
				while(imgX = imgX.offsetParent){
					x += imgX.offsetLeft;
				}
				
				y = imgY.offsetTop || 0;
				while(imgY = imgY.offsetParent) {
					y += imgY.offsetTop;
				}
				
				if(isNoImageChannelImage){
					var ChannelNameElement = document.getElementById(navn.substr(0, navn.lastIndexOf("NoImageChannelImage"))+'ChannelName');
					var tableRelativeTop = "top:-5px;";
					if( (navigator.userAgent.indexOf("Firefox") !=-1) ) 
						tableRelativeTop = "top:-6px;";
					content = '<table border="0" cellpadding"0" cellspacing="0" style="position:relative; '+tableRelativeTop+' left:-1px;"><tr><td><span style="font-family:Verdana;font-weight:bold;color:White; font-size:9px; position:relative; top:1px;">'+document.getElementById(navn.substr(0, navn.lastIndexOf("NoImageChannelImage"))+'ChannelName').innerHTML+'</span></td><td><div id="dropDownArrowNoImage" runat="server" visible="true" class="downArrowLC" style="margin-left:7px; position:relative; left:-2px;"/></td></tr></table>';
				}else if( isChannelImage ){
					content = '<div style="height:18px; position:relative; top:-4px; left:-4px;"><table border="0" cellpadding="0" cellspacing="0"><tr><td><img src="'+element.src+'" border="0" alt="'+element.alt+'"/></td><td><div id="dropDownArrowNoImage" runat="server" visible="true" class="downArrowLC"/></td></tr></table></div>';
				}else{
					alert('No Element');
				}
				
				
				str += '<tr class="hideTag">';
					str += '<td style="height:18px; " class="roundBoxLeftMiddle'+typeExt+' "></td><td class="darkGreenColorLC" >'+content+'</td><td class="roundBoxRightMiddle'+typeExt+'"></td>';
				str += '</tr>';
			}
	       	        
	        str += '<tr>';
	            str += '<td class="darkGreenColor'+typeExt+' roundBoxLeftMiddle'+typeExt+' hideTag"></td><td>';
	            
	            str += '<div class="topMenuOuter'+typeExt+'">\n';
		        str += '<table class="topMenuItemWidth'+typeExt+'" cellpadding="0" cellspacing="0" border="0" id="tab1">\n';
		        for (var i = 0; i < arrayMenuItems.length; i++) {
			        str += '<tr>\n'
			            str += '<td id="TopLeftTD' + i + '" class="lightGreenColor'+typeExt+'" style="vertical-align: top;"><div id="TopLeftDiv' + i + '" class="lightGreenTopLeftDiv'+typeExt+'"></div></td>\n';
        			    
			            str += '<td rowspan="2" id="cell1MenuTop' + i + '" onclick="location.href=\'' + arrayMenuItems[i].url + '\'" ';
			            if (i > 0) {
			                str += 'style="width: 100%; border-top:0px;" ';
			            } else {
			                str += 'style="width: 100%;" ';
			            }
			            if (arrayMenuItems[i].harUnderSider && subMenusEnabled) {
				            str += 'class="cellDropdown topMenuBorder dropDown" ';
				            str += 'onmouseover="setMenuPointColor(' + i + ', \'darkGreenSelectedColor\', \'medpil\'); LavTopMenuUnder(top' + unikID + '_' + (i) + '_items, ' + i + ', \'' + navn + '\'); visUndermenu(\'imgNivTop1_' + (i) + '\',\'top2holder\',\''+type+'\'); undermenuOver();" ';
				            str += 'onmouseout="setMenuPointColor(' + i + ', \'lightGreenColor\', \'medpil\'); ">\n';
			            } else {
				            str += 'class="cellDropdownUdenPil'+typeExt+' topMenuBorder dropDown" ';
				            str += 'onmouseover="setMenuPointColor(' + i + ', \'darkGreenSelectedColor\', \'udenpil\', \''+typeExt+'\'); LavTopMenuUnder(false); visUndermenu(\'imgNivTop1_' + (i) + '\',\'top2holder\'); undermenuOver();" ';
				            str += 'onmouseout="setMenuPointColor(' + i + ', \'lightGreenColor\', \'udenpil\', \''+typeExt+'\'); ">\n';
			            }
			            str += arrayMenuItems[i].tekst;
			            str += '</td>\n';
        			        
			            str += '<td rowspan="2" valign="top"><img class="topMenuRightImg" id="imgNivTop1_' + (i) + '" src="/images/blank.gif" width="1" height="1" alt="" border="0"/></td>\n';
        			    
			            str += '<td id="TopRightTD' + i + '" class="lightGreenColor'+typeExt+'" style="vertical-align: top;"><div id="TopRightDiv' + i + '" class="lightGreenTopRightDiv'+typeExt+'"></div></td>\n';
			        str += '</tr>\n'
        			
			        str += '<tr>\n'
			            str += '<td id="BottomLeftTD' + i + '" class="lightGreenColor'+typeExt+' hideTag" style="vertical-align: bottom;"><div id="BottomLeftDiv' + i + '" class="lightGreenBottomLeftDiv'+typeExt+'"></div></td>\n';
			            str += '<td id="BottomRightTD' + i + '" class="lightGreenColor'+typeExt+' hideTag" style="vertical-align: bottom;"><div id="BottomRightDiv' + i + '" class="lightGreenBottomRightDiv'+typeExt+'"></div></td>\n';
			        str += '</tr>\n'
        			if( i != (arrayMenuItems.length -1) )
						str += '<tr class="topMenuSpace hideTag"><td></td></tr>\n';
		        }
		        str += '</table>\n';
		        str += '</div>\n';
	            
	            str += '</td><td class="darkGreenColor'+typeExt+' roundBoxRightMiddle'+typeExt+' hideTag"></td>';
	        str += '</tr>';
	        
	        str += '<tr class="hideTag">';
	            str += '<td class="roundBoxBottomLeft'+typeExt+'"></td><td class="darkGreenColor'+typeExt+' roundBoxBottomMiddle'+typeExt+'"></td><td class="roundBoxBottomRight'+typeExt+'"></td>';
	        str += '</tr>';
	    str += '</table>';
	    
	    if(type == 'languageChooser')
		{
//			pviiClassNew("roundBoxBottomRight", '');
//			document.getElementById(obj).className = new_style;
			
		}
	    
			
	}
	if (document.getElementById("top1holder")!=null)
	{
		document.getElementById("top1holder").innerHTML = str;
	}
	//todo error tab1 != undefined in FireFox
	

	//iframeløsning
	if(str!="") 
	{
	    txt = navigator.appVersion;
		str2 = '<div style="position:absolute; left:0px; top:0px; z-index:10;">';
		/*
		if(((navigator.appVersion.indexOf("MSIE") !=-1) || (navigator.appVersion.indexOf("Firefox") !=-1)) && (navigator.userAgent.indexOf("Opera")==-1) && (navigator.appVersion.indexOf("Mac")==-1))  
		{
				var tabHeight=200;
            	if (typeof (tab1) != undefined && tab1!=null)
                {
                    tabHeight=tab1.clientHeight;
	            }
                else 
                {
		            tabHeight=247;//Only for testing purpose
	            }

			str2 +='<iframe width="184" title="menuframe" longdesc="http://www.um.dk/da/servicemenu/Sitemap/" height="'+tabHeight+'" style="left:0px; position:absolute; top:0px" src="about:blank" frameBorder="0" scrolling="no" title="Menuframe" name="Menuframe"></iframe>';
		}
		*/
		str2 +='</div>';
	} else {
		str2 = "";
	}
	document.getElementById("top1holderB").innerHTML = str2;
    }
   catch(err)
  {
  txt="There was an error on this page.\n\n"
  txt+="Error description: " + err.description + "\n\n"
  txt+="Click OK to continue.\n\n"
  //alert(txt)
  }
}

function setUnderMenuPointColor(i, bgColorClass) {
    if(bgColorClass == "darkGreenSelectedColor") {
        pviiClassNew("BottomRight2Div" + i, 'darkGreenBottomRightDiv');
        pviiClassNew("BottomLeft2Div" + i, 'darkGreenBottomLeftDiv');
        pviiClassNew("TopRight2Div" + i, 'darkGreenTopRightDiv');
        pviiClassNew("TopLeft2Div" + i, 'darkGreenTopLeftDiv');
    } else if(bgColorClass == "lightGreenColor") {
        pviiClassNew("BottomRight2Div" + i, 'lightGreenBottomRightDiv');
        pviiClassNew("BottomLeft2Div" + i, 'lightGreenBottomLeftDiv');
        pviiClassNew("TopRight2Div" + i, 'lightGreenTopRightDiv');
        pviiClassNew("TopLeft2Div" + i, 'lightGreenTopLeftDiv');
    }
    
    pviiClassNew("BottomRight2TD" + i, bgColorClass);
    pviiClassNew("BottomLeft2TD" + i, bgColorClass);
    pviiClassNew("TopRight2TD" + i, bgColorClass);
    pviiClassNew("TopLeft2TD" + i, bgColorClass);
}

function LavTopMenuUnder(arrayMenuItems, oldi, navn) {
var str = "";

try
{
	if(oldi==0) {
	    str += '<img src="/images/blank.gif" width="1" height="1" alt=""/><br />\n';
	} else {
	    str += '';
	}
	if (arrayMenuItems) {
	
	    str += '<table cellpadding="0" cellspacing="0" border="0" class="topMenu2Position" onmouseover="setLeftMenuPointSelected('+currentSelectedMenuPointItemIndex+', 2); setLock(true); setMenuPointColor(' + oldi + ', \'darkGreenSelectedColor\', \'medpil\');" onmouseout="setLock(false); setLeftMenuPointDeSelected('+currentSelectedMenuPointItemIndex+', 2); setMenuPointColor(' + oldi + ', \'lightGreenColor\', \'medpil\');">';
	        str += '<tr class="hideTag">';
	            str += '<td class="roundBoxTopLeft"></td><td class="darkGreenColor"></td><td class="roundBoxTopRight"></td>';
	        str += '</tr>';
	        
	        str += '<tr>';
	            str += '<td class="darkGreenColor hideTag"></td><td>';
	            
	            str += '<div class="topMenuOuter">\n';
		            str += '<table class="topMenuItemWidth" cellpadding="0" cellspacing="0" border="0" id="Table5">\n';
		            for (var i = 0; i < arrayMenuItems.length; i++) {
			            str += '<tr>\n';
			                str += '<td id="TopLeft2TD' + i + '" class="lightGreenColor" style="vertical-align: top;"><div id="TopLeft2Div' + i + '" class="lightGreenTopLeftDiv"></div></td>\n';
                			
			                str += '<td rowspan="2" class="cellDropdownUdenPil topMenuBorder" id="cell1MenuTopUnder1" onclick="location.href=\'' + arrayMenuItems[i].url + '\'" ';
			                if (i > 0) {
			                    str += 'style="width: 100%; border-top:0px;" ';
			                } else {
			                    str += 'style="width: 100%;" ';
			                }
			                str += 'onmouseover="setUnderMenuPointColor(' + i + ', \'darkGreenSelectedColor\'); this.className = \'cellDropdownOverUdenPil topMenuBorder\'" ';
			                str += 'onmouseout="setUnderMenuPointColor(' + i + ', \'lightGreenColor\'); this.className = \'cellDropdownUdenPil topMenuBorder\'" >';
			                str += arrayMenuItems[i].tekst;
			                str += '</td>\n';
                			
			                str += '<td id="TopRight2TD' + i + '" class="lightGreenColor" style="vertical-align: top;"><div id="TopRight2Div' + i + '" class="lightGreenTopRightDiv"></div></td>\n';
			            str += '</tr>\n';
            			
			            str += '<tr>\n'
			                str += '<td id="BottomLeft2TD' + i + '" class="lightGreenColor hideTag" style="vertical-align: bottom;"><div id="BottomLeft2Div' + i + '" class="lightGreenBottomLeftDiv"></div></td>\n';
			                str += '<td id="BottomRight2TD' + i + '" class="lightGreenColor hideTag" style="vertical-align: bottom;"><div id="BottomRight2Div' + i + '" class="lightGreenBottomRightDiv"></div></td>\n';
			            str += '</tr>\n'
	        			if( i != (arrayMenuItems.length -1) )
				            str += '<tr class="topMenuSpace hideTag"><td></td></tr>\n';
		            }
		            str += '</table>\n';
		        str += '</div>\n';
		        
		        str += '</td><td class="darkGreenColor hideTag"></td>';
	        str += '</tr>';
	        
	        str += '<tr class="hideTag">';
	            str += '<td class="roundBoxBottomLeft"></td><td class="darkGreenColor"></td><td class="roundBoxBottomRight"></td>';
	        str += '</tr>';
	    str += '</table>';
		        
	}
	document.getElementById("top2holder").innerHTML = str;

	//iframeløsning
	if(str!="") {
		str3 = "";
		if(i==0) str3 += '<img src="/images/blank.gif" width="1" height="1" alt=""/><br />\n';
		    str3 += '<div style="position:absolute; left:0px; top:1px; z-index:10;">';
		if((navigator.appVersion.indexOf("MSIE") !=-1) && (navigator.userAgent.indexOf("Opera")==-1) && (navigator.appVersion.indexOf("Mac")==-1))  {
			str3 +='<iframe name="Menuframe2_1" title="menuframe2_1" longdesc="http://www.um.dk/da/servicemenu/Sitemap/" width="184" height="'+Table5.clientHeight+'" style="left:0px; position:absolute; top:0px" src="about:blank" frameBorder="0" scrolling="no"></iframe>';
		}
		str3 +='</div>';
	} else {
		str3 = "";
	}
	document.getElementById("top2holderB").innerHTML = str3;
    }
   catch(err)
  {
  txt="There was an error on this page.\n\n"
  txt+="Error description: " + err.description + "\n\n"
  txt+="Click OK to continue.\n\n"
  //alert(txt)
  }
}

// User Survey - START
function popupUserneedsClose()
{
	document.getElementById("enalyzer").style.display = "none";
}
// User Survey -  END


/*
// REMOVED all these arrays. Are they used???
// MAST (2010-02-10).
var top0_items=new Array();

top0_items[0]=new menuItem("Aviser og nyhedsservice","/C6/Aviser og nyhedsservice/default.aspx",true);

var top0_0_items=new Array();
top0_0_items[0]=new menuItem("Abonnement - Opret personligt nyhedsabonnement","/C7/Personlig nyhedsservice/default.aspx");
top0_0_items[1]=new menuItem("Alle medier listet - Internat. og nationale nyhedstjenester","/C9/Internat og nationale nyhedetj/default.aspx");
top0_0_items[2]=new menuItem("Børsen i minivindue","/C11/Børsen/default.aspx");
top0_0_items[3]=new menuItem("EU nyheder","/C8/EU nyheder/default.aspx");
top0_0_items[4]=new menuItem("Infomedia","/C10/Infomedia/default.aspx");
top0_0_items[5]=new menuItem("Lorem ipsum dolor","/C10/Infomedia/default.aspx");
top0_0_items[6]=new menuItem("Sit amet sum","/C10/Infomedia/default.aspx");
top0_0_items[7]=new menuItem("Udenrigsforhold","/C10/Infomedia/default.aspx");
top0_0_items[8]=new menuItem("Skat og moms","/C10/Infomedia/default.aspx");
top0_0_items[9]=new menuItem("Lidt af hvert","/C10/Infomedia/default.aspx");
top0_0_items[10]=new menuItem("En hel masse andet","/C10/Infomedia/default.aspx");

top0_items[1]=new menuItem("Internt nyt","/Internt nyt/default.aspx",true);

var top0_1_items=new Array();
top0_1_items[0]=new menuItem("Abonnement - Opret personligt nyhedsabonnement","/C7/Personlig nyhedsservice/default.aspx");
top0_1_items[1]=new menuItem("Alle medier listet - Internat. og nationale nyhedstjenester","/C9/Internat og nationale nyhedetj/default.aspx");
top0_1_items[2]=new menuItem("Børsen i minivindue","/C11/Børsen/default.aspx");
top0_1_items[3]=new menuItem("EU nyheder","/C8/EU nyheder/default.aspx");
top0_1_items[4]=new menuItem("Infomedia","/C10/Infomedia/default.aspx");
top0_1_items[5]=new menuItem("Lorem ipsum dolor","/C10/Infomedia/default.aspx");
top0_1_items[6]=new menuItem("Sit amet sum","/C10/Infomedia/default.aspx");
top0_1_items[7]=new menuItem("Udenrigsforhold","/C10/Infomedia/default.aspx");
top0_1_items[8]=new menuItem("Skat og moms","/C10/Infomedia/default.aspx");
top0_1_items[9]=new menuItem("Lidt af hvert","/C10/Infomedia/default.aspx");
top0_1_items[10]=new menuItem("En hel masse andet","/C10/Infomedia/default.aspx");

top0_items[2]=new menuItem("Driftinformation (IT)","/C7/Driftinformation (IT)/default.aspx",true);

var top0_2_items=new Array();
top0_2_items[0]=new menuItem("Abonnement - Opret personligt nyhedsabonnement","/C7/Personlig nyhedsservice/default.aspx");
top0_2_items[1]=new menuItem("Alle medier listet - Internat. og nationale nyhedstjenester","/C9/Internat og nationale nyhedetj/default.aspx");
top0_2_items[2]=new menuItem("Børsen i minivindue","/C11/Børsen/default.aspx");
top0_2_items[3]=new menuItem("EU nyheder","/C8/EU nyheder/default.aspx");
top0_2_items[4]=new menuItem("Infomedia","/C10/Infomedia/default.aspx");
top0_2_items[5]=new menuItem("Lorem ipsum dolor","/C10/Infomedia/default.aspx");
top0_2_items[6]=new menuItem("Sit amet sum","/C10/Infomedia/default.aspx");
top0_2_items[7]=new menuItem("Udenrigsforhold","/C10/Infomedia/default.aspx");
top0_2_items[8]=new menuItem("Skat og moms","/C10/Infomedia/default.aspx");
top0_2_items[9]=new menuItem("Lidt af hvert","/C10/Infomedia/default.aspx");
top0_2_items[10]=new menuItem("En hel masse andet","/C10/Infomedia/default.aspx");

top0_items[3]=new menuItem("Internationale nyhedsmedier om Udenrigspolitik","/C14/C8/Thomsons nyhedsservice/default.aspx",true);

var top0_3_items=new Array();
top0_3_items[0]=new menuItem("Abonnement - Opret personligt nyhedsabonnement","/C7/Personlig nyhedsservice/default.aspx");
top0_3_items[1]=new menuItem("Alle medier listet - Internat. og nationale nyhedstjenester","/C9/Internat og nationale nyhedetj/default.aspx");
top0_3_items[2]=new menuItem("Børsen i minivindue","/C11/Børsen/default.aspx");
top0_3_items[3]=new menuItem("EU nyheder","/C8/EU nyheder/default.aspx");
top0_3_items[4]=new menuItem("Infomedia","/C10/Infomedia/default.aspx");
top0_3_items[5]=new menuItem("Lorem ipsum dolor","/C10/Infomedia/default.aspx");
top0_3_items[6]=new menuItem("Sit amet sum","/C10/Infomedia/default.aspx");
top0_3_items[7]=new menuItem("Udenrigsforhold","/C10/Infomedia/default.aspx");
top0_3_items[8]=new menuItem("Skat og moms","/C10/Infomedia/default.aspx");
top0_3_items[9]=new menuItem("Lidt af hvert","/C10/Infomedia/default.aspx");
top0_3_items[10]=new menuItem("En hel masse andet","/C10/Infomedia/default.aspx");

top0_items[4]=new menuItem("Nyt fra ...","/C8/Nyt fra/default.aspx",true);

var top0_4_items=new Array();
top0_4_items[0]=new menuItem("Abonnement - Opret personligt nyhedsabonnement","/C7/Personlig nyhedsservice/default.aspx");
top0_4_items[1]=new menuItem("Alle medier listet - Internat. og nationale nyhedstjenester","/C9/Internat og nationale nyhedetj/default.aspx");
top0_4_items[2]=new menuItem("Børsen i minivindue","/C11/Børsen/default.aspx");
top0_4_items[3]=new menuItem("EU nyheder","/C8/EU nyheder/default.aspx");
top0_4_items[4]=new menuItem("Infomedia","/C10/Infomedia/default.aspx");
top0_4_items[5]=new menuItem("Lorem ipsum dolor","/C10/Infomedia/default.aspx");
top0_4_items[6]=new menuItem("Sit amet sum","/C10/Infomedia/default.aspx");
top0_4_items[7]=new menuItem("Udenrigsforhold","/C10/Infomedia/default.aspx");
top0_4_items[8]=new menuItem("Skat og moms","/C10/Infomedia/default.aspx");
top0_4_items[9]=new menuItem("Lidt af hvert","/C10/Infomedia/default.aspx");
top0_4_items[10]=new menuItem("En hel masse andet","/C10/Infomedia/default.aspx");
*/

// -------------------------------- Left menu functions (TNI) -----------------------------------
var selectedMenuPointItemIndex = "-1";
var currentSelectedMenuPointItemIndex = "-1";
var borderList = new Array();
var useGreenStyles = "no";
var lock = false;

function setLeftMenuPointSelected(elmIndex, menuPointType) {
    if(!lock) {
        if(useGreenStyles == "yes") {
            if(menuPlace == 'venstre') {
                if(document.getElementById("LeftMenuTopLeftDiv" + menuPointType + elmIndex) != null) {
                    lastSelectedMenuPoint = elmIndex;
                    if(menuPointType == "2") {
                        currentSelectedMenuPointItemIndex = elmIndex;
                    }
                    
                    pviiClassNew("LeftMenuTopLeftDiv" + menuPointType + elmIndex, 'darkGreenTopLeftDiv');
                    pviiClassNew("LeftMenuTopRightDiv" + menuPointType + elmIndex, 'darkGreenTopRightDiv');
                    pviiClassNew("LeftMenuBottomLeftDiv" + menuPointType + elmIndex, 'darkGreenBottomLeftDiv');
                    pviiClassNew("LeftMenuBottomRightDiv" + menuPointType + elmIndex, 'darkGreenBottomRightDiv');
                    
                    document.getElementById("LeftMenuTopLeftTD" + menuPointType + elmIndex).style.backgroundColor = "#4D6000";
                    document.getElementById("LeftMenuTopRightTD" + menuPointType + elmIndex).style.backgroundColor = "#4D6000";
                    document.getElementById("LeftMenuBottomLeftTD" + menuPointType + elmIndex).style.backgroundColor = "#4D6000";
                    document.getElementById("LeftMenuBottomRightTD" + menuPointType + elmIndex).style.backgroundColor = "#4D6000";
                    
                    if(document.getElementById("trBackground" + menuPointType + elmIndex) != null) {
                        document.getElementById("trBackground" + menuPointType + elmIndex).style.backgroundColor = "#4D6000";
                    }
                    
                    if(document.getElementById("linkControl" + menuPointType + elmIndex) != null) {
                        document.getElementById("linkControl" + menuPointType + elmIndex).style.color = "White";
                    }
                    
                    if(document.getElementById("menuPoint" + menuPointType + elmIndex) != null) {
                        document.getElementById("menuPoint" + menuPointType + elmIndex).style.backgroundColor = "#4D6000";
                    }
                    
                    if(document.getElementById("border" + menuPointType + elmIndex) != null) {
                        document.getElementById("border" + menuPointType + elmIndex).className = 'niv3 darkGreenBorderColor';
                    }
                    
                    if(borderList[elmIndex] != null) {
                        document.getElementById(borderList[elmIndex]).className = 'darkGreenBorderColor';
                    }
                }
            }
        }
    }
}


function setLeftMenuPointDeSelected(elmIndex, menuPointType) {
    if(!lock) {
        if(useGreenStyles == "yes") {
            if(menuPlace == 'venstre') {
                if(document.getElementById("LeftMenuTopLeftDiv" + menuPointType + elmIndex) != null) {
                    pviiClassNew("LeftMenuTopLeftDiv" + menuPointType + elmIndex, 'lightGreenTopLeftDiv');
                    pviiClassNew("LeftMenuTopRightDiv" + menuPointType + elmIndex, 'lightGreenTopRightDiv');
                    pviiClassNew("LeftMenuBottomLeftDiv" + menuPointType + elmIndex, 'lightGreenBottomLeftDiv');
                    pviiClassNew("LeftMenuBottomRightDiv" + menuPointType + elmIndex, 'lightGreenBottomRightDiv');
                    
                    document.getElementById("LeftMenuTopLeftTD" + menuPointType + elmIndex).style.backgroundColor = "#B3C94D";
                    document.getElementById("LeftMenuTopRightTD" + menuPointType + elmIndex).style.backgroundColor = "#B3C94D";
                    document.getElementById("LeftMenuBottomLeftTD" + menuPointType + elmIndex).style.backgroundColor = "#B3C94D";
                    document.getElementById("LeftMenuBottomRightTD" + menuPointType + elmIndex).style.backgroundColor = "#B3C94D";
                    
                    if(document.getElementById("trBackground" + menuPointType + elmIndex) != null) {
                        document.getElementById("trBackground" + menuPointType + elmIndex).style.backgroundColor = "#B3C94D";
                    }
                    
                    if(document.getElementById("linkControl" + menuPointType + elmIndex) != null) {
                        document.getElementById("linkControl" + menuPointType + elmIndex).style.color = "#323232";
                    }
                    
                    if(document.getElementById("menuPoint" + menuPointType + elmIndex) != null) {
                        document.getElementById("menuPoint" + menuPointType + elmIndex).style.backgroundColor = "#B3C94D";
                    }
                    
                    if(document.getElementById("border" + menuPointType + elmIndex) != null) {
                        document.getElementById("border" + menuPointType + elmIndex).className = 'niv3 lightGreenBorderColor';
                    }
                    
                    if(borderList[elmIndex] != null) {
                        document.getElementById(borderList[elmIndex]).className = 'lightGreenBorderColor';
                    }
                }
            }
        }
    }
}

function isleftTopMenu() {
    menuPlace = 'venstre';
}
