/*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";
}


function confvalg(url){
  if(confirm("Vil du slette posten permanent?\n\PS: Der er ingen fortrydelsesret!")){
    location.href = url
  }
}

function confaflys(url){
  if(confirm("Vil du annullere aflysningen?")){
    location.href = url
  }
}

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;
 }
}
