//This function accepts a message, a width, an xRatio (horizontal position: 2=half, 3=one third, etc.), yRatio (vertical position), & whether the vertical is from the top or the bottom of the page.
function displayPleaseWait(message,messageBoxWidth,xRatio,yRatio,topOrBottom) {
	
	if (xRatio == null) xRatio=1;
	if (yRatio == null) yRatio=1;
	
	document.body.style.cursor = 'wait';

	var newSpan = document.createElement('span');
	var newSpanText = document.createTextNode(message);
	newSpan.appendChild(newSpanText);
	document.body.appendChild(newSpan);

	newSpan.setAttribute('id','pleaseWait');
	newSpan.style.display = "block";
	newSpan.style.position = "absolute";
	newSpan.style.width = ""+messageBoxWidth+"px";
	
	newSpan.style.backgroundColor = "#fefee1";
	newSpan.style.padding = "20px";
	newSpan.style.borderTop = "3px solid #cccccc";
	newSpan.style.borderRight = "3px solid #000000";
	newSpan.style.borderBottom = "3px solid #000000";
	newSpan.style.borderLeft = "3px solid #cccccc";

	if (self.innerWidth)
	{
		frameWidth = self.innerWidth;
		frameHeight = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientWidth)
	{
		frameWidth = document.documentElement.clientWidth;
		frameHeight = document.documentElement.clientHeight;
	}
	else if (document.body)
	{
		frameWidth = document.body.clientWidth;
		frameHeight = document.body.clientHeight;
	}
	else return;

	newSpan.style.left = ""+((frameWidth-messageBoxWidth)/xRatio)+"px";
	
	var verticalDistance = ""+(((frameHeight-newSpan.clientHeight)/yRatio))+"px";
	
	topOrBottom = topOrBottom.toLowerCase();
	
	if (topOrBottom == "top") {
		newSpan.style.top = verticalDistance;
	}

	if (topOrBottom == "bottom") {
		newSpan.style.bottom = verticalDistance;
	}

}


