

var ContentInfo = "";

var topColor = "#70B806";
var subColor = "#FFFFFF";
var highLightColor = "#CCFFFF";







var mouse_X;
var mouse_Y;

var tip_active = 0;



function update_tip_pos(){


		document.getElementById('ToolTip').style.left = mouse_X + 20;
		document.getElementById('ToolTip').style.top  = mouse_Y;

}






var ie = document.all?true:false;
if (!ie) document.captureEvents(Event.MOUSEMOVE)
document.onmousemove = getMouseXY;

function getMouseXY(e) {
if (ie) { // grab the x-y pos.s if browser is IE
mouse_X = event.clientX + document.body.scrollLeft;
mouse_Y = event.clientY + document.body.scrollTop;
}
else { // grab the x-y pos.s if browser is NS
mouse_X = e.pageX;
mouse_Y = e.pageY;
}
if (mouse_X < 0){mouse_X = 0;}
if (mouse_Y < 0){mouse_Y = 0;}

if(tip_active){update_tip_pos();}
}
















function GameContent(name, hits, rate , date){

ContentInfo = '<table border="0" width="120" cellspacing="0" cellpadding="0">'+
'<tr><td width="100%" bgcolor="#C4CC98">'+

'<table border="0" width="100%" cellspacing="1" cellpadding="0">'+
'<tr><td width="100%" bgcolor='+topColor+'>'+

'<table border="0" width="100%" cellspacing="0" cellpadding="0" align="center">'+
'<tr><td width="100%" class=tooltipHeaderStyle1>'+

''+name+''+

'</td></tr>'+
'</table>'+

'</td></tr>'+

'<tr><td width="100%" bgcolor='+subColor+'>'+

'<table border="0" width="100%" cellpadding="0" cellspacing="1" align="center">'+

'<tr><td width="100%" class=tooltipContentStyle1>'+

hits+

'</td></tr>'+
'<tr><td width="100%" class=tooltipContentStyle1>'+

rate+

'</td></tr>'+

'<tr><td width="100%" class=tooltipContentStyle1>'+

date+

'</td></tr>'+

'</table>'+

'</td></tr>'+
'</table>'+

'</td></tr>'+
'</table>';

}








function game_tip_it(which,name, hits, rate , date){

	
	if(which){
	
		update_tip_pos();
	
		tip_active = 1;
		
		document.getElementById('ToolTip').style.visibility = "visible";
		
		GameContent(name, hits ,rate ,date);
		
		document.getElementById('ToolTip').innerHTML = ContentInfo;
	
	}else{
	
		tip_active = 0;
	
		document.getElementById('ToolTip').style.visibility = "hidden";
	}

}











function RateGameContent(gameId){

ContentInfo = '<table border="0" width="30" cellspacing="0" cellpadding="0">'+
'<tr><td width="100%" bgcolor="#C4CC98" >'+

'<table border="0" width="100%" cellspacing="1" cellpadding="0">'+

'<tr><td width="100%" bgcolor='+subColor+'>'+

'<table border="0" width="90%" cellpadding="0" cellspacing="1" align="center">'+

'<tr bgcolor=#FF0000 onmouseover="this.style.backgroundColor=\''+highLightColor+'\';" onmouseout="this.style.backgroundColor=\'#FF0000\';"  align=center class=tooltipContentStyle1 onClick="rateGame('+gameId+',5);rate_tip_it(0,0);"><td width="100%">'+
	'5'+
'</td></tr>'+

'<tr bgcolor=#F3281E onmouseover="this.style.backgroundColor=\''+highLightColor+'\';" onmouseout="this.style.backgroundColor=\'#F3281E\';"   align=center  class=tooltipContentStyle1 onClick="rateGame('+gameId+',4);rate_tip_it(0,0);" ><td width="100%">'+
 	'4'+
'</td></tr>'+

'<tr bgcolor=#E7513D onmouseover="this.style.backgroundColor=\''+highLightColor+'\';" onmouseout="this.style.backgroundColor=\'#E7513D\';"   align=center  class=tooltipContentStyle1 onClick="rateGame('+gameId+',3);rate_tip_it(0,0);"><td width="100%">'+
	'3'+
'</td></tr>'+


'<tr  bgcolor=#DC7A5B onmouseover="this.style.backgroundColor=\''+highLightColor+'\';" onmouseout="this.style.backgroundColor=\'#DC7A5B\';"    align=center  class=tooltipContentStyle1 onClick="rateGame('+gameId+',2);rate_tip_it(0,0);"><td width="100%">'+
	'2'+
'</td></tr>'+


'<tr  bgcolor=#D0A37A onmouseover="this.style.backgroundColor=\''+highLightColor+'\';" onmouseout="this.style.backgroundColor=\'#D0A37A\';"   align=center  class=tooltipContentStyle1 onClick="rateGame('+gameId+',1);rate_tip_it(0,0);"><td width="100%">'+
	'1'+
'</td></tr>'+

'</table>'+

'</td></tr>'+
'</table>'+

'</td></tr>'+
'</table>';

}



function update_rate_tip_pos(){


		document.getElementById('ToolTip').style.left = mouse_X - 10;
		document.getElementById('ToolTip').style.top  = mouse_Y + 1;

}






function rate_tip_it(which,gameId){

	
	if(which){
	
		update_rate_tip_pos();
	
		document.getElementById('ToolTip').style.visibility = "visible";
		
		RateGameContent(gameId);
		
		document.getElementById('ToolTip').innerHTML = ContentInfo;
	
	}else{
	
		document.getElementById('ToolTip').style.visibility = "hidden";
	}

}



