var view = 'docs'; // viewname to documentsvar tabelStart = '<table>\r';var tabelSlut = '</table>\r';var cookieSupport = 'DB_SupportCookies';var cookieSmallScreen = 'DB_SmallScreen';var IE4 = (document.all);var smallScreenMsg = 'Denne hjemmeside er optimeret til en sk\u00E6rmopl\u00F8sning p\u00E5 1024*768. Er din opl\u00F8sning lavere, skal du v\u00E6re opm\u00E6rksom p\u00E5, at du ikke kan se hele sidens bredde.';function alertSmallScreen() {	// if user accepts our cookies, screen is small and cookie DB_SmallScreen is empty then alert user and set cookie	var expSeconds = 60*60*24*7; // 1 week	if(userAcceptsOurCookies()) { // user accepts our cookies		if(loadCookie(document, cookieSmallScreen) == '') { // cookie DB_SmallScreen is empty			if(screen.width<1024) { // screen is small - alert and set cookie				alert(smallScreenMsg);				saveCookie(document, cookieSmallScreen, '1', expSeconds, cookieDomain, cookiePath);			}			else { //screen is ok - set cookie				saveCookie(document, cookieSmallScreen, '0', expSeconds, cookieDomain, cookiePath);			}		}	}	}function userAcceptsOurCookies() {	var testValue = '1';	saveCookie(document, cookieSupport, testValue, 20, cookieDomain, cookiePath)	if (loadCookie(document, cookieSupport) == testValue) {		return true;	}	else {		return false;	}}function openUrlWithExp(url) {	if(url.indexOf("&exp=") == -1) {		location.href = url + "&exp=" + expand;	}}function setCityByZip(fieldFrom, fieldTo) {	var zip = document.forms[0][fieldFrom].value;	frames["autoZip"].location = currentDirURL +"postnr.nsf/getcitybyzip?openagent&fieldFrom=" + fieldFrom+"&fieldTo=" + fieldTo+"&zip=" + zip;}function hideAllComboBoxes() { 	var selectTags =  document.getElementsByTagName("select")  ;	for (var i = 0; i < selectTags.length ; i++)	{		selectTags[i].style.display="none";	} }function showComboBoxes() {	setTimeout("handleAllComboBoxes()", 300);}function handleAllComboBoxes() { 	var selectTags =  document.getElementsByTagName("select")  ; 	 		for (var i = 0; i < selectTags.length ; i++)	{		selectTags[i].style.display="block";	} }/*	Checks to see if it is nessesary to show the bottom bar, for printing and tipping a friend*/function checkBottomLinks() {	var item = document.getElementById("bottombuttons");	if(item != null) {		var winH = 0;		if (parseInt(navigator.appVersion)>3) {			 if (navigator.appName=="Netscape") {				  winH = window.innerHeight;		 	}		 	if (navigator.appName.indexOf("Microsoft")!=-1) {		 		  winH = screen.availHeight -100;			 }		}				if((winH) < document.body.clientHeight) {			item.style.display = "block";		}	}}/*	Checks to see if a new return url should be set*/function checkForBackReferer() {	var currentLocation = document.location.href.toLowerCase();	var currentReferrer = document.referrer.toLowerCase();	if(currentReferrer == "") { return;}		var index = currentLocation.indexOf('openform');	if(index == -1) {		index = currentLocation.indexOf('opendocument');	} 	if(index == -1) {		index = currentLocation.indexOf('editdocument');	} 	// Was it an openform or opendocument ?	if(index != -1) {		index = currentReferrer.indexOf('openview');		if(index == -1) {			index = currentReferrer.indexOf('searchview');		}		// Did we come from an openview or searchview?				if(index != -1) {			setReturnURL(document.referrer);		}	}	}function getPreviousSiblingElement(currentElement) {	var ps;	ps = currentElement.previousSibling;	while (ps != null && currentElement.nodeType != ps.nodeType) {		ps = ps.previousSibling;	}	return ps;}function alignFactsBoxes(alignThese) {	var contentOffset = 0;	var thisContentSection = "";	var thisFactSection = "";	for(var i=0; i<alignThese.length; i++) {		thisContentSection = "content" + alignThese[i];		thisFactSection = "faktabox" + alignThese[i];		var currFactElement = document.getElementById(thisFactSection);		if(currFactElement) {			var prevFactElement = getPreviousSiblingElement(currFactElement);			var textAreaX = document.getElementById(thisContentSection).offsetTop;			var imageX =  currFactElement.offsetTop;			var difference=(textAreaX-imageX) + contentOffset;			if (prevFactElement != null)				difference += 10;//				difference += prevFactElement.style.marginBottom;//			alert('K\u00F8rer p\u00E5 ' + i + '\ntextAreaX' + textAreaX + '\nimageX' + imageX + '\nprevFactElement.style.marginBottom:' + ((prevFactElement)? prevFactElement.style.marginBottom :'') + '\ndifference' + difference);			currFactElement.style.marginTop=difference +'px'		}	}}// Decide which array item to use as linkfunction decideLink(ownDocId, specialLink) {    if(specialLink == '') { // if url link is same as document        return ownDocId;    }    else { // document has special url in docs third array item        return specialLink;    }}// Validate and build URLfunction generateUrl(urlOrDoc) {    if(urlOrDoc.indexOf('://') != -1 || urlOrDoc.indexOf('/') == 0) { // urlOrDoc either contains :// or starts with /, is therefore proper URL        return urlOrDoc;    } // urlOrDoc is doc    return graphicPath + view + '/' + urlOrDoc;}// Check if given DocId is this documentsfunction isThisDoc(doc) {    if(doc == currentDocId) {        return true;    }    return false;}// Open URL in Front1 windowfunction openPopUp(windowURL) {	var windowName = 'Front1';	var windowFeatures = 'width=402,height=402,toolbar=0,location=0,left=150,top=10,directories=0,status=0,menuBar=0,scrollbars=1,resizable=0';	popUpWin = window.open(windowURL, windowName, windowFeatures);}// Open URL in Front2 windowfunction openPopUpPict(windowURL) {	var windowName = 'Front2';	var windowFeatures = 'width=560,height=435,toolbar=0,location=0,left=172,top=50,directories=0,status=0,menuBar=0,scrollbars=1,resizable=0';	popUpWin = window.open(windowURL, windowName, windowFeatures);}// Open URL in Front3 windowfunction openPopUpArt(windowURL) {	var windowName = 'Front3';	var windowFeatures = 'width=740,height=500,toolbar=0,location=0,left=10,top=10,directories=0,status=0,menuBar=0,scrollbars=1,resizable=1';	popUpWin = window.open(windowURL, windowName, windowFeatures);}// Open URL in Front4 windowfunction openPopUpPrint(windowURL) {	var windowName = 'Front4';	var windowFeatures = 'width=740,height=500,toolbar=0,location=0,left=10,top=10,directories=0,status=0,menuBar=0,scrollbars=1,resizable=1';	popUpWin = window.open(windowURL, windowName, windowFeatures);}// Open URL in Front5 windowfunction openPopUpVariable(windowURL, w, h) {	var windowName = 'Front5';	var windowFeatures = 'width=' + w + ',height=' + h + ',toolbar=0,location=0,left=10,top=10,directories=0,status=0,menuBar=0,scrollbars=0,resizable=1';	popUpWin = window.open(windowURL, windowName, windowFeatures);}// Close browser windowfunction done() {      window.close()}function trackSearchQueryInput() {	 	if ( event.keyCode=="13" ) 		{						document.search.Submit.click();		}}function searchQueryIsValid() {		var v = document.search.Search.value;		var exp = /^([\u00C6\u00E6\u00D8\u00F8\u00C5\u00E5\@\w\-\.\s]+)$/;		if(!exp.test(v))  {	  		alert ("Der er invalide tegn i din s\u00F8getekst.\nDu kan bruge tegnene A-\u00C5 og 0-9");			document.search.Search.focus();	  		return false;		}		if(v == '' || v == '\*') {			alert('Indtast venligst et eller flere s\u00F8geord eventuelt efterfulgt af \*.');			document.search.Search.focus();			return false;		}		return true;}function doSearch() { 	doSearchAll(document.search.Search.value,true);}function doSearchAll(v,t) {	if(t) {		var searchURL = trimSearchValue(v);		var server = location.hostname;		var url = 'http://' + server + '/semaphor/search.nsf/Search?OpenAgent&*^' + searchURL + '%1%10~1';		document.location.href = url;		return true;	}}function trimSearchValue(s) {	s = s.replace(/\u00E6/g, '|ae')	s = s.replace(/\u00C6/g, '|AE')	s = s.replace(/\u00F8/g, '|oe')	s = s.replace(/\u00D8/g, '|OE')	s = s.replace(/\u00E5/g, '|aa')	s = s.replace(/\u00C5/g, '|AA')	s = s.replace(/\s\s/g, ' ')	s = s.replace(/\sand\s/gi, '&')	s = s.replace(/\s\+\s/g, '&')	s = s.replace(/\s\+/g, '&')	s = s.replace(/\s/g, '&')	s = s.replace(/&&&/g, '&')	return s.replace(/\+/g, '&')}