

	//
	// GLOBAL DEFINITIONS
	//


	// Care
	Care_SkinFolder       = 'images/'
	


	//
	// FUNCTIONS
	//

	
	// FUNCTION byId(id)
	// Returns the object referred to by 'id' indepentant of web browser
	//   id  - string representing the id of the object required
	
	function byId(id) {
		if (document.getElementById) {
			return document.getElementById(id);
		}
		else if (document.all) {
			return document.all[id];
		}
	}


	
	// FUNCTION Tooltip_Show(thisControl, tipText, tipWidth)
	// Displays a tooltip
	//   e        - the event object causing the tooltip (used for tip position)
	//   tipText  - the text to be displayed in the tooltip (string)
	//   tipWidth - width in pixels of the tooltip
	
	function Tooltip_Show(thisControl, tipText) {
		var ie  = document.all
		var ns6 = document.getElementById && !document.all
		
		if (!(ns6||ie)) {
			alert(tipText)
		}
		else {
			var ToolTipObj  = byId('ToolTip')
			var ToolTipPointerObj = byId('ToolTipPointer')
			
			var nondefaultpos=false
			var offsetdivfrompointerX=-3
			var offsetdivfrompointerY=14
			
			var parent = thisControl
			var curX = parent.offsetWidth * 0.66
			var curY = parent.offsetHeight * 0.85
			
			ToolTipObj.innerHTML="<a href='#' onclick='Tooltip_Hide();return false'><img src='" + Care_SkinFolder + "close.gif' border='0' align='right'></a>" + tipText
			Tooltips_Enabled=true

			var ietruebody = (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
			
			while(parent){
				curX += parent.offsetLeft
				curY += parent.offsetTop
				parent = parent.offsetParent
			}

			//Find out how close we are to the corner of the window
			var winwidth=ie&&!window.opera? ietruebody.clientWidth : window.innerWidth-20
			var winheight=ie&&!window.opera? ietruebody.clientHeight : window.innerHeight-20
			
			var rightedge  = winwidth  - curX
			var bottomedge = winheight - curY
			
			var leftedge= -1000
			
			//if the horizontal distance isn't enough to accomodate the width of the context menu
			if (rightedge<ToolTipObj.offsetWidth){
				//move the horizontal position of the menu to the left by it's width
				ToolTipObj.style.left=curX-ToolTipObj.offsetWidth+"px"
				nondefaultpos=true
			}
			else if (curX<leftedge)
				ToolTipObj.style.left="5px"
			else{
				//position the horizontal position of the menu where the mouse is positioned
				ToolTipObj.style.left=curX-offsetdivfrompointerX+"px"
				ToolTipPointerObj.style.left=curX+"px"
			}
			
			//same concept with the vertical position
			//if (bottomedge<ToolTipObj.offsetHeight){
			//	ToolTipObj.style.top=curY-ToolTipObj.offsetHeight+"px"
			//	nondefaultpos=true
			//}
			//else{
				ToolTipObj.style.top=curY+offsetdivfrompointerY+"px"
				ToolTipPointerObj.style.top=curY+"px"
			//}
			
			ToolTipObj.style.visibility="visible"
			if (!nondefaultpos)
				ToolTipPointerObj.style.visibility="visible"
			else
				ToolTipPointerObj.style.visibility="hidden"
		}
	}
	
	
	
	// FUNCTION Tooltip_Hide()
	// Hides the tooltip object
	
	function Tooltip_Hide(){
		var ie=document.all
		var ns6=document.getElementById && !document.all

		if (ns6||ie){
			Tooltips_Enabled = false
			byId('ToolTipPointer').style.visibility="hidden"
			
			var tipobj = byId('ToolTip')
			tipobj.style.visibility="hidden"
			tipobj.style.left="-1000px"
			tipobj.style.backgroundColor=''
			tipobj.style.width=''
		}
	}



function enableFlash() {
	objects = document.getElementsByTagName("object");
	for (var i = 0; i < objects.length; i++)
	{
		objects[i].outerHTML = objects[i].outerHTML;
	}
}