function getBrowserHeight() {
	var intH = 0;
	var intW = 0;
   
	if(typeof window.innerWidth  == 'number' ) {
	   intH = window.innerHeight;
	   intW = window.innerWidth;
	} 
	else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
		intH = document.documentElement.clientHeight;
		intW = document.documentElement.clientWidth;
	}
	else if(document.body && (document.body.clientWidth || document.body.clientHeight)) {
		intH = document.body.clientHeight;
		intW = document.body.clientWidth;
	}
	intH = 1500; //add by meysami

	return { width: parseInt(intW), height: parseInt(intH) };
}  

function setLayerPosition() {
	var shadow = document.getElementById("shadow");
	var question = document.getElementById("question");

	var bws = getBrowserHeight();
	shadow.style.width = bws.width + "px";
	shadow.style.height = bws.height + "px";

	question.style.left = parseInt((bws.width - 350) / 2);
	question.style.top = parseInt((bws.height - 200) / 2);
	question.style.top = 200; //add by meysami

	shadow = null;
	question = null;
}

function showLayer() {
	setLayerPosition();

	var shadow = document.getElementById("shadow");
	var question = document.getElementById("question");

	shadow.style.display = "block"; 
	question.style.display = "block";

	shadow = null;
	question = null;                 
}

function hideLayer() {
	var shadow = document.getElementById("shadow");
	var question = document.getElementById("question");

	shadow.style.display = "none"; 
	question.style.display = "none";

	shadow = null;
	question = null; 
}

window.onresize = setLayerPosition;



/*
	requirements :
	
	1)include these files:
		<link href="css/PleaseWait.css" rel="stylesheet" />
		<script language="javascript" src="js/PleaseWait.js"></script>	

	1)use the correct function
		OnClientClick="showLayer();"


	3)use 2 DIV like these
		<div id="shadow" class="opaqueLayer">
		</div>
		<div id="question" class="questionLayer" style="left: -230px; top: -182px">
			<table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%" style="background-image: url('../images/Wait3.gif');
				background-position: top; background-repeat: no-repeat">
				<tr style="height: 230px">
					<td>
					</td>
				</tr>
				<tr style="height: 20px; background-image: url('../images/progress.gif'); background-position: left;
					background-repeat: no-repeat">
					<td>
					</td>
				</tr>
			</table>
		</div>
	
*/
