function zoom_old (img) {
	var str = img.src;
	var reg1=new RegExp("pix","g");
	if (str.match(reg1)) 
		return;
	wdow ('<div align="right"><img src="/img/fermer.png" style="cursor:pointer; margin:5px 0;" onclick="wFermer()" /></div><img src="'+str+'" height="380" />', 600);
}
function over (id, img) {
	var str = img.src;
	var reg1=new RegExp("pix","g");
	if (str.match(reg1)) 
		return;
	$('img_'+id).src = str;
}
function zoom (img, id) {
	wdow ('<div align="center"><br /><h2>Chargement...</h2></div>', 600 );
	var str = img.src;
	var reg1=new RegExp("pix","g");
	if (str.match(reg1)) 
		return;

	var params = new Object();
	params.id = id;
	
	params.img = str;
	new Ajax.Request("/zoom.html",{
		method:"get",
		parameters:params,
		onSuccess:function(xhr){
			$('wDIALOG').update ('<div align="right"><img src="/img/fermer.png" style="cursor:pointer; margin:5px 0;" onclick="wFermer()" /></div><img src="'+str.replace(new RegExp("(small_)", "g"),"")+'" height="380" id="imageCentre" />' + xhr.responseText );
		}
	});
}

function soumission (id) {
	wdow ('<div align="center"><br /><h2>Chargement...</h2></div>', 600 );
	var params = new Object();
	params.id = id;
	new Ajax.Request("soumission.html",{
		method:"get",
		parameters:params,
		onSuccess:function(xhr){
			$('wDIALOG').update ('<div align="right"><img src="/img/fermer.png" style="cursor:pointer; margin:5px 0;" onclick="wFermer()" /></div><img src="'+str+'" width="600" id="imageCentre" />' + xhr.responseText );
		}
	});
}

function zoomOver (img) {
	var str = img.src;
	var reg1=new RegExp("pix","g");
	if (str.match(reg1)) 
		return;
	$('imageCentre').src = str;
}

/*****************************************************
#Objet Window black transparent
******************************************************/
function wFermer(){
	$('wdow').hide();
}
function wdow (html, w) {
	if (!$('wdow')) {
		document.body.appendChild(new Element('div', {id:'wdow'}));
		$("wdow").appendChild(new Element('div', {id:'wBG'}));
		$("wdow").appendChild(new Element('div', {id:'wDIALOG'}));
		Event.observe("wBG","click",wFermer);
		Event.observe("wDIALOG","click",wFermer);
	}
	
	$('wdow').show();
	
	h=Math.round($("interface").offsetHeight);
	g = Math.round( (document.body.offsetWidth - w - 30)/2 );
	
	haut = 5;
	$('wDIALOG').style.overflow = "auto";
	$('wDIALOG').style.width = w+"px";
	$('wDIALOG').style.left = g+"px";
	$('wDIALOG').style.height = h+"px";
	$('wBG').style.height = (h+40)+"px";
	$('wDIALOG').style.top = haut+"px";
	$('wDIALOG').innerHTML = html;
}
/*****************************************************
#Wdow aide
******************************************************/

function aide (n) {
	new Ajax.Request("aide.html?n="+n,{
		onSuccess:function(xhr){
			wdow (xhr.responseText, 600);
		}
	});
}
