/****************************************************************************************/
function msg_box_open(str,w,h)
{

	var myWidth = 0, myHeight = 0;

  	if( typeof( window.innerWidth ) == 'number' )
	{
    		//Non-IE
    		myWidth = window.innerWidth;
    		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( window.document.body && ( window.document.body.clientWidth || window.document.body.clientHeight ) ) 
	{
    		//IE 4 compatible
    		myWidth = document.body.clientWidth;
    		myHeight = document.body.clientHeight;
  	}

	obj1	= document.getElementById('msg_window');

	obj1.style.height = h;
	obj1.style.width = w;

	width	= parseInt(obj1.style.width,10);
	height	= parseInt(obj1.style.height,10);

	otop	= ((myHeight/2) + (window.pageYOffset ? window.pageYOffset : document.getElementsByTagName("body")[0].scrollTop)) - (height/2);
	oleft	= ((myWidth/2)  + (window.pageXOffset ? window.pageXOffset : document.getElementsByTagName("body")[0].scrollLeft)) - (width/2);	



	//frames['msg_window'].document.open();
	//frames['msg_window'].write("<HTML><HEAD></HEAD><BODY><IMG src='/ics/images/wait.gif'>Hello world</BODY></HTML>");
	//frames['msg_window'].close();

	//frames['msg_window'].window.open();
	//frames['msg_window'].window.close();

	if(str != "")
	{
		if(str.substr(0,4) == 'http')
		{
			frames['msg_window'].document.location = str;
		}
		else
		{
			var doc = null;
			doc = frames['msg_window'].document;
			doc.open();		
			doc.write(str);
			doc.close();
		}
	}

	obj1.style.visibility = 'visible';		
	obj1.style.display='block';
	obj1.style.left = oleft;
	obj1.style.top	= otop;
	obj1.style.width = width;
	obj1.style.height = height;


	return 1;
}
/****************************************************************************************/
function msg_box_close()
{
	obj = document.getElementById('msg_window');
	obj.style.visibility = 'hidden';
	
	return false;
}
/****************************************************************************************/
function insert_msg_box()
{
	document.write("<iframe scrolling='no' name='msg_window' id='msg_window' src='about:blank'  frameborder='0' style='z-index:6;position:absolute;visibility:hidden;background:#FFFFFF;border:1px solid'></iframe>");	
	//return false;
}


insert_msg_box();
