	function $Id(id)
	{
		return document.getElementById(id);
	}
	
	function showMask()
	{
		 var myWidth = 0, myHeight = 0;
		 
		 if( typeof( window.innerWidth ) == 'number' )
		 {
		 	//Non-IE
			myWidth = window.innerWidth;
		 	//if(getWidthResolution() < 1024)
			 //	myWidth = window.innerWidth-17;
		 	myHeight = window.innerHeight;
		 } 
		 else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )
		 {
		  	//IE 6+ in 'standards compliant mode'
		  	myWidth = document.documentElement.clientWidth;
		  	myHeight = document.documentElement.clientHeight;
		 }
		 else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) )
		 {
		 	//IE 4 compatible
		  	myWidth = document.body.clientWidth;
		  	myHeight = document.body.clientHeight;
		 }
		 
		 var eSelects = document.getElementsByTagName("select");
		 /*for (x=0;x<eSelects.length;x++)
		 {
			 eSelects[x].disabled = true;
		 }*/
		 
		var width = 200;
		var height = 40;
		var left    = (myWidth  - width) /2;
		var dHeight =  myHeight;
		var sHeight = document.body.scrollHeight;
		//if(getWidthResolution() < 1024)
		//	var dHeight =  document.body.scrollHeight;
		var top     = (dHeight - height)/2;

		var toResize       = new Array($Id("maskDetalhe"),$Id("maskTotal"),$Id("maskContent"));
	
		for(var i in toResize)
		{
			var obj = toResize[i];
			if(obj)
			{
				var style = obj.style;
				if(style){
					style.top    = (top     + "px");
					style.left   = (left    + "px");
					style.height = (height  + "px");
					style.width  = (width   + "px");
					style.visibility = "visible";
				}
			}
		}

		var objMask = $Id("mask");
		var maskStyle = objMask.style;
		if(maskStyle)
		{
			if(sHeight > dHeight)
				maskStyle.height = sHeight + "px";
			else
				maskStyle.height = dHeight + "px";
			
			maskStyle.visibility = "visible";
			maskStyle.width = myWidth + "px";
		}	
	}


function ocultMask()
{
	var a = new Array($Id("maskDetalhe"),$Id("mask"),
					  $Id("maskTotal"),$Id("maskContent"));

	for(var i in a)
	{
		var obj = a[i];
		if(obj)
			obj.style.visibility = "hidden";
	}
	
	 var eSelects = document.getElementsByTagName("select");
	
	 for (x=0;x<eSelects.length;x++)
	 {
		 eSelects[x].disabled = false;
	 }
	
}
