
var glassElement=getElement("glassPane");var loadingElement=getElement("loadingGraphic");function setAjaxUrl(elementName,serverUrl,onDownloadStart,onDownloadEnd)
{if(serverUrl.match("\\?"))
{serverUrl=serverUrl+"&opid="+new Date().getTime();}
else
{serverUrl=serverUrl+"?opid="+new Date().getTime();}
if(getElement(elementName))
{var xmlHttpResponseElement=getElement(elementName);xmlHttpResponseElement.innerHTML="";showElement(xmlHttpResponseElement.id);submitXmlHttpRequest(serverUrl,xmlHttpResponseElement,onDownloadStart,onDownloadEnd);}}
function submitXmlHttpRequest(serverUrl,xmlHttpResponseElement,onDownloadStart,onDownloadEnd)
{var xmlhttp;xmlhttp=null;if(window.XMLHttpRequest)
{xmlhttp=new XMLHttpRequest();}
else if(window.ActiveXObject)
{xmlhttp=new ActiveXObject("MSXML2.XMLHTTP.3.0");}
if(xmlhttp!=null)
{xmlhttp.open("GET",serverUrl,true);xmlhttp.onreadystatechange=function()
{if(xmlhttp.readyState==4)
{if(xmlhttp.status==200)
{if(xmlHttpResponseElement!=null)
{xmlHttpResponseElement.innerHTML=xmlhttp.responseText;if((onDownloadEnd!=false)&(onDownloadEnd!="")&(onDownloadEnd!=null))
{eval(onDownloadEnd);}}
else
{}}}
else if(xmlhttp.readyState==1)
{if((onDownloadStart!=false)&(onDownloadStart!="")&(onDownloadStart!=null))
{eval(onDownloadStart);}}
else if(xmlhttp.readyState==2)
{}
else if(xmlhttp.readyState==3)
{}};xmlhttp.send(null);}
else
{alert("Your browser does not support XMLHTTP.");}}
function setLoadingPosition()
{var posX;posX=(getWindowWidth()/2);if(IE)
{loadingElement.style.left=posX-75;loadingElement.style.top=((getWindowHeight()-75)/2)+getPageYOffset();}
else
{loadingElement.style.left=(posX-75)+"px";loadingElement.style.top=((getWindowHeight()-75)/2)+getPageYOffset()+"px";}}
function showLoadingGraphic()
{loadingElement.style.display="block";loadingElement.innerHTML="<div style=\"border: solid 1px #666666; background-color: #FFFFFF; padding: 10px; width: 150px;\" align=\"\center\"><img src=\"/images/loadingGraphic1.gif\"></div>";setLoadingPosition();}
function setLoadingGraphic(elementId)
{if(elementId!="")
{var element=getElement(elementId);element.innerHTML="<table width=\""+getWidth(element)+"\" height=\""+(.75*getHeight(element))+"\"><tr valign=\"center\"><td align=\"center\"><img src=\"/images/loadingGraphic1.gif\"></td></tr></table>";}}
function setCustomLoadingGraphic(elementId,loadingImage)
{if(elementId!="")
{var element=getElement(elementId);element.innerHTML="<table width=\""+getWidth(element)+"\" height=\""+(.75*getHeight(element))+"\"><tr valign=\"center\"><td align=\"center\"><img src=\""+loadingImage+"\"></td></tr></table>";}}
function hideLoadingGraphic()
{loadingElement.style.display="none";loadingElement.innerHTML="";setLoadingPosition();}
