function popImage(xUrl,xW,xH) {

	//--- Largeur max
	var maxWidth = 640;

	//--- Dimensions réelles
	var h = xH;
	var w = xW;
	
	//--- Ramener à la largeur max et proportion de hauteur
	if (w>maxWidth) {
	  coeff = w/maxWidth;
		w = maxWidth;
		h = parseInt(h/coeff,10);
	}

	//--- Position du DIV
	var Ecran_larg = screen.width;                                              // Largeur de l'écran
	var Ecran_haut = screen.height;                                             // Hauteur de l'écran
	var sTop  = document.body.scrollTop;																				// Hauteur de défilement de l'élément parent
	var sLeft = document.body.scrollLeft;																				// Largeur de défilement de l'élément parent
	var posX = (Ecran_larg/2)-(w/2)+sLeft-30;																		// Calcul de la position en X
	var posY = (Ecran_haut/2)-(h/2)+sTop;																				// Calcul de la position en Y
	document.getElementById('aff_photo').style.top = posY+"px";
	document.getElementById('aff_photo').style.left = posX+"px";
	document.getElementById('aff_photo').style.width = w+"px";
	document.getElementById('aff_photo').style.height = h+"px";
	document.getElementById('aff_photo').style.filter = 'progid:DXImageTransform.Microsoft.Shadow(color=#000000,direction=135,strength=6)';

	//--- Remplir le champ image
	document.getElementById('aff_photo').innerHTML = "<img src='"+xUrl+"' width='"+w+"' height='"+h+"' onclick='cacheImage();'>";
	document.getElementById('aff_photo').style.visibility = 'visible';
}

//--- MASQUER LA PHOTO
function cacheImage() {
	document.getElementById('aff_photo').style.visibility = 'hidden';
}

//--- AFFICHER LE DESCRIPTIF DU BIEN
function aff_description(xId) {
	var idbien = 'description'+xId;
	var etat = document.getElementById(idbien).style.visibility;
	if (etat == 'visible') {
		document.getElementById(idbien).style.visibility = 'hidden';
		document.getElementById(idbien).style.display = 'none';
	} else {
		document.getElementById(idbien).style.visibility = 'visible';
		document.getElementById(idbien).style.display = 'block';
	}
}

//--- AFFICHER LA VIDEO
function popVideo(nom) {
x = open(nom,'','toolbar=0,location=0,directories=0,menuBar=0,scrollbars=1,resizable=0,width=620,height=500,left=10,top=10');
}


function detail_bien(nom) {
	x = open(nom,'','toolbar=0,location=0,directories=0,menuBar=0,scrollbars=1,resizable=0,width=760,height=570,left=10,top=10');
}

function bookmarksite(title,url){
if (window.sidebar) // firefox
window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
var elem = document.createElement('a');
elem.setAttribute('href',url);
elem.setAttribute('title',title);
elem.setAttribute('rel','sidebar');
elem.click();
}
else if(document.all)// ie
window.external.AddFavorite(url, title);
}

function aff_copyright(xSoc) {
	var maintenant = new Date();
	var xannee = maintenant.getFullYear();
	document.write("&copy; "+xannee+" - Reproduction et diffusion interdite - "+xSoc);
}
