var Folia = new Object(); Folia.points = []; Folia.key = [{site:"www.skagerak-denmark.de",key:"ABQIAAAAhJ7p0QclH4pKX8PPPNLTNhS0OMaRGz7hSB96ZAOKBfdbfq65IBRqdt73d9ZzmWPJAyVpI-KUfdwWHw"},{site:"www.skagerak-denmark.com",key:"ABQIAAAAhJ7p0QclH4pKX8PPPNLTNhRgXry_NmJWBS_D9EOanV5e_iQ7zBQ35RCrN6Iy_dzri66wYyIexlgMIw"},{site:"www.skagerak-denmark.no",key:"ABQIAAAAhJ7p0QclH4pKX8PPPNLTNhSsYhPMZnwPJBGVHe09G8t_yYlD0RRml7VxIrl6jDIAQ1KHGa2dZ1FHkQ"},{site:"www.triptrap.dk",key:"ABQIAAAAhJ7p0QclH4pKX8PPPNLTNhQYaHISjkyk6eqtpZ4CJ76y1c3Y8xTjNppYiGpYS_Q0j8LUzJ-9xwQ_JQ"},{site:"www.skagerak-denmark.se",key:"ABQIAAAAhJ7p0QclH4pKX8PPPNLTNhQCWeicglCFNUmAvHB5qMkMfV8THBT5FS0sRtAJ0Xa4ka1Wf5Cu69CMnA"}]; Folia.map = ""; Folia.mapName = "kort"; Folia.siteName = "skagerak-denmark.de"; Folia.mapDiv = "map"; Folia.mapWidth = 650; Folia.mapHeight = 620; Folia.mapZoom = 2; Folia.mapVersion = "2"; Folia.siteLat = 50.2893392532918; Folia.siteLng = 33.75; Folia.siteUpdateTicks = "07052010080238"; Folia.translate = {}; Folia.userLanguage = "en"; Folia.iconUrl = "http://utils.folia.dk/gfx/"; Folia.gmarkers = []; Folia.to_htmls = []; Folia.from_htmls = []; Folia.default_htmls = []; Folia.license = function(){ var site = document.location.hostname; var path = document.location.pathname; var z = path.lastIndexOf("/"); if(z>0){ site += path.substr(0,z+1); } var index = 0; for(var i = 0;i0){c_start=document.cookie.indexOf(c_name+"=");if(c_start!=-1){c_start=c_start+c_name.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end==-1)c_end=document.cookie.length;return unescape(document.cookie.substring(c_start,c_end))}}return""},set:function(c_name,value,expiredays){var exdate=new Date();exdate.setDate(exdate.getDate()+expiredays);document.cookie=c_name+"="+escape(value)+((expiredays==null)?"":";expires="+exdate.toGMTString())}} Folia.lang = {get:function(i){return Folia.translate[i];}} Folia.defaultTab = function(i){GEvent.trigger(Folia.gmarkers[i],'click');} Folia.tohere = function(i){this.gmarkers[i].openInfoWindowHtml(this.to_htmls[i]);} Folia.fromhere = function(i){this.gmarkers[i].openInfoWindowHtml(this.from_htmls[i]);} Folia.html = function(i){this.gmarkers[i].openInfoWindowHtml(this.default_htmls[i]);} Folia.openPoint = function(i){GEvent.trigger(this.gmarkers[i],'click');} Folia.zoomMarker = function(i){ this.gmarkers[i].closeInfoWindow(); this.map.setCenter(this.gmarkers[i].getLatLng(), 15); } Folia.load = function(url){var headID = document.getElementsByTagName("head")[0];var newScript = document.createElement('script');newScript.type = 'text/javascript';newScript.src = url;headID.appendChild(newScript);} Folia.start = function(obj){this.settings = obj;setTimeout(function() {Folia.init();},10);} Folia.init = function(){this.loadGoogleMapsScript();} Folia.loadGoogleMapsScript = function(){ this.settings = this.settings || {}; this.settings.jquery = (this.settings.jquery != undefined ? this.settings.jquery : true); this.settings.jqueryVersion = (this.settings.jqueryVersion != undefined ? this.settings.jqueryVersion : '1.3.2'); this.settings.jqueryUIVersion = (this.settings.jqueryUIVersion != undefined ? this.settings.jqueryUIVersion : '1.7.2'); //styles var styles = document.createElement('link'); styles.setAttribute('type', 'text/css'); styles.setAttribute('title', 'ABQIAAAAhJ7p0QclH4pKX8PPPNLTNhS0OMaRGz7hSB96ZAOKBfdbfq65IBRqdt73d9ZzmWPJAyVpI-KUfdwWHw'); styles.setAttribute('rel', 'stylesheet'); styles.setAttribute('href','http://api.folia.dk/css.aspx?update=07052010080238'+'&mapname='+Folia.mapName+"&siteName="+Folia.siteName); var headRef = document.getElementsByTagName('head')[0]; headRef.appendChild(styles); //tile layer var script = document.createElement("script"); script.src = "http://utils.folia.dk/tiles/api.js"; script.type = "text/javascript"; document.getElementsByTagName("head")[0].appendChild(script); var script = document.createElement("script"); script.src = "http://www.google.com/jsapi?oe=utf-8&key="+Folia.license()+"&callback=Folia.loadMaps&hl="+Folia.userLanguage; script.type = "text/javascript"; document.getElementsByTagName("head")[0].appendChild(script); if(this.settings.jquery==true){ var script = document.createElement("script"); script.src = "http://ajax.googleapis.com/ajax/libs/jquery/"+this.settings.jqueryVersion+"/jquery.min.js"; script.type = "text/javascript"; document.getElementsByTagName("head")[0].appendChild(script); var script = document.createElement("script"); script.src = "http://ajax.googleapis.com/ajax/libs/jqueryui/"+this.settings.jqueryUIVersion+"/jquery-ui.min.js"; script.type = "text/javascript"; document.getElementsByTagName("head")[0].appendChild(script); } } Folia.loadMaps = function(){google.load("maps", Folia.mapVersion,{"callback" : Folia.map2,"language" : Folia.userLanguage});} Folia.map2=function(){ Folia.map=new GMap2(document.getElementById(Folia.mapDiv),{size:new GSize(Folia.mapWidth,Folia.mapHeight)}); Folia.map.getContainer().style.overflow="hidden"; Folia.map.enableScrollWheelZoom(); Folia.map.enableContinuousZoom(); Folia.map.addControl(new GMapTypeControl()); Folia.map.addControl(new GLargeMapControl()); //instanser map object ved setCenter //Folia.map.setCenter(new GLatLng(Folia.siteLat,Folia.siteLng),Folia.mapZoom); //vent 10 mill sek så map object lige kan nå at blive oprettet. setTimeout(function(){Folia.initJs()},10)} //loader alt user js script. Folia.initJs = function(){ var script = document.createElement("script"); script.src = "http://api.folia.dk/js.aspx?update="+Folia.siteUpdateTicks+"&mapName="+Folia.mapName+"&siteName="+Folia.siteName; script.type = "text/javascript"; document.getElementsByTagName("head")[0].appendChild(script); } Folia.mapsLoaded = function(){ }