var i_click=0;

function LoadBody()
{
	if($('bscore')!=null)
	{
		if(!IsLocalhost())
			window.setInterval ("GetScore()",60000);
	}	
	
	top.o_topframe=this;
	
	GetHistory();
}

function GetHistory()
{
	
	var s_cklink=GetCookie("LastLink");
	var s_ret='<table width="100%" border="0" cellpadding="0" cellspacing="0"	onmouseover="ShowMenu(2)" onmouseout="HiddenMenu()">'+
						'<tr><td style="height:11px;background:url(/admin/images/tdtop.gif) 0px 0px no-repeat;"></td></tr>';

	
	if(s_cklink!=null)
	{
		if(s_cklink!="1")
		{
			var s_con=s_cklink.split('|');
			for(i=0;i<s_con.length;i++)
			{
				if(i>5)
					break;
				if(s_con[i]!="1")
				{	
					var s_spt=s_con[i].split(',');
					s_ret+='<tr><td style="background-position:135px '+s_spt[2]+'"><a href="'+s_spt[1]+'" target="main" onclick="ShowNowButton(this)" imgtop="'+s_spt[2]+'">'+s_spt[0]+'</a></td></tr>';
				}
			}
		}
	}
	s_ret+='<tr><td style="height:15px;background:url(/admin/images/tdbottom.gif) 0px 0px no-repeat;"></td></tr></table>';
	
	if($T('divmenu2')!=null)
	{
		$T('divmenu2').innerHTML=s_ret;
	}	
}

var s_target="";
function ShowMessage()
{
	
	window.open("/admin/dynamic.aspx?sel=7&body=1","main");
	
	s_target=parent.frames["main"].location.href;
	
	
}

function IKnow()
{
		window.open(s_target,"main");
}

function GetScore()
{
	
	ExecuteScript("/admin/dynamic.aspx?sel=6&rnd="+Math.random());
}

var i_timeout=0;
function StartTip(b_run)
{
	window.clearInterval(i_timeout);
	if(b_run)
	{
		i_timeout=window.setInterval ("ShowWink()",600);
	}
	else
	{
		//没有提示了
		
		$("spntip").style.display="none";
	}	
}

//开始闪烁
function ShowWink()
{
	if(i_click==0)
	{
	
		if($("spntip").style.display=="")
		{
			$("spntip").style.display="none";
		}
		else
		{
			$("spntip").style.display="";
		}	
	}
	else
	{
		$("spntip").style.display="";
	}
}

var o_tab=null;
function ShowMenu(i_sel)
{
	ClearMenuTimeout();
	
	if(o_tab!=null)
	{
		o_tab.className="";
	}
	
	$('li'+i_sel).className="selecttab";
	o_tab=$('li'+i_sel);
	
	
	top.ShowMenu(i_sel);
}


var i_timeout=0;
function HiddenMenu()
{
	ClearMenuTimeout();
	i_timeout=setTimeout("HiddenMenuStart()",1000);

}

function ClearMenuTimeout()
{
		
		ClearMenuTimeoutEnd();
	
		top.ClearMenuTimeout();
		
}

function ClearMenuTimeoutEnd()
{
	clearTimeout(i_timeout);
}

function HiddenMenuStart()
{
	
	ClearMenuTimeout();
	HiddenMenuEnd();
	top.HiddenMenuEnd();
}

function HiddenMenuEnd()
{
	if($('li1')!=null)
		$('li1').className="";
	
	if($('li2')!=null)	
		$('li2').className="";
	
	
	
}