function setQuery(n){var i=document.getElementById("searchFieldQuery"),t;i!=null&&doOnce&&(doOnce=!1,t=i.value,t.length>0&&(n.href=n.href+"?Query="+encodeURIComponent(t)))}function ToggleElementDisplay(n){var t=document.getElementById(n);t!=null&&(t.style.display=t.style.display=="none"?"":"none")}function ToggleImageSource(n,t,i){var r=document.getElementById(n),u,f;r!=null&&(u=r.src,f=u.lastIndexOf(t),r.src=f!=-1?i:t)}function OpenPopupWindow(n,t,i){window.open(n,t,i)}function DropDown_OnChange(n){var t=n.selectedIndex,i=n.options[t].value,r=i;return gaLogSearch("Resultatliste overskrift",n.options[t].text),top.location.href=r,!0}function submitStreetListForm(n){var t=document.getElementById(n),i;t!=null&&(i=t.value,window.location=i)}function submitAddressForm(n,t,i,r){var u=document.getElementById(t),f;u!=null?(f=u.options[u.selectedIndex].text,window.location="/?Query="+i+"+"+f+"+"+r+"&PostSted="+r+"&type="+n):window.location="/?Query="+i+"+"+r+"&type="+n}function getTMqs(n,t,i,r,u,f,e){var c=new Date,o=window.location,s,h,l,a;o.length>=252&&(o=o.substring(0,252)+"...");e&&(o=o+"&"+e.join("&"));s=parent.frames?parent.document.referrer:document.referrer;t.length>=252&&(t=t.substring(0,252)+"...");i.length>=252&&(i=i.substring(0,252)+"...");s.length>=252&&(s=s.substring(0,252)+"...");h=o+"*"+t+"*"+i+"*"+s+"*"+navigator.javaEnabled()+"/";h+=window.screen?screen.width+"x"+screen.height+"/"+screen.colorDepth+"/":"//";h+=r+"/"+u+"/"+f+"/"+c.getTime()+"/";l='<img name="tmImg1" border="0" height="1" width="1" onLoad="nxtImg(\'tmImg2\', \''+n+"', '"+h+"')\">";a='<img name="tmImg2" border="0" height="1" width="1">';document.write(l);document.write(a);nxtImg("tmImg1",n,c.getTime())}function nxtImg(n,t,i){if(document.images&&!tmLd){tmLd=!0;var r="";n=="tmImg1"?r=t+"://"+tmLoc+"/VC"+i:n=="tmImg2"&&(r=t+"://"+tmLoc+"/"+tmVer+i);document.images[n].src.indexOf(r)<0&&(document.images[n].src=r);tmLd=!1}}function gaLogMap(n,t){_gaq.push(["_trackEvent","Kart",n,t])}function gaLogSearch(n,t,i){_gaq.push(["_trackEvent","Sok",n,t,i])}function gaLogInfo(n,t){_gaq.push(["_trackEvent","Infoside",n,t])}function gaLogExternal(n,t){_gaq.push(["_trackEvent","External",n,t])}function gaLogMapUse(n,t,i){i?_gaq.push(["_trackEvent","Kartvisning",n,t,i]):_gaq.push(["_trackEvent","Kartvisning",n,t])}function setFocusTimeout(n){setTimeout("setFocus('"+n+"')",1e3)}function setFocus(n){var t=document.getElementById(n);t!=null&&t.focus()}function redirectMobileVersion(n,t,i){var r=new Date;r.setDate(r.getDate()+365);document.cookie="1881_WebVersion_Name2="+n+";domain=.1881.no;expires="+r.toUTCString();document.cookie="1881_WebVersion_Url2="+t+";domain=.1881.no;expires="+r.toUTCString();window.location.href=t+i}function serviceProxy(n){var t=this;this.serviceUrl=n;this.invoke=function(n,t,i,r){$.ajax({type:"POST",data:t,dataType:"json",url:"http://"+window.location.hostname+this.serviceUrl+n,contentType:"application/json; charset=utf-8",timeout:5e3,success:function(n){i(n.d)},error:r})}}function loadDialog(n,t,i){$("#"+n).length==0?($("body").append($("<div />",{id:n})),$("#"+n).dialog({modal:!0,autoOpen:!1,height:i+25,width:t,position:["center","center"],show:{effect:"drop",direction:"up"},hide:{effect:"drop",direction:"up"},resizable:!1}),$(".ui-dialog .ui-dialog-content").css("padding","0")):$("#"+n).html("");$("<iframe />",{src:$("#"+n+"_link").attr("href"),width:t,height:i-2,frameborder:0,scrolling:"no"}).appendTo("#"+n);$("#"+n).dialog("open")}function LogAction(n,t,i){typeof i=="undefined"&&(i="");var r=new serviceProxy("/Service/Logging.asmx/"),u='{"listingId":"'+n+'", "action":"'+t+'", "value":"'+i+'"}';r.invoke("Action",u,ActionLogged,ActionLoggedError)}function ActionLogged(){}function ActionLoggedError(){}function menuShowHide(n){document.onclick=null;var t=document.getElementById("drop_menu"),i=document.getElementById("button_show"),r=document.getElementById("button_hide");n?(menuInit=!0,document.onclick=hideMenu,t.style.display="block",i.style.display="none",r.style.display="block"):(t.style.display="none",i.style.display="block",r.style.display="none")}function hideMenu(){if(menuInit)menuInit=!1;else{var n=document.getElementById("drop_menu");n&&n.style.display=="block"&&menuShowHide()}}function getTarget(n){var t,n;return n||(n=window.event),n.target?t=n.target:n.srcElement&&(t=n.srcElement),t}function menuMouseOver(n){var t=getTarget(n);document.getElementById("searchButton").value=unescape(menuDict.Lookup(t.id).buttonText)}function menuClick(n){var r=getTarget(n),t=menuDict.Lookup(r.id),i=document.getElementById("searchBarForm");i&&(i.action=t.action);document.getElementById("queryType").value=t.qt;document.getElementById("text_example").innerHTML=unescape(t.searchText);menuShowHide(!1);document.getElementById("searchFieldQuery").focus();action=t.action;i?document.getElementById("searchFieldQuery").value!=""&&(gaLogSearch("Søkebar","Innsnevre søk"),i.submit()):document.getElementById("searchFieldQuery").value!=""&&(gaLogSearch("Søkebar","Innsnevre søk"),searchBarSubmitForm())}function searchBarSubmitForm(){var r,t,n,i;value=document.getElementById("searchFieldQuery").value;r=document.getElementById("queryType").value;action||(action="/");t="http://www.1881.no";(window.location.toString().indexOf("80.232.78.230")>0||window.location.toString().indexOf("139.118.185.223")>0||window.location.toString().indexOf(".1881.no")>0||window.location.toString().indexOf("localhost")>0)&&(t="");n=t+action+"?query="+encodeURIComponent(value)+"&qt="+r;i=document.getElementById("filter");i!=null&&i.checked&&(n+="&filter=on");window.location=n}function initSearchBar(){var r=document.getElementById("drop_menu"),i,t,u,n;if(r)for(menuDict.Add("search_all_1881",new MenuItem("Søk hele 1881","Søk på hva du vil! (Bransje, firma, person, telefonnummer eller adresse)","/","8")),menuDict.Add("search_person",new MenuItem("Søk person","Søk person, eksempel: Jan Johansen","/Person/","5")),menuDict.Add("search_business",new MenuItem("Søk bransje","Søk bransjer, eksempel: Rørlegger Oslo","/Bransje/","7")),menuDict.Add("search_company",new MenuItem("Søk firma","Søk firma, eksempel: Telenor","/Firma/","6")),menuDict.Add("search_address",new MenuItem("Søk adresse","Søk adresse, eksempel: Storgata Oslo","/Map/","8")),menuDict.Add("search_boardmembers",new MenuItem("Søk styreverv/roller","Søk styreverv/roller i næringslivet, eksempel: Olav Thon","/Rolle/","18")),menuDict.Add("search_internet",new MenuItem("Søk internett","Søk internett, eksempel: Britney Spears","/Internett/","0")),i=r.getElementsByTagName("li"),t=0;t<i.length;t++)i[t].onmouseover=menuMouseOver,i[t].onclick=menuClick;u=document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop?document.body.scrollTop:0;u==0&&window.document.URL.indexOf("#")==-1&&(n=document.getElementById("searchFieldQuery"),n!=null&&n.type=="text"&&(n.focus(),n.value=n.value))}function Lookup(n){return this[n]}function Add(){for(c=0;c<Add.arguments.length;c+=2)this[Add.arguments[c]]=Add.arguments[c+1],this.Keys[this.Keys.length]=Add.arguments[c]}function Dictionary(){this.Add=Add;this.Lookup=Lookup;this.Keys=[]}function MenuItem(n,t,i,r){this.buttonText=n;this.searchText=t;this.action=i;this.qt=r}function addLoadEvent(n){var t=window.onload;window.onload=typeof onload!="function"?n:function(){t&&t();n()}}function Enter(n){return n.keyCode==13?(searchBarSubmitForm(),!1):!0}function EAS_load(n){document.write('<script language="JavaScript" src="'+n+'"><\/script>')}function EAS_init(n,t){var r=(new Date).getTime(),i=EAS_server+"/eas?target=_blank&EASformat=jsvars&EAScus="+n+"&ord="+r;EAS_detect_flash();i+="&EASflash="+EAS_flash;t&&(i+="&"+t);EAS_load(i);return}function EAS_detect_flash(){if(!(EAS_flash>1)){var n=11,u=navigator.userAgent.indexOf("Opera")!=-1?!0:!1,f=navigator.appVersion.indexOf("MSIE")!=-1?!0:!1,e=navigator.appVersion.indexOf("Windows")!=-1?!0:!1;if(f&&e&&!u){for(document.write("<SCRIPT LANGUAGE=VBScript> \n"),document.write("on error resume next \nDim eas_flobj("+n+") \n"),i=2;i<n;i++)document.write("Set eas_flobj("+i+') = CreateObject("ShockwaveFlash.ShockwaveFlash.'+i+'") \n'),document.write("if(IsObject(eas_flobj("+i+"))) Then EAS_flash="+i+" \n");document.write("<\/SCRIPT> \n")}else if(navigator.plugins&&(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"])){var o=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"",t=navigator.plugins["Shockwave Flash"+o].description,r=parseInt(t.substr(t.indexOf(".")-2,2),10);r>1&&(EAS_flash=r)}}}function EAS_show_flash(n,t,r,u){var f=[];for(u&&(f=u.split(",")),document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+n+'" height="'+t+'"><param name=src value='+r+">"),i=0;i<f.length;i++)EAS_eq=f[i].indexOf("="),EAS_nv0=f[i].substring(0,EAS_eq),EAS_nv1=f[i].substring(EAS_eq+1,f[i].length),document.write('<param name="'+EAS_nv0+'" value="'+EAS_nv1+'">');for(document.write('<embed src="'+r+'" width="'+n+'" height="'+t+'" type="application/x-shockwave-flash"'),i=0;i<f.length;i++)EAS_eq=f[i].indexOf("="),EAS_nv0=f[i].substring(0,EAS_eq),EAS_nv1=f[i].substring(EAS_eq+1,f[i].length),document.write(" "+EAS_nv0+'="'+EAS_nv1+'"');document.write("><\/embed><\/object>")}function EAS_embed_flash(n,t,r,u,f,e,o){var h="",c,l,a,s;if(u)for(s=[],s=u.split(","),i=0;i<s.length;i++)c=s[i].indexOf("="),l=s[i].substring(0,c),a=s[i].substring(c+1,s[i].length),l=="FlashVars"?f+=(f?"&":"")+a:h+='<param name="'+l+'" value="'+a+'" />';if(e&&o)for(s=[],s=e.split(","),i=0;i<s.length;i++)f+=(f?"&":"")+s[i]+"="+o+s[i];f&&(h+='<param name="FlashVars" value="'+f+'" />');document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+n+'" height="'+t+'"><param name="movie" value="'+r+'" />');u&&document.write(h);document.write("<!--[if !IE]>-->");document.write('<object type="application/x-shockwave-flash" data="'+r+'" width="'+n+'" height="'+t+'">');u&&document.write(h);document.write("<\/object>");document.write("<!--<![endif]-->");document.write("<\/object>");return}function EAS_statistics(){var u=new Date,h=u.getTime(),f=0,e=0,o=0,s="",c=u.getTimezoneOffset()/60,i,r,n,t;if(navigator.plugins){for(i=navigator.plugins,r=[],n=0;n<i.length;n++)i[n].name.indexOf("RealPlayer")!=-1?r[0]=1:i[n].name.indexOf("Adobe Reader")!=-1?r[1]=1:i[n].name.indexOf("Adobe Acrobat")!=-1?r[1]=1:i[n].name.indexOf("Windows Media Player")!=-1?r[2]=1:i[n].name.indexOf("QuickTime")!=-1&&(r[3]=1);for(n=0;n<4;n++)r[n]&&(s+=n+",")}typeof EAS_cu!="undefined"&&(EAS_flash==1&&EAS_detect_flash(),screen&&screen.colorDepth&&(o=screen.colorDepth),document.body&&document.body.clientHeight>50?(f=document.body.clientWidth,e=document.body.clientHeight):document.documentElement&&document.documentElement.clientHeight>50?(f=document.documentElement.clientWidth,e=document.documentElement.clientHeight):typeof(window.innerHeight=="number")&&(f=window.innerWidth,e=window.innerHeight),t=EAS_server+"/eas?cu="+EAS_cu+";ord="+h,t+=";logrest=width="+screen.width+";height="+screen.height+";bwidth="+f+";bheight="+e+";time="+u.getHours()+":"+u.getMinutes()+":"+u.getSeconds(),t+=";tmz="+c,EAS_flash>2&&(t+=";flash="+EAS_flash),typeof EAS_page!="undefined"&&(t+=";page="+EAS_page),typeof java!="undefined"&&java.installed&&(t+=";jversion="+java.lang.System.getProperty("java.version")),typeof EAS_jsversion!="undefined"&&(t+=";jsversion="+EAS_jsversion),o&&(t+=";cdepth="+o),s&&(t+=";plugins="+s),document.referrer&&(t+=";ref="+escape(document.referrer)),document.location&&(t+=";url="+escape(document.location)),typeof EAS_capture!="undefined"&&(t+=";EAScapture="+escape(EAS_capture)),document.write('<img width="1" height="1" src="'+t+'">'))}function EAS_duplicate(n,t){var e=document.cookie.split("; "),o,u,s=0,h=0,c=Math.round((new Date).getTime()/1e3),i="",f,r;if(e.length>0)for(f=0;f<e.length;f++)if(o=e[f].split("="),o[0]=="eas_dup"){for(u=o[1].split(":"),r=0;r<u.length;r++)if(cu_val=u[r].split("_"),c-cu_val[1]<t)if(cu_val[0]==n){h=1;s=1;break}else i&&(i+=":"),i+=u[r];break}return(s||(h||(i&&(i+=":"),i+=n+"_"+c),document.cookie="eas_dup="+i+"; path=/; expires=Mon, 16-Mar-20 01:00:00 GMT;"),s)?!0:!1}function EAS_place_ad(cus,EAS_options){var EAS_options_arr,EAS_temp_val,EAS_cu_arr,i,EAS_cu,EAS_temp,EAS_div_position,EAS_div_tag,EAS_width,EAS_height,EAS_pos_top,EAS_pos_obj,confirm_img_src,confirm_img;if(EAS_dom){var set_size=1,safe_log=0,move_pos=1;if(EAS_options)for(EAS_options_arr=EAS_options.split(","),i=0;i<EAS_options_arr.length;i++)EAS_temp=EAS_options_arr[i].split("="),EAS_temp_val=0,(EAS_temp[1]=="1"||EAS_temp[1]=="y"||EAS_temp[1]=="yes")&&(EAS_temp_val=1),EAS_temp[0]=="set_size"?set_size=EAS_temp_val:EAS_temp[0]=="safe_log"?safe_log=EAS_temp_val:EAS_temp[0]=="move_pos"&&(move_pos=EAS_temp_val);for(EAS_cu_arr=cus.split(","),i=0;i<EAS_cu_arr.length;i++){if(EAS_cu=EAS_cu_arr[i],(set_size||move_pos)&&(EAS_temp="EAS_position_"+EAS_cu,EAS_div_position=document.getElementById(EAS_temp),EAS_div_position&&(EAS_temp="EAS_tag_"+EAS_cu,EAS_div_tag=document.getElementById(EAS_temp),EAS_div_tag))){if(set_size&&(EAS_width=eval("EAS_found_width_"+EAS_cu),EAS_height=eval("EAS_found_height_"+EAS_cu),EAS_width&&EAS_height&&(EAS_div_position.style.width=EAS_width+"px",EAS_div_position.style.height=EAS_height+"px")),move_pos&&(EAS_pos_top=EAS_pos_left=0,EAS_pos_obj=EAS_div_position,EAS_pos_obj.offsetParent)){do EAS_pos_top+=EAS_pos_obj.offsetTop,EAS_pos_left+=EAS_pos_obj.offsetLeft;while(EAS_pos_obj=EAS_pos_obj.offsetParent);EAS_div_tag.style.position="absolute";EAS_div_tag.style.top=EAS_pos_top+"px";EAS_div_tag.style.left=EAS_pos_left+"px"}EAS_div_tag.style.display="block"}safe_log&&(confirm_img_src=eval("EAS_confirm_"+EAS_cu),confirm_img_src&&(confirm_img=new Image(1,1),confirm_img.src=confirm_img_src))}}}var doOnce,menuInit,action,menuDict;typeof jQuery!="undefined"&&$(document).ready(function(){$("img.lazy").lazyload&&$("img.lazy").lazyload({effect:"fadeIn"})});doOnce=!0;var tmLoc="statistik-gallup.net",tmVer="V11",tmLd=!1;window.jQuery&&$(function(){$("[class*='profileImages']").each(function(){$(this).children().length>1&&$(this).slidesjs({width:100,height:100,navigation:{active:!1},pagination:{active:!1},play:{active:!1,effect:"fade",interval:5e3,auto:!0,swap:!1,pauseOnHover:!0,restartDelay:2e3}})})});menuInit=!1;menuDict=new Dictionary;addLoadEvent(initSearchBar);EAS_flash=1;EAS_proto="http:";location.protocol=="https:"&&(EAS_proto="https:");EAS_dom=document.getElementById?!0:!1;EAS_server=EAS_proto+"//ad1.emediate.dk";this.unispring||(this.unispring=function(){function d(){return"https"==document.location.href.slice(0,5)?"https://ssl-":"http://"}function t(t,r){if(!r){if(!t)return o;r=t;t={r:document.referrer}}o=[t,r];var u=r[f]?r[f]:t[f];return u||(u=r[i]?r[i]:t[i]?t[i]:l),n[u]||(n[u]=[]),n[u].push([t,r]),a=1,o}function v(i,r){a||t({});var c,o,f,u,h;for(o in n)if(n.hasOwnProperty(o))for(f=n[o];f.length>0;){for(u=",",h=[];f.length>0;){if(u=u+s(e(f.shift(),h),h),u.length>w)break;f.length>0&&(u+="+")}c=g(i,u+";",o,r)}return n={},c}function g(n,t,i,r,f,e){e=d()+(i?i:l)+"."+p;f=e+"/j0="+t;u=f+"?lt="+(new Date).getTime().toString(36)+"&x="+screen.width+"x"+screen.height+"x"+screen.colorDepth+nt();var o=document.getElementById("unispring-tp"),s=function(n){var t=document.createElement("img");return t.id="unispring-tp",t.src=n,t.width=1,t.height=1,t};return r&&r!=1?r==2&&((new Image).src=u):o?o.parentNode.replaceChild(s(u),o):document.body.appendChild(s(u)),b&&alert(u),f}function nt(){var r="i00",n=document.cookie.indexOf(r+"="),t,e,i,o;if(n!=-1)return n=n+(r.length+1),t=document.cookie.indexOf(";",n),t==-1&&(t=document.cookie.length),"&c="+document.cookie.substring(n,t);var f="0000",s=f+Math.ceil((new Date).getTime()/1e3).toString(16)+(32768|Math.random()*65535).toString(16)+f,u=new Date;return u.setTime(u.getTime()+31536e7),e="; expires="+u.toGMTString(),i=new String(document.domain).split("."),i.reverse(),o="."+i[1]+"."+i[0],document.cookie=r+"="+s+e+"; path=/; domain="+o,""}function s(n,t){for(var i=0;i<t.length;i+=1)if(t[i]==n)return"~"+i;return t.push(n),n}function e(n,t){var u,o,r,c,h;t||(t=[]);switch(typeof n){case"string":return k(n);case"number":return isFinite(n)?String(n):"null";case"boolean":case"null":return String(n);case"object":if(!n)return"null";if(u=[],typeof n.length=="number"&&!n.propertyIsEnumerable("length")){for(c=n.length,o=0;o<c;o+=1)u.push(s(e(n[o],t),t)||"null");return","+u.join("+")+";"}for(r in n)typeof r=="string"&&r!=i&&r!=f&&(h=e(n[r],t),h&&u.push(s(e(r,t)+"="+h,t)));return","+u.join("+")+";"}return""}function y(n,i,u){return n.hasOwnProperty("cp")&&r?n=h(n):i.hasOwnProperty("cp")&&r&&(i=h(i)),t(n,i),v(!this.ns,u)}function h(n){var i=0,t=navigator.userAgent;return n.hasOwnProperty("dt")?(n.dt=n.dt.toLowerCase(),n.dt=="desktop"||(n.cp=n.dt+"/"+n.cp)):(/Android|Windows|iPad/i.test(t)?/Android/i.test(t)&&/mobile|Opera\sMobi/i.test(t)||/Windows/i.test(t)&&/[Pp]hone|[Mm]obile/.test(t)?i=1:/Android|iPad/i.test(t)&&(i=2):/Macintosh|Solaris|BSD|Linux|PLAYSTATION|Nintendo\sWii|Xbox/i.test(t)||(i=1),n.cp=i===1?"mobile/"+n.cp:n.cp),n}function tt(){while(unispringq.length>0){var n=unispringq.shift();n[1]?t(n[0],n[1]):(n.hasOwnProperty("cp")&&r&&(n=h(n)),t(n,!1))}v(!this.ns,2);setTimeout("unispring.p()",50)}var r=!0,c="undefined",l="test",p="tns-cs.net",w=typeof unispring_ms!=c?unispring_ms:2048,b=typeof unispring_debug!=c?unispring_debug:null,k=encodeURIComponent,i="site",f="s",n={},a=null,o;return{a:t,add:t,c:y,commit:y,p:tt}}(),this.unispringq&&unispring.p())