function ge (id) { return document.getElementById (id); }

// position of the tooltip relative to the mouse in pixel //
var offsetx = 18;
var offsety =  8;

document.onmousemove = getmouseposition;
 
var ie5 = (document.getElementById && document.all); 
var ns6 = (document.getElementById && !document.all); 
var ua = navigator.userAgent.toLowerCase();
var isapple = (ua.indexOf('applewebkit') != -1 ? 1 : 0);

function getmouseposition(e){
    var tt = ge('tooltip');
	if(!tt) return;

	if(document.getElementById){
    	
		
		var IE = document.all?true:false
		var tempX = 0
		var tempY = 0
		
		  if (IE) { // grab the x-y pos.s if browser is IE
			if(document.body.scrollTop){
				tempX = event.clientX + document.body.scrollLeft;
				tempY = event.clientY + document.body.scrollTop;
			}else{
				tempX = event.clientX + document.documentElement.scrollLeft;
				tempY = event.clientY + document.documentElement.scrollTop;
			}
		  } else {  // grab the x-y pos.s if browser is NS
			tempX = e.pageX;
			tempY = e.pageY;
		  }  
		  // catch possible negative values in NS4
		  if (tempX < 0){tempX = 0}
		  if (tempY < 0){tempY = 0}  
		  
		  tt.style.left = tempX + 20 + 'px';
          tt.style.top = tempY + 'px';
        
    }
}
function tooltip(tip){
    var tt = ge('tooltip');
    tt.innerHTML = tip;
    tt.style.display = 'block';
}
function exitTooltip(){
    ge('tooltip').style.display = 'none';
}

function openSearch(){
	ge('searchDiv').style.display = 'block';
}
function closeSearch(){
	ge('searchDiv').style.display = 'none';
}







