document.iframeLoaders={};iframe=function(){this.initialize.apply(this,arguments)};iframe.prototype={initialize:function(D,B,C){if(!B){B={}}this.form=D;this.uniqueId=C;document.iframeLoaders[this.uniqueId]=this;this.transport=this.getTransport();this.onComplete=B.onComplete||null;this.update=this.$(B.update)||null;this.updateMultiple=B.multiple||false;if(((navigator.vendor&&(navigator.vendor.indexOf("Apple"))>-1)||window.opera)&&(/\/Direct\/Process(\?|$)/.test(D.action))&&D.elements&&(D.elements.length==1)){var A=D.action+"?jsonRequest="+escape(D.elements[0].value),F=this.transport.contentWindow||this.transport.contentDocument;if(A.length<80000){if(F.document){F=F.document}try{F.location.replace(A);return }catch(E){}}}D.target="frame_"+this.uniqueId;D.setAttribute("target","frame_"+this.uniqueId);D.submit()},onStateChange:function(){this.transport=this.$("frame_"+this.uniqueId);try{var doc=this.transport.contentDocument.body.innerHTML;this.transport.contentDocument.close()}catch(e){try{var doc=this.transport.contentWindow.document.body.innerHTML;this.transport.contentWindow.document.close()}catch(e){try{var doc=this.transport.document.body.innerHTML;this.transport.document.body.close()}catch(e){try{var doc=window.frames["frame_"+this.uniqueId].document.body.innerText}catch(e){}}}}this.transport.responseText=doc;if(this.onComplete){setTimeout(this.bind(function(){this.onComplete(this.transport)},this),10)}if(this.update){setTimeout(this.bind(function(){this.update.innerHTML=this.transport.responseText},this),10)}if(this.updateMultiple){setTimeout(this.bind(function(){try{var hasscript=false;eval("var inputObject = "+this.transport.responseText);for(var i in inputObject){if(i=="script"){hasscript=true}else{if(elm=this.$(i)){elm.innerHTML=inputObject[i]}else{}}}if(hasscript){eval(inputObject.script)}}catch(e){}},this),10)}},getTransport:function(){var A=document.createElement("DIV"),B;A.setAttribute("style","width: 0; height: 0; margin: 0; padding: 0; visibility: hidden; overflow: hidden");if(navigator.userAgent.indexOf("MSIE")>0&&navigator.userAgent.indexOf("Opera")==-1){A.style.width=0;A.style.height=0;A.style.margin=0;A.style.padding=0;A.style.visibility="hidden";A.style.overflow="hidden";A.innerHTML='<iframe name="frame_'+this.uniqueId+'" id="frame_'+this.uniqueId+'" src="about:blank" onload="setTimeout(function(){document.iframeLoaders['+this.uniqueId+'].onStateChange()},20);"></iframe>'}else{B=document.createElement("iframe");B.setAttribute("name","frame_"+this.uniqueId);B.setAttribute("id","frame_"+this.uniqueId);B.addEventListener("load",this.bind(function(){this.onStateChange()},this),false);A.appendChild(B)}(RequestBatch.container||document.body).appendChild(A);return B},bind:function(A,B){return function(){return A.apply(B,arguments)}},"$":function(A){return document.getElementById(A)}};
