function createProgessBar(msgDivId, urlPath, width, height){
	//var str = '<iframe id=progressBar frameborder=0 marginheight="0" marginwidth="0" width='+(screen.width-20)+' height='+screen.height+' src="' + rootPath + '/jsp/common/progressbar.jsp" style="display:none;position:absolute;z-index:100"></iframe>';
	//document.write(str);
	var str = "<div id='msgParentDiv' style='width:2000px; height:1000px; background:#FFFFFF;  position:absolute;left:0;right:0;top:0;bottom:0;filter:alpha(opacity=30); z-index:99;' oncontextment='return false;'></div>";
	document.write(str);

	str = "<iframe id='msgParentIframe' style='width:2000px; height:1000px; position:absolute;left:0;right:0;top:0;bottom:0;filter:alpha(opacity=50);z-index:98;'></iframe>";
	str += "<iframe id='" + msgDivId + "' frameborder='0' scrolling='no' marginheight='0' marginwidth='0' style='display:none; width:" + width + "px; height:" + height + "px;position:absolute;z-index:108;' src='" + urlPath + "'></iframe>";
	document.write(str);
	
	window.document.getElementById("msgParentDiv").style.display = "none";
	window.document.getElementById("msgParentIframe").style.display = "none";
}

function showProgressBar(msgDivId, urlPath){
	var cf=window.document.getElementById(msgDivId);
	
	if(document.body.clientHeight==0){
  		cf.style.top=(document.body.clientHeight/2)+250 + "px";
	  	cf.style.left=(document.body.clientWidth/2)-120 + "px";	
	   	//cf.style.position = "fixed";
		cf.style.display="block";
		window.document.getElementById("msgParentDiv").style.display = "block";
		window.document.getElementById("msgParentIframe").style.display = "block";
	}else{		
		//cf.style.top=(document.body.clientHeight/2)-99 + "px";
		//cf.style.left=(document.body.clientWidth/2)-200 + "px";	 
		cf.style.top=((window.screen.availHeight-parseInt(cf.style.height))/2) - 90 + "px";
		cf.style.left=((window.screen.availWidth-parseInt(cf.style.width))/2) + "px";	  
		//cf.style.position = "fixed";
		cf.style.display="block";	
		window.document.getElementById("msgParentDiv").style.display = "block";
		window.document.getElementById("msgParentIframe").style.display = "block";
	}
	
	//window.document.getElementById("msgParentIframe").src = urlPath;
	window.document.getElementById(msgDivId).src = urlPath;
	
}

function hideProgressBar(msgDivId)
{
	window.document.getElementById("msgParentDiv").style.display = "none";
	window.document.getElementById("msgParentIframe").style.display = "none";
	var cf=document.getElementById(msgDivId);
	if(cf)
		cf.style.display="none";
}

    

