


if (document.layers) document.captureEvents(Event.MOUSEMOVE);
if (!document.all) document.onmousemove=mouseTrack;

var isNav4, isNav6, isIE4;
var mpX, mpY;

var popped = 'null';

function mouseTrack(e) {
	if (document.all) {
		oScrollCoords = getScrollCoords();
		mpX = event.clientX + oScrollCoords.x + 10;
		mpY = event.clientY + oScrollCoords.y + 20;
	}
	else {
		mpX = e.pageX + 10;
		mpY = e.pageY + 20;
	}			
}

function showdiv(id,lid) {
	
	if(document.getElementById(id)) {					
		
		if (document.all) {
			oScrollCoords = getScrollCoords();
			document.getElementById(id).style.left = event.clientX + oScrollCoords.x + 10;
			document.getElementById(id).style.top = event.clientY + oScrollCoords.y + 20;
		}
		else {
			
			document.getElementById(id).style.left = mpX+"px";
			document.getElementById(id).style.top = mpY+"px";
		}
		
		document.getElementById(id).style.visibility='visible';				
	}
	else if(document.all[id]) {
		oScrollCoords = getScrollCoords();
		document.all[id].style.left = event.clientX + oScrollCoords.x + 10;
		document.all[id].style.top = event.clientY + oScrollCoords.y + 20;
	}
	
	popped = id;
}

function hidediv(id,lid) { 
	if(document.getElementById(id)) {
		document.getElementById(id).style.visibility='hidden';
	}
	else if (document.all[id]) {
		document.all[id].style.visibility='hidden';
	}
	
	if(getDiv('cmshotspothighlight')) {
		if(getIdProperty('cmshotspothighlight','visibility') != 'hidden')		
			cmsrolloverunhighlight();
	}
}
function getDiv(id) {
	var o;

	if(!id)
		return null;
		
    if (isNav6)
    {
        o = document.getElementById( id );
    }
    else if (isNav4)
    {
        o = document[id];
    }
    else
    {
        o = document.all[id];	
    }
    
    return o;
}

function cmsrolloverunhighlight() {
	if (document.getElementById) {
		document.getElementById('cmshotspothighlight').style.visibility='hidden';
		//document.getElementById('cmshotspothighlight').visibility='hidden';
	}
	else if (document.all) {
		document.all['cmshotspothighlight'].style.visibility='hidden';
		//document.all['cmshotspothighlight'].visibility='hidden';
	}
	if(popped)
		if(getDiv(popped))
			if(getIdProperty(popped,'visibility') != 'hidden')
				hidediv(popped,0);
}

function getScrollCoords () {
  if (typeof window.pageXOffset != 'undefined')
    return {x: window.pageXOffset, y: window.pageYOffset};
  else if ((!document.compatMode || document.compatMode == 'BackCompat')
           && document.body && typeof document.body.scrollLeft != 'undefined')
    return {x: document.body.scrollLeft, y: document.body.scrollTop};
  else if (document.compatMode == 'CSS1Compat' &&
           document.documentElement && typeof document.documentElement.scrollLeft != 'undefined')
    return {x: document.documentElement.scrollLeft, y: document.documentElement.scrollTop};
  else
    return null;
}

