/*var nWin
function nWindow(n,w,h,t,s,r){
  if (nWin) {nWin.close();}
  str="Toolbar="+t+",resizable="+r+",scrollbars="+s+",height="+h+",width="+w;
  if(parseInt(navigator.appVersion)>3)
  str+=",left="+(screen.width -w)/2+",top="+parseInt((screen.height -h)/3);
  nWin = window.open(n,'popup',str)
  nWin.focus();
}
*/

function do_login(reason){
alert('Du skal være logget ind'+reason)
}

var nWin
function nWindow(n,w,h,t,s,r){
  if (nWin) {nWin.close();}
  str="Toolbar="+t+",resizable="+r+",scrollbars="+s+",height="+h+",width="+w;
  if(parseInt(navigator.appVersion)>3)
  str+=",left="+(screen.width -w)/2+",top="+parseInt((screen.height -h)/3);
  //nWin = window.open(n,'popup',str)
  nWin = window.open(n,'popup','width='+ w +',height='+ h +',toolbars='+ t +',scrollbars='+ s +',left=10,top=10')
  nWin.focus();
}

function printSiden() {
	if (null!=window.print) {
		window.print();
		history.back();
	}
} 

function over(img) {
  img.src="images/arrow_1.gif";
}
function out(img) {
  img.src="images/arrow_0.gif";
}


nereidFadeObjects = new Object();
nereidFadeTimers = new Object();

function nereidFade(object, destOp, rate, delta){
if (!document.all)
return
    if (object != "[object]"){  
        setTimeout("nereidFade("+object+","+destOp+","+rate+","+delta+")",0);
        return;
    }
        
    clearTimeout(nereidFadeTimers[object.sourceIndex]);
    
    diff = destOp-object.filters.alpha.opacity;
    direction = 1;
    if (object.filters.alpha.opacity > destOp){
        direction = -1;
    }
    delta=Math.min(direction*diff,delta);
    object.filters.alpha.opacity+=direction*delta;

    if (object.filters.alpha.opacity != destOp){
        nereidFadeObjects[object.sourceIndex]=object;
        nereidFadeTimers[object.sourceIndex]=setTimeout("nereidFade(nereidFadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);
    }
} 

function expand(objID){
	divObj = document.getElementById("exp"+objID)
	if (divObj.style.display=='none')
	{
	divObj.style.display = 'block';
	//eval("p"+objID).innerHTML = '-'
	}
	else
	{
	divObj.style.display = 'none';
	//eval("p"+objID).innerHTML = '+'
	}
	
} 


function showPic (whichpic) {
 if (document.getElementById) {
  document.getElementById('placeholder')
  .src = whichpic.href;
  if (whichpic.title) {
   document.getElementById('desc')
  .childNodes[0].nodeValue = whichpic.title;
  } else {
   document.getElementById('desc')
  .childNodes[0].nodeValue = whichpic.childNodes[0].nodeValue;
  }
  return false;
 } else {
  return true;
 }
}



//SuckerTree Vertical Menu 1.1 (Nov 8th, 06)
//By Dynamic Drive: http://www.dynamicdrive.com/style/

var menuids=["topmenutree1"] //Enter id(s) of SuckerTree UL menus, separated by commas

function buildsubmenus(){
for (var i=0; i<menuids.length; i++){
  var ultags=document.getElementById(menuids[i]).getElementsByTagName("ul")
    for (var t=0; t<ultags.length; t++){
    ultags[t].parentNode.getElementsByTagName("a")[0].className="subfolderstyle"
		if (ultags[t].parentNode.parentNode.id==menuids[i]) //if this is a first level submenu
			ultags[t].style.left=ultags[t].parentNode.offsetWidth+"px" //dynamically position first level submenus to be width of main menu item
		else //else if this is a sub level submenu (ul)
		  ultags[t].style.left=ultags[t-1].getElementsByTagName("a")[0].offsetWidth+"px" //position menu to the right of menu item that activated it
    ultags[t].parentNode.onmouseover=function(){
    this.getElementsByTagName("ul")[0].style.display="block"
    }
    ultags[t].parentNode.onmouseout=function(){
    this.getElementsByTagName("ul")[0].style.display="none"
    }
    }
		for (var t=ultags.length-1; t>-1; t--){ //loop through all sub menus again, and use "display:none" to hide menus (to prevent possible page scrollbars
		ultags[t].style.visibility="visible"
		ultags[t].style.display="none"
		}
  }
}

if (window.addEventListener)
window.addEventListener("load", buildsubmenus, false)
else if (window.attachEvent)
window.attachEvent("onload", buildsubmenus)

var gAutoPrint = true; 

function printSpecial()
{
	if (document.getElementById != null)
	{
		var html = '<HTML>\n<HEAD>\n';

		if (document.getElementsByTagName != null)
		{
			var headTags = document.getElementsByTagName("head");
			if (headTags.length > 0)
				html += headTags[0].innerHTML;
		}
		
		html += '\n</HE' + 'AD>\n<BODY><table bgcolor="#ffffff"><tr><td>\n';
		
		var printReadyElem = document.getElementById("printArea");
		
		if (printReadyElem != null)
		{
				html += printReadyElem.innerHTML;
		}
		else
		{
			alert("Could not find the print section in the HTML");
			return;
		}
			
		html += '\n</td></tr></table></BO' + 'DY>\n</HT' + 'ML>';
		
		var printWin = window.open("","printSpecial");
		printWin.document.open();
		printWin.document.write(html);
		printWin.document.close();
		if (gAutoPrint)
			printWin.print();
	}
	else
	{
		alert("Sorry, the print feature is only available in modern browsers.");
	}
}