if(HP==null)var HP={};if(HP.Forms==null)HP.Forms={};if(HP.Forms.Utils==null)HP.Forms.Utils={};HP.Forms.Utils.ClickBox=new Class({implements:[Events],initialize:function(link,formid){this.link=$(link);this.form=$(formid);this.input=$(formid+"_input");this.submit=$(formid+"_submit");this.cancel=$(formid+"_cancel");this.form.addEvent("submit",this.update.bindWithEvent(this));this.link.addEvent("mouseover",function(evt){this.highlight();});this.submit.addEvent("click",this.update.bindWithEvent(this));this.cancel.addEvent("click",this.hide.bindWithEvent(this)),this.link.addEvent("click",this.show.bindWithEvent(this));},show:function(){this.link.tween("opacity",0);this.form.set("opacity",0);this.form.style.visibility="visible";this.form.style.display="block";this.form.tween("opacity",1);this.input.value=this.link.innerHTML;this.input.select();return false;},hide:function(){this.link.tween("opacity",1);this.form.set("opacity",0);this.form.style.visibility="hidden";this.form.style.display="none";},update:function(){this.form.send();this.link.innerHTML=this.input.value;this.hide();return false;}});HP.Forms.Utils.SyncPriceList=function(name,inputlist){var i=0;while(true){if($(name+'_'+i)==null)break;$each(inputlist,function(itm,idx,obj){$(itm+'_'+i).value=$(name+'_'+i).value;},this);i++;}} HP.Forms.Utils.BuyAbo=function(Abo_id,Praemien_id){$('products_id').value=Abo_id;$('praemien_products_id').value=Praemien_id;$('products_form').submit();return false;} HP.Forms.Utils.BuyProduct=function(Products_id){$('products_id').value=Products_id;$('products_form').submit();return false;} HP.Forms.Utils.ShowThemenbereichItems=function(Themenbereich,namespace,target,source){source=$(source);target=$(target);var myRequest=new Request.JSON({"url":"/AJAXRequest/"+Math.random(),"method":"post","data":{"namespace":namespace,"data":Themenbereich},"onSuccess":function(responseJSON,responseText){target.empty();var span;var input;var p;var br;var item;for(i=0;i0){target.options[0]=null;} var myRequest=new Request.JSON({"url":"/AJAXRequest","method":"post","data":{"namespace":namespace,"data":source.options[source.options.selectedIndex].value},"onSuccess":function(responseJSON,responseText){var data;for(var i=0;ithis.maxchars){this.input.value=this.input.value.substr(0,this.maxchars);if(evt.key!="backspace"&&evt.key!="delete"&&evt.key!="left"&&evt.key!="right"&&evt.key!="$"&&evt.key!="#")return false;} return true;},onKeyup:function(sender){this.recountChars();}});