// JavaScript Document
var dom=(document.getElementById)?true:false;
var ns5=((navigator.userAgent.indexOf("Gecko")>-1)&&dom)?true:false;
var ie5=((navigator.userAgent.indexOf("MSIE")>-1)&&dom)?true:false;
var ns4=(document.layers&&!dom)?true:false;
var ie4=(document.all&&!dom)?true:false;
var nodyn=(!ns5&&!ns4&&!ie4&&!ie5)?true:false;
var origWidth,origHeight;
if(ns4){
	origWidth=window.innerWidth;
	origHeight=window.innerHeight;
	window.onresize=function(){if(window.innerWidth!=origWidth||window.innerHeight!=origHeight)history.go(0);}
}
if(nodyn){event="nope"}
var theDiv,divCSS;
function initDiv(){
	if(nodyn)return;
	theDiv=(ns4)?document.imgDiv.document:(ie4)?document.all['imgDiv']:(ie5||ns5)?document.getElementById('imgDiv'):null;
	divCSS=(ns4)?document.imgDiv:theDiv.style;
	if (ie4||ie5||ns5) {
		divCSS.backgroundColor = "#585858";
		divCSS.borderWidth = "1px";
		divCSS.padding = "5px";
		divCSS.borderStyle = "ridge";
	}
	if(theDiv){
		if(ns4)document.captureEvents(Event.MOUSEMOVE);
		document.onmousemove=trackMouse;
	}
}
window.onload=initDiv;
var t1,t2;
var imgOn=false;
function showImg(evt,title){
	if(!theDiv)return;
	if(t1)clearTimeout(t1);
	if(t2)clearTimeout(t2);
	imgOn=true;
	if(ns4){
		theDiv.write(title);
		theDiv.close();
	}else if(ie4||ie5||ns5){
		theDiv.innerHTML=title;
	}
	t1=setTimeout("divCSS.visibility='visible'",100);
}
function trackMouse(evt) {
	var mouseX = (ns4||ns5)? evt.pageX: window.event.clientX + document.body.scrollLeft;
	var mouseY = (ns4||ns5)? evt.pageY: window.event.clientY + document.body.scrollTop;
	var tpWd = (ns4)? theDiv.width: (ie4||ie5)? theDiv.clientWidth: theDiv.offsetWidth;
	var tpHt = (ns4)? theDiv.height: (ie4||ie5)? theDiv.clientHeight: theDiv.offsetHeight;
	var winWd = (ns4||ns5)? window.innerWidth-20+window.pageXOffset: document.body.clientWidth+document.body.scrollLeft;
	var winHt = (ns4||ns5)? window.innerHeight-20+window.pageYOffset: document.body.clientHeight+document.body.scrollTop;
	if ((mouseX+20+tpWd)>winWd)
		divCSS.left = (ns4)? mouseX-(tpWd+20): mouseX-(tpWd+20)+"px";
	else divCSS.left = (ns4)? mouseX+20: mouseX+20+"px";
	if ((mouseY+12+tpHt)>winHt)
		divCSS.top = (ns4)? winHt-(tpHt+12): winHt-(tpHt+12)+"px";
	else divCSS.top = (ns4)? mouseY+12: mouseY+12+"px";
}
function hideImg(){
	if(!theDiv)return;
	t2=setTimeout("divCSS.visibility='hidden'",100);
	imgOn=false;
}
