function inspect(d,a,g){var f="",b,e;if(g==null){g=0}if(a==null){a=1}if(a<1){return'<font color="red">Error: Levels number must be > 0</font>'}if(d==null){return'<font color="red">Error: Object <b>NULL</b></font>'}f+="<ul>";for(property in d){try{b=typeof(d[property]);f+="<li>("+b+") "+property+((d[property]==null)?(": <b>null</b>"):(""));f+=": <it>"+d[property]+"</it>";f+="</li>";if((b=="object")&&(d[property]!=null)&&(g+1<a)){f+=inspect(d[property],a,g+1)}}catch(c){if(typeof(c)=="string"){e=c}else{if(c.message){e=c.message}else{if(c.description){e=c.description}else{e="Unknown"}}}f+='<li><font color="red">(Error) '+property+": "+e+"</font></li>"}}f+="</ul>";return f}String.format=function(){if(arguments.length==0){return null}var c=arguments[0];for(var a=1;a<arguments.length;a++){var b=new RegExp("\\{"+(a-1)+"\\}","gm");c=c.replace(b,arguments[a])}return c};String.trim=function(){if(arguments.length==0){return null}else{var a=arguments[0];return trim(a)}};function trim(b,a){if(b==null){return b}return ltrim(rtrim(b,a),a)}function ltrim(b,a){a=a||"\\s";return b.replace(new RegExp("^["+a+"]+","g"),"")}function rtrim(b,a){a=a||"\\s";return b.replace(new RegExp("["+a+"]+$","g"),"")}var map=null;var Paths={ThumbPath:"http://www.swr.de/static/TourdeLaendle/data/thumbs/",ImagePath:"http://www.swr.de/static/TourdeLaendle/data/images/",KMLPath:"http://www.swr.de/static/TourdeLaendle/data/kml/etappe{0}.kml",ImgWindowPath:"http://www.swr.de/static/TourdeLaendle/data/etappen/image.html"};function init(){document.write('<script type="text/javascript" src="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.1&mkt=de-DE"><\/script>\n');document.write('<style type="text/css">.MSVE_PoweredByLogo{visibility:hidden;}</style>\n');document.write('<style type="text/css">#MSVE_obliqueNotification{visibility:hidden;}</style>\n');document.write('<style type="text/css">#MSVE_navAction_ObliqueMapView{width:9.5em;}</style>\n')}function GetMap(){map=new VEMap("ve_map");map.LoadMap(new VELatLong(49.41056832,8.706214427),10,"r",false,VEMapMode.Mode2D,false,0,null);map.SetZoomLevel(10);map.SetScaleBarDistanceUnit(VEDistanceUnit.Kilometers);map.SetMouseWheelZoomToCenter(false)}function AddKMLLayer(b){var a=new VEShapeLayer();var c=String.format(Paths.KMLPath,b);var d=new VEShapeSourceSpecification(VEDataType.ImportXML,c,a);map.ImportShapeLayerData(d,onEtappeLoad,1)}function formatContent(g,f,e,b,d){var a="";if(d==null||typeof(d)=="undefined"){d=""}if(g!=null){a+=String.format("<div style='color:#000;font-weight:bold;font-family:Verdana,sans-serif;padding-bottom:5px;'>{0}</div>",String.trim(g))}var c=(f!=null?String.trim(f):"");if(e!=null){a+=String.format("<div style='height:100%;float:left;'><img style='cursor:pointer;' alt='{2}' title='{2}' onclick='openImgWindow(\"{0}\",\"{1}\",\"{2}\");' src='{3}'></div><div style='margin-left:2px;'>{4}</div>",Paths.ImagePath+String.trim(e),g,d,Paths.ThumbPath+String.trim(e),c)}else{a=String.format("<div>{0}</div>",c)}if(b!=null){a+=String.format("<div style='margin-top:6px;clear:both;'><a href='{0}' target='_blank'>Mehr Informationen</a></div>",String.trim(b))}return a}function openImgWindow(c,d,b){var a=Paths.ImgWindowPath+"?src="+escape(c)+"&alt="+escape(b)+"&title="+escape(d);window.open(a,null,"width=420,height=420")}function onEtappeLoad(h){var m=h.GetShapeCount();var e;for(var a=0;a<m;++a){e=h.GetShapeByIndex(a);var g=e.GetTitle();var k=new RegExp(/WP\d+/);var n=k.exec(g);if(n!=null){var d="";if(Count[g]!=null){var c=Title[g].split("|");var l=Description[g].split("|");var f=Image[g].split("|");var j=Link[g].split("|");var b=AltImageText[g].split("|");for(var a=0;a<Count[g];++a){d+=formatContent(c[a],l[a],f[a],j[a],b[a]);d+="<div style='height:10px;'></div>"}}else{d+=formatContent(Title[g],Description[g],Image[g],Link[g],AltImageText[g])}e.SetDescription(d);e.SetTitle("")}else{}}onFeedReady();document.getElementById("ve_loader").style.display="none";document.getElementById("ve_map").style.visibility="visible";document.getElementById("ve_copyright").style.visibility="visible"}init();
