function Visibility(objId,show){var obj=document.getElementById("entity_anchor_"+objId);if(!show)Tooltip._hide(obj,null);}function showDetails(url,query,view,docNo){var loader=detailsLoaders.getLoader(docNo,url,query,view);loader.loadDetails();}function hideDetails(docNo){var loader=detailsLoaders.getLoaderById(docNo);if(loader){loader.hideDetails();}}function DetailsLoaders(){}DetailsLoaders.prototype.loaders=new Array();DetailsLoaders.prototype.getLoaderById=function(id){return this.loaders[id];};DetailsLoaders.prototype.getLoader=function(id,url,query,view){if(!this.loaders[id]){this.loaders[id]=new DetailsLoader(id,url,query,view);this.loaders[id].init();}return this.loaders[id];};function DetailsLoader(id,url,query,view){this.id=id;this.url=url;this.query=query;this.view=view;}DetailsLoader.prototype.request=false;DetailsLoader.prototype.loaded=false;DetailsLoader.prototype.loading=false;DetailsLoader.prototype.details="";DetailsLoader.prototype.init=function(){this.request=getXMLHttpRequest();if(this.request==null){this.request=false;}};DetailsLoader.prototype.loadDetails=function(){if(!this.loaded&&!this.loading){this.loading=true;if(this.request){this.loadingDetails();var req=this.request;var loader=this;req.onreadystatechange=function(){loader.processReqChange();};req.open("get","documentDetails.fast?view="+this.view+"&s.sm(docDetails).query="+this.query+"&s.sm(docDetails).url="+this.url+"&s.sm(docDetails).navigators=customer,Customers,management,Management,partner,Partner,product,Product");req.send(null);}}else if(this.loaded){this.showDetails();}};DetailsLoader.prototype.loadingDetails=function(){this.details="Loading details...";this.showDetails();};DetailsLoader.prototype.loadedDetails=function(details){this.details=details;this.loaded=true;this.loading=false;this.showDetails();};DetailsLoader.prototype.showDetails=function(){this.toggleDetails(true);};DetailsLoader.prototype.hideDetails=function(){this.toggleDetails(false);};DetailsLoader.prototype.toggleDetails=function(show){var detailsShowLinkElement=byId("details_show_link_"+this.id);var detailsHideLinkElement=byId("details_hide_link_"+this.id);var detailsElement=byId("details_"+this.id);if(detailsShowLinkElement&&detailsHideLinkElement&&detailsElement){detailsShowLinkElement.style.display=show?"none":"";detailsHideLinkElement.style.display=show?"":"none";detailsElement.style.display=show?"":"none";detailsElement.innerHTML=show?this.details:"";}};DetailsLoader.prototype.processReqChange=function(){if(this.request.readyState==4){if(this.request.status==200){this.loadedDetails(this.request.responseText);}else{alert("There was a problem retrieving the data:\n"+this.request.statusText);}}};var detailsLoaders=new DetailsLoaders();