function alertSize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }

var centerfelt = myHeight-144;
var scroll = centerfelt-21;


document.write('<style type="text/css" media="screen">.scroll{height:276px;overflow:auto;}<\/style>')


 }
alertSize();



    
    
function vis(i) {document.getElementById('popup'+i).style.visibility = 'visible';}
function gem(i) {document.getElementById('popup'+i).style.visibility = 'hidden';}
function show(i) {document.getElementById('smarttext'+i).style.display = 'block';}
function hide(i) {document.getElementById('smarttext'+i).style.display = 'none';}





function openbrwindow(theURL,winName,features) {window.open(theURL,winName,features);}






var targBox = "center";

function init() {
	if (document.getElementById) {
		var atags = document.getElementsByTagName("a");
		for (var i=0;i<atags.length;i++) {
			var ca = atags[i];
			if (ca.href.indexOf("#") > -1) {
				ca.onclick = function() {
					scrollDivToAnchor(this.href.split("#")[1]);
				}
			}
		}
	}
}

function scrollDivToAnchor(a) {

	var b = document.getElementById(targBox);
	b.scrollTop = document.getElementById(a).offsetTop - b.offsetTop;
}


if (navigator.userAgent.indexOf("Safari") > -1) {
	window.onload = init;
}



/***********************************************
* Ajax Includes script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

//To include a page, invoke ajaxinclude("afile.htm") in the BODY of page
//Included file MUST be from the same domain as the page displaying it.

var rootdomain="http://"+window.location.hostname

function ajaxinclude(url) {
var page_request = false
if (window.XMLHttpRequest) // if Mozilla, Safari etc
page_request = new XMLHttpRequest()
else if (window.ActiveXObject){ // if IE
try {
page_request = new ActiveXObject("Msxml2.XMLHTTP")
} 
catch (e){
try{
page_request = new ActiveXObject("Microsoft.XMLHTTP")
}
catch (e){}
}
}
else
return false
page_request.open('GET', url, false) //get page synchronously 
page_request.send(null)
writecontent(page_request)
}

function writecontent(page_request){
if (window.location.href.indexOf("http")==-1 || page_request.status==200)
document.write(page_request.responseText)
}

function dato(){
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
var dayarray=new Array("s&oslash;ndag","mandag","tirsdag","onsdag","torsdag","fredag","l&oslash;rdag")
var montharray=new Array("januar","februar","marts","april","maj","juni","juli","august","september","oktober","november","december")
document.write(daym+".&nbsp;"+montharray[month]+"&nbsp;"+year)
}




