var ie5 = (document.getElementById && document.all); 
var ns6 = (document.getElementById && !document.all);

if (ie5)
	{
			document.write("<style>.top_left_angle {filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/img/hint/top_left_angle.png', sizingMethod='crop')} .bottom {filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/img/hint/bottom.png', sizingMethod='crop')} .top {filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/img/hint/top.png', sizingMethod='crop')} .top_right_angle {filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/img/hint/top_right_angle.png', sizingMethod='crop')} .right {filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/img/hint/right.png', sizingMethod='crop')} .bottom_right_angle {filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/img/hint/bottom_right_angle.png', sizingMethod='crop')} .bottom_left_angle {filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/img/hint/bottom_left_angle.png', sizingMethod='crop')} .left {filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/img/hint/left.png', sizingMethod='crop')} </style>");
	} 
	else 
		{
			document.write("<style>.top_left_angle {background-image:url('/img/hint/top_left_angle.png');} .bottom {background-image:url('/img/hint/bottom.png');} .top {background-image:url('/img/hint/top.png');} .top_right_angle {background-image:url('/img/hint/top_right_angle.png');} .right {background-image:url('/img/hint/right.png');} .left {background-image:url('/img/hint/left.png');} .bottom_right_angle {background-image:url('/img/hint/bottom_right_angle.png');} .bottom_left_angle {background-image:url('/img/hint/bottom_left_angle.png');} </style>");
		}

var timerHint;
function hideHint(hintID)
{
		obj = document.getElementById(hintID);
		fadeOpacity.back(hintID);
		hide=true;
}
function closeHint(hintID)
{
	clearTimeout(timerHint);
	timerHint=setTimeout("hideHint('"+hintID+"')",1000);
}
function buildHint(hintID, info)
{
	obj = document.getElementById(hintID);
	var str='<div id="'+hintID+'" class="infoHint" style="position : absolute; left: 0px; top : 0px;"><table height="80px" width="300px" class="null"><tr><td valign="bottom"><table cellpadding="0" cellspacing="0" border="0" width="300px">';
	str+='<tr><td class="top_left_angle"><img src="/img/1x1.gif" width="6" height="6"></td><td class="top"><img src="/img/1x1.gif" width="1" height="1"></td><td class="top_right_angle"><img src="/img/1x1.gif" width="6" height="6"></td></tr>';
	str+='<tr><td class="left"><img src="/img/1x1.gif" width="1" height="1"></td><td bgcolor="#eeeee0" width="100%">'+info+'</td><td class="right"><img src="/img/1x1.gif" width="1" height="1"></td></tr>';
	str+='<tr><td class="bottom_left_angle"><img src="/img/1x1.gif" width="6" height="14"></td><td class="bottom"><img src="/img/1x1.gif" width="1" height="1"></td><td class="bottom_right_angle"><img src="/img/1x1.gif" width="6" height="14"></td></tr>';
	str+='</table></td></tr></table></div>';
	document.write(str);
	closeHint(hintID);
}

var hide=true;//глобальная переменная, отвечающая будет ли строка передана в подсказку


function showHint(hintID)
{
	clearTimeout(timerHint);
	obj = document.getElementById(hintID);
	if (hide)
	{
		var IE = document.all?true:false;
		if (IE) 
		{
			e = event; 
			_x=e.clientX;
			_y=e.clientY;
			sX = _x + document.documentElement.scrollLeft;
			sY = _y + document.documentElement.scrollTop;
	//		alert (document.body.scrollTop);
			obj.style.left=sX-17+'px';
			obj.style.top=sY-105+'px';
		}
		else 
		{
			document.onmousemove = function(e) 
			{ 
				sX = e.pageX;
				sY = e.pageY;
				obj.style.left=sX-17+'px';
				obj.style.top=sY-105+'px';
				document.onmousemove = ''; 
//				alert(sX);
			}
		}
//		obj.style.visibility="visible";
//		obj.style.display="block";
		hide=false;
		fadeOpacity(hintID, 'oR1');
	}
}
