/* 
 * DasÖrtliche Javascript Library
 * Copyright (C) 2008 TENSQUARE gmbh
 */
if(!$oe$||!$||!$oe$.ui){throw new Error("Core libs missing");}(function(){var A=$oe$.getNamespace("calender");DEFAULT_CALENDER_OPTIONS={language:"de",date:new Date()};function B(G){var F=this;G=$oe$.obj.extend(G||{},DEFAULT_CALENDER_OPTIONS);var J=$v$.languages.getLanguage(G.language);var D=G.date;if(!D||(typeof (D)!=="date")){D=new Date();}var H=new Date(D);this.incDay=function(K){D=E(K);};function E(M,L){if(!L){L=D;}if(!M&&M!==0){M=1;}var K=new Date(D);K.setDate(D.getDate()+M);return K;}this.decDay=function(K){D=I(K);C();};function I(M,L){if(!L){L=D;}if(!M&&M!==0){M=1;}var K=new Date(D);K.setDate(D.getDate()-M);return K;}this.getNextDate=function(K){return E(K);};this.getDate=function(K){if(!K){K=0;}return E(K).getDate();};this.getDayOfWeekAsString=function(L,K){if(!L){L=0;}return J.calender.day[E(L,K).getDay()];};this.getMonthAsString=function(L,K){if(!L){L=0;}return J.calender.month[E(L,K).getMonth()];};this.getRestDaysOfMonth=function(){return this.getDaysOfMonth()-D.getDate();};this.getDays=function(){return D.getDate()-H.getDate()+1;};this.getDaysOfMonth=function(){var M=D.getYear();if(M<999){M+=1900;}var L=D.getMonth();var K=31;if(L==3||L==5||L==8||L==10){--K;}else{if(L==1){K=(M%4==0&&((M%100!=0)||M%400==0))?29:28;}}return K;};this.setToNextMonth=function(){D.setMonth(D.getMonth()+1);D.setDate(1);};this.setToFirstOfMonth=function(){D.setDate(1);C();};function C(){if(D<H){D=H;}}this.setToPrevMonth=function(){D.setMonth(D.getMonth()-1);this.setToFirstOfMonth();};this.getCurrentDate=function(){return D;};this.getDay=function(){return D.getDate();};}A.Calender=B;}());$v$.calender=new $oe$.calender.Calender();
/* 
 * DasÖrtliche Javascript Library
 * Copyright (C) 2008 TENSQUARE gmbh
 */
if(!$oe$||!$||!$oe$.ui){throw new Error("Core libs missing");}(function(){var A=$oe$.getNamespace("scroller");DEFAULT_EVTSC_OPTIONS={language:"de",date:new Date(),itemCount:180};function B(F,H){var M=this;F=$oe$.obj.extend(F||{},DEFAULT_EVTSC_OPTIONS);if(!F.itemCount){F.itemCount=180;}if(!F.date){F.date=new Date();}var S=new $oe$.calender.Calender({language:F.language,date:F.date});var L=null;var H=H;var K=4;var R=[];var C=null;var G=0;this.bindEvents=function(){var U={size:F.itemCount,scroll:1,initCallback:O.getBinding(M),itemFirstInCallback:D.getBinding(M),itemLastInCallback:E.getBinding(M),itemVisibleInCallback:{onAfterAnimation:T.getBinding(M)},buttonNextHTML:null,buttonPrevHTML:null};L=$("#oe_scroller");if(L.lebgth==0){return ;}L=$(L.get(0));J();L.children("li").removeClass("sc_gone");L.children("li").bind("click",M,P);L.jcarousel(U);};function P(V){var U=$(this).attr("etvScrollerIdx");if(!R[U]){return false;}if(R[U].disabled){return false;}if($oe$.val.isFunction(H)){if(H(Q(),this,U-G)){I(this);}}else{I(this);}return false;}function Q(){var W=[];var Z=G;var X=-1;for(var V=0;V<K;V++){var Y=V+G;if(!R[Y]){W.push({});continue;}var U={item:R[Y].item,date:R[Y].date,disabled:R[Y].disabled?true:false,selected:R[Y].selected?true:false,lifeTime:new Date().getTime()-R[Y].lifeTime};W.push(U);}return W;}function T(X,V,U,W){if(U!=G+1){return ;}if($oe$.val.isFunction(H)){H(Q(),null,-1);}}function N(Z){var Y=$v$.tools.createEl("li","deactivated sc_gone");$(Y).attr("etvScrollerIdx",Z);var U=$v$.tools.createEl("a");U.href="#";var W=$v$.tools.createEl("br");var V=S.getDate(Z);if(V.length==1){V="0"+V;}$(U).html(V+". "+S.getMonthAsString(Z));var X=$v$.tools.createEl("span");$(X).html(S.getDayOfWeekAsString(Z));U.appendChild(W);U.appendChild(X);Y.appendChild(U);L[0].appendChild(Y);return Y;}function I(V){var U=$(V).attr("etvScrollerIdx");if(!R[U]){return false;}if(R[U].disabled){return false;}$(C).removeClass("activated").addClass("deactivated");var W=$(C).attr("etvScrollerIdx");if(R[W]){R[W].selected=false;}C=V;$(C).addClass("activated").removeClass("deactivated");R[U].selected=true;}function J(){var U=L.children("li");if(U.length!=K){return ;}for(var Z=0;Z<F.itemCount;Z++){var Y;var X=false;var W=false;if(Z<K){Y=U[Z];$(Y).attr("etvScrollerIdx",Z);X=$(Y).hasClass("disabled");W=$(Y).hasClass("activated");if(W){C=Y;}}else{Y=N(Z);}var V={date:new Date(S.getNextDate(Z)),item:Y,disabled:X,selected:W,lifeTime:new Date().getTime()};R.push(V);}}function O(U){$("#oe_scroller_first").bind("click",this,function(){if(U.animating){return false;}var W=U.last-K;if(W==0){return false;}var V=S.getDay()-1;if(S.getDay()==1){S.setToPrevMonth();V=S.getDaysOfMonth();}else{S.setToFirstOfMonth();}U.scroll((W+1)-V);return false;});$("#oe_scroller_next").bind("click",this,function(){if(U.animating){return false;}if(U.last<U.size()){var W=U.last-K+1;var V=W+4;if(V>U.size()-(K)-1){V=U.size()-(K-1);}U.scroll(V);S.incDay(V-W);return false;}});$("#oe_scroller_prev").bind("click",this,function(){if(U.animating){return false;}var W=U.last-K;if(W==0){return false;}var V=W-3;U.scroll(V);S.decDay(4);return false;});$("#oe_scroller_last").bind("click",this,function(){if(U.animating){return false;}var X=U.last-K+1;var V=S.getRestDaysOfMonth();var W=X+V+1;if(W>U.size()-(K)-1){W=U.size()-(K-1);}U.scroll(W);S.incDay(W-X);return false;});}function D(X,V,U,W){if(U){G=U-1;}if(U==1){$("a#oe_scroller_prev").removeClass("previous_activated").addClass("previous_deactivated");$("a#oe_scroller_first").removeClass("first_activated").addClass("first_deactivated");}else{$("a#oe_scroller_prev").removeClass("previous_deactivated").addClass("previous_activated");$("a#oe_scroller_first").removeClass("first_deactivated").addClass("first_activated");}}function E(X,V,U,W){if(U<X.size()){$("a#oe_scroller_next").removeClass("next_deactivated").addClass("next_activated");$("a#oe_scroller_last").removeClass("last_deactivated").addClass("last_activated");}else{$("a#oe_scroller_next").removeClass("next_activated").addClass("next_deactivated");$("a#oe_scroller_last").removeClass("last_activated").addClass("last_deactivated");}}this.setDisabled=function(W,V){W=$(W);var U=W.attr("etvScrollerIdx");if(!R[U]){return false;}V?W.addClass("disabled"):W.removeClass("disabled");R[U].disabled=V;R[U].lifeTime=new Date().getTime();};this.select=function(U){I(U);};}A.EvtScrollerHandler=B;}());