/*Properties = 'resizable=no,scrollbars=no, status=no, width=100,height=100, top=50, left=50'*/function oWin(url,properties){hurl = 'http://'+window.location.host+url;wwin = window.open( hurl, "newWindow", properties);}function get_mouse(e){  if (!e) e = window.event;  if (e)  {     if (e.pageX || e.pageY)    { // this doesn't work on IE6!! (works on FF,Moz,Opera7)      x = e.pageX;      y = e.pageY;    }    else if (e.clientX || e.clientY)  {       x = e.clientX + document.body.scrollLeft;      y = e.clientY + document.body.scrollTop;    }    }//window.status = x + ' ' + y + ' ' + document.body.scrollTop;}function get_mouseclick(e){ if (!e) e = window.event;  if (e.button == 1){//	window.status="event2:"+event.type;}else {//window.status="event:"+event.type;}}function popkey(event){if (!event) event = window.event;           if (event.keyCode==27) {       helpScreen.display='none';      try {helpScreenMask.display='none'}      catch (err) {}      event.returnValue=false;    }    if ((event.keyCode == 8) && (event.srcElement.type != "text" && event.srcElement.type != "textarea" && event.srcElement.type != "password"))       {           event.returnValue=false       }        if (event.keyCode == 13)       {        	if (event.srcElement.name == 'query') {			sok();        	}   	           event.returnValue=false       }      }function sok() {        			var f = document.forms[0];				var loc = thisDb + 'Search?SearchView&Query=' + f.query.value + '*&SearchOrder=4';				var comp = replacesubstring(loc, " ", "*+and+");				//alert(comp);				self.location = comp;				return false;}function replaceCR(sourceList) {	for (var i=0; i<sourceList.length; i++) 		{ 			if (sourceList.charCodeAt(i) == 13) 					{ 						sourceList = sourceList.substring(0,i)+' '+sourceList.substring(i+1,sourceList.length)					} 								if (sourceList.charCodeAt(i) == 10) 					{ 						sourceList = sourceList.substring(0,i)+'<br>'+sourceList.substring(i+1,sourceList.length)					} 			} 		return sourceList}  function replacesubstring(sourceList,fromList,toList) {	for (var i=0; i<sourceList.length; i++) 		{ 		if (sourceList.substring(i,i+fromList.length) == fromList) 				{ 					sourceList = sourceList.substring(0,i)+toList+sourceList.substring(i+fromList.length,sourceList.length)				} 		} 	return sourceList}function navFylke(obj) {	var url = checkSelection(obj);	self.location = url;}function checkSelection( obj){	verdi = "";	for( j = 0; j < obj.length; j++	)	{		if( obj.options[j].selected == true)		{			verdi = obj.options[j].value;		}	}	return verdi}function imageOnClick(){/*	for( i=0; i<document.images.length ; i++ ) {		dis = document.images[i].src.toLowerCase();		if( dis.indexOf('$file') != -1 && dis.indexOf('/0/') == -1  && dis.indexOf('reklame') == -1 && dis.indexOf('top.jpg') == -1 && dis.indexOf('mblad.gif') == -1) {			document.images[i].onclick= function() { popUpPicMx('<center><img id=\"zoomPic\" width=640 border=0 src=' +escape(this.src)+'>',220) };		}	}	*/}function popUpMx(msg,ix){var content="<div id=\"helpScreenTop\"></div><div id=\"helpScreenMiddle\"><span class=ingress>"+unescape(msg)+"</span>"+"<p><center><input class=button_main type=Button value='Lukk vindu (esc)' onclick=\"helpScreen.display='none';\"></p>"+"</div><div id=\"helpScreenBottom\"></div>";helpScreen.left=ix+Xoffset;helpScreen.top=document.body.scrollTop+50;//alert(y/2 +document.body.scrollTop);document.getElementById("helpScreen").innerHTML=content;helpScreen.display='';}function popUpPicMx(msg,ix){var content="<div id=\"helpScreenTop640\"></div><div id=\"helpScreenMiddle640\">"+unescape(msg)+"<p><center><input class=button_main type=Button value='Lukk vindu (esc)' onclick=\"helpScreen.display='none';\"></p>"+"</div><div id=\"helpScreenBottom640\"></div>";helpScreen.left=ix+Xoffset;helpScreen.top=document.body.scrollTop+50;//alert(y/2 +document.body.scrollTop);document.getElementById("helpScreen").innerHTML=content;//picH = document.getElementById('zoomPic');//helpScreenMiddle = document.getElementById('helpScreenMiddle640');helpScreen.display='';//alert(picH.height);//helpScreenMiddle.style.height= picH.height + 40 + "px";}function popUpDiscussion(msg,ix,ref){var content="<div id=\"helpScreenTop\"></div><div id=\"helpScreenMiddle\"><span class=heading>"+unescape(msg)+"</span>"+"<p class=ingress>Ditt navn:<br><input class=input_260 type=text name=av></p>"+"<p class=ingress>Ditt passord (hvis du er medlem):<br><input class=input_260 type=password name=pass></p>"+"<p class=ingress>Skriv innlegget:<br><textarea class=input_400 rows=8 cols=45 name=innlegg></textarea></p>"+"<p class=ingress>Alle nye innlegg blir sendt til artikkelforfatter for godkjenning f\u00F8r de blir publisert (unntatt for de som er <a href=\"../nyttmedlem?openform\">medlem</a> og har passord).</p>"+"<p><input class=button_main type=Button value='Lagre innlegg'"+" onclick=\"if(document.forms[0].innlegg.value!='')"+"{self.location= thisDb+ 'wAdiscuss?Openagent&mail='+escape(document.forms[0].mailref.value)+'&noteid='+escape(document.forms[0].noteId.value)+'&ref="+ ref +"&av='+escape(document.forms[0].av.value)+'&pass='+escape(document.forms[0].pass.value)+'&innlegg='+escape(replaceCR(document.forms[0].innlegg.value));}\">"+"&nbsp;<input class=button_main type=Button value='Lukk vindu (esc)' onclick=\"helpScreen.display='none';\"></p>"+"</div><div id=\"helpScreenBottom\"></div>";helpScreen.left=ix+400;helpScreen.top=document.body.scrollTop+150;document.getElementById("helpScreen").innerHTML=content;helpScreen.display='';}function popUpAbb(msg,ix){var content="<div id=\"helpScreenTop\"></div><div id=\"helpScreenMiddle\" style=\"height:150px;\"><span class=heading>"+unescape(msg)+"</span>"+"<p class=ingress>Din e-postadresse:<br><input type=text name=epost></p>"+"<p class=\"ingress\">Du vil f\u00E5 en e-post n\u00E5r det er lagt ut nyheter.</p><p><input class=button_main type=Button value='Start abonnement'"+" onclick=\"if(document.forms[0].epost.value.match(/\\S+@([-\\w]+\\.)+\\w+/g) != null)"+"{self.location= thisDb + 'wAabb?Openagent&epost='+escape(document.forms[0].epost.value);}\">"+"&nbsp;<input class=button_main type=Button value='Lukk vindu (esc)' onclick=\"helpScreen.display='none';\"></p></div>"+"<div id=\"helpScreenBottom\"></div>";helpScreen.left=ix+Xoffset;helpScreen.top=250;document.getElementById("helpScreen").innerHTML=content;helpScreen.display='';}function popUp(msg){var content="<div id=\"helpScreenTop\"></div><div id=\"helpScreenMiddle\"><span class=ingress>"+unescape(msg)+"</span><p class=\"ingress\"><center><input class=button_main type=Button value='Lukk vindu (esc)' onclick=\"helpScreen.display='none';\"></p>"+"</div><div id=\"helpScreenBottom\"></div>";x=300;y=220;helpScreen.left=x+Xoffset;helpScreen.top=y+Yoffset;helpScreen.top=document.body.scrollTop+50;document.getElementById("helpScreen").innerHTML=content;helpScreen.display='';}function popUpContact(msg,ix){var content="<div id=\"helpScreenTop\"></div><div id=\"helpScreenMiddle\"><span class=heading>"+unescape(msg)+"</span>"+"<p class=ingress>Ditt navn:<br><input type=text name=av></p>"+"<p class=ingress>Din e-postadresse:<br><input type=text name=epost></p>"+"<p class=ingress>Tekst:<br><textarea rows=8 cols=45 name=tekst></textarea></p>"+"<p><input class=button_main type=Button value='Send henvendelse'"+" onclick=\"if(document.forms[0].tekst.value!='')"+"{self.location= thisDb+ 'wAcontact?Openagent&av='+escape(document.forms[0].av.value)+'&fromepost='+escape(document.forms[0].epost.value)+'&tekst='+escape(replaceCR(document.forms[0].tekst.value));}\">"+"&nbsp;<input class=button_main type=Button value='Lukk vindu (esc)' onclick=\"helpScreen.display='none';\"></p>"+"</div><div id=\"helpScreenBottom\"></div>";helpScreen.left=ix+Xoffset;//helpScreen.top=document.body.scrollTop+50;helpScreen.top=50;document.getElementById("helpScreen").innerHTML=content;helpScreen.display='';}function imageOnClickGall(){/*var dis = '';var id = '';	for( i=0; i<document.images.length ; i++ ) {		dis = document.images[i].src.toLowerCase();		if (dis.indexOf('alledoc') > 1) {			document.images[i].onclick= function() { popUpGall('<center><img id="gallPic" width=100% border=0 src=' +escape(this.src)+'>',10,this.id) };			document.images[i].style.cursor = 'hand';			document.images[i].alt = 'Klikk for st\u00F8rre bilde';		}	}*/}var nId;function popUpGall(msg,ix,id){nId = new Number(id)+1; var butten = "<input class=button_main type=Button value='Neste bilde' onclick=\"try{document.getElementById('gallPic').src = eval('document.getElementById(\\\''+ nId +'\\\').src');nId++}catch(e){this.style.display='none';}\">&nbsp;";var buttenSS = "<input id='bSS' class=button_main type=Button value='Automatisk fremvisning' onclick=\"if(t==null){this.value='Stopp fremvisning';document.getElementById('loadslide').style.display = 'inline';j=(j==0?nId-1:j);runSlideShow();}else{this.value='Automatisk bildefremvisning';document.getElementById('loadslide').style.display = 'none';clearTimeout(t);t=null;}\">&nbsp;";var content="<TABLE style=\"border-collapse: collapse; border: 25px solid #000;\" CELLPADDING=3 CELLSPACING=5 "+ "BGCOLOR=#000000><TD ALIGN=left><FONT COLOR=black SIZE=1>"+unescape(msg)+"</FONT></TD><tr><td><center><img src=\"/loading.gif\" id=\"loadslide\" style=\"display:none;width:32px;float:left;\">"+buttenSS+butten+"<input class=button_main type=Button value='Lukk vindu' onclick=\"helpScreen.display='none';helpScreenMask.display='none';clearTimeout(t);t=null;\"></td></tr></TABLE>";helpScreen.width = '640px';helpScreen.top=document.body.scrollTop+10;//alert(y/2 +document.body.scrollTop);document.getElementById("helpScreen").innerHTML=content;helpScreenMask.display='block';helpScreen.display='';helpScreen.left=document.body.clientWidth/2-document.getElementById("helpScreen").offsetWidth/2;}//COOKIE //-----------------------------------------------------------------------------------------------------function GetCookie (name) {  var arg = name + "=";  var alen = arg.length;  var clen = document.cookie.length;  var i = 0;  while (i < clen) {var j = i + alen;    if (document.cookie.substring(i, j) == arg)      return getCookieVal (j);    i = document.cookie.indexOf(" ", i) + 1;    if (i == 0) break;   }  return null;}function SetCookie (name, value) {  var argv = SetCookie.arguments;  var argc = SetCookie.arguments.length;  var expires = (argc > 2) ? argv[2] : null;  var path = (argc > 3) ? argv[3] : null;  var domain = (argc > 4) ? argv[4] : null;  var secure = (argc > 5) ? argv[5] : false;  document.cookie = name + "=" + escape (value) + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + ((path == null) ? "" : ("; path=" + path)) +  ((domain == null) ? "" : ("; domain=" + domain)) +    ((secure == true) ? "; secure" : "");}function DeleteCookie (name) {  var exp = new Date();  exp.setTime (exp.getTime() - 1);   var cval = GetCookie (name);  document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();}var expDays = 1;var exp = new Date(); exp.setTime(exp.getTime() + (expDays*24*60*60*1000));function amt(){var count = GetCookie('count')if(count == null) {SetCookie('count','1')return 1}else {var newcount = parseInt(count) + 1;DeleteCookie('count')SetCookie('count',newcount,exp)return count   }}function getCookieVal(offset) {var endstr = document.cookie.indexOf (";", offset);if (endstr == -1)endstr = document.cookie.length;return unescape(document.cookie.substring(offset, endstr));}//END COOKIESvar dben = location.pathname;dben = dben.substr(0,dben.lastIndexOf('.nsf'))+'.nsf/';//Preload imagesif (document.images){  pic1= new Image();   pic1.src = dben +"highbutton.png";   pic2= new Image();   pic2.src = dben +"bgHelpTop640.png";   pic3= new Image();   pic3.src = dben +"bgHelpBottom640.png";   pic4= new Image();   pic4.src = dben +"bgHelpMiddle640.png";   }function checkChecked( obj){	verdi = "";	for( j = 0; j < obj.length; j++	)	{		if( obj[j].checked == true)		{			verdi = obj[j].value;		}	}	return verdi}