// JScript source code
// 2003-06-10, E. Manser, TRINEA Consulting GmbH

function createWaitCursor(){
	document.write("<div id='WaitDiv' style='FONT-WEIGHT: bold; FONT-SIZE: 30px; Z-INDEX: 200; LEFT: 0px; VISIBILITY: hidden; VERTICAL-ALIGN: baseline; WIDTH: 100%; COLOR: aqua; POSITION: absolute; TOP: 0px; HEIGHT: 100%; TEXT-ALIGN: center'>");
	document.write("<table width='100%' height='100%' border='0' border=0>");
	document.write("<tr height='40%'>");
	document.write("<td width='40%'></td>");
	document.write("<td width='20%'></td>");
	document.write("<td width='40%'></td>");
	document.write("</tr>");
	document.write("<tr height='20%'>");
	document.write("<td width='40%'></td>");
	document.write("<td width='20%' align='center' valign='middle'><img id='zsWaitCursor' src='/eServices/wait.gif'></td>");
	document.write("<td width='40%'></td>");
	document.write("</tr>");
	document.write("<tr height='40%'>");
	document.write("<td width='40%'></td>");
	document.write("<td width='20%'></td>");
	document.write("<td width='40%'></td>");
	document.write("</tr>");
	document.write("</table>");
	document.write("</div>");
}

function xCenter(sId) {
  var l = xScrollLeft() + (xClientWidth() - xWidth(sId))/2;
  var t = xScrollTop() + (xClientHeight() - xHeight(sId))/2;
  xMoveTo(sId,l,t);
}

function WaitCursor(){
  var imgCursor=xGetElementById('zsWaitCursor');
  if(imgCursor && !imgCursor.complete) 
      imgCursor.src='/eServices/wait.gif';

  xCenter( "WaitDiv" );
  document.body.style.cursor = "wait";
  xShow("WaitDiv");
}

function StopCursor(){
	document.body.style.cursor = "auto";
	xHide("WaitDiv");
}

createWaitCursor();

