//*********************************//
// SoulTip v0.8
//*********************************//
// by Ferruh Mavituna
// ferruh@mavituna.com
// Non-Commercial use Only
//*********************************//
// 25.04.2003
// IE5+ Only
//*********************************//
// sample : <a href="test.htm" help="Go to test page">Look at me !</a>
// For more info http://ferruh.mavituna.com/

//* Customizations;
var divname="soultip";
var divInnername="soultipinner";

//* Fix SoulTip Coordinates
var CoordLeft=10;
var CoordRight=-15;

function fm_findObj(n, d) { //v4.01 MM Find Obj. by Macromedia 
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
	d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=fm_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function fm_MXY(XorY){ // Mouse Coords
	var coord = 0;
	XorY=="x"?coord = event.clientX + document.body.scrollLeft:coord = event.clientY + document.body.scrollTop;
	if(coord<0)coord=0;
	return coord;
}
function fm_help(){ // Show-Hide 
	var thisObj = fm_findObj(divname);
	var desc = window.event.srcElement.help;
	if(desc!=null){
		fm_writehelp(desc);
		var x = fm_MXY("x"), y = fm_MXY("y");
		thisObj.style.left=x+CoordLeft+"px";
		thisObj.style.top=y+CoordRight+"px";
	}else{
		thisObj.style.display="none";
	}
}
function fm_writehelp(val){ // Write Tip
	var thisObj = fm_findObj(divname);
	var innerObj = fm_findObj(divInnername);
	innerObj.innerHTML=val;
	thisObj.style.display="block";
}

// Grab mousemove
document.onmousemove=fm_help;