/*************************
DISCLAIMER & COPYRIGHT
This script has been created for specific
use at Labtrade Laboratory Website 
Using this script by any other company/individual/website
without permission and payment
is strictly prohibited and will be treated as violation of copyright law.
Copyright 3rd Millennium Studio - 2000 onwards
For further information please contact www.3rdmstudio.com
*************************/
var agent = navigator.userAgent.toLowerCase();
var is_ns  = ((agent.indexOf('mozilla')!=-1) && ((agent.indexOf('spoofer')==-1) 
                && (agent.indexOf('compatible') == -1)));
var is_ie   = (agent.indexOf("msie") != -1);

is_ns4up=(is_ns && document.getElementById);
is_ie4up=(is_ie && document.getElementById);

if(is_ie4up){
view_width=document.body.clientWidth;
}
if(is_ns4up){
view_width=innerWidth;
}

Xoffset=15;    
Yoffset= -10;    

if(is_ns4up||is_ie4up){
popup=document.getElementById('note');
document.onmousemove=mouseMove;
if(is_ns4up)document.captureEvents(Event.MOUSEMOVE);
}

function showIt(msg){
var info="<div id=\"toolpop\">"+msg+"</div>";
popup.innerHTML=info;
popup.style.visibility="visible";
}


function mouseMove(e){
if(is_ns4up||is_ie4up){
if(is_ns4up){
x=e.pageX;
y=e.pageY;
if(x<=view_width/2+290){
popup.style.left=x+Xoffset;
popup.style.top=y+Yoffset;
}
else if(x>=view_width/2+291){
popup.style.left=-300;
popup.style.top=-300;
}
}
if(is_ie4up){
x=event.x+document.body.scrollLeft;
y=event.y+document.body.scrollTop;
if(x<=view_width/2+290){
popup.style.left=x+Xoffset;
popup.style.top=y+Yoffset;
}
else if(x>=view_width/2+291){
popup.style.left=-300;
popup.style.top=-300;
}
}
}
}

function hideIt(){
if(is_ns4up)popup.style.visibility="hidden";
if(is_ie4up)popup.style.visibility="hidden";
}
