var last_EventId=false;var event_mapping=Array();var mouseX=0;var mouseY=0;var order_button_array=new Array();var text="";var zaehler=0;var blink_status=1;var old_supmenu_id=false;var submenu_timeout=false;var __onload=new Array();var timeOutInfoBox=null;var activeInfoBox=null;var __configoptionschange=false;var info_desc_array=new Array();var mousex=0;var mousey=0;function openHelp(url,width,height){if(url.length>0){if(width<=50)width=300;if(height<=50)height=300;var win=window.open(LOCALDIR+url,'help','width='+width+',height='+height+'');win.focus()}else{window.alert('keine Hilfe hinterlegt')}}function addListener(eventname,tag_id,callback){obj=document.getElementById(tag_id);if(!obj){return false;debug(eventname+'##'+tag_id)}if(document.all&&document.attachEvent){obj.attachEvent('on'+eventname,handleEvent)}else{obj.addEventListener(eventname,handleEvent,true)}event_mapping[obj.id+'_'+eventname]=callback;return true}function removeListener(eventname,tag_id){event_mapping[obj.id+'_'+eventname]=false}function saveMousePosition(e){if(document.all){mouseX=window.event.clientX+((document.documentElement.scrollLeft>document.body.scrollLeft)?document.documentElement.scrollLeft:document.body.scrollLeft);mouseY=window.event.clientY+((document.documentElement.scrollTop>document.body.scrollTop)?document.documentElement.scrollTop:document.body.scrollTop)}else{mouseX=e.pageX;mouseY=e.pageY}}function getObjectId(object){var id=object.id;if(id.length==0)return getObjectId(object.parentNode);else return id}function handleEvent(event){id=getObjectId(ObjectFromEvent(event));last_EventId=id;eval(event_mapping[id+'_'+event.type]);return false}function ObjectFromEvent(event){if(event.target)return event.target;else if(event.srcElement)return event.srcElement;return false}function applyClass(tag_id,classname){document.getElementById(tag_id).className=classname}function init(){addListener('mouseover','button_prev',"changeButton('button_prev',true)");addListener('mouseout','button_prev',"changeButton('button_prev',false)");addListener('click','button_prev',"historyBack()");addListener('mouseover','button_next',"changeButton('button_next',true)");addListener('mouseout','button_next',"changeButton('button_next',false)");addListener('click','button_next',"historyForward()");addListener('mouseover','button_print_send',"changeButton('button_print_send',true)");addListener('mouseout','button_print_send',"changeButton('button_print_send',false)");addListener('mouseover','button_post_send',"changeButton('button_post_send',true)");addListener('mouseout','button_post_send',"changeButton('button_post_send',false)");addListener('mouseover','ct_button_print',"changeButton('ct_button_print',true)");addListener('mouseout','ct_button_print',"changeButton('ct_button_print',false)");addListener('click','ct_button_print',"myPrint()");return true}function debug(str,color){if(!debugwin||debugwin.closed){debugwin=window.open("","","width=600,heigth=500,scrollbars,resizable");debugwin.document.write('<font style="font-size:10px;">')}debugwin.document.write('<font color="'+((color)?color:'#000')+'">'+str+'</font><br>');debugwin.focus();debugwin.scrollBy(0,20)}function applyVisibility(tag_id,flag){document.getElementById(tag_id).style.visibility=flag==true?"visible":"hidden"}function changeButton(id,flag){var obj=document.getElementById(id);var src=obj.src;if(flag){if(src.match(/_on/)){return}else{obj.src=src.replace(/.gif/,"_on.gif")}}else{if(!src.match(/_on/)){return}else{obj.src=src.replace(/_on.gif/,".gif")}}return'kl'}function changeButton2(obj,flag,width){if(flag)obj.style.backgroundPosition='-'+width+'px 0px';else obj.style.backgroundPosition='0px 0px'}function changeButtonBackground(obj,color){obj.style.backgroundColor=color}function changeButton2(obj,flag,width){if(flag)obj.style.backgroundPosition='-'+width+'px 0px';else obj.style.backgroundPosition='0px 0px'}function blinkOrder(){for(fx in order_button_array){changeButton(fx,true)}window.setTimeout("blinkOrderOff()",1000)}function blinkOrderOff(){for(fx in order_button_array){changeButton(fx,false)}}function historyBack(){window.history.back()}function historyForward(){window.history.forward()}function myPrint(){window.print()}function getCookieArray(){var ret=new Array();var arr=document.cookie.split(';');for(fx in arr){var tmp=arr[fx].split('=');if(tmp&&tmp[0]&&tmp[1]){tmp[0]=tmp[0].replace(/ /,'');tmp[1]=tmp[1].replace(/ /,'');ret[tmp[0]]=tmp[1]}}return ret}function getCookie(key){var tmp=getCookieArray();return tmp[key]}function mySchreib(str){text=str;schreib()}function schreib(){var ch=text.charAt(zaehler);if(document.all)document.getElementById('ssh_desc').innerHTML+=ch;else document.getElementById('ssh_desc').firstChild.nodeValue+=ch;zaehler++;if(zaehler<text.length)setTimeout("schreib()",33);return true}function blink(){var obj1=window.document.getElementById('blink_1');var obj2=window.document.getElementById('blink_2');if(obj1&&obj2){if(obj1.style.visibility=='hidden')obj1.style.visibility='visible';else obj1.style.visibility='hidden';if(obj2.style.visibility=='hidden')obj2.style.visibility='visible';else obj2.style.visibility='hidden';if(blink_status==1){window.setTimeout('blink()',300);blink_status=2}else{window.setTimeout('blink()',2500);blink_status=1}}}function overMenuButton(id,flag){changeButton("button_"+id,true);if(flag){showSubmenu(id)}else{if(old_supmenu_id!=false)hideSubMenu(old_supmenu_id);oldsubmenu=false}}function outMenuButton(id,flag){changeButton("button_"+id,false);if(flag)submenu_timeout=window.setTimeout("hideSubMenu("+id+")",1000)}function hideSubMenu(id){var obj=document.getElementById('menu_'+id);if(obj){obj.style.visibility="hidden"}}function showSubmenu(id){clearSubmenuTimeout();var obj=document.getElementById('menu_'+id);if(old_supmenu_id!=false)hideSubMenu(old_supmenu_id);obj.style.visibility="visible";old_supmenu_id=id}function overSubMenu(id){clearSubmenuTimeout()}function outSubMenu(id){submenu_timeout=window.setTimeout("hideSubMenu("+id+")",1000)}function clearSubmenuTimeout(){if(submenu_timeout){window.clearTimeout(submenu_timeout);submenu_timeout=false}}function addOnloadFunc(funcstr){__onload[__onload.length]=funcstr}function myOnload(){for(var fx=0;fx<__onload.length;fx++){eval(__onload[fx])}}function overGeraetDetail(id){var el=window.document.getElementById(id);if(el){el.className=el.className.replace(/ hoverGeraet/g,"");el.className=el.className+" hoverGeraet"}}function outGeraetDetail(id){var el=window.document.getElementById(id);if(el){el.className=el.className.replace(/ hoverGeraet/g,"")}}function overGeraet(id,modus){var el=window.document.getElementById(id);if(el){el.className=el.className.replace(/ hoverGeraetList/g,"");el.className=el.className+" hoverGeraetList";if(modus==1){showInfoBox("info-"+id)}}}function outGeraet(id){var el=window.document.getElementById(id);if(el){el.className=el.className.replace(/ hoverGeraetList/g,"");hideInfoBox("info-"+id)}}function showInfoBox(id){if(activeInfoBox!=id){if(timeOutInfoBox!=null){window.clearTimeout(timeOutInfoBox);timeOutInfoBox=null}timeOutInfoBox=window.setTimeout("showInfoBoxIntern(\""+id+"\");",500)}else{showInfoBoxIntern(id)}activeInfoBox=null}function hideInfoBox(id){activeInfoBox=id;if(timeOutInfoBox!=null){window.clearTimeout(timeOutInfoBox);timeOutInfoBox=null}hideInfoBoxIntern(id)}function showInfoBoxIntern(id){var el=window.document.getElementById(id);if(el){el.className=el.className.replace(/ show-infobox/g,"");el.className=el.className+" show-infobox"}}function hideInfoBoxIntern(id){var el=window.document.getElementById(id);if(el){el.className=el.className.replace(/ show-infobox/g,"")}}function overTarifDetail(id){var el=window.document.getElementById(id);if(el){el.className=el.className.replace(/ hoverTarif/g,"");el.className=el.className+" hoverTarif"}}function outTarifDetail(id){var el=window.document.getElementById(id);if(el){el.className=el.className.replace(/ hoverTarif/g,"")}}function overTarif(id,modus){var el=window.document.getElementById(id);if(el){el.className=el.className.replace(/ hoverTarifList/g,"");el.className=el.className+" hoverTarifList";if(modus==1){showInfoBox("info-"+id)}}}function outTarif(id){var el=window.document.getElementById(id);if(el){el.className=el.className.replace(/ hoverTarifList/g,"");hideInfoBox("info-"+id)}}function overAngebotDetail(id){var el=window.document.getElementById(id);if(el){el.className=el.className.replace(/ hoverTarif/g,"");el.className=el.className+" hoverTarif"}}function outAngebotDetail(id){var el=window.document.getElementById(id);if(el){el.className=el.className.replace(/ hoverTarif/g,"")}}function changeKlasse(id,type){var el=document.getElementById(id);if(el){if(type==1){el.className='netz-preis netzpreis-bottom'}else{el.className='netz-preis netzpreis-top'}return true}else{return false}}function optionsChangeMain(){var main=window.document.getElementById('config-on');var text=window.document.getElementById('config-off');var arrow=window.document.getElementById('optionsarrow');if(__configoptionschange){var el=window.document.getElementById('configoptionshidden');if(el){el.value='1';document.cookie='config_aktiv=1;'}main.style.display='block';text.style.display='none';arrow.innerHTML='&#x25B2;'}else{var el=window.document.getElementById('configoptionshidden');main.style.display='none';text.style.display='block';arrow.innerHTML='&#x25BC;'}__configoptionschange=!__configoptionschange}function startConfigOptions(){var el=window.document.getElementById('configoptions');if(el){el.style.display="block"}}function optionsChange(id,show){var element=window.document.getElementById(id);if(element){if(show){element.style.display='block'}else{element.style.display='none'}}}function hinweisChange(id,show){var element=window.document.getElementById(id);if(element){if(show){element.style.display='block'}else{element.style.display='none'}}}var selectArray=new Array();var hinweisArray=new Array();function selectChange(divid,id){var el=window.document.getElementById(id);if(el){for(var fx=0;fx<el.options.length;fx++){if(el.options[fx].selected){optionsChange(divid,selectArray[el.options[fx].value])}}}}function selectChange2(divid,id){var el=window.document.getElementById(id);if(el){for(var fx=0;fx<el.options.length;fx++){if(el.options[fx].selected){hinweisChange(divid,hinweisArray[el.options[fx].value])}}}}function viewInfo(id){var zd_info_desc=window.document.getElementById('zd_info_desc');if(!zd_info_desc){var el=document.createElement("div");el.id='zd_info_desc';if(document.all){var t=window.document.getElementById('configoptions');t.appendChild(el)}else{document.body.appendChild(el)}zd_info_desc=window.document.getElementById('zd_info_desc')}zd_info_desc.innerHTML=info_desc_array[id];if(document.all){zd_info_desc.style.top=(mousey-530)+'px';zd_info_desc.style.left=(mousex+15)+'px'}else{zd_info_desc.style.top=(mousey+10)+'px';zd_info_desc.style.left=(mousex+15)+'px'}zd_info_desc.style.display='block';return false}function hideInfo(){var zd_info_desc=document.getElementById("zd_info_desc");if(zd_info_desc){zd_info_desc.style.display='none'}}function clickInfo(id){var click_height=200;var click_width=230;var click_x=(screen.availWidth-click_width)/2;var click_y=(screen.availHeight-click_height)/2;var click_win=window.open('/0/0/shop/zdinfo.htm?id='+id,'infoWindow','height='+click_height+',width='+click_width+',scrollbars=yes,resizable=yes,screenX='+click_x+',screenY='+click_y);click_win.focus();return false}function getMousePosition(ev){if(!ev){ev=window.event}if(document.all){mousey=ev.clientY+document.documentElement.scrollTop;mousex=ev.x}else{mousey=ev.clientY+window.pageYOffset;mousex=ev.clientX+window.pageXOffset}}function openPopupMod(name){var win=window.open('',name,'width=650,height=500,scrollbars=yes,resizable=yes');win.focus()}function changeKlasse(id,type){var el=document.getElementById(id);if(id=='submit-download'&&type==1){el.className='submit-download-top'}else if(id=='submit-download'&&type==2){el.className='submit-download-bottom'}else if(id=='submit-post'&&type==1){el.className='submit-post-top'}else if(id=='submit-post'&&type==2){el.className='submit-post-bottom'}else if(id=='submit-email'&&type==1){el.className='submit-email-top'}else if(id=='submit-email'&&type==2){el.className='submit-email-bottom'}return true}function printPage(){window.print()}function setEgal(){var el=document.getElementById('egal');if(el){if(el.checked){document.getElementById('merkmal01').checked=false;document.getElementById('merkmal02').checked=false;document.getElementById('merkmal04').checked=false;document.getElementById('merkmal08').checked=false;document.getElementById('merkmal16').checked=false;document.getElementById('merkmal32').checked=false;document.getElementById('merkmal64').checked=false;document.getElementById('merkmal128').checked=false;document.getElementById('merkmal256').checked=false}}}function uncheckEgal(){var el=document.getElementById('egal');if(el){if(document.getElementById('merkmal01').checked==true||document.getElementById('merkmal02').checked==true||document.getElementById('merkmal04').checked==true||document.getElementById('merkmal08').checked==true||document.getElementById('merkmal16').checked==true||document.getElementById('merkmal32').checked==true||document.getElementById('merkmal64').checked==true||document.getElementById('merkmal128').checked==true||document.getElementById('merkmal256').checked==true){el.checked=false}else{el.checked=true}}}function resizePopUp(){window.resizeTo(420,680)}function releaseLieferanschrift(){var name=document.getElementById('lname');var strasse=document.getElementById('lstrasse');var hnr=document.getElementById('lhnr');var plz=document.getElementById('lplz');var ort=document.getElementById('lort');name.className='text';hnr.className='text';plz.className='text';strasse.className='text';ort.className='text';name.disabled=false;hnr.disabled=false;plz.disabled=false;strasse.disabled=false;ort.disabled=false;return true}function lockLieferanschrift(){var name=document.getElementById('lname');var strasse=document.getElementById('lstrasse');var hnr=document.getElementById('lhnr');var plz=document.getElementById('lplz');var ort=document.getElementById('lort');name.className='text locked';hnr.className='text locked';plz.className='text locked';strasse.className='text locked';ort.className='text locked';name.disabled=true;hnr.disabled=true;plz.disabled=true;strasse.disabled=true;ort.disabled=true;return true}function setLieferanschrift(){var checka=document.getElementById('abweichendeno');if(checka.checked==true){lockLieferanschrift()}else{releaseLieferanschrift()}}
// jQuery SWFObject v1.1.1 MIT/GPL @jon_neal
// http://jquery.thewikies.com/swfobject
(function(f,h,i){function k(a,c){var b=(a[0]||0)-(c[0]||0);return b>0||!b&&a.length>0&&k(a.slice(1),c.slice(1))}function l(a){if(typeof a!=g)return a;var c=[],b="";for(var d in a){b=typeof a[d]==g?l(a[d]):[d,m?encodeURI(a[d]):a[d]].join("=");c.push(b)}return c.join("&")}function n(a){var c=[];for(var b in a)a[b]&&c.push([b,'="',a[b],'"'].join(""));return c.join(" ")}function o(a){var c=[];for(var b in a)c.push(['<param name="',b,'" value="',l(a[b]),'" />'].join(""));return c.join("")}var g="object",m=true;try{var j=i.description||function(){return(new i("ShockwaveFlash.ShockwaveFlash")).GetVariable("$version")}()}catch(p){j="Unavailable"}var e=j.match(/\d+/g)||[0];f[h]={available:e[0]>0,activeX:i&&!i.name,version:{original:j,array:e,string:e.join("."),major:parseInt(e[0],10)||0,minor:parseInt(e[1],10)||0,release:parseInt(e[2],10)||0},hasVersion:function(a){a=/string|number/.test(typeof a)?a.toString().split("."):/object/.test(typeof a)?[a.major,a.minor]:a||[0,0];return k(e,a)},encodeParams:true,expressInstall:"http://jquery.thewikies.com/swfobject/expressInstall.swf",expressInstallIsActive:false,create:function(a){if(!a.swf||this.expressInstallIsActive||!this.available&&!a.hasVersionFail)return false;if(!this.hasVersion(a.hasVersion||1)){this.expressInstallIsActive=true;if(typeof a.hasVersionFail=="function")if(!a.hasVersionFail.apply(a))return false;a={swf:a.expressInstall||this.expressInstall,height:137,width:214,flashvars:{MMredirectURL:location.href,MMplayerType:this.activeX?"ActiveX":"PlugIn",MMdoctitle:document.title.slice(0,47)+" - Flash Player Installation"}}}attrs={data:a.swf,type:"application/x-shockwave-flash",id:a.id||"flash_"+Math.floor(Math.random()*999999999),width:a.width||320,height:a.height||180,style:a.style||""};m=typeof a.useEncode!=="undefined"?a.useEncode:this.encodeParams;a.movie=a.swf;a.wmode=a.wmode||"opaque";delete a.fallback;delete a.hasVersion;delete a.hasVersionFail;delete a.height;delete a.id;delete a.swf;delete a.useEncode;delete a.width;var c=document.createElement("div");c.innerHTML=["<object ",n(attrs),">",o(a),"</object>"].join("");return c.firstChild}};f.fn[h]=function(a){var c=this.find(g).andSelf().filter(g);/string|object/.test(typeof a)&&this.each(function(){var b=f(this),d;a=typeof a==g?a:{swf:a};a.fallback=this;if(d=f[h].create(a)){b.children().remove();b.html(d)}});typeof a=="function"&&c.each(function(){var b=this;b.jsInteractionTimeoutMs=b.jsInteractionTimeoutMs||0;if(b.jsInteractionTimeoutMs<660)b.clientWidth||b.clientHeight?a.call(b):setTimeout(function(){f(b)[h](a)},b.jsInteractionTimeoutMs+66)});return c}})(jQuery,"flash",navigator.plugins["Shockwave Flash"]||window.ActiveXObject);
// Tarifgruppen Links mit target = _blank
$(document).ready(
	function() {
		$('a.target_blank').attr('target','_blank');
	}
);
// Slideshow Infoboxen Banner
// JavaScript Document
$(document).ready(function() {     
    //Execute the slideShow
    slideShow();
});
function slideShow() {
	  //Set the opacity of all images to 0
	  $('#gallery a').css({opacity: 0.0});
	  //Get the first image and display it (set it to full opacity)
	  $('#gallery a:first').css({opacity: 1.0});
	  //Call the gallery function to run the slideshow, 6000 = change to next image after 6 seconds
	  setInterval('gallery()',6000);
	}
function gallery() {
	  //if no IMGs have the show class, grab the first image
	  var current = ($('#gallery a.show')?  $('#gallery a.show') : $('#gallery a:first'));
	  //Get next image, if it reached the end of the slideshow, rotate it back to the first image
	  var next = ((current.next().length) ? ((current.next().hasClass('clear'))? $('#gallery a:first') :current.next()) : $('#gallery a:first'));  
	  //Set the fade in effect for the next image, show class has higher z-index
	  next.css({opacity: 0.0})
	  .addClass('show')
	  .animate({opacity: 1.0}, 1000);
	  //Hide the current image
	  current.animate({opacity: 0.0}, 1000)
	  .removeClass('show');
}

