function setDisplay() {
  if (document.getElementById("LeftMenu").innerHTML == "") {
    document.getElementById("Content").style.width = "865px";
    document.getElementById("Content").style.display = "inline";
  } else {
    document.getElementById("LeftMenu").style.display = "inline";
    document.getElementById("Content").style.display = "inline";
  }
  var lh=document.getElementById("LeftMenu").offsetHeight;
  var rh=document.getElementById("Content").offsetHeight;
  var nh = Math.max(lh, rh); 
  document.getElementById("LeftMenu").style.height=nh+"px";
  document.getElementById("Content").style.height=nh+"px";
}
function readCookie(name) {
  var results=document.cookie.match('(^|;)?'+name+'=([^;]*)(;|$)');
  if (results) {
    return (unescape(results[2]));
  } else
    return null;
}
function goToDescription() {
  var c=readCookie("descriptionpage");
  if (c==null) {
  	history.go(-1);
  } else {
    window.location=c;
  }
}
function opacity(id, opacStart, opacEnd, millisec) {
    //speed for each frame
    var speed = Math.round(millisec / 100);
    var timer = 0;

    //determine the direction for the blending, if start and end are the same nothing happens
    if(opacStart > opacEnd) {
        for(i = opacStart; i >= opacEnd; i--) {
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
            timer++;
        }
    } else if(opacStart < opacEnd) {
        for(i = opacStart; i <= opacEnd; i++)
            {
            setTimeout("changeOpac(" + i + ",'" + id + "')",(timer * speed));
            timer++;
        }
    }
}

//change the opacity for different browsers
function changeOpac(opacity, id) {
    var object = document.getElementById(id).style;
    object.opacity = (opacity / 100);
    object.MozOpacity = (opacity / 100);
    object.KhtmlOpacity = (opacity / 100);
    object.filter = "alpha(opacity=" + opacity + ")";
}
function openWeather() {
  window.open('http://www.convinceblog.dk/airalpha/phpweather/','','width=340,height=370,scrollbars=yes');
}