	function ToggleDisplay(elem)
	{
		
		var e = document.all[elem];
		if (e) 
		{
			if(e.style.display=="") 
			{
				e.style.display="none";

			}
			else
				e.style.display="";		
		}
	}

	function winOpenFullScreen( url , x , y ,title)
	{
		var xwidth = screen.width-10;
		var yheight = screen.height-50;
		winOpen( url , x , y , xwidth , yheight ,title);
	}
	function openBlankWindow( url )
	{
		myurl = url ;
		features="alwaysRaised=yes,maximizable=true,scrollbars=yes,resizable=yes";
		mywin = window.open('','',features);
		mywin.location = myurl;
		mywin.document.body.leftMargin=0;
		mywin.document.body.rightMargin=0;
		mywin.document.body.topMargin=1;
		mywin.document.body.bottomMargin=0;
		
		mywin.focus();
	}
	function winOpen( url , x , y , width , height ,title)
	{
		myurl = url ;
		features="alwaysRaised=yes,maximizable=yes,dependent=yes,scrollbars=yes, top = " + y + " , left = " + x + " , width=" + width + " , height=" + height + " ,resizable=yes";
		mywin = window.open('',title,features);
		mywin.location = myurl;
		mywin.moveTo( x , y );
		mywin.resizeTo(width,height);
		mywin.focus();
	}
	function showToolTip(msg,width,height,elem)	
	{

		var tmp = "<table width='100%' cellspacing=0 cellpadding=0>"
		tmp= ""
	
		if (document.all.myhelp!=null){
			var left= event.clientX 
			var diff = left + width - document.body.clientWidth
			if (diff <0 )
				diff = diff * -1
			if ((left + width) > document.body.clientWidth)
				left =  event.clientX  -diff
			document.all.myhelp.style.visibility = 'hidden';
			document.all.myhelp.innerHTML = tmp + msg;
			document.all.myhelp.style.left = left;
			document.all.myhelp.style.top = event.clientY+20;
			if (width!=null ){
				document.all.myhelp.style.width = width;
				if (height!=null)
					document.all.myhelp.style.height = height;
			}
			if (msg.length > 0)
				document.all.myhelp.style.visibility = 'visible';
		}		
	}

	function hideToolTip()
	{
		if (document.all.myhelp!=null)
		{
			document.all.myhelp.style.visibility = 'hidden';
		}
	}
	function PopupPic(sPicURL) 
	{ 
		window.open( "popup.htm?"+sPicURL, "","resizable=1,HEIGHT=200,WIDTH=200");
	}
	document.writeln("<span id='myhelp' class='popupmsg'></span>");
