
function photosContener(name,ptop,pleft,pwidth,pheight,content){
	this.name = name;
	this.ptop=ptop;
	this.pleft=pleft;
	this.pwidth=pwidth;
	this.content=content;
	this.pheight=pheight;
	this.div;
	this.lefdecale;

	//====================================//
	//		Declaration Methods 		  //
	//====================================//
	this.getdiv=getdiv;
	this.creerzone=creerzone;
	this.getleftpos = getleftpos;
	this.gettoppos = gettoppos;
	// init
	this.gettoppos();
	this.getleftpos();
	this.creerzone();
	this.getdiv();
 
}
function gettoppos(){
    var y = screen.height;
	var ptop = parseInt(this.ptop);
	
}
function getleftpos(){
    var x = screen.width;
	var pleft = parseInt(this.pleft);
}

function getdiv(){

	if(document.getElementById){
		this.div = document.getElementById(this.name);
	} else if (document.all){
		this.div = document.all[name];
	} else if (document.layers){
		this.div = document.layers[name];
	}//fin if

}

function creerzone(){

	if(document.getElementById || document.all){
		//Conteneur
		document.write('<div id="conteneur'+this.name+'" style="position:absolute;overflow:hidden;left:'+this.pleft+'px; top:'+this.ptop+'px;width:'+this.pwidth+'px;height:'+this.pheight+'px;">');
		//1er bandeau de message
		document.write('<div id="'+this.name+'" style=position:absolute;left:0px; top:0 px;height:'+this.pheight+'px; width:'+this.pwidth+'px; z-index:1O;">');
		document.write('<div>');
		document.write(this.content);
		document.write('<\/div>');
		document.write('<\/div>');		
		document.write('<\/div>');
	} else if(document.layers){
		document.write('<ilayer name="'+this.name+'" bgcolor="#'+this.Bg+'" width="'+this.pwidth+'" height="'+this.pheight+'">'+this.content+'<\/ilayer>');
		return;
	}

}//fin createLayer
function precharge_image(url,nom)
{
 var source = url+nom;
  var image = new Image();
  image.src = source;
 return image;
}
function openbox(imageobj,url,nom,l_pos_gauche)
{
//pré chargement de l'image
	var source = url+nom;
    var p = document.getElementById("photo");
	var monimage =  imageobj;
// image chargée

	var hauteur = monimage.width;
	var largeur = monimage.height;
//	alert ('largeur = '+ monimage.width +'; hauteur ='+ monimage.height);
	var x = screen.width;
	var lpos = (x / 2);
	var y = screen.height;
	var tpos = (y / 2);
	var pos_gauche = l_pos_gauche;
	p.style.visibility = "visible";


	// 132 = hauteur de la bande du haut avec le menu
	// 203 = hauteur/2 du corp de la page
	// 169 = largeur de la bande de gauche

	p.style.top = 132 + 203 - (parseInt(hauteur)/2) +"px";
	p.style.left = 169 + pos_gauche - (parseInt(largeur)/2) + "px";
	p.innerHTML = "<img id=\'"+ nom +"\' src=" + source + " />";
	p.style.display='block';
	p.style.position = "absolute";
	p.style.border = "5px";
	p.style.borderColor = "#000000";
	p.style.visibility ='visible';
	p.style.padding="0";

}
function closebox()
{
   document.getElementById('photo').style.display='none';
//   document.getElementById('filter').style.display='none';
}

