function openCentered(theURL,winName,winWidth,winHeight,features) {
      var w = (screen.width - winWidth)/2;
      var h = (screen.height - winHeight)/2 - 60;
      features = features+',width='+winWidth+',height='+winHeight+',top='+h+',left='+w;
      window.open(theURL,winName,features);
}

function pops(x) {
      if(popLogi[x]) {
            popHTML = '<html>';
            popHTML += '<head>';
            popHTML += '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';
            popHTML += '<title>' + popLogi[x].title + '</title>';
            popHTML += '<script type="text/javascript" src="/js/scripts.js"></script>';
            popHTML += '<style>';
            popHTML += 'body{margin:0px; overflow:auto}';
            popHTML += '</style>';
            popHTML += '</head>';
            popHTML += '<body>';
            if(popLogi[x].map) {
                  popHTML += '<img src="' + popLogi[x].bilde + '" border="0" usemap="#m">';
                  popHTML += '<map name="m">';
                  popHTML += popLogi[x].map;
                  popHTML += '</map>';
            } else {
                  popHTML += '<a href="javascript:window.close();"><img src="' + popLogi[x].bilde + '" border="0"></a>';
            }
            popHTML += '</body>';
            popHTML += '</html>';

            var popLogs=window.open('','POP','width=' + popLogi[x].platums + ',height=' + popLogi[x].augstums + ', scrollbars=1');
            popLogs.document.write(popHTML);
            popLogs.focus();
      }
}


