var tts = new Array;
function bw_tt_show( obj, dx, dy, e )
{
	var x, y;
	if( document.all )
	{
		if( !e ) e = window.event;
		var scroll = (document.compatMode && document.compatMode != "BackCompat")? document.documentElement : document.body? document.body : null;
		x = e.clientX;
		y = e.clientY + scroll.scrollTop;
	}
	else
	{
		x = e.pageX;
		y = e.pageY;
	}
	
	maxwidth = xWidth(document);
	
	if ((xWidth(obj) + x+2) > maxwidth)
	{
		x = maxwidth - xWidth(obj)-2;
	}
	obj.style.left = x - dx + 'px';
	obj.style.top = y - dy + 'px';
	obj.style.display = 'block';
	obj.style.zIndex=1000;
	correctPNG();
}
function bw_tt2( obj1, obj2 )
{
	var windowHeight = ( document.all ) ? window.parent.frames["MSF"].document.body.clientHeight : window.parent.frames["MSF"].innerHeight;
	if ( 2 * obj1.offsetTop > windowHeight - obj2.offsetHeight + 2 * window.parent.frames["MSF"].document.body.scrollTop )
	{
		obj2.style.top = obj1.offsetTop - parseInt( obj2.style.height ) + 'px';
	}
	else
		obj2.style.top = obj1.offsetTop + obj1.offsetHeight + 'px';
	obj2.style.left = obj1.offsetLeft + 'px';
	obj2.style.display = 'block';
}
function bw_tt_hide()
{
	for( tt in tts )
		document.getElementById( tt + '_tool' ).style.display = 'none';
}
