/*(c) s.oehrl@esz-ag.de 2009*/(function($j){$j.fn.newsTicker=$j.fn.newsticker=function(_2){_2=_2||4000;initTicker=function(el){stopTicker(el);el.items=$j("li",el);el.items.not(":eq(0)").hide().end();el.currentitem=0;startTicker(el);};startTicker=function(el){el.tickfn=setInterval(function(){doTick(el);},_2);};stopTicker=function(el){clearInterval(el.tickfn);};pauseTicker=function(el){el.pause=true;};resumeTicker=function(el){el.pause=false;};doTick=function(el){if(el.pause){return;}el.pause=true;$j(el.items[el.currentitem]).fadeOut("slow",function(){$j(this).hide();el.currentitem=++el.currentitem%(el.items.size());$j(el.items[el.currentitem]).fadeIn("slow",function(){el.pause=false;});});};this.each(function(){if(this.nodeName.toLowerCase()!="ul"){return;}initTicker(this);}).addClass("newsticker").hover(function(){pauseTicker(this);},function(){resumeTicker(this);});return this;};})(jQuery);var $j={};$j = jQuery.noConflict();var $ = {};function loadl(seite,target){$j("#loader_img").show();dynload(seite,target);};function dynload(seite,target){/*.html abschneiden*/seite = seite.substring(0,seite.length-5);$j.ajax({url: "loader.php",type: "POST",data: {seite:seite},cache: false,dataType:"html",success: function(html){var output=html.split('[break]');$j("#col1_content").fadeIn("slow");$j("#loader_img").hide();$j("#col1_content").html(output[0]);$j("a").unbind('click');if(output[1]!='none'){$j.getScript("http://static1.esz-ag.de/inc/"+output[1]+".js");}pageTracker._trackPageview(seite+".html"); if(target!=null && seite=="news"){try{var divOffset = $j('#col1_content').offset().top; var pOffset = $j('#col1_content a[name='+target+']').offset().top;var pScroll = pOffset - divOffset;$j('#col1_content').animate({scrollTop: '+=' + pScroll + 'px'});}catch(e){}}else{$j('#col1_content').animate({scrollTop: '-=10000px'});}} });};$j(function(){/*Ajax-Loader gif setzen*/$j("#loader_img").css({left:Math.round($j(document).width()/2)+"px"});$j("#bildscroller").append("<li><img src='http://images.esz-ag.de/scroll_img_1.png' alt=''/></li>");$j("#bildscroller").append("<li><img src='http://images.esz-ag.de/scroll_img_2.png' alt=''/></li>");$j("#bildscroller").append("<li><img src='http://images.esz-ag.de/scroll_img_3.png' alt=''/></li>");$j("#bildscroller").append("<li><img src='http://images.esz-ag.de/scroll_img_4.png' alt=''/></li>");$j("#bildscroller").append("<li><img src='http://images.esz-ag.de/scroll_img_5.png' alt=''/></li>");$j("#bildscroller").append("<li><img src='http://images.esz-ag.de/scroll_img_6.png' alt=''/></li>");$j("#bildscroller").append("<li><img src='http://images.esz-ag.de/scroll_img_7.png' alt=''/></li>");$j("#bildscroller").newsTicker(4000);$j("#cse-search-box-top input[type=text]").focus(function(){$j(this).val("")});});var gmarkers = [];var map;var dirn;var adress = new Array("Max-Planck-Strasse 16, 82223 Eichenau","Nordostpark 12, 90411 Nuernberg","Hirschstr. 38, 76133 Karlsruhe","Webereistr. 1, 48565 Steinfurt","IZ-NÖ-Süd, Straße 10, Objekt 60, 2353 Wiener Neudorf");var aktadress = 0;$j(function(){$j("span.maplink[id=reic]").click(function(){notbig(); $j("span.maplink[id=reic]").css("fontWeight","bold"); aktadress=0; mapclick(0);});$j("span.maplink[id=rnue]").click(function(){notbig(); $j("span.maplink[id=rnue]").css("fontWeight","bold"); aktadress=1; mapclick(1);});$j("span.maplink[id=rkar]").click(function(){notbig(); $j("span.maplink[id=rkar]").css("fontWeight","bold"); aktadress=2; mapclick(2);});$j("span.maplink[id=rste]").click(function(){notbig(); $j("span.maplink[id=rste]").css("fontWeight","bold"); aktadress=3; mapclick(3);});$j("span.maplink[id=rwie]").click(function(){notbig(); $j("span.maplink[id=rwie]").css("fontWeight","bold"); aktadress=4; mapclick(4);});$j("span.maplink[id=reic]").css("fontWeight","bold");$j("input[name=berechneRoute]").click(function(){load_map();});});function notbig(){$j("span.maplink").css("fontWeight","normal");}function load_map(){if (GBrowserIsCompatible()) {map = new GMap2($j("#map")[0]);dirn = new GDirections(map);var eic = new GLatLng(48.1582024, 11.3218074);var nue = new GLatLng(49.4855131, 11.1234601);var kar = new GLatLng(49.0076831, 8.3914538);var ste = new GLatLng(52.0921570, 7.4167799);var wie = new GLatLng(48.0637896, 16.328018);map.setCenter(eic, 6);map.addControl(new GMapTypeControl());map.addControl(new GLargeMapControl());map.addOverlay(createMarker(eic,"<b>esz AG calibration &amp; metrology<br/>Zentrale in Eichenau</b><br/>DKD-K-18201"));map.addOverlay(createMarker(nue,"<b>esz AG calibration &amp; metrology<br/>Standort Mitte</b><br/>in N&uuml;rnberg"));map.addOverlay(createMarker(kar,"<b>esz AG calibration &amp; metrology<br/>Standort S&uuml;d-West</b><br/>in Karlsruhe"));map.addOverlay(createMarker(ste,"<b>esz AG calibration &amp; metrology<br/>Standort Nord-West</b><br/>in Steinfurt"));map.addOverlay(createMarker(wie,"<b>esz AG calibration &amp; metrology<br/>Standort Austria</b><br/>in Wiener Neudorf"));GEvent.addListener(dirn,"error", function() {/*alert("Directions Failed: "+dirn.getStatus().code);*/alert("Route konnte nicht berechnet werden.\nBitte aendern Sie Ihren Startpunkt");});if($j("input[name=startpunkt]").val()=="")$j("input[name=startpunkt]").val("Muenchen");else {/*$j("input[name=startpunkt]").val($j("input[name=startpunkt]").val().replace("ü","ue"));$j("input[name=startpunkt]").val($j("input[name=startpunkt]").val().replace("ö","oe"));$j("input[name=startpunkt]").val($j("input[name=startpunkt]").val().replace("ä","ae"));$j("input[name=startpunkt]").val($j("input[name=startpunkt]").val().replace("ß","ss"));*/}dirn.load($j("input[name=startpunkt]").val()+" to: "+adress[aktadress], {getSteps:true});/* ========== launch the custom Panel creator a millisecond after the GDirections finishes loading ==========* == The delay is required in case we rely on GDirections to perform the initial setCenter ==*/GEvent.addListener(dirn,"load", function() {setTimeout('customPanel(map,"map",dirn,$j("#path")[0])', 1);});} }function createMarker(point,html) {var baseIcon = new GIcon(G_DEFAULT_ICON);/*baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png";*/baseIcon.iconSize = new GSize(40, 39);baseIcon.shadowSize = new GSize(0, 0);baseIcon.iconAnchor = new GPoint(9, 34);baseIcon.infoWindowAnchor = new GPoint(9, 2);baseIcon.image = "http://images.esz-ag.de/esz-logo-rund_maps.png";markerOptions = { icon:baseIcon };var marker = new GMarker(point,markerOptions);GEvent.addListener(marker, "click", function() {marker.openInfoWindowHtml(html);});gmarkers.push(marker);/* add a line to the side_bar html*side_bar_html += '<a href="javascript:myclick(' + (gmarkers.length-1) + ')">' + name + '<\/a><br>';*/ return marker;}function mapclick(i) {GEvent.trigger(gmarkers[i], "click");}/* ============ custom direction panel ===============*/function customPanel(map,mapname,dirn,div) {var html = "";/* ===== local functions =====*//* === waypoint banner ===*/function waypoint(point, type, address) {var target = '"' + mapname+".showMapBlowup(new GLatLng("+point.toUrlValue(6)+"))"+'"';html += '<table style="border: 1px solid silver; margin: 10px 0px; background-color: rgb(238, 238, 238); border-collapse: collapse; color: rgb(0, 0, 0);">';html += '<tr style="cursor: pointer;" onclick='+target+'>';html += '<td style="padding: 4px 15px 0px 5px; vertical-align: middle; width: 20px;">';html += '<img src="http://www.google.com/intl/en_ALL/mapfiles/icon-dd-' +type+ '-trans.png">';html += '</td>';html += '<td style="vertical-align: middle; width: 100%;">';html +=address;html += '</td>';html += '</tr>';html += '</table>';}/* === route distance ===*/function routeDistance(dist) {html += '<div style="text-align: right; padding-bottom: 0.3em;">' + dist + '</div>';}/* === step detail ===*/function detail(point, num, description, dist) {var target = '"' + mapname+".showMapBlowup(new GLatLng("+point.toUrlValue(6)+"))"+'"';html += '<table style="margin: 0px; padding: 0px; border-collapse: collapse;">';html += '<tr style="cursor: pointer;" onclick='+target+'>';html += '<td style="border-top: 1px solid rgb(205, 205, 205); margin: 0px; padding: 0.3em 3px; vertical-align: top; text-align: right;">';html += '<a href="javascript:void(0)"> '+num+'. </a>';html += '</td>';html += '<td style="border-top: 1px solid rgb(205, 205, 205); margin: 0px; padding: 0.3em 3px; vertical-align: top; width: 100%;">';html +=description;html += '</td>';html += '<td style="border-top: 1px solid rgb(205, 205, 205); margin: 0px; padding: 0.3em 3px 0.3em 0.5em; vertical-align: top; text-align: right;">';html +=dist;html += '</td>';html += '</tr>';html += '</table>';}/* === Copyright tag ===*/function copyright(text) {html += '<div style="font-size: 0.86em;">' + text + "</div>";}/* === read through the GRoutes and GSteps ===*/for (var i=0; i<dirn.getNumRoutes(); i++) {if (i==0) {var type="play";} else {var type="pause";}var route = dirn.getRoute(i);var geocode = route.getStartGeocode();var point = route.getStep(0).getLatLng();/* === Waypoint at the start of each GRoute*/waypoint(point, type, geocode.address);routeDistance(route.getDistance().html+" (Fahrtzeit ca.: "+route.getDuration().html+")");for (var j=0; j<route.getNumSteps(); j++) {var step = route.getStep(j);/* === detail lines for each step ===*/detail(step.getLatLng(), j+1, step.getDescriptionHtml(), step.getDistance().html);}}/* === the final destination waypoint === */var geocode = route.getEndGeocode();var point = route.getEndLatLng();waypoint(point, "stop", geocode.address); /* === the copyright text ===*/copyright(dirn.getCopyrightsHtml());/* === drop the whole thing into the target div*/div.innerHTML = html;} /* ============ end of customPanel function ===========*//*localhostkey *$j.getScript("http://maps.google.com/maps?file=api&v=2.x&key=ABQIAAAAnfs7bKE82qgb3Zc2YyS-oBT2yXp_ZAY8_ufC3CFXhHIE1NvwkxSySz_REpPq-4WZA27OwgbtyR3VcA&c&async=2&callback=load_map");*esz-gmbh.de key*$j.getScript("http://maps.google.com/maps?file=api&v=2.x&key=ABQIAAAA7oU15o0wMpSU3sZB3-M5TRTNhp03fmeGhInE39HM5LASQaOu6hR-KVHU9ywFd3Pu7TLCB5LXjTn03w&async=2&callback=load_map");*esz-ag.de key*/$j(function(){$j.getScript("http://maps.google.com/maps?file=api&v=2.x&key=ABQIAAAA7oU15o0wMpSU3sZB3-M5TRQZaEC_XRCBr4K-X06XCVOMuirU7RQQHErhJa17wNG1dz2ZWjY4zpZ1uA&async=2&callback=load_map");});