function SiteManager() {	this.navigators = new Array();	this.appRootURL = "";	this.appDbURL = "";	this.currentDbURL = "";	}/*	This is the main interface to functionality for the site. Centralising the most frequent used features.*/SiteManager.prototype.init = function() {	this.excludeExternalFrames();	if(!this.isSupportedClient()) {		this.handleUnsupportedClient();	}}/*	Handles spots (html bulks)*/SiteManager.prototype.loadSpot = function(spotId, divId) {	var url = this.getAppDbURL() + "spotlookupbyid/" + spotId + "?open&unique=" + (new Date()).getTime()	$("#" +divId).load(url)}/*	Checks to see if current client is supported */SiteManager.prototype.isSupportedClient = function() {	if ((document.layers) && !(document.getElementById)) {		return false;	} else {		return true;	}}/*	Handle unsupported clients*/SiteManager.prototype.handleUnsupportedClient = function() {	if ((document.layers) && !(document.getElementById)) {		alert('Netscape version 4 kan desv\u00E6rre ikke benyttes til dette website.\n\nBenyt venligst Netscape version 6, eller en anden browser af version 4 eller h\u00F8jere.\n\nDu sendes nu til Netscape\'s download side.');		window.location.href = 'http://www.netscape.com/download';	}}/*	Handles any external frame embedding*/SiteManager.prototype.excludeExternalFrames = function() {	if (top.location!=self.document.location) {		top.location=self.document.location;	}}SiteManager.prototype.slideAt = function(id, index) {	var slideIndex = this.navigators[id];	if(slideIndex==null) {		slideIndex = 0;	}	var p = $("#" + id + slideIndex)	p.hide();	p =$("#"  + id  + index);	p.show();	this.navigators[id] = index;}SiteManager.prototype.slidePrev = function(id) {	var slideIndex = this.navigators[id];	if(slideIndex==null) {		slideIndex = 0;	}	var p = $("#" + id + slideIndex)	p.hide();	slideIndex--;	p =$("#"  + id  + slideIndex);	if(!p.size()) {		slideIndex=$("#"  + id + " > div").size()-1;		p =$("#" + id  + slideIndex);			}	p.show();	this.navigators[id] = slideIndex;	var elem = $("#" + id  + "-select");			if(elem.size() > 0) {		elem[0].selectedIndex = slideIndex;	}}SiteManager.prototype.slideNext = function(id) {	var slideIndex = this.navigators[id];	if(slideIndex==null) {		slideIndex = 0;	}	var p = $("#" + id + slideIndex)	p.hide();	slideIndex++;	p =$("#"  + id  + slideIndex);	if(!p.size()) {		slideIndex=0;		p =$("#" + id  + slideIndex);			}	p.show();	this.navigators[id] = slideIndex;		var elem = $("#" + id  + "-select");			if(elem.size() > 0) {		elem[0].selectedIndex = slideIndex;	}}SiteManager.prototype.trackSearchQueryInput = function(e) {		var keyCode = null;				if(e==null){			keycode=event.keyCode;		}else{			keycode=e.which;		}		if(evt==null) {			return;		}			 	if ( keyCode=="13" ) 	{						document.search.submit();		}}SiteManager.prototype.searchQueryIsValid = function() {		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;}SiteManager.prototype.search = function(query) {		var url = this.getAppRootURL() +"search.nsf/search?open&query=" + query;		document.location.href = url;}SiteManager.prototype.doSearch = function() { 	this.search(document.search.Search.value);}SiteManager.prototype.trimSearchValue = function(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, '&')	*/		return s;}SiteManager.prototype.navigateSearchResult = function(url) {	if(url) {		/*		$.get(url, function(data){			var srw = $("#search-result-window")			srw.html(data);			srw.css("display", "block"); 					});		*/		document.location.href = url;	}}SiteManager.prototype.setAppRootURL = function(url) {	this.appRootURL = url;}SiteManager.prototype.getAppRootURL = function() {	return this.appRootURL;}SiteManager.prototype.setAppDbURL = function(url) {	this.appDbURL = url;}SiteManager.prototype.getAppDbURL = function() {	return this.appDbURL;}SiteManager.prototype.setCurrentDbURL = function(url) {	this.currentDbURL = url;}SiteManager.prototype.getCurrentDbURL = function() {	return this.currentDbURL;} SiteManager.prototype.embedFlash = function(url, divId, width, height, flashvars, params, attributes) {	swfobject.embedSWF(url, divId, width, height, "8.0.0", this.getAppDbURL() +"/expressInstall.swf", flashvars, params, attributes);}