var bookmarkurl="http://www.ulandshjaelp.dk"
var bookmarktitle="Projekt U-landshjælp til Selvhjælp"
function addbookmark(){
if (document.all)
	window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

function openWin(picUrl)
{
  width = 550;
  height = 500;
  var left = (screen.width-width)/2;
  var top = (screen.height-height)/2;
//  window.open(url,"Vis billede","left="+left+",top="+top+",screenX="+left+",screenY="+top+",width="+width+",height="+height+",scrollbars=no,resizable=no");
  window.open("forstor.asp","Vis billede","scrollbars=no,resizable=no");
}

function PopWidnow(url_pop) {
	var PopWidth = 500;
  var PopHeight = 400;
  var PopLeft = (window.screen.width-PopWidth)/2;
	var PopTop = (window.screen.height-PopHeight)/2;
    
  status = window.open(url_pop,'Billede','toolbar=no,status=no,menubar=no,location=no,directories=no,resizable=no,scrollbars=yes,width='+PopWidth+',height='+PopHeight+',top='+PopTop+',left='+PopLeft);
}

function toggleDisplay(id) {
	if(document.all[id].style.display == "none") {
		document.all[id].style.display = "";
		dispValue = 1;
	}
	else {
		document.all[id].style.display = "none";
		dispValue = 0;
	}
	setCookie(id, dispValue,"","");
//	SetMenuCookie(id, dispValue);
}

/**********************************************************************
 * Menu Cookie Functions
 **********************************************************************/ 

function getCookieValue(cookieName) {
// var cookieValue = document.cookie;
 var cookieValue = '';
 var cookieStartsAt = cookieValue.indexOf(" " + cookieName + "=");
 
 if (cookieStartsAt == -1) {
  cookieStartsAt = cookieValue.indexOf(cookieName +"="); 
 }

 if (cookieStartsAt == -1) {
  cookieValue = null;
 }
 else {
  cookieStartsAt = cookieValue.indexOf("=", cookieStartsAt) +1;
  var cookieEndsAt = cookieValue.indexOf(";",cookieStartsAt);
  if (cookieEndsAt == -1) {
   cookieEndsAt = cookieValue.length;
  }
  cookieValue = unescape(cookieValue.substring(cookieStartsAt,cookieEndsAt));
 }
 return cookieValue;
}


function setCookie(cookieName, cookieValue, cookiePath, cookieExpires) {
 cookieValue = escape(cookieValue);
 
 if (cookieExpires =="") {
  var nowDate = new Date();
  nowDate.setMonth(nowDate.getMonth()-12);
  cookieExpires = nowDate.toGMTString();
 }
 
 if (cookiePath!="") {
  cookiePath =";Path=" +cookiePath;
 }
 document.cookie = cookieName +"=" + cookieValue +"; expires=" + cookieExpires +cookiePath;
}
