function CW_AjaxPage_Manager(){}CW_AjaxPage_Manager.prototype={handleNewLocation:"NULL",isFirstPage:true,displayPage:function(A,B){var C=null;try{C=this.getPage(A);C.getPageName()}catch(D){CW_logger.log(CW_logger.LEVEL_ERROR,"CW_AjaxPage_Manager.cant' retrieve displayPage:"+A+" ,error:"+D);return }CW_logger.log(CW_logger.LEVEL_INFORMATION,"CW_AjaxPage_Manager.displayPage, pageName:"+A+" pageIdentifier:"+B);this.launchDisplayPage(C,C.getParams(),B)},launchDisplayPage:function(C,A,B){if(C.getMustBeConnected()&&!CW_config.hasConnectedUser()){if(this.isFirstPage){loadMainPage();this.isFirstPage=false}this.displayUserNotConnected()}else{try{this.isFirstPage=false;if(C.mustRefreshElement){this.refreshElement(C)}if(C.getRequiredPreDisplay()==true){C.preDisplay(A,B)}else{C.display(A,B)}}catch(D){CW_logger.log(CW_logger.LEVEL_ERROR,"CW_AjaxPage_Manager.cant' display displayPage:"+C.getPageName()+" ,error:"+D);return }}},getPage:function(pageName){var page=null;try{if(pageName.lastIndexOf("_")==pageName.length-1){pageName=pageName.substring(0,pageName.length-1)}}catch(e){}try{page=eval("new CW_AjaxPage_"+pageName+"();");page.getPageName();return page}catch(e){CW_logger.log(CW_logger.LEVEL_ERROR,"CW_AjaxPage_Manager.cant' retrieve displayContent:"+pageName+" ,error:"+e);return null}return page},handleHistoryChange:function(E){if(this.handleNewLocation!=E){this.handleNewLocation=E;var C=E.indexOf("/_/");var G="";var D="";var B="";if(C>0){G=E.substring(0,C);B=E.substring(C+3)}else{G=E}var F=G.indexOf(":");if(F>0){D=G.substring(F+1);G=G.substring(0,F)}G=this.convertHistoryNameToPageName(G);var A=this.getPage(G);CW_logger.log(CW_logger.LEVEL_INFORMATION,"CW_AjaxPage_Manager.handleHistoryChange, historyPage:"+G+" historyParam:"+B+" pageIdentifier:"+D+" mustBeConnected:"+A.getMustBeConnected()+" newLocation:"+E);this.launchDisplayPage(A,B,D);CW_logger.log(CW_logger.LEVEL_INFORMATION,"CW_AjaxPage_Manager.handleHistoryChange, historyPage:"+G+" historyParam:"+B)}else{CW_logger.log(CW_logger.LEVEL_INFORMATION,"CW_AjaxPage_Manager.handleHistoryChange try too set the same location, newLocation:"+E)}},convertPageNameToHistory:function(B){B=(new String(B)).toLowerCase();var C=B.split("_");var E="";var A="";for(var D=0;D<C.length;D++){E=C[D];A+=E.substring(0,1).toUpperCase()+E.substring(1)+"/"}return A},convertHistoryNameToPageName:function(C){var B=new RegExp("/","g");var A=(new String(C)).toLowerCase().replace(B,"_");if(A.charAt(0)=="_"){A=A.substring(1)}if(A.charAt(A.length)=="_"){A=A.substring(0,A.length-1)}return A},refreshElement:function(A){},displayUserNotConnected:function(){}};var CW_AjaxPage_Manager=new CW_AjaxPage_Manager();function CW_AjaxPage_MODEL(){this.initialize()}CW_AjaxPage_MODEL.prototype.name=null;CW_AjaxPage_MODEL.prototype.statId=null;CW_AjaxPage_MODEL.prototype.menuId=null;CW_AjaxPage_MODEL.prototype.mustBeConnected=false;CW_AjaxPage_MODEL.prototype.requiredPreDisplay=false;CW_AjaxPage_MODEL.prototype.mustRefreshElement=true;CW_AjaxPage_MODEL.prototype={initialize:function(){this.name="MODEL";this.statId="null";this.menuId="null";this.mustBeConnected=false;this.requiredPreDisplay=false;this.mustRefreshElement=true},preDisplay:function(B,A){},display:function(B,A){CW_logger.log(CW_logger.LEVEL_ERROR,"CW_AjaxPage_MODEL.display is called, but implementation not allowed it, this class must be extended")},getPageName:function(){return this.name},getHistoryPageName:function(){return CW_AjaxPage_Manager.convertPageNameToHistory(this.name)},getStatId:function(){return this.statId},getMenuId:function(){return this.menuId},getMustBeConnected:function(){return this.mustBeConnected},getRequiredPreDisplay:function(){return this.requiredPreDisplay},getParams:function(){return this.defaultParam}};