
				var ns4 = document.layers;
				var ns6 = document.getElementById && !document.all;
				var ie4 = document.all;
				var descText = "";
				var offsetX = 0;
				var offsetY = 20;
				var toolTipSTYLE="";
				var txtColorStyle="";
				
				function initToolTips()
				{
					if(ns4||ns6||ie4)
					{
						if(ns4)
						{
							toolTipSTYLE = document.toolTipLayer;
						}
						else if(ns6)
						{
							toolTipSTYLE = document.getElementById("toolTipLayer").style;
						}
						else if(ie4)
						{
							toolTipSTYLE = document.all.toolTipLayer.style;
						}
						
						if(ns4)
						{
							document.captureEvents(Event.MOUSEMOVE);
						}
						else
						{
							toolTipSTYLE.visibility = "visible";
							toolTipSTYLE.display = "none";
						}
						document.onmousemove = moveToMouseLoc;
					}
				}
				function toolTip(msg, fg, bg)
				{
					if(arguments.length < 1) // hide
					{
						if(ns4)
						{
							toolTipSTYLE.visibility = "hidden";
						}
						else
						{
							toolTipSTYLE.display = "none";
						}
					}
					else // show
					{
						if(!fg) fg = "#777777";
						if(!bg) bg = "#FFFFFF";
						var content =
							'<table border="0" cellspacing="0" cellpadding="1" bgcolor="' + fg + '"><td>' +
							'<table border="0" cellspacing="0" cellpadding="1" bgcolor="' + bg + 
							'"><td align="left" style="padding:2px"' + 
							(msg.length > 30 ? ' width="150"' : "") +
							'><font face="sans-serif" color="' + fg +
							'" size="-2">&nbsp\;' + msg +
							'&nbsp\;</font></td></table></td></table>';
						if(ns4)
						{
							toolTipSTYLE.document.write(content);
							toolTipSTYLE.document.close();
							toolTipSTYLE.visibility = "visible";
						}
						if(ns6)
						{
							document.getElementById("toolTipLayer").innerHTML = content;
							toolTipSTYLE.display='block'
						}
						if(ie4)
						{
							document.all("toolTipLayer").innerHTML=content;
							toolTipSTYLE.display='block'
						}
					}
				}
/*************************************************************************************	Change the text to display the name of the
																						current color the mouse is over. **/
				function colorName(colName, colAtts)
				{
					var content;
					var statTxt;
					if(arguments.length < 1) // hide
					{
						content = 'Available Colors';
						statTxt = "";
					}
					else
					{
						content = '<b><font color="#666666">&nbsp\;' + colName + '&nbsp\;</b>';
						if(colAtts != null && colAtts.length > 0){
							content += '<font color="#999999">-&nbsp\;' + colAtts + '</font>';
						}
						/*content += ' this is text, this is text, this is text, this is text, this is text.'*/
						content += '</font>';
						
						statTxt = colName;
						if(colAtts != null && colAtts.length > 0){
							statTxt += ' - ' + colAtts;
						}
					}
					if(ns4)
					{
						txtColorStyle.document.write(content);
						txtColorStyle.document.close();
					}
					if(ns6)
					{
						document.getElementById("txtColorOver").innerHTML = content;
						txtColorStyle.display="block";
					}
					if(ie4)
					{
						document.all("txtColorOver").innerHTML=content;
						txtColorStyle.display = 'block';
					}
					window.status = statTxt;
				}
/*************************************************************************************/
				function moveToMouseLoc(e)
				{
					var x,y;
					if(ns4||ns6)
					{
						x = e.pageX;
						y = e.pageY;
					}
					else
					{
						x = event.x + document.body.scrollLeft;
						y = event.y + document.body.scrollTop;
					}
					toolTipSTYLE.left = x + offsetX;
					toolTipSTYLE.top = y + offsetY;
					return true;
				}
/*************************************************************************************/
				var g_popup = null;
				function ShowPics(imgID, imgTitle, imgDesc){
					if(!g_popup.isVisible()){
						g_popup.show();
					}
					//window.
					PopupTopTitle.innerHTML = imgTitle;
//					var tmpContent = '<img src="' + imgID + '" />';
//					if(imgDesc.length > 0)
//					{
//					    tmpContent += '<br /><br /><center>' + imgDesc + '</center>';
//					}
//					g_popup.changeContent(tmpContent);
					g_popup.changeContent("<img src='" + imgID + "'/><br/><br/><center>" + imgDesc + "</center>");
				}
/*************************************************************************************/
				function findObj(theObj, theDoc)
				{
					var p, i, foundObj;
					  
					if(!theDoc) theDoc = document;
					if( (p = theObj.indexOf("?")) > 0 && parent.frames.length)
					{
						theDoc = parent.frames[theObj.substring(p+1)].document;
						theObj = theObj.substring(0,p);
					}
					if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];
					for (i=0; !foundObj && i < theDoc.forms.length; i++) 
						foundObj = theDoc.forms[i][theObj];
					for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) 
						foundObj = findObj(theObj,theDoc.layers[i].document);
					if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);
					  
					return foundObj;
				}
/*************************************************************************************/
				function LinkClick(locStr)
				{
					var s = document.location.pathname.toString().substring(0,document.location.pathname.toString().lastIndexOf('/'));
					if(locStr.charAt(0) != '/'){
						s += '/';
					}
					document.location.href = s + locStr;
				}
/************************************************************************************* Change the style properties of the element **/
				function setColor(objName, fg, bg)
				{
					var obj = findObj(objName);
					if (obj.style)
					{
						obj.style.color = fg;
						obj.style.backgroundColor = bg;
					}
				}
//** Methods in this script: **/
//
//          addLoadListener(fn);
//
//	        attachEventListener(target, eventType, functionRef, capture)
//
//	        detachEventListener(target, eventType, functionRef, capture)
//
//	        getEventTarget(event)
//
//	        stopDefaultAction(event)
//
//	        getScrollingPosition()
//
//	        getPosition(theElement)
//
//	        identifyBrowser()
//
//	        getViewportSize()
//
//	        getElementsByAttribute(attribute, attributeValue)
//
//        	makePopup(url, width, height, [scroll | both])
//
//	        makeGetRequest(url, callBackFunk)
//
//	        createNewStyleSheet(media)
//
//	        addHeadStyleRule(styleSheet, selector, properties)
//
//***********************************************************//
/*
	addLoadListener(fn)
	
		____/ ARGUMENTS \________________________________________________________
			[ object ]	fn
							The function to evaluate after the document has
							completely finished loading.
		____/ RETURNS \__________________________________________________________
			Nothing.
		____/ COMMENTS \_________________________________________________________
			Add callback for event to execute after document loads.
_____________________________________________________________________________*/
				function addLoadListener(fn)
				{
				  if (typeof window.addEventListener != 'undefined')
				  {
				    window.addEventListener('load', fn, false);
				  }
				  else if (typeof document.addEventListener != 'undefined')
				  {
				    document.addEventListener('load', fn, false);
				  }
				  else if (typeof window.attachEvent != 'undefined')
				  {
				    window.attachEvent('onload', fn);
				  }
				  else
				  {
				    var oldfn = window.onload;
				    if (typeof window.onload != 'function')
				    {
				      window.onload = fn;
				    }
				    else
				    {
				      window.onload = function()
				      {
				        oldfn();
				        fn();
				      };
				    }
				  }
				}
/*
	attachEventListener(target, eventType, functionRef, capture)
	
		____/ ARGUMENTS \________________________________________________________
			[ object ]	target
							The element to attach the event to.
			[ object ]	eventType
							The event to listen for.
			[ object ]	functionRef
							The function to evaluate when the event is triggered.
			[ obsolete]	capture
		____/ RETURNS \__________________________________________________________
			bool [ true | false ] - If the operation is a success, true,
									otherwise false.
		____/ COMMENTS \_________________________________________________________
			Add event to execute on object event.
_____________________________________________________________________________*/
				function attachEventListener(target, eventType, functionRef, capture)
				{
				  if (typeof target.addEventListener != "undefined")
				  {
				    target.addEventListener(eventType, functionRef, capture);
				  }
				  else if (typeof target.attachEvent != "undefined")
				  {
				    target.attachEvent("on" + eventType, functionRef);
				  }
				  else
				  {
				    eventType = "on" + eventType;
				
				    if (typeof target[eventType] == "function")
				    {
				      var oldListener = target[eventType];
				
				      target[eventType] = function()
				      {
				        oldListener();
				
				        return  functionRef();
				      }
				    }
				    else
				    {
				      target[eventType] = functionRef;
				    }
				  }
				
				  return true; 
				}
/*
	detachEventListener(target, eventType, functionRef, capture)
	
		____/ ARGUMENTS \________________________________________________________
			[ object ]	target
							The element to detach the event from.
			[ object ]	eventType
							The event to detach a function from.
			[ object ]	functionRef
							The function to detach from the event.
			[ obsolete ]	capture
		____/ RETURNS \__________________________________________________________
			bool [ true | false ] - If the operation is a success, true,
									otherwise false.
		____/ COMMENTS \_________________________________________________________
			Add event to execute on object event.
_____________________________________________________________________________*/
                function detachEventListener(target, eventType, functionRef, capture)
                {
                    if (typeof target.removeEventListener != "undefined")
                    {
                        target.removeEventListener(eventType, functionRef, capture)
                    }
                    else if (typeof target.detachEvent != "undefined")
                    {
                        target.detachEvent("on" + eventType, functionRef);
                    }
                    else
                    {
                        target["on" + eventType] = null;
                    }

                    return true;
                }
/*
	getEventTarget(event)
	
		____/ ARGUMENTS \________________________________________________________
			[object]	event
							The source event that was triggered.
		____/ RETURNS \__________________________________________________________
			Object
		____/ COMMENTS \_________________________________________________________
			Get the source of the event.
_____________________________________________________________________________*/
                function getEventTarget(event)
                {
                    var targetElement = null;
                    if (typeof event.target != "undefined")
                    {
                        targetElement = event.target;
                    }
                    else
                    {
                        targetElement = event.srcElement;
                    }
                    while (targetElement.nodeType == 3 && targetElement.parentNode != null)
                    {
                        targetElement = targetElement.parentNode;
                    }
                    return targetElement;
                }
/*
	stopDefaultAction(event)
	
		____/ ARGUMENTS \________________________________________________________
			[ object ]	event
							The event to stop.
		____/ RETURNS \__________________________________________________________
			bool [ true | false ] - If the operation is a success, true,
									otherwise false.
		____/ COMMENTS \_________________________________________________________
			Stop the default action.
_____________________________________________________________________________*/
                function stopDefaultAction(event)
                {
                    event.returnValue = false;

                    if (typeof event.preventDefault != "undefined")
                    {
                        event.preventDefault();
                    }

                    return true;
                }
/*
	getScrollingPosition()
	
		____/ ARGUMENTS \________________________________________________________
			None.
		____/ RETURNS \__________________________________________________________
			Array(int, int)
		____/ COMMENTS \_________________________________________________________
			Get the top, left position of the current window.
_____________________________________________________________________________*/
				function getScrollingPosition()
				{
				  //array for X and Y scroll position
				  var position = [0, 0];
				
				  //if the window.pageYOffset property is supported
				  if(typeof window.pageYOffset != 'undefined')
				  {
					//store position values
					position = [
						window.pageXOffset,
						window.pageYOffset
					];
				  }
				
				  //if the documentElement.scrollTop property is supported
				  //and the value is greater than zero
				  if(typeof document.documentElement.scrollTop != 'undefined'
					&& document.documentElement.scrollTop > 0)
				  {
					//store position values
					position = [
						document.documentElement.scrollLeft,
						document.documentElement.scrollTop
					];
				  }
				
				  //if the body.scrollTop property is supported
				  else if(typeof document.body.scrollTop != 'undefined')
				  {
					//store position values
					position = [
						document.body.scrollLeft,
						document.body.scrollTop
					];
				  }
				
				  //return the array
				  return position;
				}
/*
	getPosition(theElement)
	
		____/ ARGUMENTS \________________________________________________________
			[ object ]	theElement
							The element whose position to evaluate.
		____/ RETURNS \__________________________________________________________
			[ Array ]   An array containing the X and Y coordinates of the element.
			            [positionX, positionY]
		____/ COMMENTS \_________________________________________________________
			Gets the position of the element referenced in the argument and returns
			it in an Array.
_____________________________________________________________________________*/
                function getPosition(theElement)
                {
                    var positionX = 0;
                    var positionY = 0;

                    while (theElement != null)
                    {
                        positionX += theElement.offsetLeft;
                        positionY += theElement.offsetTop;
                        theElement = theElement.offsetParent;
                    }

                  return [positionX, positionY];
                }
/*
	identifyBrowser()
	
		____/ ARGUMENTS \________________________________________________________
			None.
		____/ RETURNS \__________________________________________________________
			[ string ] ['kde', 'opera7', 'opera5', 'ie*' 'ie5mac', 'safari1.2',
						'safari1', 'mozilla']
		____/ COMMENTS \_________________________________________________________
			Identify the current browser.
_____________________________________________________________________________*/
				function identifyBrowser() {
				  var agent = navigator.userAgent.toLowerCase();
				
				  if (typeof navigator.vendor != "undefined" && navigator.vendor == "KDE" &&
				      typeof window.sidebar != "undefined")
				  {
				    return "kde";
				  }
				  else if (typeof window.opera != "undefined")
				  {
				    var version = parseFloat(agent.replace(/.*opera[\/ ]([^ $]+).*/, "$1"));
				
				    if (version >= 7)
				    {
				      return "opera7";
				    }
				    else if (version >= 5)
				    {
				      return "opera5";
				    }
				
				    return false;
				  }
				  else if (typeof document.all != "undefined")
				  {
				    if (typeof document.getElementById != "undefined")
				    {
				      var browser = agent.replace(/.*ms(ie[\/ ][^ $]+).*/, "$1").replace(/ /, "");
				
				      if (typeof document.uniqueID != "undefined")
				      {
				        if (browser.indexOf("5.5") != -1)
				        {
				          return browser.replace(/(.*5\.5).*/, "$1");
				        }
				        else
				        {
				          return browser.replace(/(.*)\..*/, "$1");
				        }
				      }
				      else
				      {
				        return "ie5mac";
				      }
				    }
				
				    return false;
				  }
				  else if (typeof document.getElementById != "undefined")
				  {
				    if (navigator.vendor.indexOf("Apple Computer, Inc.") != -1)
				    {
				      if (typeof window.XMLHttpRequest != "undefined")
				      {
				        return "safari1.2";
				      }
				
				      return "safari1";
				    }
				    else if (agent.indexOf("gecko") != -1)
				    {
				      return "mozilla";
				    }
				  }
				  return false;
				}

                function identifyOS()
                {
                    var agent = navigator.userAgent.toLowerCase();

                    if (agent.indexOf("win") != -1)
                    {
                        return "win";
                    }
                    else if (agent.indexOf("mac"))
                    {
                        return "mac";
                    }
                    else
                    {
                        return "unix";
                    }

                    return false;
                }
/*
	getViewportSize()
	
		____/ ARGUMENTS \________________________________________________________
			None.
		____/ RETURNS \__________________________________________________________
			Array(int, int)
		____/ COMMENTS \_________________________________________________________
			Get the width and height of the current window.
_____________________________________________________________________________*/
				function getViewportSize()
				{
				  var size = [0,0];
				
				  if (typeof window.innerWidth != 'undefined')
				  {
					size = [
						window.innerWidth,
						window.innerHeight
					];
				  }
				  else if (typeof document.documentElement != 'undefined'
					  && typeof document.documentElement.clientWidth != 'undefined'
					  && document.documentElement.clientWidth != 0)
				  {
					size = [
						document.documentElement.clientWidth,
						document.documentElement.clientHeight
					];
				  }
				  else
				  {
					size = [
						document.getElementsByTagName('body')[0].clientWidth,
						document.getElementsByTagName('body')[0].clientHeight
					];
				  }
				
				  return size;
				}
/*
	getElementsByAttribute(attribute, attributeValue)
	
		____/ ARGUMENTS \________________________________________________________
			[string]	attribute
							The name of the attribute to identify with an
							element.
			[string]	attributeValue
							The value of the attribute to match against.
		____/ RETURNS \__________________________________________________________
			Array of elements.
		____/ COMMENTS \_________________________________________________________
			Get an Array() of objects whose 'attribute' matches the 'attributeValue'.
_____________________________________________________________________________*/
				function getElementsByAttribute(attribute, attributeValue)
				{
				  var elementArray = new Array();
				  var matchedArray = new Array();
				
				  if (document.all)
				  {
					elementArray = document.all;
				  }
				  else
				  {
					elementArray = document.getElementsByTagName("*");
				  }
				
				  for (var i = 0; i < elementArray.length; i++)
				  {
					if (attribute == "class")
					{
					  var pattern = new RegExp("(^| )" + attributeValue + "( |$)");
				
					  if (elementArray[i].className.match(pattern))
					  {
						matchedArray[matchedArray.length] = elementArray[i];
					  }
					}
					else if (attribute == "for")
					{
					  if (elementArray[i].getAttribute("htmlFor") || elementArray[i].getAttribute("for"))
					  {
						if (elementArray[i].htmlFor == attributeValue)
						{
						  matchedArray[matchedArray.length] = elementArray[i];
						}
					  }
					}
					else if (elementArray[i].getAttribute(attribute) == attributeValue)
					{
					  matchedArray[matchedArray.length] = elementArray[i];
					}
				  }
				
				  return matchedArray;
				}
				
/*
	makePopup(url, width, height, [scroll | both])
	
		____/ ARGUMENTS \________________________________________________________
			[string]	url
							The URL of the html content to load.
			[int]   	width
							The width of the new window.
			[int]   	height
							The height of the new window.
			[struct]	overflow (scroll|both)
							Determines how to handle the overflow attribute
							of the new window.
		____/ RETURNS \__________________________________________________________
			A reference to the new window.
		____/ COMMENTS \_________________________________________________________
            document.getElementById('survey_link').onclick = function()
            {
                var survey = makePopup(this.href, 640, 480, 'scroll');
                return survey.closed;
            };
_____________________________________________________________________________*/
                function makePopup(url, width, height, overflow)
                {
                    if (width > 640) { width = 640; }
                    if (height > 480) { height = 480; }

                    if (overflow == '' || !/^(scroll|resize|both)$/.test(overflow))
                    {
                        overflow = 'both';
                    }

                    var win = window.open(url, '',
                        'width=' + width + ',height=' + height
                        + ',scrollbars=' + (/^(scroll|both)$/.test(overflow) ? 'yes' : 'no')
                        + ',resizable=' + (/^(resize|both)$/.test(overflow) ? 'yes' : 'no')
                        + ',status=yes,toolbar=no,menubar=no,location=no'
                        );

                    return win;
                }
/*
	makeGetRequest(url, callBackFunk)
	
		____/ ARGUMENTS \________________________________________________________
			[string]	url
							The location of the document to retrieve.
			[object]	cllBackFunk
							The function to trigger when the request has received
							a valid response.
		____/ RETURNS \__________________________________________________________
			Nothing.
		____/ COMMENTS \_________________________________________________________
			Simple AJAX Request.
_____________________________________________________________________________*/
		        function makeGetRequest(url, callBackFunk)
		        {
		            var http_request = false;
		
		            if (window.XMLHttpRequest) {									// Mozilla, Safari,...
		                http_request = new XMLHttpRequest();
		                if (http_request.overrideMimeType) {
		                    http_request.overrideMimeType('text/xml');
		                }
		            } else if (window.ActiveXObject) {								// IE
		                try {
		                    http_request = new ActiveXObject("Msxml2.XMLHTTP");
		                } catch (e) {
		                    try {
		                        http_request = new ActiveXObject("Microsoft.XMLHTTP");
		                    } catch (e) {}
		                }
		            }
		
		            if (!http_request) {
		                alert('Giving up :( Cannot create an XMLHTTP instance');
		                return false;
		            }
		            http_request.onreadystatechange = function()
		            {
		            	callBackFunk(http_request);
		            };
		            http_request.open('GET', url, true);
		            http_request.send(null);
		        }
/*
	createNewStyleSheet(media)
	
		____/ ARGUMENTS \________________________________________________________
			[ string ]	media (optional)
							The value of the media attribute of the stylesheet
							element.
		____/ RETURNS \__________________________________________________________
			[ object ]	A newly created, empty stylesheet object.
		____/ COMMENTS \_________________________________________________________
			Create a new StyleSheet object.
_____________________________________________________________________________*/
				function createNewStyleSheet(media)
				{
					var isSafari = /safari/.test(identifyBrowser());
					
					var styleSheet = document.createElement("style");
					styleSheet.setAttribute("type", "text/css");
					
					if (typeof media == "undefined")
					{
						styleSheet.setAttribute("media", "all");
					}
					else
					{
						styleSheet.setAttribute("media", media);
					}
					
					styleSheet = document.getElementsByTagName("head")[0].appendChild(styleSheet);
					
					if (typeof document.styleSheets != "undefined" && document.styleSheets.length > 0 && !isSafari)
					{
						styleSheet = document.styleSheets[document.styleSheets.length - 1];
					}
					return styleSheet;
				}
/*
	addHeadStyleRule(styleSheet, selector, properties)
	
		____/ ARGUMENTS \________________________________________________________
			[ string ]	styleSheet
							The name of the StyleSheet object to modify.
		____/ RETURNS \__________________________________________________________
			bool [ true | false ] - If the operation is a success, true,
									otherwise false.
		____/ COMMENTS \_________________________________________________________
			Add a stylesheet rule.
_____________________________________________________________________________*/
				function addHeadStyleRule(styleSheet, selector, properties)
				{
					var isSafari = /safari/.test(identifyBrowser());
					
					if (typeof styleSheet.addRule != "undefined" && !isSafari)
					{
						styleSheet.addRule(selector, properties);
					}
					else if (typeof styleSheet.insertRule != "undefined" && !isSafari)
					{
						styleSheet.insertRule(selector + " {" + properties + "}", styleSheet.cssRules.length);
					}
					else
					{
						styleSheet.appendChild(document.createTextNode(selector + " {" + properties + "}"));
					}
					return true;
				}

/*************************************************************/
/*
	showTip(event)
	
		____/ ARGUMENTS \________________________________________________________
			event       [object]
							The event that triggered the function.
		____/ RETURNS \__________________________________________________________
			Nothing
		____/ COMMENTS \_________________________________________________________
			Shows a tooltip layer whose content contains the value of the
			target element's 'title' attribute.
[ SAMPLE USAGE ]

        addLoadListener(initTooltips);
        function initTooltips()
        {
            var tips = getElementsByAttribute("class", "hastooltip");
            for (var i = 0; i < tips.length; i++)
            {
                attachEventListener(tips[i], "mouseover", showTip, false);
                attachEventListener(tips[i], "mouseout", hideTip, false);
            }
            return true;
        }
_____________________________________________________________________________*/
function showTip(event)
{
  if (typeof event == "undefined")
  {
    event = window.event;
  }

  var target = getEventTarget(event);

  while (target.className == null || !/(^| )hastooltip( |$)/.test(target.className))
  {
    target = target.parentNode;
  }

  var tip = document.createElement("div");
  var content = target.getAttribute("title");
  target.tooltip = tip;
  target.setAttribute("title", "");

  if (target.getAttribute("id") != "")
  {
    tip.setAttribute("id", target.getAttribute("id") + "tooltip");
  }
  
  var tmpContent = document.createElement("span");
//  tmpContent.innerHtml = content;
  var nodeText = document.createTextNode(content);
  tmpContent.appendChild(nodeText);
  
  tip.className = "tooltip";
  tip.appendChild(tmpContent);

  var scrollingPosition = getScrollingPosition();
  var cursorPosition = [0, 0];

  if (typeof event.pageX != "undefined" && typeof event.x != "undefined")
  {
    cursorPosition[0] = event.pageX;
    cursorPosition[1] = event.pageY;
  }
  else
  {
    cursorPosition[0] = event.clientX + scrollingPosition[0];
    cursorPosition[1] = event.clientY + scrollingPosition[1];
  }

  tip.style.position = "absolute";
  tip.style.left = cursorPosition[0] + 10 + "px";
  tip.style.top = cursorPosition[1] + 10 + "px";
  tip.style.visibility = "hidden";

  document.getElementsByTagName("body")[0].appendChild(tip);

  var viewportSize = getViewportSize();

  if (cursorPosition[0] - scrollingPosition[0] + 10 + tip.offsetWidth > viewportSize[0] - 25)
  {
    tip.style.left = scrollingPosition[0] + viewportSize[0] - 25 - tip.offsetWidth + "px";
  }
  else
  {
    tip.style.left = cursorPosition[0] + 10 + "px";
  }

  if (cursorPosition[1] - scrollingPosition[1] + 10 + tip.offsetHeight > viewportSize[1] - 25)
  {
    if (event.clientX > (viewportSize[0] - 25 - tip.offsetWidth))
    {
      tip.style.top = cursorPosition[1] - tip.offsetHeight - 10 + "px";
    }
    else
    {
      tip.style.top = scrollingPosition[1] + viewportSize[1] - 25 - tip.offsetHeight + "px";
    }
  }
  else
  {
    tip.style.top = cursorPosition[1] + 10 + "px";
  }

  tip.style.visibility = "visible";

  return true;
}
/*
	hideTip(event)
	
		____/ ARGUMENTS \________________________________________________________
			event       [object]
							The event that triggered the function.
		____/ RETURNS \__________________________________________________________
			Nothing
		____/ COMMENTS \_________________________________________________________
			Hides the tooltip that was triggered by showTip()
_____________________________________________________________________________*/
function hideTip(event)
{
  if (typeof event == "undefined")
  {
    event = window.event;
  }

  var target = getEventTarget(event);

  while (target.className == null || !target.className.match(/(^| )hastooltip( |$)/))
  {
    target = target.parentNode;
  }

  if (target.tooltip != null)
  {
//    target.setAttribute("title", target.tooltip.childNodes[0].nodeValue);
    target.setAttribute("title", target.tooltip.childNodes[0].firstChild.nodeValue);
    target.tooltip.parentNode.removeChild(target.tooltip);
  }

  return false;
}