function Recommander() {

	//alert('Cette fonction permettra d\'envoyer l\'adresse du site ŕ une ou plusieurs personnes');

	var lien = "http://www.touraine-immo.com/popup_recommander.php";

	var window2=window.open(lien,"Recommander",'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=550,height=270,top=0,left=0');



}

function Recommander_En() {

	//alert('Cette fonction permettra d\'envoyer l\'adresse du site ŕ une ou plusieurs personnes');

	var lien = "http://www.touraine-immo.com/english/popup_recommander.php";

	var window2=window.open(lien,"Recommend",'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=550,height=270,top=0,left=0');



}



function Choix_Agence() {

	index = document.form1.chx_agence.selectedIndex; 

	agence = document.form1.chx_agence.options[index].value;

	if (agence =="0") agence = "presentation.php";

	location.href= "http://www.touraine-immo.com/"+agence;

}

function Choix_Agence_En() {

	index = document.form1.chx_agence.selectedIndex; 

	agence = document.form1.chx_agence.options[index].value;

	if (agence =="0") agence = "presentation.php";

	location.href= "http://www.touraine-immo.com/english/"+agence;

}



function ChangeMessage(message,champ)

  {

  if(document.getElementById)

    document.getElementById(champ).innerHTML = message;

  }





function Diaporama() {

	hauteur = 360;

	largeur = 385;

	var top=(screen.height-hauteur)/2;

	var left=(screen.width-largeur)/2;

	window.open("diapo.html","Diaporama","top="+top+",left="+left+",width="+largeur+",height="+hauteur+",toolbar=no,resizable=yes,scrollbars=yes");

}

function Diaporama2() {

	hauteur = 360;

	largeur = 385;

	var top=(screen.height-hauteur)/2;

	var left=(screen.width-largeur)/2;

	window.open("../diapo.html","Diaporama","top="+top+",left="+left+",width="+largeur+",height="+hauteur+",toolbar=no,resizable=yes,scrollbars=yes");

}



function GrandePhoto(titre,photo,W,H) {

  //newin.close();

  

  myWin=open("","newin","width="+W+",height="+H+",resizable=0,scrollbars=0,status=0");

  myWin.document.open();

  if (myWin.blur) myWin.focus();

  myWin.resizeTo(W+12,H+27);

  myWin.document.write('<html><head><title>'+titre+'</title></head><body BGCOLOR="#ffffff" marginwidth="0" marginheight="0" topmargin="0" leftmargin="0">');

  myWin.document.write('<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0"><tr><td>');

  myWin.document.write('<IMG SRC="'+photo+'" WIDTH="'+W+'" HEIGHT="'+H+'" BORDER="0">');

  myWin.document.write("</table></tr></td>");

  myWin.document.write('<script type="text/javascript">var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");document.write(unescape("%3Cscript src=\'" + gaJsHost + "google-analytics.com/ga.js\' type=\'text/javascript\'%3E%3C/script%3E"));</script><script type="text/javascript">var pageTracker = _gat._getTracker("UA-4243821-10");pageTracker._trackPageview();</script></body></html>');

  myWin.document.close();  

}



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];}

}





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;

}



/*

var a =0;

function defilimg() {

	lien1 = '<a href="http://www.touraineimmo.com/ag_montrichard.php"><img src="http://www.touraine-immo.com/images/header/ph1.jpg" width="108" height="71" border="0" alt="Agence de Montrichard"></a>';

	lien2 = '<a href="http://www.touraineimmo.com/ag_blere.php"><img src="http://www.touraine-immo.com/images/header/ph2.jpg" width="108" height="71" border="0" alt="Agence de Bléré"></a>';

	lien3 = '<a href="http://www.touraineimmo.com/ag_amboise.php"><img src="http://www.touraine-immo.com/images/header/ph3.jpg" width="108" height="71" border="0" alt="Agence de Amboise"></a>';		

	if (a == 3) {

		a = 0;

	}



		tempo3 = setTimeout("defilimg()",3500);

		//if (prems == false) {

			if (a == 0) {

				ChangeMessage(lien1,'ejs_photo');

				//ChangeMessage(lien1,'ejs_info');

			}

			if (a == 1) {

				ChangeMessage(lien2,'ejs_photo');

				//ChangeMessage(lien2,'ejs_info');

			}

			if (a == 2) {

				ChangeMessage(lien3,'ejs_photo');

				//ChangeMessage(lien3,'ejs_info');

			}

			a++;	

}

*/

imgPath = new Array;

SiClickGoTo = new Array;

SiClickGoTo_En = new Array;

version = navigator.appVersion.substring(0,1);

if (version >= 3)

	{

	i0 = new Image;

	i0.src = "http://www.touraine-immo.com/images/header/ph1.jpg";

	SiClickGoTo[0] = "http://www.touraineimmo.com/ag_montrichard.php";

	//SiClickGoTo[0] = "http://www.voila.fr";

	SiClickGoTo_En[0] = "http://www.touraineimmo.com/english/ag_montrichard.php";

	imgPath[0] = i0.src;

	i1 = new Image;

	i1.src = "http://www.touraine-immo.com/images/header/ph2.jpg";

	SiClickGoTo[1] = "http://www.touraineimmo.com/ag_blere.php";

	//SiClickGoTo[1] = "http://www.voila.fr";

	SiClickGoTo_En[1] = "http://www.touraineimmo.com/english/ag_blere.php";

	imgPath[1] = i1.src;

	i2 = new Image;

	i2.src = "http://www.touraine-immo.com/images/header/ph3.jpg";

	SiClickGoTo[2] = "http://www.touraineimmo.com/ag_amboise.php";

	//SiClickGoTo[2] = "http://www.voila.fr";

	SiClickGoTo_En[2] = "http://www.touraineimmo.com/english/ag_amboise.php";

	imgPath[2] = i2.src;	

	}

a = 0;



function defilimg()



	{

	

	if (version >= 3)

		{

		document.write('<A HREF="#" onClick="ImgDest();return(false)"><IMG SRC="http://www.touraine-immo.com/images/header/ph1.jpg" BORDER=0 ALT="Nos agences" NAME=defil></A>');

		defilimg2()

		}

	else

		{

		document.write('<A HREF="http://www.touraineimmo.com/ag_montrichard.php"><IMG SRC="http://www.touraine-immo.com/images/header/ph1.jpg" BORDER=0></A>')

		}

		

	}

	

function defilimg_en()

	{

	if (version >= 3)

		{

		document.write('<A HREF="#" onClick="ImgDest_En();return(false)"><IMG SRC="http://www.touraine-immo.com/images/header/ph1.jpg" BORDER=0 ALT="Our agencies" NAME=defil></A>');

		defilimg2()

		}

	else

		{

		document.write('<A HREF="http://www.touraineimmo.com/ag_montrichard.php"><IMG SRC="http://www.touraine-immo.com/images/header/ph1.jpg" BORDER=0></A>')

		}

	}

function ImgDest()

	{

	document.location.href = SiClickGoTo[a-1];

	}		

function ImgDest_En()

	{

	document.location.href = SiClickGoTo_En[a-1];

	}

function defilimg2()

	{

	if (a == 3)

		{

		a = 0;

		}

	if (version >= 3)

		{

		document.defil.src = imgPath[a];

		tempo3 = setTimeout("defilimg2()",2500);

		a++;

		}

	}

