var AjaxHandler=Class.create();
AjaxHandler.prototype={initialize:function(a,b,c,e,d,f,g){this.url=b;this.callback=e;this.jsContext=d;this.bindingObject=g;this.production_mode=f;this.safe="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.:";a&&Event.observe($(a),c,this.invokeAjax.bindAsEventListener(this))},invokeAjax:function(a){var b=this.url.split("?");b[0]=b[0].split(";")[0];if(this.jsContext!=null)for(var a=this.jsContext(a),c=0;c<a.length;c++)b[0]+="/"+this.encodeAsTapestry(a[c]);a=b[0];b[1]!=null&&(a+="?"+
b[1]);this.bindingObject!=null&&!this.production_mode?this.prototypeAjax(a,this.callback,this.bindingObject):this.bindingObject!=null&&this.production_mode?this.prototypeNoErrorAjax(a,this.callback,this.bindingObject):this.production_mode?this.noErrorAjax(a,this.callback):Tapestry.ajaxRequest(a,this.callback)},prototypeAjax:function(a,b,c){return new Ajax.Request(a,{onSuccess:function(a,d){if(a.request.success())try{b.call(c,a,d)}catch(f){Tapestry.ajaxError("Client exception processing response: "+
f)}else Tapestry.ajaxError("Server request was unsuccesful. There may be a problem accessing the server.")},onException:Tapestry.ajaxFailureHandler,onFailure:Tapestry.ajaxFailureHandler})},noErrorAjax:function(a,b){return new Ajax.Request(a,{onSuccess:function(a,e){if(a.request.success())try{b.call(this,a,e)}catch(d){}else Tapestry.ajaxError("Server request was unsuccesful. There may be a problem accessing the server.")},onException:Tapestry.ajaxFailureHandler,onFailure:Tapestry.ajaxFailureHandler})},
prototypeNoErrorAjax:function(a,b,c){return new Ajax.Request(a,{onSuccess:function(a,d){if(a.request.success())try{b.call(c,a,d)}catch(f){}else Tapestry.ajaxError("Server request was unsuccesful. There may be a problem accessing the server.")},onException:Tapestry.ajaxFailureHandler,onFailure:Tapestry.ajaxFailureHandler})},encodeAsTapestry:function(a){if(a.length==0)return"$N";for(var b="",c=!1,e=0;e<a.length;e++){var d=a.charAt(e);this.safe.indexOf(d)!=-1?b+=d:(b+=d=="$"?"$$":"$"+this.atox(d),c=
!0)}return c?b:a},atox:function(a){a=a.charCodeAt().toString(16);if(a.length==1)return"000"+a;else if(a.length==2)return"00"+a;else if(a.length==3)return"0"+a;else a.length>4&&alert("Hex string larger than 4 length!!");return a}};
