var _gaq=_gaq||[];_gaq.push(["_setAccount","UA-18136372-1"]);_gaq.push(["_addOrganic","maps.google","q"]);var ref=document.referrer;if(ref.search("(images|www).google.([^/]+)/(images|imghp|imgres|imglanding)")!=-1&&ref.search("prev")!=-1){var regex=new RegExp("google.([^/]+)/.*&prev=([^&]+)&");var match=regex.exec(ref);_gaq.push(["_addOrganic","images.google."+match[1],"q",true]);_gaq.push(["_setReferrerOverride","http://images.google."+match[1]+unescape(match[2])])}_gaq.push(["_trackPageview"]);jQuery(document).ready(function(){var d=["jpg","gif","png","bmp","tif","mov","wmv","wmv","asf","mpeg","mpg4","m4v","swf","zip","rar","exe","mp3","mp4","flac","wav","pdf","doc","docx","xls","xlsx","pps","pptx","pub","wps","odt","ots","otf","txt","js"];var a="/mal/utlank/";var c="/mal/nedladdning/";var b="disabled";jQuery("a").each(function(){var f=jQuery(this);var g=f.attr("href");if(g==undefined){return}var h=g.replace("http://","").replace("https://","");var e=g.split(".").reverse();var k=e[0].toLowerCase();var e=g.split("/").reverse();var j=e[2];var i=false;if(jQuery.inArray(k,d)!=-1){i=true;f.click(function(){if(b=="enabled"){_gaq.push(["_trackEvent","Downloads",k.toUpperCase(),g])}else{_gaq.push(["_trackPageview",c+h])}})}if((g.match("^http"))&&(!g.match(document.domain))&&(i==false)){f.click(function(){if(b=="enabled"){_gaq.push(["_trackEvent","Outbound Traffic",g.match("://(.[^/]+)")[1],g])}else{_gaq.push(["_trackPageview",a+h])}})}if(g.match("^mailto")){f.click(function(){_gaq.push(["_trackPageview","/mal/epost/"+g.replace("mailto:","")])})}})});(function(){var b=document.createElement("script");b.type="text/javascript";b.async=true;b.src=("https:"==document.location.protocol?"https://ssl":"http://www")+".google-analytics.com/ga.js";var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(b,a)})();if(typeof deconcept=="undefined"){var deconcept=new Object()}if(typeof deconcept.util=="undefined"){deconcept.util=new Object()}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object()}deconcept.SWFObject=function(n,b,o,e,j,l,g,f,d,m,k){if(!document.createElement||!document.getElementById){return}this.DETECT_KEY=k?k:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(n){this.setAttribute("swf",n)}if(b){this.setAttribute("id",b)}if(o){this.setAttribute("width",o)}if(e){this.setAttribute("height",e)}if(j){this.setAttribute("version",new deconcept.PlayerVersion(j.toString().split(".")))}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion(this.getAttribute("version"),g);if(l){this.addParam("bgcolor",l)}var a=f?f:"high";this.addParam("quality",a);this.setAttribute("useExpressInstall",g);this.setAttribute("doExpressInstall",false);var i=(d)?d:window.location;this.setAttribute("xiRedirectUrl",i);this.setAttribute("redirectUrl","");if(m){this.setAttribute("redirectUrl",m)}};deconcept.SWFObject.prototype={setAttribute:function(a,b){this.attributes[a]=b},getAttribute:function(a){return this.attributes[a]},addParam:function(b,a){this.params[b]=a},getParams:function(){return this.params},addVariable:function(b,a){this.variables[b]=a},getVariable:function(a){return this.variables[a]},getVariables:function(){return this.variables},getVariablePairs:function(){var c=new Array();var b;var a=this.getVariables();for(b in a){c.push(b+"="+a[b])}return c},getSWFHTML:function(){var b="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn")}b='<embed type="application/x-shockwave-flash" src="'+this.getAttribute("swf")+'" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'"';b+=' id="'+this.getAttribute("id")+'" name="'+this.getAttribute("id")+'" ';var f=this.getParams();for(var e in f){b+=[e]+'="'+f[e]+'" '}var d=this.getVariablePairs().join("&");if(d.length>0){b+='flashvars="'+d+'"'}b+="/>"}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX")}b='<object id="'+this.getAttribute("id")+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'">';b+='<param name="movie" value="'+this.getAttribute("swf")+'" />';var c=this.getParams();for(var e in c){b+='<param name="'+e+'" value="'+c[e]+'" />'}var a=this.getVariablePairs().join("&");if(a.length>0){b+='<param name="flashvars" value="'+a+'" />'}b+="</object>"}return b},write:function(b){if(this.getAttribute("useExpressInstall")){var a=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(a)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title)}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var c=(typeof b=="string")?document.getElementById(b):b;c.innerHTML=this.getSWFHTML();return true}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"))}}return false}};deconcept.SWFObjectUtil.getPlayerVersion=function(h,g){var d=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var a=navigator.plugins["Shockwave Flash"];if(a&&a.description){d=new deconcept.PlayerVersion(a.description.replace(/([a-z]|[A-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."))}}else{try{var c=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");for(var b=3;c!=null;b++){c=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+b);d=new deconcept.PlayerVersion([b,0,0])}}catch(f){}if(h&&d.major>h.major){return d}if(!h||((h.minor!=0||h.rev!=0)&&d.major==h.major)||d.major!=6||g){try{d=new deconcept.PlayerVersion(c.GetVariable("$version").split(" ")[1].split(","))}catch(f){}}}return d};deconcept.PlayerVersion=function(a){this.major=parseInt(a[0])!=null?parseInt(a[0]):0;this.minor=parseInt(a[1])||0;this.rev=parseInt(a[2])||0};deconcept.PlayerVersion.prototype.versionIsValid=function(a){if(this.major<a.major){return false}if(this.major>a.major){return true}if(this.minor<a.minor){return false}if(this.minor>a.minor){return true}if(this.rev<a.rev){return false}return true};deconcept.util={getRequestParameter:function(c){var d=document.location.search||document.location.hash;if(d){var b=d.indexOf(c+"=");var a=(d.indexOf("&",b)>-1)?d.indexOf("&",b):d.length;if(d.length>1&&b>-1){return d.substring(d.indexOf("=",b)+1,a)}}return""}};if(Array.prototype.push==null){Array.prototype.push=function(a){this[this.length]=a;return this.length}}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;function switchcontent(b,a){this.className=b;this.collapsePrev=false;this.persistType="none";this.filter_content_tag=(typeof a!="undefined")?a.toLowerCase():""}switchcontent.prototype.setStatus=function(b,a){this.statusOpen=b;this.statusClosed=a};switchcontent.prototype.setColor=function(a,b){this.colorOpen=a;this.colorClosed=b};switchcontent.prototype.setPersist=function(a,b){if(a==true){if(typeof b=="undefined"){this.persistType="session"}else{this.persistType="days";this.persistDays=parseInt(b)}}else{this.persistType="none"}};switchcontent.prototype.collapsePrevious=function(a){this.collapsePrev=a};switchcontent.prototype.sweepToggle=function(b){if(typeof this.headers!="undefined"&&this.headers.length>0){for(var a=0;a<this.headers.length;a++){if(b=="expand"){this.expandcontent(this.headers[a])}else{if(b=="contract"){this.contractcontent(this.headers[a])}}}}};switchcontent.prototype.defaultExpanded=function(){var b=[];for(var a=0;(!this.collapsePrev&&a<arguments.length)||(this.collapsePrev&&a==0);a++){b[b.length]=arguments[a]}this.expandedindices=b.join(",")};switchcontent.prototype.togglecolor=function(b,a){if(typeof this.colorOpen!="undefined"){b.style.color=a}};switchcontent.prototype.togglestatus=function(b,a){if(typeof this.statusOpen!="undefined"){b.firstChild.innerHTML=a}};switchcontent.prototype.contractcontent=function(b){var a=document.getElementById(b.id.replace("-title",""));a.style.display="none";this.togglestatus(b,this.statusClosed);this.togglecolor(b,this.colorClosed)};switchcontent.prototype.expandcontent=function(b){var a=document.getElementById(b.id.replace("-title",""));a.style.display="block";this.togglestatus(b,this.statusOpen);this.togglecolor(b,this.colorOpen)};switchcontent.prototype.toggledisplay=function(b){var a=document.getElementById(b.id.replace("-title",""));if(a.style.display=="block"){this.contractcontent(b)}else{this.expandcontent(b);if(this.collapsePrev&&typeof this.prevHeader!="undefined"&&this.prevHeader.id!=b.id){this.contractcontent(this.prevHeader)}}if(this.collapsePrev){this.prevHeader=b}};switchcontent.prototype.collectElementbyClass=function(c){var d=new RegExp("(^|\\s+)"+c+"($|\\s+)","i");this.headers=[],this.innercontents=[];if(this.filter_content_tag!=""){var b=document.getElementsByTagName(this.filter_content_tag)}else{var b=document.all?document.all:document.getElementsByTagName("*")}for(var a=0;a<b.length;a++){if(typeof b[a].className=="string"&&b[a].className.search(d)!=-1){if(document.getElementById(b[a].id+"-title")!=null){this.headers[this.headers.length]=document.getElementById(b[a].id+"-title");this.innercontents[this.innercontents.length]=b[a]}}}};switchcontent.prototype.init=function(){var b=this;this.collectElementbyClass(this.className);if(this.headers.length==0){return}if(this.persistType=="days"&&(parseInt(switchcontent.getCookie(this.className+"_dtrack"))!=this.persistDays)){switchcontent.setCookie(this.className+"_d","",-1)}var c=(this.persistType=="session"&&switchcontent.getCookie(this.className)!="")?","+switchcontent.getCookie(this.className)+",":(this.persistType=="days"&&switchcontent.getCookie(this.className+"_d")!="")?","+switchcontent.getCookie(this.className+"_d")+",":(this.expandedindices)?","+this.expandedindices+",":"";for(var a=0;a<this.headers.length;a++){if(typeof this.statusOpen!="undefined"){this.headers[a].innerHTML='<span class="status"></span>'+this.headers[a].innerHTML}if(c.indexOf(","+a+",")!=-1){this.expandcontent(this.headers[a]);if(this.collapsePrev){this.prevHeader=this.headers[a]}}else{this.contractcontent(this.headers[a])}this.headers[a].onclick=function(){b.toggledisplay(this)}}switchcontent.dotask(window,function(){b.rememberpluscleanup()},"unload")};switchcontent.prototype.rememberpluscleanup=function(){var b=new Array("none");for(var a=0;a<this.innercontents.length;a++){if(this.persistType!="none"&&this.innercontents[a].style.display=="block"&&(!this.collapsePrev||(this.collapsePrev&&b.length<2))){b[b.length]=a}this.headers[a].onclick=null}if(b.length>1){b.shift()}if(typeof this.statusOpen!="undefined"){this.statusOpen=this.statusClosed=null}if(this.persistType=="session"){switchcontent.setCookie(this.className,b.join(","))}else{if(this.persistType=="days"&&typeof this.persistDays=="number"){switchcontent.setCookie(this.className+"_d",b.join(","),this.persistDays);switchcontent.setCookie(this.className+"_dtrack",this.persistDays,this.persistDays)}}};switchcontent.dotask=function(b,c,a){var a=(window.addEventListener)?a:"on"+a;if(b.addEventListener){b.addEventListener(a,c,false)}else{if(b.attachEvent){b.attachEvent(a,c)}}};switchcontent.getCookie=function(a){var b=new RegExp(a+"=[^;]+","i");if(document.cookie.match(b)){return document.cookie.match(b)[0].split("=")[1]}return""};switchcontent.setCookie=function(b,c,e){if(typeof e!="undefined"){var a=new Date();var d=a.setDate(a.getDate()+e);document.cookie=b+"="+c+"; expires="+a.toGMTString()}else{document.cookie=b+"="+c}};$(document).ready(function(){initMenu();processLeftMenu();processNewsList();initDatePickers();setupHoverAndClicksForTeasers()});$(window).load(function(){setColumnHeights()});function setColumnHeights(){var a=$("#leftColumn");var e=$("#centerColumn");var d=$("#rightColumn");var b=Math.max(a.outerHeight(),Math.max(e.outerHeight(),d.outerHeight()));a.height(b-(a.outerHeight()-a.innerHeight()));e.height(b-(e.outerHeight()-e.innerHeight()));d.height(b-(d.outerHeight()-d.innerHeight()))}function initMenu(){$("#topMenu li a").each(function(){var b=$(this);var e=b.attr("name");var h=b.text();var d=b.hasClass("active");var g=d?"on":"";var c=""+b.find("img").attr("src");var f=c.endsWith("gif")?"gif":"png";var a=$('<img src="/images/menu/'+e+g+"."+f+'" alt="'+h+'" />');if(!d){a.hover(function(){$(this).attr("src","/images/menu/"+e+"on."+f+"")},function(){$(this).attr("src","/images/menu/"+e+"."+f+"")})}b.html(a)})}function processLeftMenu(){$("div.leftMenu a").each(function(){$(this).html("<b>&bull;</b> "+$(this).html())})}function processNewsList(){$("#leftColumn div.newsList div.newsItem").each(function(){var a=$(this).find("div.head a");$(this).click(function(){location.href=a.attr("href")});$(this).attr("title",a.text())})}function initDatePickers(){var a={appendText:"(yyyy-mm-dd)",dateFormat:"yy-mm-dd",monthNames:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],firstDay:1,dayNames:["Söndag","Måndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag"],dayNamesMin:["Sö","Må","Ti","On","To","Fr","Lö"],nextText:"Nästa",prevText:"Föregående"};$("#eventDateFrom").datepicker(a);$("#eventDateTo").datepicker(a)}function setupHoverAndClicksForTeasers(){var a="#main_left_niva1_1, #main_left_niva1_2, #main_left_niva1_3, #main_left_niva2_1 .item, #main_left_niva2_2_artiklar_1 .item, #main_left_niva2_2_artiklar .item, #main_left_niva3_1 .item, #main_left_niva3_2 .item";$(a).find("a").click(function(b){b.preventDefault()});$(a).click(function(){var b=$("a:first",this);var c=b.attr("href");var d=b.attr("target");d.length>0&&d!="_top"&&d!="_self"?window.open(c,d):location.href=c});$(a).hover(function(){$(this).find("a").each(function(){$(this).addClass("active")})},function(){$(this).find("a").each(function(){$(this).removeClass("active")})})}function swap(b,a){b.src=a.src}function popupWin(c,a,b){window.open(c,a,b)}function utskrift(){popupWin(printUri,"vmcprint","menubar=yes,scrollbars=yes,resizable=yes,width=635,height=460")}function utskrift_evenemang(a){popupWin(printUriEvent+a+" ","vmcprint","menubar=yes,scrollbars=yes,resizable=yes,width=635,height=460")}function MM_openBrWindow(c,a,b){window.open(c,a,b)}function MM_openBokaWindow(c,a,b){window.open(c,a,b)}function popKarta(a,c){var g="http://kartfab.karttricket.se/preview/iframe.aspx?id=52&key=84f92e7b-c535-422d-864e-091a7222a87d";var b=565;var e=549;var f="/webadmin/mod/karta/public_map.asp?kid="+a;var d=g;if(a){if(c){f+="&pid="+c}d=f;b=640;e=502}window.open(d,"publikkarta","width="+b+",height="+e+",toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no")}function VisaBanner(a,b){_gaq.push(["_trackPageview","/mal/utlank/"+a]);document.location.href="/reg.asp?hhh="+escape(a)+"&ddd="+b}function fbs_click(){u=location.href;t=document.title;window.open("http://www.facebook.com/sharer.php?u="+encodeURIComponent(u)+"&t="+encodeURIComponent(t),"facebook","toolbar=0,status=0,width=626,height=436");return false}function fbs_clickParam(a,b){window.open("http://www.facebook.com/sharer.php?u="+encodeURIComponent(a)+"&t="+encodeURIComponent(b),"facebook","toolbar=0,status=0,width=626,height=436");return false}function mySpaceGetThis(c,d,b,a){var e="http://www.myspace.com/index.cfm?fuseaction=postto&t="+encodeURIComponent(c)+"&c="+encodeURIComponent(d)+"&u="+encodeURIComponent(b)+"&l="+a;window.open(e)}function goToEventPage(a){$("#eventPage").val(a);$("#eventForm").submit();return false}String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};String.prototype.ltrim=function(b){if(!b){return this.replace(/^\s+/,"")}else{var a=new RegExp("^"+b);return this.replace(a,"")}};String.prototype.rtrim=function(b){if(!b){return this.replace(/\s+$/,"")}else{var a=new RegExp(b+"$");return this.replace(a,"")}};String.prototype.startsWith=function(a){return this.match("^"+a)};String.prototype.endsWith=function(a){return this.match(a+"$")};
