function $(s)
{
	return (document.getElementById)?document.getElementById(s):eval('document.all.'+s);
}

function Right(s,len)
{
	s=s.substring(s.length-len);
	return s;
}

function ShowUser()
{
	try
	{
		var s = getCookie('ForumUserInfo');
		if(s.length<10) return;
		var tmp = s.split('.,');
		s = tmp[3]+'&nbsp;<img src="http://bbs.gamech.com.cn/images/icon/image'+Right('00'+tmp[6],3)+'.gif"> '+tmp[7]+'<img src="http://www.gamech.com.cn/Beta1/images/money.gif">'+tmp[8]+' &nbsp; <span style="cursor:pointer;" onclick="Logout()">退出</span> &nbsp;';
		$('iUserInfo').innerHTML = s;
	}
	catch(e)
	{
	}
}

function getCookie(cookieName)
{
	try
	{
		var cookieValue='';
		var posName=document.cookie.indexOf(escape(cookieName)+'=');
		if (posName==-1) return '';
		var posValue=posName+(escape(cookieName)+'=').length;
		var endPos=document.cookie.indexOf(';',posValue);
		return unescape(document.cookie.substring(posValue,(endPos==-1)?99999:endPos));
	}
	catch(e)
	{
	}
}
function Logout()
{
	try
	{
	document.cookie=escape('ForumUserInfo')+'=0; expires=0; path=/; domain=.gamech.com.cn;';
	$('iUserInfo').innerHTML = '<img src="http://www.gamech.com.cn/?Passport/Logout" width="1px" height="1px">';
	}
	catch(e)
	{
	}
	setTimeout("location.href='http://www.hxflash.com/member/processing/process_logout.php';",2000);
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~

if (window.Event)  document.captureEvents(Event.MOUSEUP);  

function nocontextmenu()  
{ 
event.cancelBubble = true 
event.returnValue = false; 

return false; 
} 

function norightclick(e)  
{ 
if (window.Event)  
{ 
if (e.which == 2 || e.which == 3) 
return false; 
} 
else 
if (event.button == 2 || event.button == 3) 
{ 
event.cancelBubble = true 
event.returnValue = false; 
return false; 
} 

} 

document.oncontextmenu = nocontextmenu; // for IE5+ 
document.onmousedown = norightclick; // for all others 

function Fla(flaImg,flaLink,flaTopic){
s+='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="337" height="138">';
s+='<param name="movie" value="http://www.hxflash.com/images/main.swf"><param name="quality" value="high">';
s+='<param name="menu" value="false"><param name=wmode value="transparent">';
s+='<param name="FlashVars" value="bcastr_flie='+flaImg+'&bcastr_link='+flaLink+'&bcastr_title='+flaTopic+'&AutoPlayTimes=180">';
s+='<embed src="http://www.hxflash.com/images/main.swf" wmode="opaque" FlashVars="bcastr_flie='+flaImg+'&bcastr_link='+flaLink+'&bcastr_title='+flaTopic+'&AutoPlayTimes=180&menu="false" quality="high" width="337" height="138" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
s+='</object>';
document.write(s);
}
setTimeout(ShowUser,1000);