﻿var tempImage1,tempImage2;window.focus(),tempImage1=new Image,tempImage1.src="/App_Images/Vent.gif",tempImage2=new Image,tempImage2.src="/App_Images/Glas.png",$(function(){$(document).keypress(function(n){return n.which!=13||$(n.target).is("textarea")?!0:($(":submit.default, :button.default").first().click(),!1)});$(document).on("focusin",":input",function(){var t=$(this);if(t.is("textarea"))$(":submit, :button").removeClass("default");else if(t.is(":submit, :button"))$(":submit, :button").removeClass("default"),$(this).addClass("default");else if(!t.is(":reset")){var r=$(document).find("*"),u=r.index(this),i=r.slice(u+1).filter(":submit, :button").filter(":visible").filter(":enabled").first();i.length>0&&($(":submit, :button").removeClass("default"),i.addClass("default")),setTimeout(function(){t.select()},0)}});$(":submit, :button").filter(":visible").filter(":enabled").first().focus(),$("input").not(":button, :submit, :reset").add("select").add("textarea").filter(":visible").filter(":enabled").first().focus(),$.vindue.intern.tidsmåler.startMåler(),$.ajax("/Skærm.aspx.ashx/"+screen.width+"x"+screen.height+"/"+document.documentElement.clientWidth+"x"+document.documentElement.clientHeight,{global:!1,cache:!1,complete:function(){$.vindue.intern.tidsmåler.opdaterTid()}}),$(document).ajaxStart(function(){$.vindue.åbn({lukTimerTid:15e3}),$.vindue.intern.tidsmåler.startMåler()}),$(document).ajaxError(function(n,t,i){$.vindue.luk(),$.vindue.åbn({vindueType:"besked",overskrift:"Fejl:",indhold:"Url: "+i.url+"<br />\nFejlkode: "+t.status+"="+t.statusText+"<br />\nFejltekst:\n"+t.responseText})}),$(document).ajaxStop(function(){$.vindue.intern.tidsmåler.opdaterTid(),$.vindue.luk()});$(document).on("click",'a.downloadlink, a[href^="/Download.asgx.ashx"]',function(){return $.overfør.download($(this).attr("href")),!1});$(window).on("hashchange",$.historie.ændret)}),(function(n){n=jQuery,n.historie={init:function(t,i){n.historie.sideData=t,n.historie.historieData[0]=n.historie.sideData(0),n.historie.navigering=i;if(location.hash=="")n.historie.ændret();else{var r=location.hash.length>2?location.hash.substring(2,location.hash.length):0;history.go(-r)}},"tilføj":function(){n.historie.tæller++;var t="#!"+n.historie.tæller;n.historie.historieData[n.historie.tæller]=n.historie.sideData(n.historie.tæller),location.hash=t},"ændret":function(){n.historie.tæller=location.hash.length>2?location.hash.substring(2,location.hash.length):0;if(n.historie.historieData[n.historie.tæller])n.historie.navigering(n.historie.historieData[n.historie.tæller],n.historie.tæller);else{var t=location.hash.length>2?location.hash.substring(2,location.hash.length):0;history.go(-t)}},navigering:function(){},sideData:function(){},"tæller":0,historieData:{}},n.cookies={hent:function(t){var f=document.cookie.split(";"),r,u;for(i=0;i<f.length;i++){r=f[i].split("="),u=n.trim(r[0]);if(u==t)return r.length>1?unescape(n.trim(r[1])):null}return null},"sæt":function(n,t,i,r,u,f){i&&(i=new Date(+new Date+i)),document.cookie=n+"="+escape(t)+(i?";expires="+i.toGMTString():"")+(r?";path="+r:"")+(u?";domain="+u:"")+(f?";secure":"")},slet:function(n,t,i){this.hent(n)&&(document.cookie=n+"="+(t?";path="+t:"")+(i?";domain="+i:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT")}},n.overfør={postData:function(t){var r,i;return t&&(t.nodeType||t.jquery)?(n("#__EVENTTARGET").length==0&&n('<input id="__EVENTTARGET" type="hidden" name="__EVENTTARGET" />').appendTo("form"),n("#__EVENTTARGET").val(n(t).attr("name")?n(t).attr("name"):n(t).attr("id")),n(t).is(":button",":submit")&&(i=n('<input type="hidden" />').attr("name",n(t).attr("name")||"").val(n(t).val()).appendTo("form")),r=n("form").serialize(),i&&i.remove()):r=n("form").serialize(),r},standard:{action:null,retning:"auto",knap:null,fejl:function(){},"færdig":function(){}},tekster:{standard:{overskrift:"Downloading ...",tak:"Thank you for downloading:"},da:{overskrift:"Henter ...",tak:"Tak, fordi du hentede:"},de:{overskrift:"Herunterladen ...",tak:"Danke fürs Herunterladen von:"},fr:{overskrift:"Téléchargeant ...",tak:"Merci de télécharger:"},es:{overskrift:"Descargando ...",tak:"Gracias por descargar el:"}},fuldPost:function(t,i){var r,o,u,e,f;n.extend(!0,this.standard,this.standard,this.tekster[sprog]),r=n.extend(!0,{},this.standard,t),r.retning!="standard"&&r.retning!="nyTab"&&n.vindue.åbn(i),r.retning=="nyTab"?n("form").attr("target","_blank"):r.retning=="auto"&&(o=n('<iframe id="postIFrame" name="postIFrame" style="display: none;" />').appendTo("body").load(function(t){var i=n(this).contents(),f,u;n(this).off("load").remove(),n.vindue.luk(),f=i.find("title");if(f.length>0){u=parseInt(f.text().substr(0,3));if(u>=100&&u<599)return n.vindue.åbn({vindueType:"besked",overskrift:i.find("title").text(),indhold:i.find("body").html()}),r.fejl(t,i),!1}return r.færdig(t,i),!1}),n("form").attr("target","postIFrame")),r.retning!="nyTab"&&(this.cookieTid=(new Date).toUTCString(),u=n('<input type="hidden" name="DownloadCookieNavn" />').val(this.cookieTid).appendTo("form"),this.downloadTimer=setInterval(function(){var t=n.cookies.hent(n.overfør.cookieTid);t&&(clearInterval(n.overfør.downloadTimer),n.cookies.slet(n.overfør.cookieTid),n.vindue.luk(),r.færdig(null,null),n.vindue.åbn({vindueType:"besked",overskrift:r.overskrift,indhold:"<div>"+r.tak+"</div><div>'"+t+"'</div>",lukTimerTid:4e3}))},1e3)),r.action?n("form").attr("action",r.action):(e=n("#__PREVIOUSPAGE").remove(),n("form").removeAttr("action")),n("form").attr("enctype","multipart/form-data"),r.knap&&(r.knap.nodeType||r.knap.jquery)&&(n("#__EVENTTARGET").length==0&&n('<input id="__EVENTTARGET" type="hidden" name="__EVENTTARGET" />').appendTo("form"),n("#__EVENTTARGET").val(n(r.knap).attr("name")?n(r.knap).attr("name"):n(r.knap).attr("id")),n(r.knap).is(":button",":submit")&&(f=n('<input type="hidden" />').attr("name",n(r.knap).attr("name")||"").val(n(r.knap).val()).appendTo("form"))),n("form").submit().attr("enctype","application/x-www-form-urlencoded").removeAttr("target").removeAttr("action").append(e),f&&f.remove(),u&&u.remove()},download:function(t,i){var u=n('<input type="hidden" name="DownloadLink" />').val(t.replace("Download.asgx.ashx","")).appendTo("form"),r=n('<input type="hidden" name="Skærm" />').val(screen.width+"x"+screen.height+"/"+document.documentElement.clientWidth+"x"+document.documentElement.clientHeight).appendTo("form");this.fuldPost({action:"/Download.asgx.ashx",retning:"standard"},i),r.remove(),u.remove()},downloadTimer:null,cookieTid:0},n.vindue={erSynlig:!1,"åbn":function(t){top==self&&(n.vindue.intern.vindueKø.push(t),n.vindue.erSynlig||n.vindue.intern.åbn())},luk:function(){n.vindue.intern.luk()},"tilføjKlik":function(t,i){n(t).click(function(){return n.vindue.åbn(i),!1})},centrer:function(){var t=n.vindue.intern.vindueObj.vindue;t.css({left:Math.floor(n(window).width()-t.outerWidth())/2+"px",top:Math.floor(n(window).height()-t.outerHeight())/2+"px"})},standard:{vindueType:"vent",indhold:"",fadeInd:300,fadeUd:300,smartTid:1e3,lukTimerTid:0,nulstilFocus:!0,checkBoxTekst:"","åbnet":function(){},vist:function(){},lukket:function(){},"væk":function(){},okKlik:function(){},annullerKlik:function(){},"indtastÆndret":function(){}},tekster:{standard:{overskrift:"Loading data ...",okTekst:"Ok",annullerTekst:"Cancel",jaTekst:"Yes",nejTekst:"No"},da:{overskrift:"Henter data ...",okTekst:"Ok",annullerTekst:"Annuller",jaTekst:"Ja",nejTekst:"Nej"},de:{overskrift:"Zugreifen auf Daten ...",okTekst:"Ok",annullerTekst:"Annullieren",jaTekst:"Ja",nejTekst:"Nein"},fr:{overskrift:"Accès aux données ...",okTekst:"Ok",annullerTekst:"Annuler",jaTekst:"Oui",nejTekst:"Non"},es:{overskrift:"Acceso a los datos ...",okTekst:"Ok",annullerTekst:"Cancelar",jaTekst:"Sí",nejTekst:"No"}},intern:{vindueObj:{parametre:null,containerVindue:null,vindue:null,vindueIndhold:null,indtast:null},"åbn":function(){var f,t,i,r,e,u;n.vindue.erSynlig=!0,f=this.vindueKø.shift(),t=this.vindueObj,n.extend(!0,n.vindue.standard,n.vindue.standard,n.vindue.tekster[sprog]),t.parametre=n.extend(!0,{},n.vindue.standard,f),i=t.parametre,r=!0,typeof i.indhold=="string"&&i.indhold.indexOf("<script")!=-1&&(i.indhold="Fejl!<br />\nHtml indeholder scripts!"),t.containerVindue=n('<div id="containervindue" class="containervindue" tabindex="9995" />').prependTo("form"),n('<div id="dækvindue" class="dækvindue" />').on("click.vindue",function(r){return i.vindueType!="vent"&&(i.annullerKlik(r,t),n.vindue.intern.luk()),!1}).appendTo(t.containerVindue),t.vindue=n('<div id="vindue" class="vindue" />').appendTo(t.containerVindue),n('<div class="vindueoverskrift" />').html(i.overskrift).appendTo(t.vindue),t.vindueIndhold=n('<div class="vindueindhold" />').html(i.indhold).appendTo(t.vindue);switch(i.vindueType){case"besked":case"bekræft":case"spørg":case"indtast":case"fil":n('<div class="vinduebund" />').appendTo(t.vindue).append('<div id="vindueknapcontainer" class="vindueknapcontainer" />'),n('<input id="vindueknap1" name="VindueKnap1" type="button" class="vindueknap vinduedefault" tabindex="9998" />').val(i.okTekst).on("click.vindue",function(r){return i.okKlik(r,t)!=!1&&n.vindue.intern.luk(),!1}).appendTo("#vindueknapcontainer"),i.vindueType!="besked"&&n('<input id="vindueknap2" name="VindueKnap2" type="button" class="vindueknap tabindex="9999"" />').val(i.annullerTekst).on("click.vindue",function(r){return i.annullerKlik(r,t)!=!1&&n.vindue.intern.luk(),!1}).appendTo("#vindueknapcontainer");switch(i.vindueType){case"spørg":n("#vindueknap1").val(i.jaTekst),n("#vindueknap2").val(i.nejTekst);break;case"indtast":t.indtast=n('<input id="vindueIndtast" name="VindueIndtast" type="text" class="vindueindtast" tabindex="9996" />').on("change.vindue",function(n){return i.indtastÆndret(n,t)}).appendTo(t.vindueIndhold);break;case"fil":t.indtast=n('<input id="vindueIndtast" name="VindueIndtast" type="file" class="vindueindtast" tabindex="9996" />').on("change.vindue",function(n){return i.indtastÆndret(n,t)}).appendTo(t.vindueIndhold)}if(i.checkBoxTekst!=""){n('<input id="vindueCheckBox" name="VindueCheckBox" type="checkbox" class="vinduecheckbox" tabindex="9997" />').appendTo(t.vindueIndhold).on("change.vindue",function(n){return i.indtastÆndret(n,t)});n('<label for="vindueCheckBox" />').text(i.checkBoxTekst).appendTo(t.vindueIndhold)}break;default:n.extend(i,{fadeInd:0}),n(t.vindueIndhold).css({"min-width":"180px"}),r=!1,e=n('<iframe width="180px" height="50px" style="border-style: none;" />').appendTo(t.vindueIndhold).load(function(){n(this).off("load").contents().find("body").css({"background-image":"url(/App_Images/Vent.gif)","background-repeat":"no-repeat","background-position":"center",opacity:"0.6"}),r=!0})}i.åbnet(t),i.nulstilFocus==!0&&(i.nulstilFocus=n(document.activeElement));n(window).on("resize.vindue",n.vindue.centrer);n(t.containerVindue).on("keypress.vindue",function(r){return i.vindueType=="vent"?!1:r.which!=13||n(r.target).is("textarea")?r.which==27?(i.annullerKlik(r,t)!=!1&&n.vindue.intern.luk(),!1):!0:(t.vindue.find(".vinduedefault").first().click(),!1)});n(t.vindue).on("focusin.vindue",":input",function(){var r=n(this);if(r.is("textarea"))n(":submit, :button",t.vindue[0]).removeClass("vinduedefault");else if(r.is(":submit, :button"))n(":submit, :button",t.vindue[0]).removeClass("vinduedefault"),n(this).addClass("vinduedefault");else if(!r.is(":reset")){var f=n(t.vindue).find("*"),e=f.index(this),u=f.slice(e+1).filter(":submit, :button").filter(":visible").filter(":enabled").first();u.length>0&&(n(":submit, :button",t.vindue[0]).removeClass("vinduedefault"),u.addClass("vinduedefault")),setTimeout(function(){r.select()},0)}return!1});n(window).triggerHandler("resize.vindue"),u=i.vindueType=="vent"&&i.smartTid>this.tidsmåler.gennemsnitstid?i.smartTid:0,n.vindue.intern.vindueStartTimer=window.setInterval(function(){r&&(window.clearInterval(n.vindue.intern.vindueStartTimer),n(t.containerVindue).fadeTo(i.fadeInd,1,function(){t.containerVindue.focus(),n(":submit, :button",t.vindue[0]).filter(":visible").filter(":enabled").first().focus(),n("input",t.vindue[0]).not(":button, :submit, :reset").add("select",t.vindue[0]).add("textarea",t.vindue[0]).filter(":visible").filter(":enabled").first().focus(),i.vist(t),i.lukTimerTid>0&&(n.vindue.intern.vindueLukTimer=setTimeout(function(){n.vindue.intern.luk()},i.lukTimerTid))}))},u)},luk:function(){if(n.vindue.intern.lukker&&n.vindue.intern.vindueKø.length>0)n.vindue.intern.vindueKø.shift();else if(n.vindue.erSynlig){n.vindue.intern.lukker=!0;var t=this.vindueObj;window.clearInterval(n.vindue.intern.vindueStartTimer),n(t.containerVindue).stop(!0),window.clearTimeout(n.vindue.intern.vindueLukTimer),n(window).off(".vindue"),n(t.containerVindue).off(".vindue","*"),n.vindue.intern.vindueKø.length>0&&(t.parametre.fadeUd=0),t.containerVindue.fadeOut(t.parametre.fadeUd,function(){t.parametre.nulstilFocus&&n(t.parametre.nulstilFocus).focus();var i=t.parametre.væk;t.parametre.lukket(t),t.containerVindue.remove(),t.parametre=null,t.containerVindue=null,t.vindue=null,t.vindueIndhold=null,t.indtast=null,i(),n.vindue.erSynlig=!1,n.vindue.intern.lukker=!1,n.vindue.intern.vindueKø.length>0&&setTimeout("$.vindue.intern.åbn();",0)})}},"vindueKø":[],lukker:!1,vindueStartTimer:null,vindueLukTimer:null,"tidsmåler":{startTid:0,antalTest:0,gennemsnitstid:0,"startMåler":function(){this.startTid=+new Date},opdaterTid:function(){var n=this.antalTest*this.gennemsnitstid+ +new Date-this.startTid;this.antalTest++,this.gennemsnitstid=n/this.antalTest}}}}})(jQuery)
