function nombre() {
var request;

if (window.XMLHttpRequest) { // Firefox
	request = new XMLHttpRequest();
}
else if (window.ActiveXObject) { // IE
	request = new ActiveXObject("Microsoft.XMLHTTP");
}
else {
	return; // Non supporte
}	

request.open('GET', '../images/nb.txt', false); // Synchro
request.send(null);
//return request.responseText;
nb=request.responseText; 
}
nombre();


num = Math.floor(Math.random() * nb)+1;
num1 = Math.floor(Math.random() * nb)+1;
num2 = Math.floor(Math.random() * nb)+1;

if (num==num1) {num1=Math.floor(Math.random() * nb)+1;}
if (num==num2) {num2=Math.floor(Math.random() * nb)+1;}
if (num1==num2) {num2=Math.floor(Math.random() * nb)+1;}
if (num==num1) {num1=Math.floor(Math.random() * nb)+1;}
if (num==num2) {num2=Math.floor(Math.random() * nb)+1;}


function ChangeImage()
	{

if (num == 0) { num = (nb)}
if (num1 == 0) { num1 = (nb)}
if (num2 == 0) { num2 = (nb)}
if(document.getElementById)
		{
		
		ig1='../images/G' + num + '.jpg';
		im1='../images/' + num + '.jpg';
		j1="javascript:PopupImage('" + ig1 + "')";
		
		ig2='../images/G' + num1 + '.jpg';
		im2='../images/' + num1 + '.jpg';
		j2="javascript:PopupImage('" + ig2 + "')";
		
		ig3='../images/G' + num2 + '.jpg';
		im3='../images/' + num2 + '.jpg';
		j3="javascript:PopupImage('" + ig3 + "')";
		
		//document.getElementById("zone").innerHTML ='<a href=' + im1 + '><img src=' + ig1 + ' border="0"></a>';
		
		document.getElementById("zone").innerHTML ='<a href="' + j1 + '"><img src="' + im1 + '" border="0" /></a>';
		document.getElementById("zone2").innerHTML ='<a href="' + j2 + '"><img src="' + im2 + '" border="0" /></a>';
		document.getElementById("zone3").innerHTML ='<a href="' + j3 + '"><img src="' + im3 + '" border="0" /></a>';
		
		
		//document.getElementById("zone2").innerHTML ='<a href="../images/G' + num1 + '.jpg"><img src="../images/' + num1 + '.jpg" border="0"></a> ';
		//document.getElementById("zone3").innerHTML ='<a href="../images/G' + num2 + '.jpg"><img src="../images/' + num2 + '.jpg" border="0"></a>';
		num = num-1 
		num1 = num1-1 
		num2 = num2-1 
}
setTimeout("ChangeImage()", 8000);
	}
window.onload = ChangeImage;



//-->
