/*
Simple Image Trail script- By JavaScriptKit.com
Visit http://www.javascriptkit.com for this script and more
This notice must stay intact

if (document.getElementById || document.all){
	document.write('<div id="trailimageid">');
	document.write('</div>');
}

*/

function gettrailobj(){
if (document.getElementById)
return document.getElementById("trailimageid").style
else if (document.all)
return document.all.trailimagid.style
}

function gettrailobjnostyle(){
if (document.getElementById)
return document.getElementById("trailimageid")
else if (document.all)
return document.all.trailimagid
}


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

function showtrail(imagename,title,description,height){

	var currentimageheight = 270;	
	if (height > 0){
		currentimageheight = height;
	}

	document.onmousemove=followmouse;

	newHTML = ''; 
	newHTML = newHTML + '<div  style="padding: 0px 0px 0px 0px;"><img src="' + imagename + '" border="0"></div>';
	
	gettrailobjnostyle().innerHTML = newHTML;

	gettrailobj().visibility="visible";
}


function hidetrail(){
	gettrailobj().visibility="hidden";
	document.onmousemove="";
	gettrailobj().left="-1900px";

}

function followmouse(e){
var xcoord=-275;
var ycoord=10;
if (typeof e != "undefined"){
xcoord+=e.pageX;
ycoord+=e.pageY;
}
else if (typeof window.event !="undefined"){
xcoord+=truebody().scrollLeft+event.clientX;
ycoord+=truebody().scrollTop+event.clientY;
}

gettrailobj().display="";
gettrailobj().left=xcoord+"px";
gettrailobj().top=ycoord+"px";
}
