var CWTBodyContainer="CWTBodyContainer";var LoadingWarning="LoadingWarning";var MessageBox1=null;function CWTMessageBox(aa,ba,ca){var da=new BrowserDimension();this.Window=new Window("CWTMessageBox",{className:"dialog",width:300,height:125,zIndex:5000,resizable:false,top:da.QuarterHeight,left:da.QuarterWidth,title:ba,draggable:true,closable:true,maximizable:false,minimizable:false,detachable:false,showEffectOptions:{duration:0},hideEffectOptions:{duration:0}});var ea=$(aa).innerHTML;ea=ReplaceAll(ea,"_TEXT_MESSAGE_",ca);this.Window.getContent().innerHTML=ea;this.Window.show();this.Window.toFront();}
function CWTMessageBoxWC(fa,ga,X,Y,W,H){if(W==undefined)W=400;if(H==undefined)H=250;this.Window=new Window("CWTMessageBoxWC",{className:"dialog",width:W,height:H,zIndex:5000,resizable:false,top:Y,left:X,title:fa,draggable:true,closable:true,maximizable:false,minimizable:false,detachable:false,showEffectOptions:{duration:0},hideEffectOptions:{duration:0}});this.Window.getContent().innerHTML=ga;this.Window.show();this.Window.toFront();}
var open=0;var close=0;function OpenMB1(MB){open++;MessageBox1=MB;}
function CloseMB1(){close++;if(close!=open){}
if(MessageBox1!=null){try{MessageBox1.Window.destroy();}catch(err){}
MessageBox1=null;}}
function SubmitURLMB(ha){OpenL();new Ajax.Request(ha,{onSuccess:function(ia){CloseL();CloseMB1();OpenMB1(new CWTMessageBox("PT_TXT_MB",'...',ia.responseText));}});}
function SubmitURLMB_WC(ja,X,Y,W,H){OpenL();new Ajax.Request(ja,{onSuccess:function(ka){CloseL();DisplayHTML(ka.responseText,X,Y,W,H);}});}
function SubmitFormMB(la,ma){OpenL();var na=Form.serialize($(ma));new Ajax.Request(la,{method:'post',postBody:na,onSuccess:function(oa){CloseL();CloseMB1();OpenMB1(new CWTMessageBox("PT_TXT_MB",'...',oa.responseText));}});}
function DisplayHTML(pa,X,Y,W,H){CloseMB1();OpenMB1(new CWTMessageBoxWC("...",pa,X,Y,W,H));}
function OpenL(){scroll(0,0);var qa=new BrowserDimension();var Cn=$(LoadingWarning);Cn.style.top=qa.CenterHeight-25;Cn.style.left=qa.CenterWidth-75;Cn.style.display="block";}
function CloseL(){$(LoadingWarning).style.display="none";}
function onClickNavigateBody(ra,sa){NavigateDiv(ra,CWTBodyContainer,true,true,sa);}
function onClickNavigateDiv(ta,ua,va){NavigateDiv(ta,ua,true,false,va);}
function onClickNavigateDivWLE(wa,xa,ya){NavigateDiv(wa,xa,false,false,ya);}
var Navi=null;function NavigateDiv(za,Aa,Ba,Ca,Da,Ea){if(Ba){OpenL();}
if(Navi!=null){var rs=Navi.transport.readyState;if(rs==0||rs==1){Navi.transport.abort();Navi=null;}}
if(Da!=undefined||Ea!=undefined){if(Da!=undefined)Ea=Form.serialize($(Da));Navi=new Ajax.Updater(Aa,za,{method:'post',postBody:Ea,onComplete:function(){CloseL();Navi=null;},asynchronous:true,evalScripts:true});}else{Navi=new Ajax.Updater(Aa,za,{onComplete:function(){CloseL();Navi=null;},asynchronous:true,evalScripts:true});}
if(Ca){var Fa=za;Fa=Fa+"/"+Math.round(Math.random()*10000);Fa=ReplaceAll(Fa,"?","_");Fa=ReplaceAll(Fa,"&","_");Fa=ReplaceAll(Fa,"=","_");dhtmlHistory.add(Fa,new HistoryItem(za,Aa,Ba,Ea));}}