UNOUNO.namespace("global");UNOUNO.global.Functions={getElementsByClassName:function(clsName,element){var retVal=[];var elements;if(element){elements=element.getElementsByTagName("*");}else{elements=document.getElementsByTagName("*");}for(var i=0;i<elements.length;i++){if(elements[i].className.indexOf(" ")>=0){var classes=elements[i].className.split(" ");
for(var j=0;j<classes.length;j++){if(classes[j]==clsName){retVal.push(elements[i]);}}}else{if(elements[i].className==clsName){retVal.push(elements[i]);}}}return retVal;},countdownIntervalDisplay:function(clazz,interval){var allCountdownElementsA;var allCountdownElementsB;if(clazz instanceof Array){allCountdownElementsA=this.getElementsByClassName(clazz[0]);
allCountdownElementsB=this.getElementsByClassName(clazz[1]);}else{allCountdownElementsA=this.getElementsByClassName(clazz);}if(allCountdownElementsA){for(var i=0;i<allCountdownElementsA.length;i++){allCountdownElementsA[i].style.display="block";}}if(allCountdownElementsB){for(var i=0;i<allCountdownElementsB.length;
i++){allCountdownElementsB[i].style.display="none";}}window.setInterval(function(scope,clazz){return function(){scope.toggleCountdown(allCountdownElementsA);scope.toggleCountdown(allCountdownElementsB);};}(this,clazz),interval);},toggleCountdown:function(countdownElements){if(countdownElements){for(var i=0;
i<countdownElements.length;i++){if(countdownElements[i].style.display=="block"){countdownElements[i].style.display="none";}else{countdownElements[i].style.display="block";}}}}};
UNOUNO.util.TariffDynPrice=function(radioboxIDs){this.init(radioboxIDs);};UNOUNO.util.TariffDynPrice.prototype={radioboxIDs:null,qxBom:qx.bom,initRadioboxes:function(){var addListenerCallbackShowPrice=function(scope,radioboxId){return function(e){scope.showPrice(radioboxId);};};for(var i=0;i<this.radioboxIDs.length;
i++){if(document.getElementById(this.radioboxIDs[i])){this.qxBom.Element.addListener(document.getElementById(this.radioboxIDs[i]),"change",addListenerCallbackShowPrice(this,this.radioboxIDs[i]));if(document.getElementById(this.radioboxIDs[i]).checked===true){this.showPrice(this.radioboxIDs[i]);}}}},showPrice:function(id){this.resetPrices();
var priceId=this.getPriceId(id);var priceElem=document.getElementById(priceId);if(priceId&&priceElem){priceElem.style.display="inline-block";}},resetPrices:function(){for(var i=0;i<this.radioboxIDs.length;i++){this.hidePrice(this.radioboxIDs[i]);}},hidePrice:function(id){var priceId=this.getPriceId(id);
var priceElem=document.getElementById(priceId);if(priceId&&priceElem){priceElem.style.display="none";}},getPriceId:function(id){if(document.getElementById(id)){var priceId=document.getElementById(id).value.replace(/-bundle/g,"");return priceId;}},init:function(radioboxIDs){this.radioboxIDs=radioboxIDs;
this.initRadioboxes();}};
if(UNOUNO.init.JSLoadStack&&UNOUNO.init.JSLoadStack.length>0){for(var i=0;i<UNOUNO.init.JSLoadStack.length;i++){UNOUNO.init.JSLoadStack[i].call();}}