/***********************************************
* Cool DHTML tooltip script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

var ie=document.all
var ns6=document.getElementById && !document.all
var enabletip=false
if (ie||ns6) {
var tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById? document.getElementById("dhtmltooltip") : ""

//var iframeobj=document.all? document.all["hoverbox"] : document.getElementById? document.getElementById("hoverbox") : ""

//var isrcobj=hoverbox.document.all? hoverbox.document.all["hoversrc"] : hoverbox.document.getElementById? hoverbox.document.getElementById("hoversrc") : ""

}

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function ddrivetip(thetext, thecolor, thewidth){
	if (ns6||ie){
		if (typeof thewidth!="undefined") {
			rwidth=(browsersize('x')/2)-50
			dwidth=thewidth+50
		
			if (rwidth < dwidth) {
				tipobj.style.width=rwidth-50+"px"
				//iframeobj.style.width=rwidth-50+"px"
			}
			else {
				tipobj.style.width=thewidth+"px"
				//iframeobj.style.width=thewidth+"px"
			}
		}
		if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor
		tipobj.innerHTML=partinfo[thetext]
		//iframeobj.src="http://pittdesign.com/php/hover.php?hover="+thetext
		enabletip=true
		return false
	}
}

function positiontip(e){
if (enabletip){
var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;
var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop;

//the tooltip div height
divY=tipobj.offsetHeight

//the browser size Y
bYsize=browsersize()

//the browser scroll position
bscrollY=getScrollXY()

//find the middle height
bpos=bscrollY+(bYsize/2)-(divY/2)

tipobj.style.top=bpos+"px"
tipobj.style.visibility="visible"
//tipobj.style.position="fixed"

//positioning X
//window.alert( 'SIZE: ' + browsersize('x')/2 )
//tipobj.style.left=(browsersize('x')/2)+50+"px"
tipobj.style.right=(browsersize('x')/2)+"px"
tipobj.style.left=""
}
}

function hideddrivetip(){
if (ns6||ie){
enabletip=false
tipobj.style.visibility="hidden"
tipobj.style.left="-1000px"
tipobj.style.backgroundColor=''
tipobj.style.width=''
}
}


function browsersize(blah) {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  //window.alert( 'Width = ' + myWidth );
  if (!blah) return myHeight;
  else return myWidth;
}

function getScrollXY() {
  var scrOfX = 0, scrOfY = 0;
  if( typeof( window.pageYOffset ) == 'number' ) {
    //Netscape compliant
    scrOfY = window.pageYOffset;
    scrOfX = window.pageXOffset;
  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
    //DOM compliant
    scrOfY = document.body.scrollTop;
    scrOfX = document.body.scrollLeft;
  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
    //IE6 standards compliant mode
    scrOfY = document.documentElement.scrollTop;
    scrOfX = document.documentElement.scrollLeft;
  }
  //return [ scrOfX, scrOfY ];
  return scrOfY;
}

document.onmousemove=positiontip