var g_browserVer;
var g_tips_timer = null;
var g_tips_j = 3;

function getPos(obj)
{
	var pos = [];
	pos[0] = obj.offsetLeft;//X
	pos[1] = obj.offsetTop;//Y
	while (obj = obj.offsetParent)
	{
		pos[0] += obj.offsetLeft;
		pos[1] += obj.offsetTop;
	}
	return pos;
}

function newShowTips(obj,way,imgHeight)
{
	var featureTips = $id("featureTips");
	var pos = getPos(obj);
	featureTips.style.left = pos[0] + 130 + "px";
	g_tips_timer = setInterval(function(){tipsAnimateUp(imgHeight)},10);
	function tipsAnimateUp(imgHeight)
	{
		
		if (g_tips_j >= 0)
		{
			if (g_browserVer == 1)
			{
				featureTips.style.top = (pos[1] + g_tips_j * 15) + "px";
			}
			else
			{
				featureTips.style.top = (pos[1] - 5 + g_tips_j * 15) + "px";
			}
			setOpacity();
			if (g_tips_j == 3)
			{
				featureTips.style.display = "block";
			}
			g_tips_j--;
		}
		else
		{
			clearInterval(g_tips_timer);
			g_tips_timer = null;
			g_tips_j = 3;
		}
	}
	function setOpacity()
	{
		if (g_browserVer == 1)
		{
			$id("tipsCase").filters.alpha.opacity = 100 - g_tips_j * 25;
			$id("tipsBg").filters.alpha.opacity = 20 - g_tips_j * 5;
		}
		else
		{
			$id("tipsCase").style.opacity = 1 - g_tips_j * 0.25;
			$id("tipsBg").style.opacity = 0.2 - g_tips_j * 0.05;
		}
	}
}

function newHideTips()
{
	$id("featureTips").style.display = "none";
	clearInterval(g_tips_timer);
	g_tips_timer = null;
	g_tips_j = 3;
}