﻿var Coordx = 0;
var Coordy = 0;
e=window.event;
function mousex(e){
  if(document.layers) {return e.x;}
  else {return event.clientX;}
  }
function mousey(e){
  if(document.layers) {return event.y;}
  else {return event.clientY;}
  }
function coord(e){
Coordx = mousex();
Coordy = mousey();
}
function DynPopupImage(image, titre, commentaire) {
	 var largeurpopup=240;
	 var hauteurpopup=180;
	 var top=Coordy+(hauteurpopup/8);
	 var left=Coordx-(largeurpopup/2);
	 var nomimage=arguments[0];
	 if (nomimage.substring(13,22)!="imagevide") {
	 	 ObjWindow = window.open("","","top="+top+",left="+left+",width="+largeurpopup+",height="+hauteurpopup+",toolbar=no,scrollbars=no,resizable=no");
	 	 ObjWindow.document.write("<html><head><title>"+titre+"</title></head>");
	 	 ObjWindow.document.write("<body onload='window.focus()' onblur='window.close()' onclick='window.close()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0>");
		 ObjWindow.document.write("<table width='100%' border='0' cellspacing='0' cellpadding='0' height='100%'><tr><td valign='middle' align='center'>");
		 ObjWindow.document.write("<img src='"+image+"' width='"+largeurpopup+"' height='"+hauteurpopup+"' border='0' alt='"+commentaire+"' title='"+commentaire+"'>");
		 ObjWindow.document.write("</td></tr></table></body></html>");
		 ObjWindow.document.close();
	 }
}
function slideshow1() {
	if (document.photo1.filters) photo1.filters.blendTrans.Apply(); 
	document.photo1.src="images_biens/cdcD.jpg";
	if (document.photo1.filters) photo1.filters.blendTrans.Play();
	setTimeout("slideshow2()", 2000);
}
function slideshow2() {
	if (document.photo2.filters) photo2.filters.blendTrans.Apply(); 
	document.photo2.src="images_biens/cdcE.jpg";
	if (document.photo2.filters) photo2.filters.blendTrans.Play();
	setTimeout("slideshow3()", 2000);
}
function slideshow3() {
	if (document.photo3.filters) photo3.filters.blendTrans.Apply(); 
	document.photo3.src="images_biens/cdcF.jpg";
	if (document.photo3.filters) photo3.filters.blendTrans.Play();
	setTimeout("slideshow4()", 2000);
}
function slideshow4() {
	if (document.photo1.filters) photo1.filters.blendTrans.Apply(); 
	document.photo1.src="images_biens/cdcA.jpg";
	if (document.photo1.filters) photo1.filters.blendTrans.Play();
	setTimeout("slideshow5()", 2000);
}
function slideshow5() {
	if (document.photo2.filters) photo2.filters.blendTrans.Apply(); 
	document.photo2.src="images_biens/cdcB.jpg";
	if (document.photo2.filters) photo2.filters.blendTrans.Play();
	setTimeout("slideshow6()", 2000);
}
function slideshow6() {
	if (document.photo3.filters) photo3.filters.blendTrans.Apply(); 
	document.photo3.src="images_biens/cdcC.jpg";
	if (document.photo3.filters) photo3.filters.blendTrans.Play();
	setTimeout("slideshow1()", 2000);
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
