/* -- Adobe GoLive JavaScript Library */

CSAg = window.navigator.userAgent; CSBVers = parseInt(CSAg.charAt(CSAg.indexOf("/")+1),10);
CSIsW3CDOM = ((document.getElementById) && !(IsIE()&&CSBVers<6)) ? true : false;
function IsIE() { return CSAg.indexOf("MSIE") > 0;}
function CSIEStyl(s) { return document.all.tags("div")[s].style; }
function CSNSStyl(s) { if (CSIsW3CDOM) return document.getElementById(s).style; else return CSFindElement(s,0);  }
CSIImg=false;
function CSInitImgID() {if (!CSIImg && document.images) { for (var i=0; i<document.images.length; i++) { if (!document.images[i].id) document.images[i].id=document.images[i].name; } CSIImg = true;}}
function CSFindElement(n,ly) { if (CSBVers<4) return document[n];
	if (CSIsW3CDOM) {CSInitImgID();return(document.getElementById(n));}
	var curDoc = ly?ly.document:document; var elem = curDoc[n];
	if (!elem) {for (var i=0;i<curDoc.layers.length;i++) {elem=CSFindElement(n,curDoc.layers[i]); if (elem) return elem; }}
	return elem;
}
function CSGetImage(n) {if(document.images) {return ((!IsIE()&&CSBVers<5)?CSFindElement(n,0):document.images[n]);} else {return null;}}
CSDInit=false;
function CSIDOM() { if (CSDInit)return; CSDInit=true; if(document.getElementsByTagName) {var n = document.getElementsByTagName('DIV'); for (var i=0;i<n.length;i++) {CSICSS2Prop(n[i].id);}}}
function CSICSS2Prop(id) { var n = document.getElementsByTagName('STYLE');for (var i=0;i<n.length;i++) { var cn = n[i].childNodes; for (var j=0;j<cn.length;j++) { CSSetCSS2Props(CSFetchStyle(cn[j].data, id),id); }}}
function CSFetchStyle(sc, id) {
	var s=sc; while(s.indexOf("#")!=-1) { s=s.substring(s.indexOf("#")+1,sc.length); if (s.substring(0,s.indexOf("{")).toUpperCase().indexOf(id.toUpperCase())!=-1) return(s.substring(s.indexOf("{")+1,s.indexOf("}")));}
	return "";
}
function CSGetStyleAttrValue (si, id) {
	var s=si.toUpperCase();
	var myID=id.toUpperCase()+":";
	var id1=s.indexOf(myID);
	if (id1==-1) return "";
	s=s.substring(id1+myID.length+1,si.length);
	var id2=s.indexOf(";");
	return ((id2==-1)?s:s.substring(0,id2));
}
function CSSetCSS2Props(si, id) {
	var el=document.getElementById(id);
	if (el==null) return;
	var style=document.getElementById(id).style;
	if (style) {
		if (style.left=="") style.left=CSGetStyleAttrValue(si,"left");
		if (style.top=="") style.top=CSGetStyleAttrValue(si,"top");
		if (style.width=="") style.width=CSGetStyleAttrValue(si,"width");
		if (style.height=="") style.height=CSGetStyleAttrValue(si,"height");
		if (style.visibility=="") style.visibility=CSGetStyleAttrValue(si,"visibility");
		if (style.zIndex=="") style.zIndex=CSGetStyleAttrValue(si,"z-index");
	}
}
CSStopExecution=false;
function CSAction(array) {return CSAction2(CSAct, array);}
function CSAction2(fct, array) { 
	var result;
	for (var i=0;i<array.length;i++) {
		if(CSStopExecution) return false; 
		var aa = fct[array[i]];
		if (aa == null) return false;
		var ta = new Array;
		for(var j=1;j<aa.length;j++) {
			if((aa[j]!=null)&&(typeof(aa[j])=="object")&&(aa[j].length==2)){
				if(aa[j][0]=="VAR"){ta[j]=CSStateArray[aa[j][1]];}
				else{if(aa[j][0]=="ACT"){ta[j]=CSAction(new Array(new String(aa[j][1])));}
				else ta[j]=aa[j];}
			} else ta[j]=aa[j];
		}			
		result=aa[0](ta);
	}
	return result;
}
CSAct = new Object;

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}


userAgent = window.navigator.userAgent;
browserVers = parseInt(userAgent.charAt(userAgent.indexOf("/")+1),10);
mustInitImg = true;
function initImgID() {di = document.images; if (mustInitImg && di) { for (var i=0; i<di.length; i++) { if (!di[i].id) di[i].id=di[i].name; } mustInitImg = false;}}

function findElement(n,ly) {
	d = document;
	if (browserVers < 4)		return d[n];
	if ((browserVers >= 6) && (d.getElementById)) {initImgID; return(d.getElementById(n))}; 
	var cd = ly ? ly.document : d;
	var elem = cd[n];
	if (!elem) {
		for (var i=0;i<cd.layers.length;i++) {
			elem = findElement(n,cd.layers[i]);
			if (elem) return elem;
		}
	}
	return elem;
}

function changeImagesArray(array) {
	if (preloadFlag == true) {
		var d = document; var img;
		for (i=0;i<array.length;i+=2) {
			img = null; var n = array[i];
			if (d.images) {
				if (d.layers) {img = findElement(n,0);}
				else {img = d.images[n];}
			}
			if (!img && d.getElementById) {img = d.getElementById(n);}
			if (!img && d.getElementsByName) {
				var elms = d.getElementsByName(n);
				if (elms) {
					for (j=0;j<elms.length;j++) {
						if (elms[j].src) {img = elms[j]; break;}
					}
				}
			}
			if (img) {img.src = array[i+1];}
		}
	}
}


function changeImages() {
	d = document;
	if (d.images) {
		var img;
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			img = null;
			if (d.layers) {img = findElement(changeImages.arguments[i],0);}
			else {img = d.images[changeImages.arguments[i]];}
			if (img) {img.src = changeImages.arguments[i+1];}
		}
	}
}


function toggleImages() {
	for (var i=0; i<toggleImages.arguments.length; i+=2) {
		if (selected == toggleImages.arguments[i])
			changeImagesArray(toggleImages.arguments[i+1]);
	}
}

function CSClickReturn () {
	var bAgent = window.navigator.userAgent; 
	var bAppName = window.navigator.appName;
	if ((bAppName.indexOf("Explorer") >= 0) && (bAgent.indexOf("Mozilla/3") >= 0) && (bAgent.indexOf("Mac") >= 0))
		return true; // dont follow link
	else return false; // dont follow link
}

function CSSetImageURL(action) {
	var img=CSGetImage(action[1]);
	if (img) img.src=action[2];
}

function CSOpenPositionWindow(action) {
// Matt Ridley, Dec. '98
	var wf = "";	
	wf = wf + "width=" + action[3];
	wf = wf + ",height=" + action[4];
	wf = wf + ",resizable=" + (action[5] ? "yes" : "no");
	wf = wf + ",scrollbars=" + (action[6] ? "yes" : "no");
	wf = wf + ",menubar=" + (action[7] ? "yes" : "no");
	wf = wf + ",toolbar=" + (action[8] ? "yes" : "no");
	wf = wf + ",directories=" + (action[9] ? "yes" : "no");
	wf = wf + ",location=" + (action[10] ? "yes" : "no");
	wf = wf + ",status=" + (action[11] ? "yes" : "no");	
	wf = wf + ",left=" + action[12];
	wf = wf + ",top=" + action[13];	
	window.open(action[1],action[2],wf);
}
// © Mads Rasmussen Nov 2002
// Ver. 1.b1 dec 2002 - Jim D.
// All Rights Reserved Rasmussens Design
function flyanimageRDjim(action) { 
var venstre,hojre,FAIpost,FAIvin="";
var erNN6=document.getElementById&&!document.all;
if(erNN6) var nn=20; else nn=0;
if(action[15]==10){venstre=0; hojre =0;}
if(action[15]==20){venstre=Math.floor(screen.availWidth/2-action[3]/2-action[5]); hojre =Math.floor(screen.availHeight/2-action[4]/2)-action[5];}
if(action[15]==30){venstre=action[8]; hojre=action[9];}
var resize=action[14];
var alttext=action[6];
if(action[6]==""&&action[19]==true) alttext="Click image to close the window"; 
if(action[14]==true) var rdx=10; else rdx=0;
FAIvin = ",width=" + (action[3]+action[10]+(action[5]*2));
if(action[16] == 1){FAIvin += ",height=" + (action[4]+action[10]+(action[5]*2)) ;}
else if(action[16]== 2||action[16]==3||action[16]==4){ FAIvin += ",height=" + (action[4]+action[10]+40+rdx+nn+(action[5]*2));}
FAIvin += ",resizable=" + (resize ?"1":"0");
FAIvin += ",scrollbars=" + (action[13] ?"1":"0");
FAIvin += ",left=" + venstre;FAIvin += ",top=" + hojre;FAIvin += ",ScreenX=" + venstre;FAIvin += ",ScreenY=" + hojre;
FAIpost = '<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">';
FAIpost += '<html><head><meta http-equiv=\"content-type\" content=\"text/html;charset=iso-8859-1\">';
FAIpost += '<title>'+action[7]+'</title>';
if(action[18]==true){FAIpost += '<link href=\"'+action[1]+'\" rel=\"stylesheet\" type=\"text/css\" media=\"screen\">';}
FAIpost += '</head><body text=#000000 bgcolor=\"'+action[12]+'\" leftmargin=\"'+action[10]+'\" marginheight=\"'+action[10]+'\" marginwidth=\"'+action[11]+'\" topmargin=\"'+action[11]+'\">';
FAIpost +='<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" height=\"100%\"><tr><td align=\"center\" valign=\"middle\">';
if(action[19] == true){FAIpost +='<a href=\"Javascript:void(self.close())\" onfocus=\"this.blur();\">'}
FAIpost +='<img src=\"'+action[2]+'\" border=\"'+action[5]+'\" alt=\"'+alttext+'\" title=\"'+action[21]+'\">';
if(action[19] == true){FAIpost +='</a>'}
if(action[16] == 1){action[17]="";}
if(action[16] == 2){FAIpost +='<p align=\"left\">&nbsp;&nbsp;'}
if(action[16] == 3){FAIpost +='<p align=\"center\">'}
if(action[16] == 4){FAIpost +='<p align=\"right\">'}
if(action[16] == 2||action[16]==3||action[16]==4){FAIpost +='<a href=\"Javascript:void(self.close())\" onfocus=\"this.blur();\">'+action[17]+'</a>'}
if(action[16] == 4){FAIpost +='&nbsp;&nbsp;'}
if(action[16] == 2||action[16]==3||action[16]==4){FAIpost +='</p>'}
FAIpost +='</td></tr></table>';
FAIpost += '</body></html>';
	
nytFAIvin = window.open('',action[20],FAIvin);
nytFAIvin.focus();
nytFAIvin.document.write(FAIpost);
nytFAIvin.document.close()
}
//Ver. 1.1.9 feb 2003 - revised ver. b2.511/2.004 mar 2004 - edited again Jul 2005 ver. 2.1
// All Rights Reserved Rasmussens Design
function flyanimage25RD(action) { 
var nytFAIvin,FAIpost,FAIvin="";
var agt = navigator.userAgent.toLowerCase();
var erNN62 = (agt.indexOf("netscape6/6.2") !=-1)?1:0;var erNN60 = (agt.indexOf("netscape6/6.0") !=-1)?1:0;var erNN = (agt.indexOf("netscape") !=-1)?1:0;var erFo = (agt.indexOf("firefox") !=-1)?1:0;var erOp = (agt.indexOf("opera") !=-1)?1:0;var erSa = (agt.indexOf("safari") !=-1)?1:0;

FAIvin = ",height=20,width=20,resizable="+(action[18]?1:0)+",scrollbars="+(action[17]?1:0);
FAIpost = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">\n<html>\n<head>'

FAIpost += '\n <scri'
FAIpost +='pt type="text/javascript">'
// mine kopiretigheder - trussel med bÃ¥l og brÃ¦nd
FAIpost +='\n//Script copyrights belong to Rasmussens Design http://www.rasmussens.dk Mar. 2004. This script is a part of a commercial Adobe GoLive action. Any use than licensed is prohibitate.'
//scriptet til on the fly html page
FAIpost +='\nfunction tilpasvin() {var venstre,hojre,border;var agt = window.navigator.userAgent.toLowerCase();var erNN = (agt.indexOf("netscape") !=-1)?1:0;var erFo = (agt.indexOf("firefox") !=-1)?1:0;var erIE=(agt.indexOf("explorer") != -1)?1:0;var erWin=(agt.indexOf("windows") != -1)?1:0;var erOp = (agt.indexOf("opera") !=-1)?1:0;var erSa = (agt.indexOf("safari") !=-1)?1:0;var lm1=(erWin)?10:0;var lm2=(erWin)?25:0;var lm3=(erNN||erFo)?16:0;var lm4=(erNN)?5:0;var lm6=(erWin)?20:0;var lm7=(erOp||erSa)?23:0;'
//her forÃ¸ges vh, hvis resize er true
if(action[18]==true) FAIpost +='var lm5=15;'; else FAIpost +='var lm5=0;'
// hvis der stÃ¥r anedet en 0, skal vÃ¦rdien ganges med to lÃ¦gges til v. stÃ¦rrelsen
if(action[2]>0) FAIpost += 'border=parseInt('+action[2]+'*2);'; else FAIpost +='border=0;'
// caption er true lÃ¦gges 70 til vh (virker)
if(action[11]==true) FAIpost +='var caption=70;'; else FAIpost +='var caption=0;'
//her findes bredden
FAIpost += 'var vb=parseInt('+action[8]+'*2+document.images["Img"].width+lm1+lm3+border);'
// her findes hÃ¸jden
FAIpost += 'var vh=parseInt('+action[9]+'*2+document.images["Img"].height+lm2+lm3+lm4+lm5+lm7+caption+border);'
// efterfÃ¸lgende er en sikkerhedsventil, sÃ¥ billed/vinduesstÃ¸rrelsen ikke bliver stÃ¸rre end skÃ¦rmoplÃ¸sningen
// hvis vb er stÃ¸rre end screen.avail sÃ¥ tilpasses vinduet her
FAIpost += 'if(vb>screen.availWidth) {vb=parseInt(screen.availWidth-('+action[6]+'+'+action[8]+'+border)+lm3); vh=parseInt(lm3+vh+lm5);}'
// hvis vh er stÃ¸rre end screen.avail sÃ¥ tilpasses vinduet her
FAIpost += 'if(vh>screen.availHeight) {vh=parseInt(screen.availHeight-('+action[7]+'+'+action[9]+'+(lm3*2)+border));'
FAIpost += ' vb =parseInt(lm3+vb+lm5+lm6);}self.resizeTo(vb,vh);'
//sÃ¦ttes midlertidigt ud af kraft.
if(erNN||erFo){FAIpost += 'if(parseInt('+action[8]+'*2+document.images["Img"].width+lm1+lm3+border)<vb) self.resizeTo(parseInt(vb-15),parseInt(vh+10));'
FAIpost += 'if(parseInt('+action[9]+'*2+document.images["Img"].height+caption+border)<vh) self.resizeTo(parseInt(vb-lm3),parseInt(vh-lm3));'}
// hvis center window er true, findes midten af skÃ¦rmen her
if(action[16]==true){FAIpost +='venstre=parseInt(screen.availWidth/2-vb/2); hojre=parseInt(screen.availHeight/2-vh/2);'}
// hvis center window er false, findes positionen her
if(action[16]==false){FAIpost +='venstre='+action[6]+'; hojre='+action[7]+';'}
// sÃ¦tter vinduet pÃ¥ plads pÃ¥ skÃ¦rmen
FAIpost += 'self.moveTo(venstre,hojre);}'
FAIpost += '\n</scr'
FAIpost +='ipt>'

//selve det renderede vindue
FAIpost += '\n<title>'+action[4]+'</title>';
if(action[10]!="#")FAIpost += '\n<link href="'+action[10]+'" rel="stylesheet" type="text/css" media="screen">';
FAIpost += '</head><body text=#000000 bgcolor="#'+action[15]+'" leftmargin="'+action[8]+'" marginheight="'+action[9]+'" marginwidth="'+action[8]+'" topmargin="'+action[9]+'"   onload="tilpasvin()";'

if(action[14]==true&&!erNN62&&!erNN60) FAIpost += ' onBlur="javascript:window.close();"'
// sikkerhedsventil til NN6/6.2 ellers crasher den
FAIpost += '>';
FAIpost +='<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%"><tr><td align="center" valign="middle">'
if(action[13]==true) FAIpost +='<a href="Javascript:void(self.close())" onfocus="this.blur();" title="'+action[3]+'">'
FAIpost +='<img src="'+action[1]+'" align="top" border="'+action[2]+'" alt="'+action[3]+'" title="'+action[3]+'" id="Img" name="Img">'
if(action[13]==true)FAIpost +='</a>'
if(action[11]==true)FAIpost +='<div align="center">'+action[12]+'</div>'
FAIpost +='</td></tr></table>'
FAIpost += '</body></html>'
nytFAIvin = window.open('',action[5],FAIvin);
nytFAIvin.document.write(FAIpost);
if(window.focus) nytFAIvin.focus();
nytFAIvin.document.close()
}

// OUT Open Image Window Action v1.2.6
// Script copyright 1999, 2000 OUT Media Design GmbH. All rights reserved.

function OUTOpenImageWindow(action) {
	var imgWinW = action[3];
	var imgWinH = action[4];
	var bgImg = action[16] ? ' BACKGROUND="'+action[15]+'" ' : '';
	var bVers=window.navigator.appVersion.substring(0,1);
	var isMac = window.navigator.userAgent.indexOf("Mac") >= 0;
	var isNN = window.navigator.appName.indexOf("Netscape")>=0;
	var isIE = window.navigator.appName.indexOf("Explorer")>=0;
	var wOffset = (bVers<4 && isNN) ? 9 : action[14];
	imgWinW += 2*wOffset;
	imgWinH += 2*wOffset;
	var wf = "";	
	wf = wf + "width=" + imgWinW;
	wf = wf + ",height=" + imgWinH;
	wf = wf + ",resizable=" + (action[5] ? "no" : "yes");
	wf = wf + ",scrollbars=" + (action[6] ? "no" : "yes");
	wf = wf + ",menubar=" + (action[7] ? "no" : "yes");
	wf = wf + ",toolbar=" + (action[8] ? "no" : "yes");
	wf = wf + ",directories=" + (action[9] ? "no" : "yes");
	wf = wf + ",location=" + (action[10] ? "no" : "yes");
	wf = wf + ",status=" + (action[11] ? "no" : "yes");
	var newImgWin = window.open("",action[2],wf);
	newImgWin.saveResizable = !action[5];
	
	newImgWin.document.writeln('<HTML><HEAD><TITLE>'+action[13]+'</TITLE></HEAD>');
	newImgWin.document.writeln('<BODY BGCOLOR="'+action[12]+'"'+bgImg+' MARGINWIDTH="'+action[14]+'" MARGINHEIGHT="'+action[14]+'" LEFTMARGIN="'+action[14]+'" TOPMARGIN="'+action[14]+'">');
	newImgWin.document.write('<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="100%" HEIGHT="100%"><TR><TD VALIGN="middle" ALIGN="center"><IMG SRC="'+action[1]+'"');
	if (action[17] && bVers>=4) newImgWin.document.write(' ONLOAD="var imgWinW=this.width+'+2*wOffset+';var imgWinH=this.height+'+2*wOffset+';if(window.setResizable) window.setResizable(true);window.resizeTo(imgWinW, imgWinH);if (window.setResizable) window.setResizable(window.saveResizable);if(window.document.body && (window.document.body.clientWidth!=imgWinW || window.document.body.clientHeight!=imgWinH)) { window.resizeTo(2*imgWinW-window.document.body.clientWidth,2*imgWinH-window.document.body.clientHeight);}"');
	newImgWin.document.writeln('></TD></TR></TABLE>');
	newImgWin.document.writeln('</BODY></HTML>');
	newImgWin.document.close();
	if(bVers>=4 && !action[17]) { //do chrome compensation now
		if (isNN && newImgWin.setResizable) newImgWin.setResizable(true);
		if (!(isIE && isMac)) newImgWin.resizeTo(imgWinW,imgWinH);
		if (isNN && newImgWin.setResizable) newImgWin.setResizable(!action[5]);
		if(isIE && !isMac && (newImgWin.document.body.clientWidth!=imgWinW || newImgWin.document.body.clientHeight!=imgWinH)) newImgWin.resizeTo(2*imgWinW-newImgWin.document.body.clientWidth,2*imgWinH-newImgWin.document.body.clientHeight);
	}
	if(action[18] && bVers>=4 && !(isMac && isIE && bVers<5)) newImgWin.focus();
}


