var ie = document.all ? 1 : 0
var ns = document.layers ? 1 : 0

if(ns){doc = "document."; sty = ""}
if(ie){doc = "document.all."; sty = ".style"}

var initialize = 0
var Ex, Ey, topColor, subColor, ContentInfo

if(ie)
	{
	Ex = "event.x"
	Ey = "event.y"
	
	topColor = "#FFCC66"
	subColor = "#FFFFCC"
	}

if(ns)
	{
	Ex = "e.pageX"
	Ey = "e.pageY"
	window.captureEvents(Event.MOUSEMOVE)
	window.onmousemove=overhere
	topColor = "#FFCC66"
	subColor = "#FFFFCC"
	}



function MoveToolTip(layerName, FromTop, FromLeft, e)
	{
	if(ie){eval(doc + layerName + sty + ".top = "  + (eval(FromTop) + 20 + document.body.scrollTop))}
	if(ns){eval(doc + layerName + sty + ".top = "  + (eval(FromTop) + 20))}
	eval(doc + layerName + sty + ".left = " + (eval(FromLeft)-25))
	}


function ReplaceContent(layerName)
	{
	
	if(ie){document.all[layerName].innerHTML = ContentInfo}

if(ns)
	{
	with(document.layers[layerName].document) 
	{ 
	   open(); 
	   write(ContentInfo); 
	   close(); 
	}

	}
}


function Activate(){initialize=1}
function deActivate(){initialize=0}

function overhere(e){
if(initialize)
	{
	MoveToolTip("ToolTip", Ey, Ex, e)
	eval(doc + "ToolTip" + sty + ".visibility = 'visible'")
	}
    else
	{
	MoveToolTip("ToolTip", 0, 0)
	eval(doc + "ToolTip" + sty + ".visibility = 'hidden'")
	}

	}

function EnterContent(layerName, TTitle, TContent)
	{
	
	ContentInfo = '<table border="0" cellpadding="0" cellspacing="0" width="150">'+
	'<tr><td colspan="3"><img border="0" src="/images/b.gif" width="20" height="1"><img border="0" src="/images/a.gif" width="13" height="8"><img border="0" src="/images/b.gif" width="117" height="1"></td></tr>'+
	'<tr><td width="1" bgcolor="#000000"><img border="0" src="/images/b.gif" width="1" height="1"></td>'+
	'<td bgcolor="#FFFFCC"><table border="0" cellpadding="4" cellspacing="0" width="148">'+
	'<tr><td><font class="tooltipcontent">'+TContent+'</font></td></tr>'+
	'</table></td><td width="1" bgcolor="#000000"><img border="0" src="/images/b.gif" width="1" height="1"></td></tr>'+
	'<tr><td bgcolor="#000000" colspan="3"><img border="0" src="/images/b.gif" width="9" height="1"></td></tr>'+
	'</table>'	
	ReplaceContent(layerName)

}

function openWindow( windowURL, windowName, windowW, windowH, winX, winY) 
{ 
windowFeatures='width='+windowW+',height='+windowH+',toolbar=0,location=0,screenx=0,screeny=0,directories=0,status=0,menuBar=0,scrollBars=1,left='+winX+',top='+winY+',resizable=0' 
window.open( windowURL, windowName, windowFeatures ) ; 

}