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

var offsetfrommouse=[15,15]; //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 = 270;   // maximum image size.

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
}
var playerMouseOffset = 0;



function showtrail(imagename,type,title,description,ratingaverage,ratingnumber,showthumb,height,downloads,format,width,height,catid,loopable,mouseOffset,subcat1,subcat2,subcat3,keywords,category,copyright,audiocat,loprice,hiprice){
        if (typeof catid == 'undefined' ) {
                catid = 0;
        }
        if (typeof loopable == 'undefined' ) {
                loopable = 0;
        }
        if (typeof mouseOffset == 'undefined' ) {
                mouseOffset = 0;
        }
        playerMouseOffset = mouseOffset;
	if (typeof subcat1 == 'undefined' ) {
                subcat1 = 0;
        }
        if (typeof subcat2 == 'undefined' ) {
                subcat2 = 0;
        }
        if (typeof subcat3 == 'undefined' ) {
                subcat3 = 0;
        }
        if (typeof keywords == 'undefined' ) {
                keywords = '';
        }
        if (typeof category == 'undefined' ) {
                category = '';
        }
        if (typeof copyright == 'undefined' ) {
                copyright = '';
        }

        if (typeof themePath == 'undefined' ) {
                themePath = '';
        }

        if (height > 0){
                currentimageheight = height;
        }
        playerMouseOffset = mouseOffset;
        document.onmousemove=followmouse;

        cameraHTML = '';

        if (ratingnumber == 0){
                ratingaverage = 0;
        }

        for(x = 1; x <= 5; x++){

                if (ratingaverage >= 1){
                        cameraHTML = cameraHTML + '<img src="' + themePath + '/images/camera_1.gif">';
                } else if (ratingaverage >= 0.5){
                        cameraHTML = cameraHTML + '<img src="' + themePath + '/images/camera_05.gif">';
                } else {
                        cameraHTML = cameraHTML + '<img src="' + themePath + '/images/camera_0.gif">';
                }

                ratingaverage = ratingaverage - 1;

        }

        cameraHTML = cameraHTML + ' (' + ratingnumber + ' Review';
        if ( ratingnumber != 1 ) cameraHTML += 's';
        cameraHTML = cameraHTML + ')';
	
	if(ratingnumber == 'info') {
		// change the display based on what was passed to us
			
			  var newHTML = '<div class="popupframe">';
			newHTML = newHTML + '<table border="0" width="500" cellpadding="3" cellspacing="3" bgcolor="#EFEFEF"><tr><td width="50%" valign="top">';

      	
      	 

  newHTML = newHTML + '<div class="popupinnerframe">';

        	if (showthumb > 0){
                	if(type=='photo')
		        	newHTML = newHTML + '<div align="center" style="padding: 0px 0px 0px 0px;"><img src="' + imagename + '" border="0"></div>';
                	if(type=='video' || type=='ae') {
                   	 	temp = '<div align="center" class="popupframevideo">'
                                 +'     <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+width+'" height="'+height+'" id="434_player" align="middle">'
                                 +'     <param name="allowScriptAccess" value="sameDomain" />'
                                 +'     <param name="movie" value="playerS.swf" />'
                                 +'     <param name="quality" value="high" />'
                                  +'     <param name="bgcolor" value="#ffffff" />'
                                  +'     <param name="wmode" value="transparent" />'
				  +'     <param name="loop" value="true" />'
                                 +' <param name="FlashVars" value="path='+imagename+'" /> '
                                 +'     <embed FlashVars="path='+imagename+'" src="playerS.swf" wmode="transparent" quality="high" bgcolor="#ffffff" width="'+width+'" height="'+height+'" name="player" align="middle"allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'
                                 +'     </object>'
                                 +'</div>';
				
				 }
		if(type=='audio') {
	                	temp = '<div align="center" class="popupframeaudio">'
                                 +'     <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="0" height="0" id="434_player" align="middle">'
                                 +'     <param name="allowScriptAccess" value="sameDomain" />'
                                 +'     <param name="movie" value="playerA.swf" />'
                                 +'     <param name="quality" value="high" />'
                                 +'     <param name="bgcolor" value="#ffffff" />'
                                 +'     <param name="wmode" value="transparent" />'
                                 +' <param name="FlashVars" value="file='+imagename+'" /> '
                                 +'     <embed FlashVars="file='+imagename+'" src="playerA.swf" wmode="transparent" quality="high" bgcolor="#ffffff" width="0" height="0" name="player" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'
                                 +'     </object>'
			         + '<img class="popupaudioimage" src="/themes/indiefootage/images/' + catid + '.jpg" width="360" height="240">'
                                 +'</div>';
}


                   		newHTML += temp;

				  newHTML = newHTML + '</div>';
  
  				newHTML = newHTML + '</td><td width="50%" height="100%" style="padding-left: 10px;" align="left" valign="top">';
  				newHTML = newHTML + '<font color="#444444">';
  				newHTML = newHTML + '<b>DESCRIPTION:</b><br>';
  				if (description != ''){
  				newHTML = newHTML + '' +description+ '';
  				} else {
          newHTML = newHTML + 'You have not added a description for this file.  Please click the EDIT icon to add one.';
          }
  				newHTML = newHTML + '<br><br>';
  			  newHTML = newHTML + '<b>KEYWORDS:</b><br>';
  				if (keywords != ''){
  				newHTML = newHTML + '' +keywords+ '';
  				} else {
          newHTML = newHTML + 'You have not added any keywords for this file.  Please click the EDIT icon to add some keywords.';
          }
  				newHTML = newHTML + '<br><br>';
  						  newHTML = newHTML + '<b>CATEGORIES:</b><br>';
  				if (format != ''){
  				newHTML = newHTML + 'Main: ' +category+ '';
  				} else {
          newHTML = newHTML + 'IMPORTANT:  The primary category missing!  Click EDIT to repair.';
          }
  				newHTML = newHTML + '<br>';
 		 
  				if (subcat1 != '' || subcat2 != '' || subcat3 !=''){
  				newHTML = newHTML + 'Sub Category 1: ' +subcat1+ '<br>';
  				if (subcat2 != ''){
          newHTML = newHTML + 'Sub Category 2: ' +subcat2+ '<br>';
          } 
          if (subcat3 != ''){
  				newHTML = newHTML + 'Sub Category 3: ' +subcat3+ '';
  				 } 
  				newHTML = newHTML + '';
  				
  				} else {
          newHTML = newHTML + 'You have not added any sub-categories for this file. Please click the edit icon to add some sub-categories.';
          }
  				newHTML = newHTML + '<br><br>';
  				newHTML = newHTML + '</font>';
  				newHTML = newHTML + '</td></tr></table>';
  				newHTML = newHTML + '</div>';
  				newHTML = newHTML + '</div>';
  				
  				
  				
                	}
			
  				
  				}
  				


else if(ratingnumber == 'infolarge') {
		// change the display based on what was passed to us
			var newHTML = '<table border="0" width="678" cellpadding="3" cellspacing="3" bgcolor="#666666"><tr><td width="50%" valign="top">';

      		newHTML = newHTML + '<table class="thin" width="400">';
        	newHTML = newHTML + '<tr><td width="100%">';
          newHTML = newHTML + '<p align="center">';         

        	if (showthumb > 0){
                	if(type=='photo')
		        	newHTML = newHTML + '<div align="center" style="padding: 0px 0px 0px 0px;"><img src="' + imagename + '" border="0"></div>';
                	if(type=='video' || type=='ae') {
				
                    		 	temp = '<div align="center" class="popupframevideo">'
                                 +'     <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+width+'" height="'+height+'" id="434_player" align="middle">'
                                 +'     <param name="allowScriptAccess" value="sameDomain" />'
                                 +'     <param name="movie" value="playerS.swf" />'
                                 +'     <param name="quality" value="high" />'
                                  +'     <param name="bgcolor" value="#ffffff" />'
                                  +'     <param name="wmode" value="transparent" />'
				  +'     <param name="loop" value="true" />'
                                 +' <param name="FlashVars" value="path='+imagename+'" /> '
                                 +'     <embed FlashVars="path='+imagename+'" src="playerS.swf" wmode="transparent" quality="high" bgcolor="#ffffff" width="'+width+'" height="'+height+'" name="player" align="middle"allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'
                                 +'     </object>'
                                 +'</div>';
				
				
				 }
		if(type=='audio') {
                     		temp = '<div align="center" class="popupframeaudio">'
                                 +'     <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="0" height="0" id="434_player" align="middle">'
                                 +'     <param name="allowScriptAccess" value="sameDomain" />'
                                 +'     <param name="movie" value="playerA.swf" />'
                                 +'     <param name="quality" value="high" />'
                                 +'     <param name="bgcolor" value="#ffffff" />'
                                 +'     <param name="wmode" value="transparent" />'
                                 +' <param name="FlashVars" value="file='+imagename+'" /> '
                                 +'     <embed FlashVars="file='+imagename+'" src="playerA.swf" wmode="transparent" quality="high" bgcolor="#ffffff" width="0" height="0" name="player" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'
                                 +'     </object>'
			         + '<img class="popupaudioimage" src="/themes/indiefootage/images/' + catid + '.jpg" width="360" height="240">'
                                 +'</div>';
}


                   		newHTML += temp;

				  newHTML = newHTML + '</td></tr>';
        	newHTML = newHTML + '</table>';
  				newHTML = newHTML + '</td><td width="50%" height="100%" align="left" valign="top">';
  				newHTML = newHTML + '<font color="#F0F0F0">';
  				newHTML = newHTML + '<b>DESCRIPTION:</b><br>';
  				if (description != ''){
  				newHTML = newHTML + '' +description+ '';
  				} else {
          newHTML = newHTML + 'You have not added a description for this file.  Please click the EDIT icon to add one.';
          }
  				newHTML = newHTML + '<br><br>';
  			  newHTML = newHTML + '<b>KEYWORDS:</b><br>';
  				if (keywords != ''){
  				newHTML = newHTML + '' +keywords+ '';
  				} else {
          newHTML = newHTML + 'You have not added any keywords for this file.  Please click the EDIT icon to add some keywords.';
          }
  				newHTML = newHTML + '<br><br>';
  						  newHTML = newHTML + '<b>CATEGORIES:</b><br>';
  				if (format != ''){
  				newHTML = newHTML + 'Main: ' +category+ '';
  				} else {
          newHTML = newHTML + 'IMPORTANT:  The primary category missing!  Click EDIT to repair.';
          }
  				newHTML = newHTML + '<br>';
 		 
  				if (subcat1 != '' || subcat2 != '' || subcat3 !=''){
  				newHTML = newHTML + 'Sub Category 1: ' +subcat1+ '<br>';
  				if (subcat2 != ''){
          newHTML = newHTML + 'Sub Category 2: ' +subcat2+ '<br>';
          } 
          if (subcat3 != ''){
  				newHTML = newHTML + 'Sub Category 3: ' +subcat3+ '';
  				 } 
  				newHTML = newHTML + '';
  				
  				} else {
          newHTML = newHTML + 'You have not added any sub-categories for this file. Please click the edit icon to add some sub-categories.';
          }
  				newHTML = newHTML + '<br><br>';
  				newHTML = newHTML + '</font>';
  				newHTML = newHTML + '</td></tr></table>';
  				
  				
  				
  				
  				
                	}
			
  				
  				}



	
  	else if(ratingnumber == 'notes') {
		// change the display based on what was passed to us
			var newHTML = '<table border="0" width="200" cellpadding="3" cellspacing="3" bgcolor="#666666"><tr><td width="100%" valign="top">';

      		newHTML = newHTML + '<table class="thin" width="222">';
        	newHTML = newHTML + '<tr><td width="100%">';
          newHTML = newHTML + '<p align="left"><b>REVIEWER NOTES:</b><br>' + description + '</p>';



				  newHTML = newHTML + '</td></tr>';
        	newHTML = newHTML + '</table>';
  				newHTML = newHTML + '</td>';
  				newHTML = newHTML + '</tr></table>';
  				
  				
  				
  				
  				
                	}              	
                	

	
	else if(copyright != '' || category != '') {  

		if (height > 0){
                	currentimageheight = height;
        	}
	var newHTML = '<div class="popupframe">';
	newHTML = newHTML + '<div class="popupinnerframe">';
        	if (showthumb > 0){
                	if(type=='photo')
		        	newHTML = newHTML + '<div align="center" style="padding: 0px 0px 0px 0px;"><img src="' + imagename + '" border="0"></div>';
                	if(type=='video') {
				 	temp = '<div align="center" class="popupframevideo">'
                                 +'     <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+width+'" height="'+height+'" id="434_player" align="middle">'
                                 +'     <param name="allowScriptAccess" value="sameDomain" />'
                                 +'     <param name="movie" value="playerS.swf" />'
                                 +'     <param name="quality" value="high" />'
                                  +'     <param name="bgcolor" value="#ffffff" />'
                                  +'     <param name="wmode" value="transparent" />'
				  +'     <param name="loop" value="true" />'
                                 +' <param name="FlashVars" value="path='+imagename+'" /> '
                                 +'     <embed FlashVars="path='+imagename+'" src="playerS.swf" wmode="transparent" quality="high" bgcolor="#ffffff" width="'+width+'" height="'+height+'" name="player" align="middle"allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'
                                 +'     </object>'
                                 +'</div>';


                   		newHTML += temp;
				
				if(width > 350) {
				fontsize = '14';	
					
				} else {
					
				fontsize = '11';	
				}
				
		                  				newHTML = newHTML + '<div style="width: '+width+'px; margin-top: 5px;">';
	                      	newHTML = newHTML + '<div class="popupinfoleft" style="font-family: tahoma, arial, helvetica; font-size: '+fontsize+'px; text-transform: capitalize; width: '+width/2+'px; float: left;">'+title+'<br>';
	                      	//newHTML = newHTML + '<font face="Tahoma" size="1">&#169;' +copyright+ '</font>';
	                      	newHTML = newHTML + '</div>';
	                      	newHTML = newHTML + '<div class="popupinforight" style="text-align: right; width: '+width/2+'px; float: right;">';
  				newHTML = newHTML + '<font face="Tahoma" size="1">' +category+ '<br>Native Format:'+format+'</font>';
  				newHTML = newHTML + '<br><font face="Tahoma" size="1">' +loprice+ '</font></div><div style="clear:both;"></div>';
  				newHTML = newHTML + '</div></div></div>';
				

                	}
			if(type=='audio') {
				temp = '<div align="center" class="popupframeaudio">'
                                 +'     <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="1" height="1" id="434_player" align="middle">'
                                 +'     <param name="allowScriptAccess" value="sameDomain" />'
                                 +'     <param name="movie" value="playerA.swf" />'
                                 +'     <param name="quality" value="high" />'
                                 +'     <param name="bgcolor" value="#ffffff" />'
                                 +'     <param name="wmode" value="transparent" />'
                                 +' <param name="FlashVars" value="file='+imagename+'" /> '
                                 +'     <embed FlashVars="file='+imagename+'" src="playerA.swf" wmode="transparent" quality="high" bgcolor="#ffffff" width="1" height="1" name="player" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'
                                 +'     </object>'
			         + '<img class="popupaudioimage" src="/themes/indiefootage/images/' + catid + '.jpg" width="360" height="240">'
                                 +'</div>';              


                   newHTML += temp;

                         				newHTML = newHTML + '<div style="width: 360px; margin-top: 5px;">';
	                      	newHTML = newHTML + '<div class="popupinfoleft" style="font-family: tahoma, arial, helvetica; width: '+360/2+'px; float: left;">'+title+'<br>';
	                      	//newHTML = newHTML + '<font face="Tahoma" size="1">&#169;' +copyright+ '</font>';
	                      	newHTML = newHTML + '</div>';
	                      	newHTML = newHTML + '<div class="popupinforight" style="text-align: right; width: '+360/2+'px; float: right;">';
  				newHTML = newHTML + '<font face="Tahoma" size="1">' +category+ '<br>Native Format:'+format+'</font>';
  				//newHTML = newHTML + '<br><font face="Tahoma" size="1">' +loprice+ '</font>';
  				newHTML = newHTML +  '</div><div style="clear:both;"></div>';
				newHTML = newHTML + '</div></div></div>';




                	}
        	}
	}
	else {
        	newHTML = '<table width="222" cellpadding="0" cellspacing="0" border="0" style="border:0px solid #000000;"><tr><td width="0%">';
		if (showthumb > 0){
                	if(type=='photo')
                	newHTML = newHTML + '<div align="center" style="padding: 0px 0px 0px 0px;"><img src="' + imagename + '" border="0"></div>';
                	if(type=='video' || type=='ae') {
					 	temp = '<div align="center" style="padding: 0px 0px 0px 0px; background-color: white; background-image: URL("/themes/indiefootage/images/ajax-loader.gif")">'
                                 +'     <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+width+'" height="'+height+'" id="434_player" align="middle">'
                                 +'     <param name="allowScriptAccess" value="sameDomain" />'
                                 +'     <param name="movie" value="playerS.swf" />'
                                 +'     <param name="quality" value="high" />'
                                 +'     <param name="bgcolor" value="#000000" />'
                                 +' <param name="FlashVars" value="path='+imagename+'" /> '
                                 +'     <embed FlashVars="path='+imagename+'" src="playerS.swf" quality="high" bgcolor="#000000" width="'+width+'" height="'+height+'" name="player" align="middle"allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />'
                                 +'     </object>'
                                 +'</div>'; 

                   		newHTML += temp;

				newHTML = newHTML + '</td><td width="100%" valign="top" style="font-family:Verdana; font-size:12px;">';
        			newHTML = newHTML + '<div style="padding: 0px; background-color: #000000;">';


                	}

                	if(type=='audio') {
				 temp = '<div align="center" style="padding: 0px 0px 0px 0px; width:266px;height:177px;" class="player">'
                        + '</div>';

                   		newHTML += temp;
        			newHTML = newHTML + '<div style="padding: 0px; background-color: #000000;">';

                	}
        	}




        	newHTML = newHTML + '</div></td></tr></table>';
	}

        gettrailobjnostyle().innerHTML = newHTML;

        if(type=='audio') {
		
$f("div.player", "/flowplayer.commercial-3.2.7.swf", {
           		key: '$91a49734961719e9aff',

    // first entry in the playlist works as splash and second entry is the audio file
    playlist: ['http://www.revostock.com/themes/indiefootage/images/' + catid + 'medium.jpg', imagename],
                                onLoad: function () {
               this.setVolume(75);
},
    			// fullscreen button not needed here
    			plugins: {
 
    			
    			
        			controls: null
    			},
    			clip: {
        			autoPlay: true
       

       
       
    			}

		});
	}
	else {
flowplayer("a.player", "/flowplayer.commercial-3.2.7.swf", {
           		key: '$91a49734961719e9aff',

        		clip: {
            			autoPlay: true,
            			autoBuffering: true,
            			onBeforeFinish: function() {
                			// returning false prevents the default
                			// behavior associated with this event --->
                			// it will loop instead of stop at finish
                			return false;
            			}
          		},
        		logo: {
            			opacity: 0
        		},

        		canvas: {backgroundColor: "#48494b"},

			plugins: {
 				controls: null
			}
        	});
	}



        gettrailobj().visibility="visible";

}



function watermark(watermark){

        mouseOffset = 0;
        playerMouseOffset = mouseOffset;
        document.onmousemove=followmouse;



		// change the display based on what was passed to us
	


   var newHTML = '<div align="left">';
   newHTML = newHTML + '<p><img src="'+ watermark + '" width="800"></p>';
newHTML = newHTML + '</div>';


	

        gettrailobjnostyle().innerHTML = newHTML;

        gettrailobj().visibility="visible";

}









function showtrailhelp(helpnotes){

        mouseOffset = 0;
        playerMouseOffset = mouseOffset;
        document.onmousemove=followmouse2;

      

		// change the display based on what was passed to us
	


   var newHTML = '<div align="left">';
   newHTML = newHTML + '<table border="0" width="287" cellspacing="0" cellpadding="0" height="46">';
    newHTML = newHTML + '<tr>';
    newHTML = newHTML + '<td width="100%" height="4"><img border="0" src="http://www.revostock.com/themes/indiefootage/images/bubbletop.png" width="287" height="35"></td>';
    newHTML = newHTML + '</tr>';
    newHTML = newHTML + '<tr>';
      newHTML = newHTML + '<td width="100%" height="21"  style="padding: 0px 13px 0px 16px; word-wrap: break-word; overflow: hidden;" background="http://www.revostock.com/themes/indiefootage/images/bubblemiddle.png"><font face="Tahoma" size="1">' + helpnotes + '</font></td>';
    newHTML = newHTML + '</tr>';
    newHTML = newHTML + '<tr>';
      newHTML = newHTML + '<td width="100%" height="19"><img border="0" src="http://www.revostock.com/themes/indiefootage/images/bubblebottom.png" width="287" height="19"></td>';
    newHTML = newHTML + '</tr>';
  newHTML = newHTML + '</table>';
newHTML = newHTML + '</div>';


	

        gettrailobjnostyle().innerHTML = newHTML;

        gettrailobj().visibility="visible";

}


function showtrailencode(image){

        mouseOffset = 0;
        playerMouseOffset = mouseOffset;
        document.onmousemove=followmouse2;

      

		// change the display based on what was passed to us
	


   var newHTML = '<div align="center">';
   newHTML = newHTML + '<div style="padding: 10px; background-color: #ffffff; border: solid 1px #E4E4E4;"';
    newHTML = newHTML + '<img src="/themes/indiefootage/images/' + image + '">';
newHTML = newHTML + '</div>';


	

        gettrailobjnostyle().innerHTML = newHTML;

        gettrailobj().visibility="visible";

}



function hidetrail(){
	var foo = gettrailobj();
	if(foo) {
		foo.visibility = "hidden";
	}
	//gettrailobj().visibility="hidden";
	foo = gettrailobjnostyle();
	if(foo) {
		foo.innerHTML = "";
	}
	//gettrailobjnostyle().innerHTML=""
	document.onmousemove=""
	foo = gettrailobj();
	if(foo) {
		foo.left="-500px";
	}
	//gettrailobj().left="-500px"

}
function followmouse(e){
var currentimageheight = 270;   // maximum image size.
        if (typeof playerMouseOffset == 'undefined' ) {
                playerMouseOffset = 0;
        }

        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(document.body.offsetHeight, window.innerHeight)
        //if (document.all){
        //      gettrailobjnostyle().innerHTML = 'A = ' + truebody().scrollHeight + '<br>B = ' + truebody().clientHeight;
        //} else {
        //      gettrailobjnostyle().innerHTML = 'C = ' + document.body.offsetHeight + '<br>D = ' + window.innerHeight;
        //}

        if (typeof e != "undefined"){
                if (docwidth - e.pageX < 300){
                        xcoord = e.pageX - xcoord - 286; // Move to the left side of the cursor
                } else {
                        xcoord += e.pageX;
                }
                if (docheight - e.pageY < (currentimageheight + 110)){
			// bug fix by Marc Swanson.  Safari would show the popup off the screen on widescreen pages.
			// removed the e.PageY from the subtraction in the calc.
                        //ycoord += e.pageY - Math.max(0,(110 + currentimageheight + e.pageY - docheight - truebody().scrollTop));
                        ycoord += e.pageY - Math.max(0,(110 + currentimageheight - docheight - truebody().scrollTop));
                } else {
                        ycoord += e.pageY;
                }

        } else if (typeof window.event != "undefined"){
                if (docwidth - event.clientX < 300){
                        xcoord = event.clientX + truebody().scrollLeft - xcoord - 300; // Move to the left side of the cursor
                } else {
                        xcoord += truebody().scrollLeft+event.clientX
                }
                if (docheight - event.clientY < (currentimageheight + 110)){
                        ycoord += event.clientY + truebody().scrollTop - Math.max(0,(110 + currentimageheight + event.clientY - docheight));
                } else {
                        ycoord += truebody().scrollTop + event.clientY;
                }
        }

        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)
        ycoord -= playerMouseOffset;

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

}

function followmouse2(e){
	if (typeof playerMouseOffset == 'undefined' ) {
                playerMouseOffset = 0;
        }

        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.max(truebody().scrollHeight, truebody().clientHeight) : Math.max(document.body.offsetHeight, window.innerHeight)
        //if (document.all){
        //      gettrailobjnostyle().innerHTML = 'A = ' + truebody().scrollHeight + '<br>B = ' + truebody().clientHeight;
        //} else {
        //      gettrailobjnostyle().innerHTML = 'C = ' + document.body.offsetHeight + '<br>D = ' + window.innerHeight;
        //}

        if (typeof e != "undefined"){
                if (docwidth - e.pageX < 300){
                        xcoord = e.pageX - xcoord - 0; // Move to the left side of the cursor
                } else {
                        xcoord += e.pageX;
                }
		if (docheight - e.pageY < (currentimageheight + 110)){
                        // bug fix by Marc Swanson.  Safari would show the popup off the screen on widescreen pages.
                        // removed the e.PageY from the subtraction in the calc.
                        //ycoord += e.pageY - Math.max(0,(110 + currentimageheight + e.pageY - docheight - truebody().scrollTop));
                        ycoord += e.pageY - Math.max(0,(110 + currentimageheight - docheight - truebody().scrollTop));
                } else {
                        ycoord += e.pageY;
                }

        } else if (typeof window.event != "undefined"){
                if (docwidth - event.clientX < 300){
                        xcoord = event.clientX + truebody().scrollLeft - xcoord - 0; // Move to the left side of the cursor
                } else {
                        xcoord += truebody().scrollLeft+event.clientX
                }
                if (docheight - event.clientY < (currentimageheight + 0)){
                        ycoord += event.clientY + truebody().scrollTop - Math.max(0,(0 + currentimageheight + event.clientY - docheight));
                } else {
                        ycoord += truebody().scrollTop + event.clientY;
                }
        }


        ycoord -= playerMouseOffset;

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

}

// call hidetrail once just to init things
// this prevents the first video from showing in the upper left momentarily in IE
hidetrail();

