//this calls the setUpHelp function when the page first loads
setUpHelp();
//calls the Is function at the begginning to check the browser
var is = new Is();
//checks the version of the browser, if it is told old then it will not work
function Is ()
{   // convert all characters to lowercase to simplify testing
    var agt=navigator.userAgent.toLowerCase()

    // *** BROWSER VERSION ***
    this.major = parseInt(navigator.appVersion)

    this.nav  = ((agt.indexOf('mozilla')!=-1) && ((agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1)))
    this.nav4 = (this.nav && (this.major == 4))
    this.nav4up = this.nav && (this.major >= 4)

    this.ie   = (agt.indexOf("msie") != -1)
    this.ie4  = (this.ie && (this.major == 4))
    this.ie4up  = this.ie  && (this.major >= 4)
}
// makes the ballon that will hold the text
// TheDiv is the name that will be referenced both on the actual page and in other functions below
function setUpHelp()
{
	// call the maketheBalloon function to actually physically make the balloon
   maketheBalloon("helpballoon",100,"");
}
//make the balloon set the properties of the ballon in the div tag
function maketheBalloon(width, message)
{
	//set the div that will hold the content
	/*settings for Div
		border-width:thin
		border-style:inset
		border-color:blue
		position:absolute
		background-color:#CCCCCC
		padding:2
		layer-background-color: #CCCCCC
		visibility:hidden	
	*/
   var theString = '<STYLE TYPE="text/css">#helpballoon{width:'+width+';}</STYLE>';
   theString+='<DIV style="text-align: left; border: 1px solid #cc6600; z-index:1; font-family:Verdana, sans-serif; font-size:8pt; position:absolute; width: 250px; background-color:#ffffCC; padding:2; visibility:hidden" id="helpballoon">'+message+'</DIV>';
   // write the div tag to the page
   document.write(theString);
}
// makes the div visible and places it beside the mouse pointer
function showhelp(TheText,event)
{
	event = (event) ? event : ((window.event) ? window.event : "");
	

	//this is for netscape
	if (is.nav4up) {
			document.getElementById('helpballoon').style.left = event.pageX + 10 + 'px';
			document.getElementById('helpballoon').style.top = event.pageY + 10 + 'px';
			document.getElementById('helpballoon').innerHTML = TheText;
			document.getElementById('helpballoon').style.visibility = "visible";			
	}
	//this is for IE
	else {
			document.all['helpballoon'].style.pixelLeft = (document.body.scrollLeft +event.clientX) + 10;
			document.all['helpballoon'].style.pixelTop = (document.body.scrollTop + event.clientY) + 10;
			document.all['helpballoon'].innerHTML = TheText;
			document.all['helpballoon'].style.visibility="visible";
	}
                
}
// hide the div tag
function hidehelp()
{
        is.nav4up ? document.getElementById('helpballoon').style.visibility = "hidden" : document.all['helpballoon'].style.visibility="hidden";
}