var offsetfrommouse=[20,15];
var displayduration=0;
var currentimageheight = 100; //Position of The window
var defaultimageheight = 40;
var defaultimagewidth = 40;
document.write('<div style="display: none; position: absolute;z-index:110;" id="trailimageid"></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,ratingaverage,ratingnumber,showthumb,height,age,name,disablity,description){
 height+=55
 defaultimageheight = currentimageheight
 defaultimagewidth = 200
 document.onmousemove=followmouse; cameraHTML = '';
 newHTML = '<div style="padding: 5px; width: 200px; height:100px; background-color: #FFF; border: 1px solid #888;">';//Window Height And Width
 if (ratingnumber == 0)
 {ratingaverage = 0;}
 cameraHTML = '<img src="/images/votes/' + ratingaverage + '.gif">' + '(' + ratingnumber  + ')';
 
 newHTML = newHTML + '<span style="color:#1D5B95;margin-top:0px;margin-left:3px;margin-bottom:0px;"><font face=verdana size=2px><b>' + title + '</b></font></span>';
 
 newHTML = newHTML + '<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td bgcolor="#D52229"></td></tr><tr><td><img src="images/0.gif" width="1" height="3"></td></tr></table>';
 
 newHTML = newHTML + '<table border="0" cellspacing="0" cellpadding="0"><tr><td><font face=verdana size=2px><b>Name:</b> ' + name + '</font></td></tr></table>';
  newHTML = newHTML + '<table border="0" cellspacing="0" cellpadding="0"><tr><td><font face=verdana size=2px><b>Age:</b> ' + age + '</font></td></tr></table>';
  newHTML = newHTML + '<table border="0" cellspacing="0" cellpadding="0"><tr><td><font face=verdana size=2px><b>Disability:</b> ' + disablity + '</font></td></tr></table>';
 if(description!="")
 {
 newHTML = newHTML + '<table border="0" cellspacing="0" cellpadding="0"><tr><td><font face=verdana size=2px><b>Description:</b> ' + description + '</font></td></tr></table>';
 }
newHTML = newHTML + '<div align="center" style="padding: 8px 2px 2px 2px;"></div>';
 newHTML = newHTML + '</div>';
 gettrailobjnostyle().innerHTML = newHTML; gettrailobj().visibility = "visible"; gettrailobj().display="block";
}
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 < defaultimagewidth + 2*offsetfrommouse[0]){ xcoord = e.pageX - xcoord - defaultimagewidth;} else {xcoord += e.pageX;}
 if (docheight - e.pageY < defaultimageheight + 2*offsetfrommouse[1]){ycoord += e.pageY - Math.max(0,(2*offsetfrommouse[1] + defaultimageheight + e.pageY - docheight - truebody().scrollTop));} else {ycoord += e.pageY;}
} else if (typeof window.event != "undefined"){if (docwidth - event.clientX < defaultimagewidth + 2*offsetfrommouse[0]){xcoord = event.clientX + truebody().scrollLeft - xcoord - defaultimagewidth;} else {xcoord += truebody().scrollLeft+event.clientX}
 if (docheight - event.clientY < (defaultimageheight + 2*offsetfrommouse[1])){ycoord += event.clientY + truebody().scrollTop - Math.max(0,(2*offsetfrommouse[1] + defaultimageheight + event.clientY - docheight));} else {ycoord += truebody().scrollTop + event.clientY;}
} gettrailobj().left=xcoord+"px"; gettrailobj().top=ycoord+"px"}