	
	 w=1;
	 h=1;

	chaine= navigator.userAgent;
	reg=new RegExp("(IE 8)", "g");
	quelie = chaine.match (reg);

	if (document.getElementById || document.all) {
		if (navigator.appName == 'Netscape' ) {
			document.write('<div id="trailimageid" style=" border:3px solid #458; position:absolute; width:110px; height:110px; overflow:hidden; z-index=1100 !important;visibility:hidden;border:1px solid #B9CC00;background:#FFF;text-align:center;"><iframe src="" style="height: 110px; width: 110px; overflow:visible;" id="ttimg">Titre</iframe></div>');
		}
		else { 
			
			if (navigator.appName == 'Microsoft Internet Explorer' ) {
			
				if (quelie == "IE 8") {
				document.write('<div id="trailimageid" style=" border:3px solid #458; position:absolute; width:110px; height:110px; overflow:hidden; z-index=1100 !important;visibility:hidden;border:1px solid #B9CC00;background:#FFF;text-align:center;"><iframe src="" style="height: 130px; width: 130px; overflow:visible;" id="ttimg">Titre</iframe></div>'); 				
				} else {
				document.write('<div id="trailimageid" style=" border:3px solid #458; position:absolute; width:110px; height:110px; overflow:hidden; z-index=1100 !important;visibility:hidden;border:1px solid #B9CC00;background:#FFF;text-align:center;"><iframe src="" style="height: 130px; width: 130px; overflow:visible;" id="ttimg">Titre</iframe></div>');
				}
				
			}	
			
			else {
				document.write('<div id="trailimageid" style=" border:3px solid #458; position:absolute; width:110px; height:110px; overflow:hidden; z-index=1100 !important;visibility:hidden;border:1px solid #B9CC00;background:#FFF;text-align:center;"><iframe src="" style="height: 110px; width: 110px; overflow:visible;" id="ttimg">Titre</iframe></div>');
			}
		}
	}
	
	function gettrailobj()
	{
		if (document.getElementById) return document.getElementById("trailimageid").style
		else if (document.all) return document.all.trailimagid.style
	}
	
	function truebody()
	{
		return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
	}
	
$(document).ready(function() {
						   
	$('#trailimageid').mouseout( function()  {
		gettrailobj().visibility="hidden"
	});
	
	$('.videapp').mouseover( function()  {
		$('#trailimageid').show();
	});

}); 	
	
function showtrail(width,height,file,docspip)

	{
		
		overdocspip = '#over' + docspip
		pos = $(overdocspip).findPos();
		vraix = pos.x;
		vraiy = pos.y;
		
		
		/* Detection d' IE */
		if (navigator.appName == 'Microsoft Internet Explorer' ) {
		
			chaine= navigator.userAgent;
			reg=new RegExp("(IE 8)", "g");
			quelie = chaine.match (reg);
			
			if (quelie == "IE 8") {
				vraix = pos.x ;
				vraiy = pos.y ;
			} else {
				vraix = pos.x + -110 ;
				vraiy = pos.y +60 ;
			}
		
		} else {
			if ( navigator.appName != 'Netscape' ) {
				vraix = pos.x + -120 ;
				vraiy = pos.y +60 ;
			} 
		}
		
		document.getElementById('ttimg').src = file ;
		exacty = vraiy - width;
		exactx = vraix - height;
		gettrailobj().left=exactx+"px";
		gettrailobj().top=exacty+"px";
		gettrailobj().visibility="visible";
	}
	
	
jQuery.fn.extend ({
   findPos : function() {
		   obj = $(this).get(0);
		 curleft = obj.offsetLeft || 0;
		 curtop = obj.offsetTop || 0;
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
			}
		return {x:curleft,y:curtop};
   }
});
	

