var descFader=new Array();function horizon(){var m,st,t,sp,moOvSl,clickEffect,even,dir,dirH,fs,maxOpac,sa,l,w,ot,fC,over,dD,aP,clickStopsaP,dS,aPSpeed,maxOpacDesc,startSl,overhead,otE,overheadEven,aSD;this.build=function(list_ID,list_width,slide_delay,slideSpeed,startSl,hoverEffect,clickEffect,even,direction,fadeSpeed,maxOpacity,fC,dD,dDH,aP,clickStopsaP,dS,aPSpeed,maxOpacDesc,aSD,dDFO){m=document.getElementById(list_ID);st=list_width;t=slide_delay;sp=slideSpeed;startSl=startSl;moOvSl=hoverEffect;m.clickEffect=clickEffect;m.even=even;dir=direction;fs=fadeSpeed;maxOpac=maxOpacity;m.fC=fC;sa=m.getElementsByTagName("li");l=sa.length;w=m.offsetWidth;var IE6=false
/*@cc_on || @_jscript_version < 5.7 @*/
;if(IE6){w=parseInt(m.style.width)}ot=Math.floor((w-st)/(l-1));overhead=(w-(ot*(l-1))-st);otE=Math.floor(w/l);overheadEven=w-(Math.floor(w/l)*l);m.aSD=aSD;m.dDFO=dDFO;maxOpacDesc=maxOpacDesc;m.dS=dS;m.o=false;m.active=false;m.list_width=w/l;m.dD=dD;m.dDH=dDH;m.lastOver=false;m.lastOut=false;m.firstActive=m.active;m.aPOn=aP;m.aPPause=false;m.clickStopsaP=clickStopsaP;m.aPSpeed=aPSpeed;if(startSl!=null){m.a=sa[startSl-1]}if(navigator.appName.indexOf("Microsoft")!=-1){m.ie=true}else{m.ie=false}if(navigator.userAgent.indexOf("Mozilla")!=-1){m.mozilla=true}else{m.mozilla=false}if(navigator.userAgent.indexOf("Firefox")==-1){t=parseInt(slide_delay*2);sp=parseInt(slideSpeed/2)}m.h=this;for(var i=0;i<l;i++){var s=sa[i];s.style.width=m.list_width+"px";var da=s.getElementsByTagName("div");var dd=da[0].getElementsByTagName("div");if(m.slideMin){da[0].style.width=m.slideO+"px"}var df;s.desc=false;for(var iB=0;iB<dd.length;iB++){if(dd[iB].className=="neHSf"){df=dd[iB];s.fader=dd[iB]}if(dd[iB].className=="neHSb"){s.desc=dd[iB];s.desc.m=m;if(!m.aSD){if(m.dD==0){s.desc.style.top=(s.desc.parentNode.offsetHeight)+"px"}if(m.dD==1){s.desc.style.top=(0-s.desc.offsetHeight)+"px"}if(m.dDH==0){s.desc.style.left=(s.desc.parentNode.offsetWidth)+"px"}if(m.dDH==1){s.desc.style.left="-"+(s.desc.offsetWidth)+"px"}}else{if(m.dD==0){s.desc.style.top=(s.desc.parentNode.offsetHeight-s.desc.offsetHeight)+"px"}if(m.dD==1){s.desc.style.top=(0)+"px"}if(m.dDH==0){s.desc.style.left=(s.desc.parentNode.offsetWidth-s.desc.offsetWidth)+"px"}if(m.dDH==1){s.desc.style.left="-"+(0)+"px"}}var beschreibungsDivs=s.desc.getElementsByTagName("div");s.desc.beBa=beschreibungsDivs[0];s.desc.beTe=beschreibungsDivs[1];m.h.sO(s.desc.beBa,maxOpacDesc);s.desc.beBa.style.width=s.desc.offsetWidth+"px";s.desc.beBa.style.height=s.desc.offsetHeight+"px";s.desc.s=s;s.desc.beBa.s=s;this.setClick(s.desc.beBa)}if(dd[iB].className=="neHSiO"){s.fadeInImg=dd[iB];m.h.sO(s.fadeInImg,0);s.fadeInImg.s=s;this.setClick(s.fadeInImg)}if(dd[iB].className=="neHSi"){s.img=dd[iB];s.img.s=s;this.setClick(s.img)}var handles=dd[iB].parentNode.getElementsByTagName("img");if(handles.length>0){var handle=handles[0];s.handle=handle;s.handle.s=s;this.setClick(s.handle)}}s.num=i;this.sO(df,0);if(i==startSl-1){m.a=s}this.timerFade(s)}if(startSl!=null){m.o=sa[startSl-1];m.a=sa[startSl-1]}m.timerFade=setInterval(function(){m.h.fade(false)},t);m.onmouseout=function(){if(m.fC){m.a=false}m.lastOver=m.o;m.o=false;m.aPPause=false};if(m.aPOn){m.h.startaP()}return(this)};this.setClick=function(s){if(m.clickEffect||(s.s.handle&&s.s.handle==s)){s.onclick=function(){m.slideEnded=false;s=this.s;if(m.clickStopsaP){m.h.stopaP()}if(s==m.a&&!moOvSl){var act=-1;for(var i=0;i<l;i++){var sb=sa[i];if(sb==m.a&&act==-1){act=parseInt(i)}}if(dir==0){if(act<l-1&&act!=-1){m.a=sa[act+1];s=sa[act+1]}else{m.a=sa[0];s=sa[0]}}else{if(act>0&&act!=-1){m.a=sa[act-1];s=sa[act-1]}else{m.a=sa[l-1];s=sa[l-1]}}}else{m.a=s}clearInterval(m.timerFade);m.timerFade=setInterval(function(){m.h.fade(s)},t)}}};this.fadeDesc=function(s){if(m.o){s=m.o.desc}else{if(m.a){s=m.a.desc}}var re=false;if(m.aSD==false&&(s&&(s.s==m.o||s.s==m.a)&&s.parentNode.style.width==s.parentNode.parentNode.style.width)){re=m.h.moveIt(s,m.dD,true)}if(m.aSD==false&&(m.a&&m.a.desc&&m.a.desc.parentNode.style.width==m.a.desc.parentNode.parentNode.style.width)&&(!m.dDFO||m.o==m.a)){re=m.h.moveIt(m.a.desc,m.dD,true)}m.h.clearDesc(s.s);m.re=re;return(re)};this.clearDesc=function(s){if(m.o){s=m.o}else{if(m.a){s=m.a}}var AllClear=true;for(var i=0;i<sa.length;i++){var des=sa[i].desc;if(m.aSD==false&&((des&&s!=des.s&&(!m.a||des.s!=m.a))||(m.dDFO&&m.o&&m.o!=des.s)||(des.parentNode.style.width!=des.parentNode.parentNode.style.width&&(m.dDFO||(m.a&&m.a!=des.s))))){AllClear=m.h.moveIt(des,m.dD,false)}}return(AllClear)};this.moveIt=function(s,dir,inOut){var direction=m.dD;var re=true;var ofs;var minSpeed;if(inOut){minSpeed=2}else{minSpeed=1}if(s.style){if(m.dD==0){if(inOut){ofs=s.offsetHeight}else{ofs=0}var ziel=(s.parentNode.offsetHeight-ofs);var ist=parseInt(s.style.top);if(ist>ziel||(!inOut&&ist<ziel)){var mover;if(inOut){mover=parseInt((ist-ziel)/m.dS)}else{mover=parseInt((ziel-ist)/m.dS)}mover=(mover>0)?mover:minSpeed;if(!inOut){mover=mover*-1}var newTop=ist-mover;if(newTop>ziel||(!inOut&&ist<ziel)){s.style.top=newTop+"px"}else{s.style.top=ziel+"px";re=true}}}if(m.dD==1){if(!inOut){ofs=s.offsetHeight}else{ofs=0}var ziel=0-ofs;var ist=parseInt(s.style.top);if(ist<ziel||(!inOut&&ist>ziel)){var mover;if(inOut){mover=parseInt((ziel-ist)/m.dS)}else{mover=parseInt((ist-ziel)/m.dS)}mover=(mover>0)?mover:minSpeed;if(!inOut){mover=mover*-1}var newTop=ist+mover;if(newTop<ziel||(!inOut&&ist>ziel)){s.style.top=newTop+"px"}else{s.style.top=ziel+"px";re=true}}}if(m.dDH==0){if(inOut){ofs=s.offsetWidth}else{ofs=0}var ziel=(s.parentNode.offsetWidth-ofs);var ist=parseInt(s.style.left);if(ist>ziel||(!inOut&&ist<ziel)){var mover;if(inOut){mover=parseInt((ist-ziel)/m.dS)}else{mover=parseInt((ziel-ist)/m.dS)}mover=(mover>0)?mover:minSpeed;if(!inOut){mover=mover*-1}var newTop=ist-mover;if(newTop>ziel||(!inOut&&ist<ziel)){s.style.left=newTop+"px"}else{s.style.left=ziel+"px";re=true}}}if(m.dDH==1){if(!inOut){ofs=s.offsetWidth}else{ofs=0}var ziel=0-ofs;var ist=parseInt(s.style.left);if(ist<ziel||(!inOut&&ist>ziel)){var mover;if(inOut){mover=parseInt((ziel+-ist)/m.dS)}else{mover=parseInt((ist-ziel)/m.dS)}mover=(mover>0)?mover:minSpeed;if(!inOut){mover=mover*-1}var newTop=ist+mover;if(newTop<ziel||(!inOut&&ist>ziel)){s.style.left=newTop+"px"}else{s.style.left=ziel+"px";re=true}}}}return(re)};this.timerFade=function(s){s.onmouseover=function(){m.o=s;m.aPPause=true;if((!m.lastOver&&!m.o)||(m.lastOver.num&&m.lastOver.num!=m.o.num)||(m.fC&&!moOvSl)){clearInterval(m.timerFade);m.timerFade=setInterval(function(){m.h.fade(s)},t)}m.lastOver=s}};this.startaP=function(){if(m.aP){clearInterval(m.aP)}m.o=false;m.aP=setInterval(function(){m.h.aP()},m.aPSpeed)};this.stopaP=function(){if(m.aP){clearInterval(m.aP)}};this.aP=function(){if(!m.aPPause){if(!m.a){m.a=sa[sa.length-1]}var act=m.a.num;var s=false;if(dir==0){if(act<l-1&&act!=-1){m.a=sa[act+1];s=sa[act+1]}else{m.a=sa[0];s=sa[0]}}else{if(act>0&&act!=-1){m.a=sa[act-1];s=sa[act-1]}else{m.a=sa[l-1];s=sa[l-1]}}clearInterval(m.timerFade);m.timerFade=setInterval(function(){m.h.fade(s)},t)}};this.slide=function(s){var breite=m.list_width;m.slideEnded=false;if(s==undefined){s=false}if(s.style){var cw=parseInt(s.style.width)}if(s==false&&m.even==true&&!m.a||(m.a==undefined&&!s)){if(breite!=parseInt(breite)){breite=breite-(0.003*l)}m.h.clearDesc(s);m.slideEnded=true;var lange=new Array();var kurze=new Array();var breiteKurze=0;for(var i=0;i<l;i++){o=sa[i];ow=parseInt(o.style.width);if(ow<=otE){kurze[kurze.length]=o;breiteKurze=breiteKurze+parseInt(o.style.width)}else{if(ow>otE){lange[lange.length]=o}}}var brKo=w;var tOE=overheadEven;var notProcessedSlides=l;for(var i=0;i<lange.length;i++){var o,ow,otemp;var oi=0;o=lange[i];ow=parseInt(o.style.width);oi=Math.ceil((ow-otE)/sp);oi=(oi>0)?oi:1;if(ow-oi>otE){otemp=ow-oi;m.slideEnded=false}else{otemp=otE;if(tOE>0){var overheader=Math.ceil(tOE/notProcessedSlides);otemp=otemp+overheader;tOE=tOE-overheader}}if(brKo-otemp<0){otemp=otemp+(brKo-otemp)}o.style.width=(otemp)+"px";brKo=brKo-otemp;notProcessedSlides--}var Anzahl=kurze.length;oi=Math.floor((brKo-breiteKurze)/Anzahl);oi=(oi>0)?oi:1;for(var i=0;i<kurze.length;i++){o=kurze[i];ow=parseInt(o.style.width);if(ow+oi<=otE||(tOE>0&&ow+oi<=otE+1)){otemp=ow+oi;if(ow+oi<otE+1){m.slideEnded=false}}else{otemp=otE}if(i==kurze.length-1){otemp=(brKo)}if(tOE>0){var overheader=Math.ceil(tOE/notProcessedSlides);otemp=otemp+overheader;tOE=tOE-overheader}if(brKo-otemp<0){otemp=otemp+(brKo-otemp)}o.style.width=(otemp)+"px";brKo=brKo-otemp;notProcessedSlides--}}else{if(cw<st||(s==false&&m.a&&parseInt(m.a.style.width)<st)){m.h.clearDesc(s);var owt=0;var i=0;var tempOverhead=overhead;for(i;i<l;i++){if(sa[i]!=s||(s==false&&sa[i]!=m.a)){var o,ow;var oi=0;o=sa[i];ow=parseInt(o.style.width);if(ow>ot){oi=Math.floor((ow-ot)/sp);oi=(oi>0)?oi:1;var tmpWidth=ow-oi;if(tmpWidth==ot&&tempOverhead>0){tmpWidth++;tempOverhead--;oi--}o.style.width=(tmpWidth)+"px"}owt=owt+(ow-oi)}}if(s.style){s.style.width=(w-owt)+"px"}else{if(s==false&&m.a){var oow=parseInt(w);for(var i=0;i<l;i++){if(sa[i]!=m.a){oow=oow-parseInt(sa[i].style.width)}}m.a.style.width=(oow)+"px"}}}else{m.slideEnded=true;if(m.a&&m.a.desc){m.a.desc.aktiv=true;m.slideEnded=m.h.fadeDesc(m.a.desc)}if((s&&s.desc)&&s!=m.a){s.desc.aktiv=true;m.slideEnded=m.h.fadeDesc(s.desc)}}}};this.fade=function(s){if((moOvSl||m.fC)){if(m.o!=false&&moOvSl){m.h.slide(m.o)}else{if(m.fC&&s==false){m.a=false;m.o=false}if(m.even&&s==false){m.h.slide(false)}else{if(m.a){m.h.slide(m.a)}else{m.h.slide(false)}}}}else{if(m.a){m.h.slide(m.a)}}var i=0;var sa=m.getElementsByTagName("li");var l=sa.length;var allClear=1;for(i;i<l;i++){var op;var sb=sa[i];op=this.gO(sb.fader);if(sb!=m.a||(m.dDFO&&m.a!=m.o)){if(op<maxOpac){sb.fader.style.display="block";op=op+0.04;this.sO(sb.fader,op);if(op<maxOpac){allClear=0}}if(sb.fadeInImg&&sb!=m.o){var opSP=this.gO(sb.fadeInImg);opSP=opSP-0.04;opSP=(opSP>0)?opSP:0;this.sO(sb.fadeInImg,opSP);if(opSP>0){allClear=0}}}}if(m.a&&(!m.dDFO||(m.dDFO&&!m.o))){op=op-fs;if(m.a.fader.style.display!="none"){this.sO(m.a.fader,0);m.a.fader.style.display="none"}if(m.a.fadeInImg){var opSP=this.gO(m.a.fadeInImg);opSP=opSP+0.04;if(opSP<1){this.sO(m.a.fadeInImg,opSP);if(opSP<1){allClear=0}}else{this.sO(m.a.fadeInImg,1)}}}if(m.o){var op;op=this.gO(m.o.fader);if(op>0){op=op-fs;if(m.o.fader.style.display!="none"){this.sO(m.o.fader,0);m.o.fader.style.display="none"}}if(m.o.fadeInImg){var opSP=this.gO(m.o.fadeInImg);opSP=opSP+0.04;opSP=(opSP<1)?opSP:1;if(opSP<1){this.sO(m.o.fadeInImg,opSP);if(opSP<1){allClear=0}}else{this.sO(m.o.fadeInImg,1)}}}var descCleared=true;if(m.a){descCleared=m.h.clearDesc(m.a)}if(allClear==1&&descCleared&&(m.slideEnded||(m.slideEnded==undefined&&m.even))){m.o=false;m.lastOver=false}};this.sO=function(s,opac){if(m.ie){var opB=parseInt(opac*100);if(opB>(100)){opB=100}s.style.filter="alpha(opacity="+opB+")"}else{s.style.opacity=opac}};this.gO=function(s){var op;if(m.ie){op=parseInt(parseFloat(s.style.filter.replace(/[\D\.]/g,"")))/100}else{op=parseFloat(s.style.opacity)}return(op)}};
