﻿function checkSoeg(s)  {
  if (document.forms[0].sg.value == "søg") {
  	document.forms[0].sg.value = '';     
  }
}

	var scrollerBoxCenter = null;


function resvalue(r0,r1,r2)
{
	if (jsres == 0)
	{
		return r0;
	} else {
		if (jsres == 1)
		{
			return r1;
		} else {
			return r2;
		}
	}
}	

function mainMenuMouse(n,e)
{
	//alert(n);
		if(n == 1){
		e.style.backgroundColor = "#25408F";
	}else{
		e.style.backgroundColor = "";
		
		}
	
	
}


function submenuMouse(n,e)
{

//alert(n);
	if(n == 1){
		e.style.backgroundColor = "#25408F";
	}else{
		e.style.backgroundColor = "";
		
		}

arrLinks = e.getElementsByTagName("a");
		var a = null;
		if (arrLinks.length == 1){
			a = arrLinks[0];
			
			}		
		if (a != null){		
			if (n == 1){
					a.style.color = "#ffffff";
				}else{
					a.style.color = "#000000";
				}		
		}		

}	



function locate(obj,do_not_replace_existing_locations)
{
	if (typeof(obj) != "string")
	{
		alert("Please send ID as string and not object.")
		return;
	}

	objID = obj;
	obj = g(obj);

	if (!obj)
	{
		alert("No luck finding object with ID: " + objID);
	} else {
		show_cross   = 0;
		show_box     = 1;
		flash_border = 1;
		flash_speed  = 500;

		cross_x_size = 2;
		cross_y_size = 2;
		box_x_size   = 2;
		box_y_size   = 2;

		x = rxposObj(obj);
		y = ryposObj(obj);
		document.title = "Last coordinates - x: " + x + ", y: " + y;

		
		ranX1 = ranY1 = ranX2 = ranY2 = "";
		if (do_not_replace_existing_locations)
		{
			ranX1 = "_" + ("" + Math.random()).substring(2);
			ranY1 = "_" + ("" + Math.random()).substring(2);
			ranX2 = "_" + ("" + Math.random()).substring(2);
			ranY2 = "_" + ("" + Math.random()).substring(2);
		}

		if (show_cross == 1)
		{
			createLine( rxposObj(obj) + obj.offsetWidth/2,0,cross_x_size,screen.availHeight,"ff0000",999,"locate-x-line" + ranX1);
			createLine(0,ryposObj(obj) + obj.offsetHeight/2,screen.availWidth,cross_y_size,"ff0000",999,"locate-y-line"  + ranY1);
		}


		if (show_box == 1)
		{
			var left   = rxpos(objID);
			var right  = left + g(objID).offsetWidth;
			var top    = rypos(objID);
			var bottom = top + g(objID).offsetHeight;

			/*
			if (left - right < 5)
			{
				left += - 5;
				right -= - 5;
			}

			if (bottom - top < 5)
			{
				bottom += 5;
				top -= 5;
			}
			*/

			createLine(left,top,box_y_size,bottom-top,"ff0000",999,"x1"    +ranX1);
			createLine(left,top,right-left,box_x_size,"ff0000",999,"y1"    +ranY1);
			createLine(right,top,box_y_size,bottom-top,"ff0000",999,"x2"   +ranX2);
			createLine(left,bottom,right-left+2,box_x_size,"ff0000",999,"y2" +ranY2);
		}

		if (show_box == 1 & flash_border == 1)
		{
			setInterval('g("x1' + ranX1 + '").style.display = (g("x1' + ranX1 + '").style.display == "none")?"block":"none"; g("y1' + ranY1 + '").style.display = g("x2' + ranX2 + '").style.display = g("y2' + ranY2 + '").style.display = g("x1' + ranX1 + '").style.display;', flash_speed + (Math.random()*flash_speed));
		}

	}
	
}


function addPngFix()
{
	if (navigator.userAgent.toLowerCase().indexOf("msie 7") > -1) return;
	pngimg = document.getElementsByTagName("img");
	for(var i = 0, len = pngimg.length; i < len; i++)
	{
		
		if (pngimg[i].className.toLowerCase().indexOf("nopng") == -1 ){
			if (pngimg[i].src.toLowerCase().indexOf(".png") > -1)
			{
				pngimg[i].className += " overlay";
			}
		}
		
	}
	//alert("fisk");
}

//***************************** slide

var intCurrImg = 0;
function nextImage() {
	if(typeof(arrPageImages)!="undefined") {
		intCurrImg += 1;
		if(intCurrImg>=arrPageImages.length) {
			intCurrImg = 0;
		}
		g('MainImage').style.backgroundImage = "url(\"" + arrPageImages[intCurrImg] + "\")";
		g('Imgtxt').innerHTML = arrPageImagestxt[intCurrImg];
		
		if( arrPageImagestxt[intCurrImg] != "<br><br>" ){
			g("photoinfo").style.display = "block";
		}else{
			g("photoinfo").style.display = "none";
		}							
	}	
}

function prevImage() {
	if(typeof(arrPageImages)!="undefined") {
		intCurrImg -= 1;
		if(intCurrImg<0) {
			intCurrImg = arrPageImages.length - 1;
		}
		g('MainImage').style.backgroundImage = "url(\"" + arrPageImages[intCurrImg] + "\")";
		g('Imgtxt').innerHTML = arrPageImagestxt[intCurrImg];
		
		if( arrPageImagestxt[intCurrImg] != "<br><br>" ){
			g("photoinfo").style.display = "block";
		}else{
			g("photoinfo").style.display = "none";
		}			
		
	}
	

	
}
function thisImage() {
		intCurrImg = intCurrImgThumb;
		g('MainImage').style.backgroundImage = "url(\"" + arrPageImages[intCurrImg] + "\")";
		g('Imgtxt').innerHTML = arrPageImagestxt[intCurrImg];	
		/*if (lukstateimg == 1) {
		toggleImgTxt();
		}	*/
		g('Imgtxt').style.top = rypos('photoinfo') - g("Imgtxt").offsetHeight + g("photoinfo").offsetHeight - p(jsRF * 1) + "px";

		if( arrPageImagestxt[intCurrImg] != "<br><br>" ){
			g("photoinfo").style.display = "block";
		}else{
			g("photoinfo").style.display = "none";
		}		
		
}
//***************************** Thumbslide
var intCurrImgThumb = 0;
function nextImageThumb() {
	if(typeof(arrPageImagesThumb)!="undefined") {
		intCurrImgThumb += 1;
		if(intCurrImgThumb>=arrPageImagesThumb.length) {
			intCurrImgThumb = 0;
		}
		g('thumb').src = arrPageImagesThumb[intCurrImgThumb];
		g('currthumb').innerHTML = intCurrImgThumb + 1;
	}
}
function prevImageThumb() {
	if(typeof(arrPageImagesThumb)!="undefined") {
		intCurrImgThumb -= 1;
		if(intCurrImgThumb<0) {
			intCurrImgThumb = arrPageImagesThumb.length - 1;
		}
		g('thumb').src = arrPageImagesThumb[intCurrImgThumb];
		g('currthumb').innerHTML = intCurrImgThumb + 1;
	}
}
//***************************** show/hide text
var lukstate=2;
function togglePhoto() {	
	if (lukstate == 1) {
		lukstate=2;	
		//g("submenu").style.display = "block";
		//g("submenudots").style.display = "block";
		//g("imgmenu").style.display = "block";		
		g("divBoxCenterTextMaster").style.display = "block";
		g("imgArrowScrolbarBoxCenterUp").style.display = "block";
		g("imgArrowScrolbarBoxCenterDown").style.display = "block";
		g("divScrollbarBoxCenter").style.display = "block";
		g("divScrollSliderBoxCenter").style.display = "block";
		g("bottom_bar").style.display = "block";
		g("Imgtxt").style.display = "block";
		//alert(jstxtviewtext);
		//g("togglephoto").children[0].nodeValue = jstxtviewtext;
		g("togglephoto").innerHTML  = jstxtviewphoto;
				
	}else{		
		lukstate=1;		
		//g("submenu").style.display = "none";
		//g("submenudots").style.display = "none";
		//g("imgmenu").style.display = "none";		
		g("divBoxCenterTextMaster").style.display = "none";
		g("imgArrowScrolbarBoxCenterUp").style.display = "none";
		g("imgArrowScrolbarBoxCenterDown").style.display = "none";
		g("divScrollbarBoxCenter").style.display = "none";
		g("divScrollSliderBoxCenter").style.display = "none";
		g("bottom_bar").style.display = "none";
		g("Imgtxt").style.display = "none";
		//alert(jstxtviewphoto);
		//g("togglephoto").children[0].nodeValue = jstxtviewphoto;
		//alert(g("togglephoto").children.length);
		g("togglephoto").innerHTML  = jstxtviewtext;
		
	}
}
//***************************** show/hide imagetext
var lukstateimg=1;
function toggleImgTxt() {	
	if (lukstateimg == 1) {
		lukstateimg=2;	
		g("Imgtxt").style.display = "none";	
	}else{		
		lukstateimg=1;		
		g("Imgtxt").style.display = "block";
		
		//g('Imgtxt').style.top = rypos('photoinfo') - g("Imgtxt").offsetHeight + g("photoinfo").offsetHeight - p(jsRF * 1) + "px";
		
		
	}
}

//***************************** show/hide Front

var lukstatefront=2;
function togglePhotoFront() {	
	if (lukstatefront == 1) {
		lukstatefront=2;	
		g("frontContent").style.display = "block";
		g("frontmap").style.display = "block";
		g("dots_front_right").style.display = "block";
		g("frontNews").style.display = "block";
		g("frontOffer").style.display = "block";		

			
	}else{		
		lukstatefront=1;		
		g("frontContent").style.display = "none";
		g("frontmap").style.display = "none";
		g("dots_front_right").style.display = "none";
		g("frontNews").style.display = "none";
		g("frontOffer").style.display = "none";		
	}
}




//***************************** Stuff


var userAgent				= navigator.userAgent.toLowerCase();
var is_ie					= (userAgent.indexOf("msie") > -1)?true:false;
var is_ie6					= (userAgent.indexOf("msie 6") > -1)?true:false;
var is_ie7					= (userAgent.indexOf("msie 7") > -1)?true:false;
var is_ie9					= (userAgent.indexOf("msie 9") > -1)?true:false;
var is_opera				= (userAgent.indexOf("opera") > -1)?true:false;
var is_firefox				= (userAgent.indexOf("firefox") > -1)?true:false;
var is_firefox2				= (userAgent.indexOf("firefox/2") > -1)?true:false;
var is_firefox3				= (userAgent.indexOf("firefox/3") > -1)?true:false;


var ie5;
var ns6;
function startup() {
	ie5=document.all&&document.getElementById;
	ns6=document.getElementById&&!document.all;
	//alert ("ns6: " + ns6);
}

function getPageSize(){
	
	var xScroll, yScroll;
	
	if (window.innerHeight && window.scrollMaxY) {	
		xScroll = document.body.scrollWidth;
		yScroll = window.innerHeight + window.scrollMaxY;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		xScroll = document.body.scrollWidth;
		yScroll = document.body.scrollHeight;
	} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
		xScroll = document.body.offsetWidth;
		yScroll = document.body.offsetHeight;
	}
	
	var windowWidth, windowHeight;
	if (self.innerHeight) {	// all except Explorer
		windowWidth = self.innerWidth;
		windowHeight = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
		windowWidth = document.documentElement.clientWidth;
		windowHeight = document.documentElement.clientHeight;
	} else if (document.body) { // other Explorers
		windowWidth = document.body.clientWidth;
		windowHeight = document.body.clientHeight;
	}	
	
	// for small pages with total height less then height of the viewport
	if(yScroll < windowHeight){
		pageHeight = windowHeight;
	} else { 
		pageHeight = yScroll;
	}

	// for small pages with total width less then width of the viewport
	if(xScroll < windowWidth){	
		pageWidth = windowWidth;
	} else {
		pageWidth = xScroll;
	}


	arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) 
	return arrayPageSize;
}


function delayPositionThings() {
		setTimeout("positionThings()", 500);
}

var blnFirstRun = true;

	//alert("jsintForside: " + jsintForside);

function positionThings() {


	if (blnFirstRun){
		if(window.captureEvents){
			window.onmousemove=sourceCheck;
		} else {
			document.onmousemove=sourceCheck;
		}	
		addPngFix();	
	}


	var pageSize = getPageSize();
	//var pageHeight = (ie5 ? pageSize[1] : pageSize[3]);
	var pageWidth = (ie5 ? pageSize[0] : pageSize[2]);


	/*
	g('Site').style.top = p((pageHeight - g('Site').offsetHeight) / 2) + "px";
	if(p(g('Site').style.top) < 0) {
		g('Site').style.top = "0px";
	}
	*/
	if(g('Site')){
	g('Site').style.left = p((pageWidth - g('Site').offsetWidth) / 2) + "px";
	if(p(g('Site').style.left) < 0) {
		g('Site').style.left = "0px";
	}
	}

	if(g('top_flowers')){
		//g('top_flowers').style.left = rxpos('Site') + p(jsRF * 12) + "px";
		//g('top_flowers').style.left = rxpos('Site') + p(jsRF * 0) + "px";
		g('top_flowers').style.left = rxpos('Site') + p(jsRF * 12) + "px";
		g('top_flowers').style.top =  rypos('Site') + p(jsRF * 0) + "px";
		g('top_flowers').style.width =   p(jsRF * 769)- p(jsRF * 12) + "px";
		g('top_flowers').style.height = p(jsRF * 96) + "px";
		//g('top_flowers').style.height = p(jsRF * 88) + "px";
		//g("top_flowers").style.display = "none";
	}
	
	
	
	if(g('top_flowers_content')){
		
			//g('top_flowers_content').style.left = rxpos('top_flowers') + p(jsRF * 12) + "px";
			//g('top_flowers_content').style.top =  rypos('top_flowers') + p(jsRF * 0) + "px";
		
		
			g('top_flowers_content').style.width =   p(jsRF * 769)- p(jsRF * 12) + "px";
			g('top_flowers_content').style.height = p(jsRF * 88) + "px";
			
			
			
	}	

	
	if(g('top_waves')){
		g('top_waves').style.left = rxpos('Site') + p(jsRF * 44) + "px";
		g('top_waves').style.top =  rypos('Site') + p(jsRF * 4) + "px";

	}	
	
	
	
	
	//alert((pageWidth - g('Site').offsetWidth)/2 + p(jsRF * 40) + "px");
	
	if(g('bottom_bar')){	
		
		g('bottom_bar').style.left = rxpos('Site') +p(jsRF * 0) + "px";
		//g('bottom_bar').style.top =   rypos('Site') + p(jsRF * 489) + "px";
		g('bottom_bar').style.top =   rypos('Site') + p(jsRF * 489) + "px";
		//g('bottom_bar').style.width =  p(jsRF * 769) + "px";
		g('bottom_bar').style.width =  p(jsRF * 769) + "px";
		g('bottom_bar').style.height = p(jsRF * 82) + "px";
		//g("bottom_bar").style.display = "none";
	}
	
	
	if(g('flowerx')){		
		//g('flowerx').style.left = rxpos('Site') + p(jsRF * 610) + "px";
		//g('flowerx').style.top = rypos('Site') + p(jsRF * 427) + "px";
		//g('flowerx').style.width =  p(jsRF * 104) + "px";
		//g('flowerx').style.height = p(jsRF * 91) + "px";
	}	
		
	if(g('hovedmenu')){	
		g('hovedmenu').style.left = rxpos('Site') + p(jsRF * 0) + "px";
		g('hovedmenu').style.top = rypos('Site') + p(jsRF * resvalue(77,79,78)) + "px";
	}

	if(g('TopMenu')){	
		g('TopMenu').style.left = rxpos('Site') + p(jsRF * 30) + "px";
		g('TopMenu').style.top = rypos('Site')+ p(jsRF * 10) + "px";
		
	}

//locate("MenuStreg");

if ( blnIsTopMenu == false){

	//************************************ vedr. Streger der forbinder hoved menu og undemenu
	if(jsintSubmenuCount >0) {
		if(g('MenuLine') && g('MenuStreg')){			
				

			if (ns6) {
				//alert("hey");
				g('MenuLine').style.left = rxpos('MenuStreg') + (g("aktiv").offsetWidth/2) + resvalue(-1,-2,-1) + "px";
				g('MenuLine').style.width = g("MainImage").offsetWidth + (rxpos('Site') - rxpos('MenuStreg') - (g("aktiv").offsetWidth/2)) + resvalue(51,67,84) + "px";
				g('MenuLine').style.top  = 	rypos('Site') + resvalue(101,130,161)+ resvalue(13,14,17) + "px";
			

			}
			else if (is_ie9)
				{
				//	alert("ie9");
						g('MenuLine').style.left = rxpos('MenuStreg') + (g("aktiv").offsetWidth/2) + resvalue(1,1,0) + "px";
				g('MenuLine').style.width = g("MainImage").offsetWidth + (rxpos('Site') - rxpos('MenuStreg') - (g("aktiv").offsetWidth/2)) + resvalue(49,65,83) + "px";
				//g('MenuLine').style.top  = 	rypos('Site') + resvalue(101,130,161) + "px";
				g('MenuLine').style.top  = rypos('Site') + resvalue(113,144,177) + "px";
				}
			
			else
				{
			//	alert("hey");
				g('MenuLine').style.left = rxpos('MenuStreg') + (g("aktiv").offsetWidth/2) + resvalue(1,1,0) + "px";
				g('MenuLine').style.width = g("MainImage").offsetWidth + (rxpos('Site') - rxpos('MenuStreg') - (g("aktiv").offsetWidth/2)) + resvalue(49,65,83) + "px";
				g('MenuLine').style.top  = 	rypos('Site') + resvalue(101,130,161) + "px";
				//g('MenuLine').style.top  = rypos('Site') + resvalue(113,144,177) + "px";
			}			
			
		}	
	
	var a= g("aktiv").offsetWidth
	//alert(p(jsRF * 102));
	
				//alert(resvalue(10,12,36));
		if(g('SubMenuStregVertikal')){			
			if (ns6) {
				g('SubMenuStregVertikal').style.left = rxpos('Site') + g("MainImage").offsetWidth + resvalue(33,44,57)+ 0 + "px";
				g('SubMenuStregVertikal').style.top = rypos('MenuLine') + resvalue(13,14,18)- resvalue(13,14,17) + "px";
				//g('SubMenuStregVertikal').style.height = g("SubMenuStregVertikal").offsetHeight + resvalue(-2,-3,-3) + "px"; PH: 04-02-2009 19:57:20
				g('SubMenuStregVertikal').style.height = (intSubmenuCount-1)*resvalue(23,26,28) + resvalue(-2,-3,-3) + "px";
			}else if(is_ie6)
				{
			//alert("ie6");	
				g('SubMenuStregVertikal').style.left = rxpos('Site') + g("MainImage").offsetWidth + resvalue(33,44,57)+ 0 + "px";
				g('SubMenuStregVertikal').style.top = rypos('MenuLine') + resvalue(13,14,18) + "px";
				//g('SubMenuStregVertikal').style.height = g("SubMenuStregVertikal").offsetHeight + resvalue(-2,-4,-2) + "px"; PH: 04-02-2009 19:57:20
				g('SubMenuStregVertikal').style.height = (intSubmenuCount-1)*resvalue(23,26,28) + resvalue(-2,-3,-3) + "px";
			
			}
			else if (is_ie9)
				{
						g('SubMenuStregVertikal').style.left = rxpos('Site') + g("MainImage").offsetWidth + resvalue(33,44,57)+ 0 + "px";
				g('SubMenuStregVertikal').style.top = rypos('MenuLine') + resvalue(0,0,1) + "px";				
				//g('SubMenuStregVertikal').style.top = rypos('MenuLine') + resvalue(13,14,18) + "px";
				//g('SubMenuStregVertikal').style.height = g("SubMenuStregVertikal").offsetHeight + resvalue(-2,-4,-2) + "px"; PH: 04-02-2009 19:57:20
				g('SubMenuStregVertikal').style.height = (intSubmenuCount-1)*resvalue(23,26,28) + resvalue(-2,-4,-2) + "px";
				}
			else{ 
			//	alert("hey");
				g('SubMenuStregVertikal').style.left = rxpos('Site') + g("MainImage").offsetWidth + resvalue(33,44,57)+ 0 + "px";
				//g('SubMenuStregVertikal').style.top = rypos('MenuLine') + resvalue(0,0,1) + "px";				
				g('SubMenuStregVertikal').style.top = rypos('MenuLine') + resvalue(13,14,18) + "px";
				//g('SubMenuStregVertikal').style.height = g("SubMenuStregVertikal").offsetHeight + resvalue(-2,-4,-2) + "px"; PH: 04-02-2009 19:57:20
				g('SubMenuStregVertikal').style.height = (intSubmenuCount-1)*resvalue(23,26,28) + resvalue(-2,-4,-2) + "px";
				
			}
		}	
	}
		//************************************ END vedr. Streger der forbinder hoved menu og undemenu
}else{

if(jsintSubmenuCount >0) {
	
	
			if (ns6) {
				//alert("hey");
				g('MenuLine').style.left = rxpos('Site') + resvalue(735,919,1149)+ 0 + "px";
				g('MenuLine').style.width = resvalue(85,108,135) + "px";
				g('MenuLine').style.top  = 	rypos('Site') + resvalue(101,130,161) + resvalue(13,14,17) + "px";
			}else{
				//alert("hey");
				g('MenuLine').style.left = rxpos('Site') + resvalue(735,919,1149)+ 0 + "px";
				g('MenuLine').style.width = resvalue(85,108,135) + "px";
				g('MenuLine').style.top  = 	rypos('Site') + resvalue(101,130,161) + "px";
			}	

			if(g('SubMenuStregVertikal')){
			//alert("hey");
				if (ns6) {
					g('SubMenuStregVertikal').style.left = rxpos('Site') + g("MainImage").offsetWidth + resvalue(34,45,57)+ 0 + "px";
					g('SubMenuStregVertikal').style.top = rypos('MenuLine') + resvalue(13,14,17) - resvalue(13,14,17) + "px";
					//g('SubMenuStregVertikal').style.height = g("SubMenuStregVertikal").offsetHeight + resvalue(-3,-4,-2) + "px";  PH: 04-02-2009 19:57:20
					g('SubMenuStregVertikal').style.height =  (intSubmenuCount-1)*resvalue(23,26,28) + resvalue(-3,-4,-2) + "px";
				}else if(is_ie6){
				//alert("ie6");	
					g('SubMenuStregVertikal').style.left = rxpos('Site') + g("MainImage").offsetWidth + resvalue(33,44,57)+ 0 + "px";
					g('SubMenuStregVertikal').style.top = rypos('MenuLine') + resvalue(13,14,18) + "px";
					//g('SubMenuStregVertikal').style.height = g("SubMenuStregVertikal").offsetHeight + resvalue(-2,-4,-2) + "px"; PH: 04-02-2009 19:57:20
					g('SubMenuStregVertikal').style.height = (intSubmenuCount-1)*resvalue(23,26,28) + resvalue(-2,-3,-3) + "px";
								
				}else{
					g('SubMenuStregVertikal').style.left = rxpos('Site') + g("MainImage").offsetWidth + resvalue(34,45,57)+ 0 + "px";
					g('SubMenuStregVertikal').style.top = rypos('MenuLine') + resvalue(13,14,17) + "px";
					//g('SubMenuStregVertikal').style.height = g("SubMenuStregVertikal").offsetHeight + resvalue(-3,-4,-1) + "px"; PH: 04-02-2009 19:57:20
					g('SubMenuStregVertikal').style.height = (intSubmenuCount-1)*resvalue(23,26,28) + resvalue(-3,-4,-1) + "px";
				}
			
			}
}
//g("SubMenuStregVertikal").style.display = "none";
//g("MenuLine").style.display = "none";


}




	if(g('Logo')){	
		g('Logo').style.left = rxpos('Site') + p(jsRF * 782) + "px";
		g('Logo').style.top = rypos('Site') + p(jsRF * 0) + "px";
	}
	
	if(g('dots_front_top_left')){	
		g('dots_front_top_left').style.left = rxpos('Site') + p(jsRF * 6) + "px";
		g('dots_front_top_left').style.top = rypos('Site') + p(jsRF * 29) + "px";
		g("dots_front_top_left").style.display = "none";
	}

	if(g('adresse')){	
		//g('adresse').style.left = rxpos('Site') + p(jsRF * 80) + "px";
		//g('adresse').style.top = rypos('Site') + p(jsRF * 652) + "px";
	}
	if(g('contact')){	
		//g('contact').style.left = rxpos('Site')+ p(jsRF * 782) + "px";
		//g('contact').style.top = rypos('Site')+ p(jsRF * 545) + "px";
	}
	if(g('home_print_search')){	
		g('home_print_search').style.left = rxpos('Site')+ p(jsRF * 680) + "px";
		g('home_print_search').style.top = rypos('Site')+ p(jsRF * 10) + "px";
	}
	if(g('toplinks')){	
		g('toplinks').style.left = rxpos('Site')+ p(jsRF * 792) + "px";
		g('toplinks').style.top = rypos('Site')+ p(jsRF * resvalue(545,547,547)) + "px";
	}
	
	
		if(g('submenu')){
				g('submenu').style.left = rxpos('Site')+ p(jsRF * 782) + "px";
				g('submenu').style.top = rypos('Site')+ p(jsRF * 96) + "px";
				//g('submenu').style.top = rypos('Site')+ p(jsRF * 88) + "px";
				//g('submenu').style.height = p(jsRF * 483) + "px";
				
		}	

		if(g('submenuNYTOP')){
				g('submenuNYTOP').style.left = rxpos('Site')+ p(jsRF * 782) + "px";
				//g('submenuNYTOP').style.top = rypos('Site')+ p(jsRF * 96) + "px";
				g('submenuNYTOP').style.top = rypos('Site')+ p(jsRF * 88) + "px";
				g('submenuNYTOP').style.height = p(jsRF * 40) + "px";
				
		}	


	
	
		if(g('LangSelection')){
			g('LangSelection').style.left = rxpos('Site')+ p(jsRF * 932) + "px";
			//g('LangSelection').style.top = rypos('Site')+ p(jsRF * 547) + "px";
			g('LangSelection').style.top = rypos('Site')+ resvalue(547,684,855) + "px";
			g('LangSelection').style.width =  p(jsRF * 52) + "px";
		}

		if(g('langBgwhite')){
			g('langBgwhite').style.left = rxpos('Site')+ p(jsRF * 782) + "px";
			g('langBgwhite').style.top = rypos('Site')+ p(jsRF * 545) + "px";		
		}	

		if(g('TwologosBgwhite')){
			g('TwologosBgwhite').style.left = rxpos('Site')+ p(jsRF * 782) + "px";
			g('TwologosBgwhite').style.top = rypos('Site')+ p(jsRF * 475) + "px";
			
					
		}	


		if(g('MainImage')){
			g('MainImage').style.left = rxpos('Site')+ p(jsRF * 0) + "px";
			//g('MainImage').style.top = rypos('Site')+ p(jsRF * 0) + "px";
			g('MainImage').style.top = rypos('Site')+ p(jsRF * 86) + "px";
		}
		

		
		

		if(g('ImageOverlayBottomLeft')){
			g('ImageOverlayBottomLeft').style.left = rxpos('Site')+ p(jsRF * 0) + "px";
			//g('ImageOverlayBottomLeft').style.top = rypos('Site')+ p(jsRF * 96) + "px";
			g('ImageOverlayBottomLeft').style.top = rypos('Site')+ p(jsRF * 0) + "px";
			
		g('ImageOverlayBottomLeft').style.width =  p(jsRF * 12) + "px";
		g('ImageOverlayBottomLeft').style.height = p(jsRF * 572) + "px";			
			
						
		}



		if(g('imgArrowLeft') && g('imgArrowRight')){
			g('imgArrowLeft').style.left = rxpos('Site') + p(jsRF * 16) + "px";
			g('imgArrowLeft').style.top = rypos('Site')+ p(jsRF * 280) + "px";
			//g("imgArrowLeft").style.display = "block";			
	
			g('imgArrowRight').style.left = rxpos('Site') + p(jsRF * 750) + "px";
			g('imgArrowRight').style.top = rypos('Site')+ p(jsRF * 280) + "px";
			//g("imgArrowRight").style.display = "block";		
	
			if (arrPageImages.length > 1) {
				g("imgArrowLeft").style.display = "block";	
				g("imgArrowRight").style.display = "block";
			}else{
			g("imgArrowLeft").style.display = "none";	
				g("imgArrowRight").style.display = "none";	
				
				
			}
		}
		
		
		
		
		

		if(g('Imgtxt')){
			g('Imgtxt').style.left = rxpos('Site') + p(jsRF * 210) + "px";
			g('Imgtxt').style.top = rypos('Site')+ p(jsRF * 510) + "px";
			g("Imgtxt").style.display = "block";	
		}
		
		
		
	
	if (jsintForside == 0) {
	//if (1 == 1) {
		// Artikel elementer:
		
		if (jsres == 0 ){
			//g('submenu').style.width = p(jsRF * 200) - p(jsRF * 2) + "px";
		}else if (jsres == 1 ){
			//g('submenu').style.width = p(jsRF * 200) + "px";
			
		}else if (jsres == 2 ){
			//g('submenu').style.width = p(jsRF * 200) - p(jsRF * 2) + "px";
		}
		
		if (arrPageImages.length == 0) {
			g("thumbnav").style.display = "none";
			g("photoinfo").style.display = "none";				
		}

	if(g('bottom_flower_bg')){	
		
		//g('bottom_flower_bg').style.left = rxpos('Site') + p(jsRF * 350) + "px";
		//g('bottom_flower_bg').style.top = rypos('Site') + p(jsRF * 421) + "px";
		//g('bottom_flower_bg').style.width =  p(jsRF * 104) + "px";
		//g('bottom_flower_bg').style.height = p(jsRF * 91) + "px";
	}			

		/*
		g('submenudots').style.left = rxpos('submenu') + p(jsRF * 1) + "px";
		g('submenudots').style.top = rypos('Site')+ p(jsRF * 44) + "px";
		g('submenudots').style.width = (g("submenu").offsetWidth) - p(jsRF * 1) + "px";
	
		g('imgmenu').style.left = rxpos('submenu') + "px";
		g('imgmenu').style.top = rypos('Site')+ p(jsRF * 406) + "px";
		g('imgmenu').style.width = (g("submenu").offsetWidth) + "px";
		
		g('imgmenubg').style.width = (g("submenu").offsetWidth) + "px";
		*/
		

		if(g('photoinfo')){
			//g("photoinfo").style.width = p(jsRF * 70) + "px";
			//g('photoinfo').style.left = rxpos('Site')+  p(jsRF * 13) + "px";			
			//g('photoinfo').style.top = rypos('Site')+ p(jsRF * 370) + "px";
		}
	
	


		// vedr. content
		var k =0;
		var k2 =0;
		if (jsres == 0 ){
			k =0;
			k2 =1;
		}else if (jsres == 1 ){
			k =1;		
		}else if (jsres == 2 ){
			k =0;
		}
		






			if (ns6) {
				//g("TextMasterTop").style.left = rxpos('Site') + p(jsRF * 350) + "px";
				//g("TextMasterTop").style.top = rypos('Site') + resvalue(113,144,178) + "px";
				//g("TextMasterTop").style.width = p(jsRF * 385) + "px";
				//g("TextMasterTop").style.height = g("TextMasterTop").offsetHeight - p(jsRF * resvalue(3,0,0)) + "px";
				
				g("divBoxCenterTextMaster").style.left = rxpos('Site') + p(jsRF * 350) + "px";
				//g("divBoxCenterTextMaster").style.top = rypos('TextMasterTop') + g("TextMasterTop").offsetHeight + resvalue(0,0,0) + "px";
				g("divBoxCenterTextMaster").style.top = rypos('Site') + resvalue(114,144,178) + "px";
				
					
				g("divBoxCenterTextMaster").style.width = p(jsRF * 385) + "px";
				g("divBoxCenterTextMaster").style.height = resvalue(455,567,712) + "px";
				
				//g("TextMasterTop").style.MozOpacity  = 0.9;
				g("divBoxCenterTextMaster").style.MozOpacity  = 0.9;	
								
			}else{
				//g("TextMasterTop").style.left = rxpos('Site') + p(jsRF * 350) + "px";
				//g("TextMasterTop").style.top = rypos('Site') + resvalue(113,144,178) + "px";
				//g("TextMasterTop").style.width = p(jsRF * 385) + "px";
				//g("TextMasterTop").style.height = g("TextMasterTop").offsetHeight - p(jsRF * resvalue(3,0,0)) + "px";	
				
				g("divBoxCenterTextMaster").style.left = rxpos('Site') + p(jsRF * 350) + "px";
				//g("divBoxCenterTextMaster").style.top = rypos('TextMasterTop') + g("TextMasterTop").offsetHeight + resvalue(0,0,0) + "px";
				g("divBoxCenterTextMaster").style.top = rypos('Site') + resvalue(114,144,178) + "px";
				
					
				g("divBoxCenterTextMaster").style.width = p(jsRF * 385) + "px";
				g("divBoxCenterTextMaster").style.height = resvalue(455,567,712) + "px";	
					
				//g("TextMasterTop").style.filter = "alpha(opacity=90);";
				g("divBoxCenterTextMaster").style.filter = "alpha(opacity=90);";	
			}	
			
			

			
			
		
		
		if(g('togglephoto')){
			g("togglephoto").style.width = p(jsRF * 70) + "px";
			g('togglephoto').style.left = rxpos('Site')+  p(jsRF * resvalue(661,662,662)) + "px";		
			//g('togglephoto').style.top = rypos('divBoxCenterTextMaster')+ resvalue(0,0,0) + "px"; PH 05-02-2009 10:22
			if (ns6) {
				g('togglephoto').style.top  = 	rypos('Site') + resvalue(101,130,161) + resvalue(13,14,17) + "px";
			}else{
				g('togglephoto').style.top  = 	rypos('Site') + resvalue(101,130,161) + resvalue(13,14,17) + "px";
			}	
			
		}

		g("imgArrowScrolbarBoxCenterUp").style.left = rxpos("divBoxCenterTextMaster") + g("divBoxCenterTextMaster").offsetWidth - jsRF*10 - g("imgArrowScrolbarBoxCenterUp").offsetWidth /2 + "px";
		//g("imgArrowScrolbarBoxCenterUp").style.top  = rypos("divBoxCenterTextMaster") + p(jsRF * 10) + "px";
		g("imgArrowScrolbarBoxCenterUp").style.top  = rypos("divBoxCenterTextMaster") + p(jsRF * 25) + "px";

		g("imgArrowScrolbarBoxCenterDown").style.left = rxpos("imgArrowScrolbarBoxCenterUp") + "px";
		g("imgArrowScrolbarBoxCenterDown").style.top  = rypos("divBoxCenterTextMaster") + g("divBoxCenterTextMaster").offsetHeight - g("imgArrowScrolbarBoxCenterDown").offsetHeight - p(jsRF * 10)+ "px";
	
		g("divScrollbarBoxCenter").style.left   = rxpos("imgArrowScrolbarBoxCenterUp") + g("imgArrowScrolbarBoxCenterUp").offsetWidth/2 + "px";
		g("divScrollbarBoxCenter").style.top    = rypos("imgArrowScrolbarBoxCenterUp") + jsRF*10 + "px";
		g("divScrollbarBoxCenter").style.height = rypos("imgArrowScrolbarBoxCenterDown") - g("imgArrowScrolbarBoxCenterDown").offsetHeight + jsRF*2 - rypos("divScrollbarBoxCenter") + "px";

		g("divScrollSliderBoxCenter").style.top = rypos("divScrollbarBoxCenter")+ "px";
		g("divScrollSliderBoxCenter").style.left = rxpos("divScrollbarBoxCenter") - g("divScrollSliderBoxCenter").offsetWidth/2 + "px";				


	if( g("divBoxCenterTextDocument").offsetHeight > g("divBoxCenterTextMaster").offsetHeight)	{




			if (scrollerBoxCenter == null)
			{
				scrollerBoxCenter = new textScroller(1);
			}
			scrollerBoxCenter.masterobj = 'divBoxCenterTextMaster';
			scrollerBoxCenter.scrollerobj = 'divBoxCenterTextDocument';
			scrollerBoxCenter.scrollbar = 'divScrollbarBoxCenter';
			scrollerBoxCenter.arrowobj = 'divScrollSliderBoxCenter'; //fake shit
			scrollerBoxCenter.scrollslider = 'divScrollSliderBoxCenter';
			scrollerBoxCenter.prepare();	


			// scrollbarvisible
	
				g("imgArrowScrolbarBoxCenterUp").style.visibility = "visible";
				g("imgArrowScrolbarBoxCenterDown").style.visibility = "visible";
				g("divScrollbarBoxCenter").style.visibility = "visible";
				g("divScrollSliderBoxCenter").style.visibility = "visible";
	}





		if( typeof(arrPageImagestxt[intCurrImg]) != "undefined" && arrPageImagestxt.length > 0 && arrPageImagestxt[0] != "<br><br>"){
			
			g("photoinfo").style.display = "block";
		}else{
			g("photoinfo").style.display = "none";
		}	


	}else{
			// Forside elementer:	
		

			if(g('frontContent')){				
				g('frontContent').style.left = rxpos('Logo')+ p(jsRF * 20) + "px";
				g('frontContent').style.top = rypos('Logo') + g("Logo").offsetHeight - p(jsRF * 2) + "px";
				//g("frontContent").style.filter = "alpha(opacity=80);";
				//g("frontContent").style.MozOpacity  = 0.8;			
				//g("frontContent").style.display = "none";
			}		


			if(g('divContentsFlash')){
			
			if(g('divContentsFlash')){
			g('divContentsFlash').style.left = rxpos('Site')+ p(jsRF * 0) + "px";
			//g('divContentsFlash').style.top = rypos('Site')+ p(jsRF * 0) + "px";
			g('divContentsFlash').style.top = rypos('Site')+ p(jsRF * 86) + "px";
		}		
			
			//g('divContentsFlash').style.left = rxpos('Site')+ p(jsRF * 12) + "px";
			//g('divContentsFlash').style.top = rypos('Site')+ p(jsRF * 61) + "px";
			
			
			
			//g('dots_front_right').style.left = rxpos('frontContent') + p(jsRF * 0) + "px";
			//g('dots_front_right').style.top = rypos('divContentsFlash') + g("divContentsFlash").offsetHeight - g("dots_front_right").offsetHeight + "px";

			//g('frontmap').style.left = rxpos('Site')+ p(jsRF * 12) + "px";
			//g('frontmap').style.top = rypos('Site')+ p(jsRF * 61) + "px";

			//g("togglephotofront").style.width = p(jsRF * 70) + "px";
			//g('togglephotofront').style.left = rxpos('Site') + p(jsRF * 350) + "px";
			//g('togglephotofront').style.top = rypos('Site') + p(jsRF * resvalue(113,113,113)) + "px";			
			
			}
			
			if(g('frontNews')){
				g('frontNews').style.left = rxpos('Site')+ p(jsRF * 38) + "px";
				g('frontNews').style.top = rypos('Site')+ p(jsRF * 404) + "px";			
				g("frontNews").style.filter = "alpha(opacity=80);";
				g("frontNews").style.MozOpacity  = 0.8;
				g("frontNews").style.display = "none";
			}				
			if(g('frontOffer')){
				g('frontOffer').style.left = rxpos('Site')+ p(jsRF * 38) + "px";
				g('frontOffer').style.top = rypos('Site')+ p(jsRF * 462) + "px";			
				g("frontOffer").style.filter = "alpha(opacity=80);";
				g("frontOffer").style.MozOpacity  = 0.8;
				g("frontOffer").style.display = "none";		
			}

			

	}

blnFirstRun = false;
	
}


//scrollerBoxCenter

document.onmouseup = function (){
	if(scrollerBoxCenter != null)	{
		scrollerBoxCenter.cancelScroll();
		scrollerBoxCenter.moving = false;
		scrollerBoxCenter.blnIsDragging = false;
		}	
	}






