LL_infoID = new Array();

LL_infoID[1] = "gamedata";

LL_infoID[0] = "unused";
bNS4 = bNS6 = bIE = bOPERA = false;
if     (navigator.userAgent.indexOf("Opera") != -1) { bOPERA = true; }
else if(navigator.userAgent.indexOf("Gecko") != -1) { bNS6 = true;   }
else if(document.layers)                            { bNS4 = true;   }
else if(document.all)                               { bIE = true;    }

LLx = LLxx = LLy = LLyy = 0;
var LL_mousex;
var LL_mousey;
var STO = null;
var SET = false;
var cID = '';
if(bNS4 || bNS6 || bOPERA) { document.captureEvents(Event.MOUSEMOVE); }
document.onmousemove = LL_getmouseposition;


// Functions used by all browsers

function Null() { return; }

function LL_getmouseposition(e)
{
if(bIE || bOPERA) { 
//	LL_mousex = event.clientX + document.body.scrollLeft;
//	LL_mousey = event.clientY + document.body.scrollTop;
	LL_mousex = event.clientX + document.documentElement.scrollLeft;
	LL_mousey = event.clientY + document.documentElement.scrollTop;
        
        if (bOPERA) {
            	LL_mousex = event.clientX + window.pageXOffset;
                LL_mousey = event.clientY + window.pageYOffset;
            }
	}
else if(bNS6 || bNS4) {
	LL_mousex = e.pageX;
	LL_mousey = e.pageY;
        if (LL_mousex < 0){ LL_mousex = 0; }
        if (LL_mousey < 0) { LL_mousey = 0; }
	}
} // LL_getmouseposition()

// Functions to relay browser type to custom functions

function LL_showinfo(m_section,gameId) {
LL_infoID[1] = "gamedata"+gameId;
LL_hideallinfo();
if(cID != m_section) { SET = false; }
cID = m_section;

     if(bIE)    { LL_bIE_showit(m_section); }
else if(bNS6)   { LL_bNS6_showit(m_section); }
else if(bOPERA) { LL_bOPERA_showit(m_section); }
else if(bNS4)   { LL_bNS4_showit(m_section); }
} // LL_showinfo()

function LL_hideallinfo(m_section) { 
clearTimeout(STO);
     if(bIE)    { LL_bIE_hideallinfo(); }
else if(bNS6)   { LL_bNS6_hideallinfo(); }
else if(bOPERA) { LL_bOPERA_hideallinfo(); }
else if(bNS4)   { LL_bNS4_hideallinfo(); }
} // LL_hideallinfo()

// IE functions

function LL_bIE_hidesection(m_section) {
if(LL_mouseinrectangle()) { return; }
eval(LL_infoID[m_section] + '.style.visibility="hidden"');
} // LL_bIE_hidesection()

function LL_bIE_hideallinfo() {
for(i = 1; i < LL_infoID.length; i++) { 
	eval(LL_infoID[i] + '.style.visibility="hidden"');
	}
} // LL_bIE_hideallinfo()

function LL_bIE_showit(m_section) {
	LL_bIE_hideallinfo();
	var x = LL_mousex - 500;
	if(x < 0) { x = 0; }
	var y = LL_mousey;
	if(y < 0) { y = 0; }
//        if(SET == false) {
		eval(LL_infoID[m_section] + '.style.left="' + x + '"');
		eval(LL_infoID[m_section] + '.style.top="' + y + '"');
//	}
	eval(LL_infoID[m_section] + '.style.visibility="visible"');
	LLx = eval(LL_infoID[m_section] + '.style.pixelLeft');
	LLxx = eval(LL_infoID[m_section] + '.scrollWidth') + LLx;
	LLy = eval(LL_infoID[m_section] + '.style.pixelTop');
	LLyy = eval(LL_infoID[m_section] + '.scrollHeight') + LLy;
	SET = true;
	clearTimeout(STO);
	STO = setTimeout('SET = false',2000);
} // LL_bIE_showit()



// Netscape 6 functions

function LL_bNS6_hidesection(m_section) {
if(LL_mouseinrectangle()) { return; }
document.getElementById(LL_infoID[m_section]).style.visibility="hidden";
} // LL_bNS6_hidesection()

function LL_bNS6_hideallinfo() {
for(i = 1; i < LL_infoID.length; i++) { 
	document.getElementById(LL_infoID[i]).style.visibility="hidden";
	}
} // LL_bNS6_hideallinfo()

function LL_bNS6_showit(m_section) {
	LL_bNS6_hideallinfo();
	var x = LL_mousex - 500;
	if(x < 0) { x = 0; }
	var y = LL_mousey;
	if(y < 0) { y = 0; }
//	if(SET == false) {
		document.getElementById(LL_infoID[m_section]).style.left = x + 'px';
		document.getElementById(LL_infoID[m_section]).style.top = y + 'px';
//		}
	document.getElementById(LL_infoID[m_section]).style.visibility="visible";
	var padding = 0;
	if(parseInt(document.getElementById(LL_infoID[m_section]).style.padding) > 0) { padding = parseInt(document.getElementById(LL_infoID[m_section]).style.padding) * 2; }
	LLx = parseInt(document.getElementById(LL_infoID[m_section]).style.left);
	LLxx = parseInt(document.getElementById(LL_infoID[m_section]).style.width) + LLx + padding;
	LLy = parseInt(document.getElementById(LL_infoID[m_section]).style.top);
	LLyy = parseInt(document.getElementById(LL_infoID[m_section]).style.height) + LLy + padding;
	SET = true;
	clearTimeout(STO);
	STO = setTimeout('SET = false',2000);
} // LL_bNS6_showit()



// Opera 6 functions
function LL_bOPERA_hidesection(m_section) {
if(LL_mouseinrectangle()) { return; }
document.getElementById(LL_infoID[m_section]).style.visibility="hidden";
} // LL_bOPERA_hidesection()

function LL_bOPERA_hideallinfo() {
for(i = 1; i < LL_infoID.length; i++) { 
	document.getElementById(LL_infoID[i]).style.visibility="hidden";
	}
} // LL_bOPERA_hideallinfo()

function LL_bOPERA_showit(m_section) {
	LL_bOPERA_hideallinfo();
	var x = LL_mousex - 500;
	if(x < 0) { x = 0; }
	var y = LL_mousey;
	if(y < 0) { y = 0; }
//	if(SET == false) {
		document.getElementById(LL_infoID[m_section]).style.left = x + 'px';
		document.getElementById(LL_infoID[m_section]).style.top = y + 'px';
//		}
	document.getElementById(LL_infoID[m_section]).style.visibility="visible";
	var padding = 0;
	if(parseInt(document.getElementById(LL_infoID[m_section]).style.padding) > 0) { padding = parseInt(document.getElementById(LL_infoID[m_section]).style.padding) * 2; }
	LLx = parseInt(document.getElementById(LL_infoID[m_section]).style.left);
	LLxx = parseInt(document.getElementById(LL_infoID[m_section]).style.width) + LLx + padding;
	LLy = parseInt(document.getElementById(LL_infoID[m_section]).style.top);
	LLyy = parseInt(document.getElementById(LL_infoID[m_section]).style.height) + LLy + padding;
	SET = true;
	clearTimeout(STO);
	STO = setTimeout('SET = false',2000);
} // LL_bOPERA_showit()



// Netscape 4 functions

function LL_bNS4_hidesection(m_section) {
if(LL_mouseinrectangle()) { return; }
eval('document.' + LL_infoID[m_section] + '.visibility="hide"');
} // LL_bNS4_hidesection()

function LL_bNS4_hideallinfo() {
for(i = 1; i < LL_infoID.length; i++) { 
	eval('document.' + LL_infoID[i] + '.visibility="hide"');
	}
} // LL_bNS4_hideallinfo()

function LL_bNS4_showit(m_section) {
	LL_bNS4_hideallinfo();
	var x = LL_mousex - 500;
	if(x < 0) { x = 0; }
	var y = LL_mousey;
	if(y < 0) { y = 0; }
//	if(SET == false) {
		eval('document.' + LL_infoID[m_section] + '.left="' + x + '"');
		eval('document.' + LL_infoID[m_section] + '.top="' + y + '"');
//		}
	eval('document.' + LL_infoID[m_section] + '.visibility="show"');
	LLx = eval('parseInt(document.' + LL_infoID[m_section] + '.left)');
	LLxx = eval('parseInt(document.' + LL_infoID[m_section] + '.clip.width)') + LLx;
	LLy = eval('parseInt(document.' + LL_infoID[m_section] + '.top)');
	LLyy = eval('parseInt(document.' + LL_infoID[m_section] + '.clip.height)') + LLy;
	SET = true;
	clearTimeout(STO);
	STO = setTimeout('SET = false',2000);
} // LL_bNS4_showit()
