
function ShowLoader(input,layer){try{var imageLocation="images/misc/loadingbar.gif";var str="<p>";var img="<img src='"+imageLocation+"' />";switch(input){case 1:str+="Receiving Data<br/>";break;case 2:str+="Loading "+layer+" Data<br/>";break;case 3:str+="Unloading "+layer+" Data<br/>";break;case 4:str+="Updating Map<br/>";break;default:break;}
var updatingElement=GetElementByID('dvUpdating');var theMapDiv=GetElementByID('map');var horizontalPosition=getX(theMapDiv);var horizontalOffset=horizontalPosition+(theMapDiv.offsetWidth/2)-110;var topOfMap=getY(theMapDiv);updatingElement.style.position='absolute';updatingElement.style.top=topOfMap+10+'px';updatingElement.style.left=horizontalOffset+'px';updatingElement.style.zIndex='50000';GetElementByID('dvUpdating').style.display='inline';GetElementByID('dvUpdating').innerHTML=str+img+"</p>";}
catch(e){DisplayErrorWindow(e,"ShowLoader");}}
function getY(oElement){var iReturnValue=0;while(oElement!=null){iReturnValue+=oElement.offsetTop;oElement=oElement.offsetParent;}
return iReturnValue;}
function getX(oElement){var iReturnValue=0;while(oElement!=null){iReturnValue+=oElement.offsetLeft;oElement=oElement.offsetParent;}
return iReturnValue;}
function HideLoader(){try{GetElementByID('dvUpdating').innerHTML="";GetElementByID('dvUpdating').style.display='none';}
catch(e){DisplayErrorWindow(e,"HideLoader");}}
