function createBengRequestUrl(b,d,o,c,n,p,h){o=(o||{});d=(d||{});c=(c||{});var l="";var g="";var j="";var a,k;for(a in o){g+=a+"="+o[a]+"&"}for(a in c){j+=a+"="+c[a]+"&"}g=jencode(g);var m=/%/g;g=g.replace(m,"$");for(var a in d){k=jencode(d[a]);k=k.replace(m,"$");b+="/"+a+"="+k}if(g){b+="/header="+g}if(!n){b+="/cc="+new Date().getTime()}var f="";try{f=getTopWindow().urlSessionId||""}catch(i){}b=beng_widget_uri(b,f,null,typeof p=="string"?p:null,h||null,null,(j!=""?j:null));return b}BengWidget=Class.create({initialize:function(c,a,b,f,e,d){this.path=c;this.base=a;this.session=b;this.frame=f;this.clsId=e;this.widgetElementId=d},getInfo:function(){return this.path+"#"+this.base},doGetUrl:function(c,b,e){var a=this.translateURI(c,"proxy");a+=(a.indexOf("?")==-1?"?":"&")+"cc="+new Date().getTime();for(var d in e){a+="&"+d+"="+e[d]}return a},doRequest:function(c,b,e,f){var a=this.translateURI(c,"proxy");a+=(a.indexOf("?")==-1?"?":"&")+"cc="+new Date().getTime();for(var d in e){a+="&"+d+"="+e[d]}return new Ajax.Request(a,b)},reload:function(d,g,b){d=(d||"");var a=this.translateURI(d,"partial");a+=(a.indexOf("?")==-1?"?":"&")+"cc="+new Date().getTime();for(var e in g){a+=(a.indexOf("?")==-1?"?":"&")+e+"="+g[e]}b=(b||{});b.method="get";b.evalScripts=true;var f=b.onComplete||null;b.onComplete=function(){for(var j=0;j<window.frames.length;j++){try{var h=window.frames[j].name;if(h&&window.frames[h]&&window.frames[h].closed){window.frames[h]=window.frames[j]}}catch(k){}}if(f){f()}};var c=this.getElement();return new Ajax.Updater(c,a,b)},translateURI:function(b,c){c=c||"";var a=beng_widget_uri(this.base,this.session,this.frame,this.path,c);if(b){a+=b}return a},setElement:function(a){this.widgetElement=a},getElement:function(){if(!this.widgetElement){if(this.widgetElementId){this.widgetElement=$(this.widgetElementId);if(this.widgetElement){return this.widgetElement}}var a="beng_widget___"+this.path.replace(/\/|:/g,"__");this.widgetElement=$(a+"__");if(!this.widgetElement){this.widgetElement=$(a)}}return this.widgetElement}});
