function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_changeProp(objName,x,theProp,theValue) { //v6.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
    if (theValue == true || theValue == false)
      eval("obj."+theProp+"="+theValue);
    else eval("obj."+theProp+"='"+theValue+"'");
  }
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function changetab(tabsoff, tabson) {
	var tabsoffarray = new Array();
	tabsoffarray = tabsoff.split('|');
	for (i=0; i < tabsoffarray.length; i++) {
		MM_changeProp(tabsoffarray[i],'','style.display','none','DIV')	
		MM_changeProp('tab_' + tabsoffarray[i],'','style.background','url(/grafik/Flash/tabs/' + tabsoffarray[i] + '.gif)','DIV')
	}
	MM_changeProp(tabson,'','style.display','block','DIV')
	MM_changeProp('tab_' + tabson,'','style.background','url(/grafik/Flash/tabs/' + tabson + '_current.gif)','DIV')
}

function changetabtxt(tabsoff, tabson) {
	var tabsoffarray = new Array();
	tabsoffarray = tabsoff.split('|');
	for (i=0; i < tabsoffarray.length; i++) {
		MM_changeProp(tabsoffarray[i],'','style.display','none','DIV')	
		MM_changeProp('tab_' + tabsoffarray[i],'','style.color','#f9a600','DIV')
		MM_changeProp('tab_' + tabsoffarray[i],'','style.background','#434135','DIV')
	}
	MM_changeProp(tabson,'','style.display','block','DIV')
	MM_changeProp('tab_' + tabson,'','style.background','transparent','DIV')
	MM_changeProp('tab_' + tabson,'','style.color','#000','DIV')
}

function changetabtxt2(tabsoff, tabson) {
	var tabsoffarray = new Array();
	tabsoffarray = tabsoff.split('|');
	for (i=0; i < tabsoffarray.length; i++) {
		MM_changeProp(tabsoffarray[i],'','style.display','none','DIV')	
		MM_changeProp('tab_' + tabsoffarray[i],'','style.background','url(/grafik/ver2/main-nav-hoz-holdet-bg.jpg)','DIV')
		MM_changeProp('tab_' + tabsoffarray[i],'','style.color','#ffffff','DIV')
	}
	MM_changeProp(tabson,'','style.display','block','DIV')
	MM_changeProp('tab_' + tabson,'','style.background','transparent','DIV')
	MM_changeProp('tab_' + tabson,'','style.color','#000','DIV')
}

function execonload() {
	var sourcehtml = document.getElementById('sourcemenubanners').innerHTML;
	document.getElementById('destmenubanners').innerHTML = sourcehtml;
}

function side6confirm() {
	if (confirm("Denne hjemmeside indeholder billeder og materiale, som kan virke stødende. Ønsker du at fortsætte?") == true)
	window.open("http://side6.dk/");
}


function createAjaxObj(){
	var httprequest=false
	if (window.XMLHttpRequest) {
		httprequest=new XMLHttpRequest()
	if (httprequest.overrideMimeType)
		httprequest.overrideMimeType('text/xml')
	}
	else if (window.ActiveXObject) {
	try {
		httprequest=new ActiveXObject("Msxml2.XMLHTTP");
	} 
	catch (e) {
	try {
		httprequest=new ActiveXObject("Microsoft.XMLHTTP");
	}
	catch (e){}
	}
	}
	return httprequest
}

var ajaxpack=new Object()
ajaxpack.basedomain="http://"+window.location.hostname
ajaxpack.ajaxobj=createAjaxObj()
ajaxpack.filetype="txt"
ajaxpack.addrandomnumber=0 //Set to 1 or 0. See documentation.

ajaxpack.getAjaxRequest=function(url, parameters, callbackfunc, filetype){
ajaxpack.ajaxobj=createAjaxObj() //recreate ajax object to defeat cache problem in IE
if (ajaxpack.addrandomnumber==1) //Further defeat caching problem in IE?
var parameters=parameters+"&ajaxcachebust="+new Date().getTime()
if (this.ajaxobj){
this.filetype=filetype
this.ajaxobj.onreadystatechange=callbackfunc
this.ajaxobj.open('GET', url+"?"+parameters, true)
this.ajaxobj.send(null)
}
}

ajaxpack.postAjaxRequest=function(url, parameters, callbackfunc, filetype){
ajaxpack.ajaxobj=createAjaxObj() //recreate ajax object to defeat cache problem in IE
if (this.ajaxobj){
this.filetype=filetype
this.ajaxobj.onreadystatechange = processGetPost;
this.ajaxobj.open('POST', url, true);
this.ajaxobj.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
this.ajaxobj.setRequestHeader("Content-length", parameters.length);
this.ajaxobj.setRequestHeader("Connection", "close");
this.ajaxobj.send(parameters);
}
}

function processGetPost(divobj) {
	var myajax=ajaxpack.ajaxobj
	alert(myajax.readyState);
	var myfiletype=ajaxpack.filetype
	if (myajax.readyState == 4) {
		if (myajax.status==200) {
			//document.getElementById(divobj).innerHTML = myajax.responseText;
		}
	}
}
















// Old scripts


function PopWin(url,h,w) {
	h = 620;
	w = 900;
	leftPos = 50;
	topPos = 50;
	popupWin = window.open(url, 'ebpop', 'height=' + h + ',width=' + w + ',top=' + topPos + ',left=' + leftPos + '')
}

function PopWinOld(url,h,w) {
	var ww = 620;
	wh = 900;
	leftPos = null;
	topPos = null;
	IE=(document.all)?true:false;
	var wh = (IE)?document.body.clientHeight : window.innerHeight;
	var ww = (IE)?document.body.clientWidth : window.innerWidth;
	if (top.screen){
		if (screen.width){
			leftPos = Math.round((ww-w-10)/2);
			topPos = Math.round((wh-h-29)/2);
		} else {
			leftPos = 50;
			topPos = 50;
		}
	}
	popupWin = window.open(url, 'Ekstrabladet', 'height=' + h + ',width=' + w + ',top=' + topPos + ',left=' + leftPos + '')
}




	function popV2(theURL,winName,features) { //v2.0
	window.open(theURL,winName,features);
	}

      function popUp(urlen) {
        NewWindow=window.open(urlen, 'popUpWindow', 'resizeable=no,width=476,height=420,scrollbars=no,toolbar=no,location=no,menubar=no,status=no')
      }
      function pop(theURL,winName,features) {
        window.open(theURL,winName,features);
      }

      function popUp2(urlen, width, height, name) {
        window.open(urlen, name, 'resizeable=no,width='+width+',height='+height+',scrollbars=yes,toolbar=no,location=no,menubar=no,status=no')
      }

      var newwin;
      function launchwin(winurl,winname,winfeatures) {
        newwin = window.open(winurl,winname,winfeatures);
        if(javascript_version> 1.0) setTimeout('newwin.focus();',250);
      }
      function etdkebpop() {
        newwin = window.open("http://www.easytraffic.com/etdk-eb/", "etdkebpop", "height=600,width=425,channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=0,scrollbars=0,zlock=1,status=0,toolbar=0");
      }
