<!-- Begin
// You're welcome to use/copy any code, if you credit the copyright owners: (c) Postulat i/s 2001.

var bgTablePart1 = '<table cellpadding="0" cellspacing="0" border="0" width="139"><tr valign="top"><td width="18"><a href="javascript:switchBackground(1)" onFocus="this.blur();"><img name="knap_bgr_1" src="images/bgr_1.gif" width=18 height=20 border=0></a></td><td width="4"><img src="images/knap_bgr_skygge_h.gif" width=4 height=20 border=0 style="filter:alpha(opacity=50)"></td><td width="17"><img src="images/spacer.gif" width=17 height=20 border=0></td><td width="18"><a href="javascript:switchBackground(2)" onFocus="this.blur();"><img name="knap_bgr_2" src="images/bgr_2.gif" width=18 height=20 border=0></a></td><td width="4"><img src="images/knap_bgr_skygge_h.gif" width=4 height=20 border=0 style="filter:alpha(opacity=50)"></td><td width="17"><img src="images/spacer.gif" width=17 height=20 border=0></td><td width="18"><a href="javascript:switchBackground(3)" onFocus="this.blur();"><img name="knap_bgr_3" src="images/bgr_3.gif" width=18 height=20 border=0></a></td><td width="4"><img src="images/knap_bgr_skygge_h.gif" width=4 height=20 border=0 style="filter:alpha(opacity=50)"></td><td width="17"><img src="images/spacer.gif" width=17 height=20 border=0></td><td width="18"><a href="javascript:switchBackground(4)" onFocus="this.blur();"><img name="knap_bgr_4" src="images/bgr_4.gif" width=18 height=20 border=0></a></td><td width="4"><img src="images/knap_bgr_skygge_h.gif" width=4 height=20 border=0 style="filter:alpha(opacity=50)"></td></tr>';
var bgTablePart2 = '<tr valign="top"><td width="22" colspan="2"><img src="images/knap_bgr_skygge_b.gif" width=22 height=4 border=0 style="filter:alpha(opacity=50)"></td><td width="17"><img src="images/spacer.gif" width=17 height=20 border=0></td><td width="22" colspan="2"><img src="images/knap_bgr_skygge_b.gif" width=22 height=4 border=0 style="filter:alpha(opacity=50)"></td><td width="17"><img src="images/spacer.gif" width=17 height=20 border=0></td><td width="22" colspan="2"><img src="images/knap_bgr_skygge_b.gif" width=22 height=4 border=0 style="filter:alpha(opacity=50)"></td><td width="17"><img src="images/spacer.gif" width=17 height=20 border=0></td><td width="22" colspan="2"><img src="images/knap_bgr_skygge_b.gif" width=22 height=4 border=0 style="filter:alpha(opacity=50)"></td></tr></table>';
var txtTablePart1 = '<table cellpadding="0" cellspacing="0" border="0" width="100"><tr valign="top"><td width="18"><a href="javascript:setFaceSmaller()" onFocus="this.blur();"><img name="knap_tekst_S" src="images/knap_tekst_S_n.gif" width=18 height=20 border=0></a></td><td width="4"><img src="images/knap_bgr_skygge_h.gif" width=4 height=20 border=0 style="filter:alpha(opacity=50)"></td><td width="17"><img src="images/spacer.gif" width=17 height=20 border=0></td><td width="18"><a href="javascript:resetFace()" onFocus="this.blur();"><img name="knap_tekst" src="images/knap_tekst_d.gif" width=18 height=20 border=0></a></td><td width="4"><img src="images/knap_bgr_skygge_h.gif" width=4 height=20 border=0 style="filter:alpha(opacity=50)"></td><td width="17"><img src="images/spacer.gif" width=17 height=20 border=0></td><td width="18"><a href="javascript:setFaceLarger()" onFocus="this.blur();"><img name="knap_tekst_L" src="images/knap_tekst_L_n.gif" width=18 height=20 border=0></a></td><td width="4"><img src="images/knap_bgr_skygge_h.gif" width=4 height=20 border=0 style="filter:alpha(opacity=50)"></td></tr>';
var txtTablePart2 = '<tr valign="top"><td width="22" colspan="2"><img src="images/knap_bgr_skygge_b.gif" width=22 height=4 border=0 style="filter:alpha(opacity=50)"></td><td width="17"><img src="images/spacer.gif" width=17 height=20 border=0></td><td width="22" colspan="2"><img src="images/knap_bgr_skygge_b.gif" width=22 height=4 border=0 style="filter:alpha(opacity=50)"></td><td width="17"><img src="images/spacer.gif" width=17 height=20 border=0></td><td width="22" colspan="2"><img src="images/knap_bgr_skygge_b.gif" width=22 height=4 border=0 style="filter:alpha(opacity=50)"></td></tr></table>';
var btmSpacer = '<img src="images/spacer.gif" width=304 height=16 border=0>'


function adjustScrolling() {
	var screenHeight = screen.height;
	var screenWidth = screen.width;
	// 640 x 480
	if (screenHeight < 600) {self.moveTo(0,0); self.resizeTo(screenWidth,screenHeight)};
	// 1024 x 768 og derover
	if (screenHeight >= 768) {document.body.scroll='no'};
}

// ''''''''''''''''''''' Her begynder baggrunds handlers '''''''''''''''''''''''''''
var fadeDuration = 2;

var bgrPic = new Array();
bgrPic[0] = new Image(); bgrPic[0].src = "images/bgr_0.gif";
bgrPic[1] = new Image(); bgrPic[1].src = "images/bgr_1.gif";
bgrPic[2] = new Image(); bgrPic[2].src = "images/bgr_2.gif";
bgrPic[3] = new Image(); bgrPic[3].src = "images/bgr_3.gif";
bgrPic[4] = new Image(); bgrPic[4].src = "images/bgr_4.gif";


// Foelgende variabler gemmer oplysninger om, hvilke billeder der ligger hvor.
var knapSrc = new Array();
// 0 er den aktive bgr, 1,2,3,4 er knap nummer 1,2,3,4
knapSrc[0] = bgrPic[0].src;
knapSrc[1] = bgrPic[1].src;
knapSrc[2] = bgrPic[2].src;
knapSrc[3] = bgrPic[3].src;
knapSrc[4] = bgrPic[4].src;

// Bare en liste over knappernes navne.
var knap = new Array();
knap[0] = "";
knap[1] = "knap_bgr_1";
knap[2] = "knap_bgr_2";
knap[3] = "knap_bgr_3";
knap[4] = "knap_bgr_4";

function switchBackground(no){
	if (document.body){
		var newCol, oldCol, imgName;
		imgName = knap[no];
		newCol = knapSrc[no];
		oldCol = knapSrc[0];
		if (document.all) {
			document.body.style.filter="blendTrans(duration=fadeDuration)";
			document.body.filters.blendTrans.Apply();
			}
		document.images[imgName].src = oldCol;
		if (document.all) {
			document.body.filters.blendTrans.Play();
			}
		document.body.background = newCol;
		knapSrc[no] = oldCol;
		knapSrc[0] = newCol;
	}
}

function simpleSwitchBackground(no){
		var newCol, oldCol, imgName;
		imgName = knap[no];
		newCol = knapSrc[no];
		oldCol = knapSrc[0];
		document.images[imgName].src = oldCol;
		document.body.background = newCol;
		knapSrc[no] = oldCol;
		knapSrc[0] = newCol;
}


function saveBackground() {
	if (document.body){
		var currColor = knapSrc[0];
		currColor = currColor.charAt(currColor.length-5);
		
		var today = new Date();
		var expires = new Date();
		expires.setTime(today.getTime() + 100*60*60*24*365);
		setCookie("UserColor", currColor, expires);	
	}
}

function loadBackground() {
	if (document.body){
		var prevColor = getCookie("UserColor")
		if (prevColor != null & prevColor != 0) {
		simpleSwitchBackground(prevColor);
		}
	}
}

// ''''''''''''''''''''' Her begynder font-size handlers '''''''''''''''''''''''''''
var origFontSize = 11;
// Husk at origFontSize skal laves i flere browser-versioner, skulle den oenskede class have forskellige stoerrelser.
var fontSize = 11;
var maxFontSize = 13;
var minFontSize = 9;

function resetFace() {
	on('knap_tekst_L');
	on('knap_tekst_S');
	off('knap_tekst');
	fontSize = origFontSize;
	tekstfelt = document.getElementById("artikelText");
	tekstfelt.style.fontSize = fontSize+"px";
	}

function setFaceLarger() {
	if (fontSize < maxFontSize) {
		fontSize++;
		on('knap_tekst_S');
		if (fontSize >= maxFontSize) { off('knap_tekst_L');}
		else { on('knap_tekst_L');}
		if (fontSize == origFontSize) {	off('knap_tekst');}
		else {on('knap_tekst');}
	}
	else {
		on('knap_tekst_S');
		on('knap_tekst');
		off('knap_tekst_L');
	}
	tekstfelt = document.getElementById("artikelText")
	tekstfelt.style.fontSize = fontSize+"px";
}

function setFaceSmaller() {
	if (fontSize > minFontSize) {
		fontSize--;
		on('knap_tekst_L');
		if (fontSize <= minFontSize) { off('knap_tekst_S');}
		else { on('knap_tekst_S');}
		if (fontSize == origFontSize) {	off('knap_tekst');}
		else {on('knap_tekst');}
	}
	else {
		on('knap_tekst_L');
		on('knap_tekst');
		off('knap_tekst_S');
	}
	tekstfelt = document.getElementById("artikelText")
	tekstfelt.style.fontSize = fontSize+"px";
}


//  End -->
