/* Browsertest */

var isDOM = false;

ua = navigator.userAgent.toLowerCase();

isMSIE = ua.indexOf('msie') != -1;
isOpera = ua.indexOf('opera') != -1;
isGecko = ua.indexOf('gecko') != -1;

((document.getElementById) && (isMSIE || isGecko) && (!isOpera)) ? isDOM = true : isDOM = false;

/* Test for navigation mv */

function init() {
  if (isDOM) {
    if (top == self) {
      path=document.location.pathname;
      top.location.href = '/dynindex.html?' + path;
    }
    document.body.style.background = 'fixed #FFFFFF url(/imgs/liljer.jpg) 370px 0px repeat-y'
    if (document.getElementById('idSitemap')){document.getElementById('idSitemap').style.visibility = 'hidden'};
  }
}

function initNoPic() {
  if (isDOM) {
    if (top == self) {
      path=document.location.pathname;
      top.location.href = '/dynindex.html?' + path;
    }
    if (document.getElementById('idSitemap')){document.getElementById('idSitemap').style.visibility = 'hidden'};
  }
}

function winOpen(pic, name, title, width, height) {
  var winW = width + 60;
  var winH = height + 80;
  var textTop = height+10;
  newWin = window.open( '', name, 'width=' + winW + ', height=' + winH);
  var s = '<html><title>'+ title + '</title><body bgcolor="#FFFFFF">';
  s = s + '<div style="position: absolute; left: 35; top: 35; width: ' + width + ';">';
  s = s + '<img src="' + pic + '">';
  s = s + '<div style="position: absolute; left: 0; top: ' + textTop + '; width: ' +  width + '; text-align: center; font-size: 11px;">'
  s = s + '<a href= "javascript:window.close()"><b>Luk dette vindue</b></a>';
  s = s + '</div></div></body></html>';
  newWin.document.write(s)
}


