function showTrail(title, description) {
	document.onmousemove = followmouse;

	//newHTML = '<div style="float: right; padding: 10px 10px 0 0;"><img src="' + imagename + '" alt="' + title + '"/></div>';
	newHTML = '<div style="padding: 14px 10px 0 28px;">';
	newHTML += '<h2>' + title + '</h2>';
	newHTML += '<div style="padding: 15px 0 0 0;">';
	newHTML += description;
	newHTML += '</div>';
	//newHTML += '<div style="clear: both;"></div>';
	newHTML += '</div>';

	gettrailobjnostyle().innerHTML = newHTML;
	gettrailobj().visibility="visible";
}

var offsetfrommouse=[85,8]; //image x,y offsets from cursor position in pixels. Enter 0,0 for no offset
var displayduration=0; //duration in seconds image should remain visible. 0 for always.
var currentimageheight = 100;	// maximum image size.

if (document.getElementById || document.all){
	document.write('<div id="trail">');
	document.write('</div>');
}

function gettrailobj(){
	if (document.getElementById)
	return document.getElementById("trail").style
	else if (document.all)
	return document.all.trailimagid.style
}

function gettrailobjnostyle(){
	if (document.getElementById)
	return document.getElementById("trail")
	else if (document.all)
	return document.all.trailimagid
}

function truebody(){
	return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function hidetrail(){
	gettrailobj().visibility="hidden"
	document.onmousemove=""
	gettrailobj().left="-500px"

}

function followmouse(e){

	var xcoord=offsetfrommouse[0];
	var ycoord=offsetfrommouse[1];

	var docwidth=document.all? truebody().scrollLeft+truebody().clientWidth : pageXOffset+window.innerWidth-15
	var docheight=document.all? Math.min(truebody().scrollHeight, truebody().clientHeight) : Math.min(window.innerHeight)

	if (typeof e != "undefined"){
		//if (docwidth - e.pageX < 240){
			xcoord = e.pageX - xcoord; // Move to the left side of the cursor
		//} else {
		//	xcoord += e.pageX - xcoord - (200 + 15 + offsetfrommouse[0]);
		//}

		ycoord += e.pageY - gettrailobjnostyle().offsetHeight - 15; //- gettrailobjnostyle().height

	} else if (typeof window.event != "undefined"){
		//if (docwidth - event.clientX < 240){
			//xcoord = event.clientX + truebody().scrollLeft - xcoord - 215; // Move to the left side of the cursor
			xcoord = event.clientX + truebody().scrollLeft - xcoord;
		//} else {
		//	xcoord += truebody().scrollLeft+event.clientX - xcoord - (200 + 15 + offsetfrommouse[0]);
		//}

		ycoord += truebody().scrollTop + event.clientY - gettrailobjnostyle().offsetHeight - 15;
	}

	var docwidth=document.all? truebody().scrollLeft+truebody().clientWidth : pageXOffset+window.innerWidth-15
	var docheight=document.all? Math.max(truebody().scrollHeight, truebody().clientHeight) : Math.max(document.body.offsetHeight, window.innerHeight)
	if(ycoord < 0) { ycoord = ycoord*-1; }
	gettrailobj().left=xcoord+"px"
	gettrailobj().top=ycoord+"px"
}