/*
	Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
	Available via Academic Free License >= 2.1 OR the modified BSD license.
	see: http://dojotoolkit.org/license for details
*/

/*
	This is an optimized version of Dojo, built for deployment and not for
	development. To get sources and documentation, please visit:

		http://dojotoolkit.org
*/

function Supermap(){this.collectData=true;this.randomtracking=1;this.dom="upi.e-heat.de";this.accountID="eh303031_6161";this.maxHeight=5E3;this.interval=1E3;this.startPointID=["head","ch-wrp"];this.debug=false}Supermap.prototype.globalSegments=function(){};Supermap.prototype.loadEvent=function(){var a=this;this.bind=function(b){a.getClick(b)};this.win.document.attachEvent?this.win.document.attachEvent("onmousedown",this.bind):this.win.document.addEventListener("mousedown",this.bind,false)};
Supermap.prototype.removeEvent=function(){this.win.document.attachEvent?this.win.document.detachEvent("onmousedown",this.bind):this.win.document.removeEventListener("mousedown",this.bind,false)};
Supermap.prototype.getClick=function(a){a=a||this.win.event;if(!(a.which&&a.which==3||a.button&&a.button==2)){var b=new Date;if(!(b.getTime()-this.timeDiff<this.interval)){this.timeDiff=b.getTime();this.x=a.pageX||a.clientX+(this.win.pageXOffset||this.win.document.documentElement.scrollLeft||this.win.document.body.scrollLeft);this.y=a.pageY||a.clientY+(this.win.pageYOffset||this.win.document.documentElement.scrollTop||this.win.document.body.scrollTop);if(!(this.x>this.getInnerWidth()||this.y>this.maxHeight)){a=
this.getOffset(0,0);this.x+=a[0];this.y+=a[1];this.request()}}}};Supermap.prototype.request=function(){var a="http"+(this.win.location.protocol.indexOf("https:")===0?"s":"")+"://"+this.dom+"/"+this.accountID+"/img.gif?";a+="x="+this.x+"&y="+this.y+"&t="+(this.timeDiff-this.time)+"&w="+this.getWidth()+"&p="+encodeURIComponent(this.getPage());a+=this.getSegments()?this.getSegments():"";this.debug?alert(decodeURIComponent(a)):this.sendRequest(a)};
Supermap.prototype.sendRequest=function(a){if(this.win.document.images){this.images[this.index]=new Image;this.images[this.index].src=a;this.index++}else this.win.document.write('<img alt="" border="0" name="heatimage" width="1" height="1" src="'+a+'">')};Supermap.prototype.go=function(){this.images=[];this.index=0;this.myframes=[];this.myMaps=[];this.IE=navigator.appName=="Microsoft Internet Explorer"?true:false;this.loadEvent()};
Supermap.prototype.deleteMap=function(){for(var a in this.myMaps)if(typeof this.myMaps.hasOwnProperty!==undefined&&this.myMaps.hasOwnProperty(a)){this.myMaps[a].deleteMap();delete this.myMaps[a]}this.win.document!==null&&this.removeEvent()};Supermap.prototype.defSegment=function(a,b){if(this.segm)this.segm[a]=b};Supermap.prototype.getInnerWidth=function(){return this.IE?this.win.document.body.clientWidth:this.win.innerWidth};
Supermap.prototype.getInnerHeight=function(){return this.IE?this.win.document.body.clientHeight:this.win.innerHeight};Supermap.prototype.getWidth=function(){return this.IE?this.win.document.body.clientWidth:this.win.innerWidth};
Supermap.prototype.onload=function(){var a=this;if(this.win.document.addEventListener)this.win.document.addEventListener("DOMContentLoaded",function(){a.win.document.removeEventListener("DOMContentLoaded",arguments.callee,false);a.init()},false);else this.win.document.attachEvent&&this.win.document.attachEvent("onreadystatechange",function(){if(a.win.document.readyState==="complete"){a.win.document.detachEvent("onreadystatechange",arguments.callee);a.init()}})};
Supermap.prototype.init=function(){for(var a=this.win.document.getElementsByTagName("frame"),b=this.win.document.getElementsByTagName("iframe"),c=this.intervalID=0,d=this,e=0;e<a.length;e++){this.myframes[c]=a[e];c++}for(a=0;a<b.length;a++){this.myframes[c]=b[a];c++}if(this.IE)for(a=0;a<this.myframes.length;a++)try{this.myMaps[a]=new Childmap(this.myframes[a],this)}catch(f){}else{this.intervalID=setInterval(function(){d.checkWindow(d.myframes)},10);this.timeoutID=setTimeout(function(){clearInterval(d.intervalID)},
5E4)}};Supermap.prototype.checkWindow=function(a){for(var b=[],c=0;c<a.length;c++)try{if(a[c].contentWindow===undefined||a[c].contentWindow.document===undefined||a[c].contentWindow.document.URL===undefined||a[c].contentWindow.document.URL.indexOf("about:blank")===0)return;else b[b.length]=a[c]}catch(d){}clearInterval(this.intervalID);clearTimeout(this.timeoutID);for(c=0;c<b.length;c++)try{this.myMaps[c]=new Childmap(b[c],this)}catch(e){}};
Supermap.prototype.setPos=function(a){this.offX=this.offY=0;if(a.offsetParent){do{this.offX+=a.offsetLeft;this.offY+=a.offsetTop}while(a=a.offsetParent)}else if(a.x){this.offX+=a.x;this.offY+=a.y}};Supermap.prototype.getOffset=function(a,b){this.setPos(this.startPoint);return[a-this.offX,b-this.offY]};Heatmap.prototype=new Supermap;Heatmap.prototype.constructor=Heatmap;
function Heatmap(){Supermap.call(this);this.win=top.window;for(var a=this.startPointID.length;a--;)if(this.win.document.getElementById(this.startPointID[a])){this.startPoint=this.win.document.getElementById(this.startPointID[a]);break}if(!this.pagename)this.pagename=this.win.location.pathname;this.collectData===true&&this.go()}
Heatmap.prototype.go=function(){if(!(Math.random()*this.randomtracking>1)){Supermap.prototype.go.call(this);this.segm={};this.timeDiff=new Date;this.time=this.timeDiff=this.timeDiff.getTime();if(!this.pagename)this.pagename=this.win.location.pathname;if(!this.startPoint)this.startPoint=this.win.document.getElementsByTagName("body")[0].childNodes[1];this.globalSegments();this.init()}};Heatmap.prototype.getPage=function(){return this.pagename};
Heatmap.prototype.getSegments=function(){var a="",b;for(b in this.segm)if(typeof this.segm.hasOwnProperty!="undefined"&&this.segm.hasOwnProperty(b))a+="&s_"+b+"="+encodeURIComponent(this.segm[b]);return a};Childmap.prototype=new Supermap;Childmap.prototype.constructor=Childmap;function Childmap(a,b){Supermap.call(this);this.frm=a;this.win=a.contentWindow;this.daddy=b;this.collectData===true&&this.go()}
Childmap.prototype.go=function(){Supermap.prototype.go.call(this);this.time=this.timeDiff=this.daddy.time;this.init()};Childmap.prototype.getPage=function(){return this.daddy.getPage()};Childmap.prototype.defSegment=function(a,b){this.daddy.defSegment(a,b)};Childmap.prototype.getSegments=function(){return this.daddy.getSegments()};Childmap.prototype.getWidth=function(){return this.daddy.getWidth()};
Childmap.prototype.getOffset=function(a,b){var c=this.frm;if(this.IE){a+=2;b+=2}a+=(c.offsetWidth-c.clientWidth)/2;b+=(c.offsetHeight-c.clientHeight)/2;this.setPos(c);return this.daddy.getOffset(this.offX+a,this.offY+b)};function ed_write_cookie(a){var b="; expires="+(new Date((new Date).getTime()+368064E5)).toGMTString();document.cookie="e_coo="+escape(a)+b+"; path=/"+(typeof gFpcDom!="undefined"&&gFpcDom!=""?"; domain="+gFpcDom:"")}
function ed_is_new(){var a="",b=new Date;b=Math.round(b.getTime()/1E6);if(dcsGetCookie("e_coo")){a=dcsGetCookie("e_coo");/^(\d*?),/i.exec(a);var c=parseInt(RegExp.$1,10);/^\d*?,([rf])/i.exec(a);var d=RegExp.$1;if(c+2<b){ed_write_cookie(a.replace(/^\d*?,[rf]/i,b.toString()+",r"));return"returning"}else{ed_write_cookie(a.replace(/^\d*?,/i,b.toString()+","));return d=="f"?"new":"returning"}}else{ed_write_cookie(b.toString()+",f");return"new"}}
function ed_build_page(a){try{if(top.e_h!=undefined){top.e_h.deleteMap();delete top.e_h}top.e_h=new Heatmap;top.e_h.pagename=a;top.e_h.defSegment("h_nvr",ed_is_new());_ed.heatmap.segments.init();_ed.heatmap.segments.setSegments(top.e_h);gImages[0]&&top.e_h.defSegment("h_wtstring",gImages[0].src.substring(gImages[0].src.indexOf("dcs.gif?")+8))}catch(b){_ed.err.push(b)}}
function ed_track(){try{var a=DCSext.ShownPage.replace(/http:\/\/.*?\//,"/");/(nodeid=[^\&]*)/i.exec(a);var b=RegExp.$1;/(l=[^\&]*)/i.exec(a);var c=RegExp.$1;/(cid=[^\&]*)/i.exec(a);var d=RegExp.$1;a=a.slice(0,a.indexOf("?")+1)+b+"&"+c+"&"+d;switch(a){case "/online/portal/lh/de/homepage?nodeid=1649106&l=de&cid=18002":case "/online/portal/lh/us/homepage?nodeid=1678690&l=en&cid=1000390":case "/online/portal/lh/it/homepage?nodeid=1680030&l=it&cid=1000273":case "/online/portal/lh/uk/homepage?nodeid=1679381&l=en&cid=1000243":case "/online/portal/lh/fr/homepage?nodeid=1681382&l=fr&cid=1000241":case "/online/portal/lh/es/homepage?nodeid=1680697&l=es&cid=1000233":case "/online/portal/lh/jp/homepage?nodeid=1665490&l=ja&cid=1000276":case "/online/portal/lh/in/homepage?nodeid=1662862&l=en&cid=1000267":case "/online/portal/lh/ru/homepage?nodeid=1672090&l=ru&cid=1000348":case "/online/portal/lh/at/homepage?nodeid=1648585&l=de&cid=18001":case "/online/portal/lh/hk/homepage?nodeid=1661530&l=en&cid=1000259":case "/online/portal/lh/de/homepage/myhomepage/expert_traveller?nodeid=3139037&l=de&cid=18002":case "/online/portal/lh/de/homepage/myhomepage/expert_traveller?nodeid=1678690&l=en&cid=1000390":case "/online/portal/lh/de/homepage/myhomepage/expert_traveller?nodeid=1680030&l=it&cid=1000273":case "/online/portal/lh/de/homepage/myhomepage/expert_traveller?nodeid=1679381&l=en&cid=1000243":case "/online/portal/lh/de/homepage/myhomepage/expert_traveller?nodeid=1681382&l=fr&cid=1000241":case "/online/portal/lh/de/homepage/myhomepage/expert_traveller?nodeid=1680697&l=es&cid=1000233":case "/online/portal/lh/de/homepage/myhomepage/expert_traveller?nodeid=1665490&l=ja&cid=1000276":case "/online/portal/lh/de/homepage/myhomepage/expert_traveller?nodeid=1662862&l=en&cid=1000267":case "/online/portal/lh/de/homepage/myhomepage/expert_traveller?nodeid=1672090&l=ru&cid=1000348":case "/online/portal/lh/de/homepage/myhomepage/expert_traveller?nodeid=1648585&l=de&cid=18001":case "/online/portal/lh/de/homepage/myhomepage/expert_traveller?nodeid=1661530&l=en&cid=1000259":window.location.search&&
window.location.search.indexOf("action=CheckInAction")!=-1?ed_build_page("/checkin"+a):ed_build_page(a);break;case "/online/portal/lh/de/specials?nodeid=1649181&l=de&cid=18002":case "/online/portal/lh/de/info_and_services/flightinfo/arrivals_departures?nodeid=1649230&l=de&cid=18002":ed_build_page(a)}var e=DCSext.ShownPage;switch(e){case "http://book.lufthansa.com:80/Lufthansa/wds/FFCR.jsp":case "http://book.lufthansa.com:80/Lufthansa/wds/FFPR.jsp":case "http://book.lufthansa.com:80/Lufthansa/wds/FARE.jsp":case "http://book.lufthansa.com:80/Lufthansa/wds/ALPI.jsp":case "http://book.lufthansa.com:80/Lufthansa/wds/PURF.jsp":case "http://book.lufthansa.com:80/Lufthansa/wds/COFD.jsp":case "http://book.lufthansa.com:80/Lufthansa/wds/AVAI.jsp":case "http://book.lufthansa.com:80/Lufthansa/wds/FFCO.jsp":case "http://book.lufthansa.com:80/Lufthansa/wds/AVAC.jsp":ed_build_page(e)}}catch(f){_ed.err.push(f)}}
ed_track();

