function getText()
{

}
 
this.screenshotPreview = function(){	

	/* CONFIG */		
	xOffset = 100;
	yOffset = 100;
	/* END CONFIG */

	$("a.screenshot").hover(function(e){
		this.t = this.title;
		this.title = "";
  		numLigne = getNumLigne(this.id);
 		numColonne = getNumColonne(this.id);
 		positionCSS = new Array();
 		positionCSS = calculerCSSPosition(numLigne,numColonne);
 		positionCSS1 = positionCSS[0];
                positionCSS2 = positionCSS[1];
		var c = (this.t != "") ? "<br/>" + this.t : "";
		$("body").append("<p id='screenshot'><img src='"+ this.rel +"' alt='url preview' />"+ c +"</p>");
  		$("#screenshot")
  			.css(positionCSS1[0],(positionCSS1[1]) + "px")
  			.css(positionCSS2[0],(positionCSS2[1]) + "px")
  			.fadeIn("fast");

    },
	function(){
		this.title = this.t;	
		$("#screenshot").remove();
    });	
	$("a.screenshot").mousemove(function(e){
            	numLigne = getNumLigne(this.id);
 		numColonne = getNumColonne(this.id);
 		positionCSS = new Array();
 		positionCSS = calculerCSSPosition(numLigne,numColonne);
 		positionCSS1 = positionCSS[0];
                positionCSS2 = positionCSS[1];
		$("#screenshot")
  			.css(positionCSS1[0],(positionCSS1[1]) + "px")
  			.css(positionCSS2[0],(positionCSS2[1]) + "px");
	});
};


// starting the script on page load
$(document).ready(function(){
	screenshotPreview();
});
//----------------------------------------------------
// Fonction pour récupérer le numéro de ligne
//----------------------------------------------------
function getNumColonne(str)
{
var tabTemp = new Array();
tabTemp = str.split("_");
return(tabTemp[1]);
}
//----------------------------------------------------
// Fonction pour récupérer le numéro de ligne
//----------------------------------------------------
function getNumLigne(str)
{
var tabTemp = new Array();
tabTemp = str.split("_");
return(tabTemp[1]);
}
//----------------------------------------------------
// Fonction pour calculer la position de la grande
// image en fonction du numéro de ligne et de colonne
// Renvoie un tableau de taille 2 (top, left & right)
//----------------------------------------------------
function calculerCSSPosition(numLigne,numColonne)
{
var tabTemp = new Array();
if(numColonne==1)
  { tabTemp[0] = new Array("top","10");
    tabTemp[1] = new Array("right","10"); }
if(numColonne==2)
  { tabTemp[0] = new Array("top","10");
    tabTemp[1] = new Array("right","10"); }
if(numColonne==3)
  { tabTemp[0] = new Array("top","10");
    tabTemp[1] = new Array("left","10"); }
if(numColonne==4)
  { tabTemp[0] = new Array("top","10");
    tabTemp[1] = new Array("left","10"); }
if(numColonne==5)
  { tabTemp[0] = new Array("top","10");
    tabTemp[1] = new Array("left","10"); }
return(tabTemp);
}
