function validateForm(obj){
		// --- parcour tous les éléments du formulaire
		for (i=0; i<obj.elements.length; i++) 
		{ 
			// --- pour les champs requis de type texte
			if(obj.elements[i].type=="text" && obj.elements[i].name.charAt(2)=="_")
			{
				
				// --- champs texte obligatoire
				if(obj.elements[i].name.substr(0,3)=="tr_" && obj.elements[i].value.length<2)
				{
					alert("Un champ requis n'a pas été complété.") 
					obj.elements[i].focus() 
					return false; 
				}
				
				// --- champs email obligatoire
				if(obj.elements[i].name.substr(0,3)=="mr_" && (obj.elements[i].value.indexOf('@')<1 || obj.elements[i].value.indexOf('@')>obj.elements[i].value.lastIndexOf('.') || obj.elements[i].value.lastIndexOf('.')<obj.elements[i].value.length-4))
				{
					alert("L'adresse E-mail n'est pas valide.");
					obj.elements[i].focus() 
					return false; 
				}
			}
		} 
}

function popUpCenter(url,nom,largeur,hauteur,options) {
	var haut=(screen.height-hauteur)/2;
	var Gauche=(screen.width-largeur)/2;
	fencent=window.open(url,nom,"top="+haut+",left="+Gauche+",width="+largeur+",height="+hauteur+","+options);
}

function showImage(url, width, height)
{
	
	var max_width = screen.width-100;
	var max_height = screen.height-100;
	var full_view = max_width>=width && max_height>=height;
	var win_width = full_view ? width : Math.min(width, max_width);
	var win_height = full_view ? height : Math.min(height, max_height);
	var win_top = Math.floor((screen.height - win_height - 16)/2);
	var win_left = Math.floor((screen.width - win_width)/2);
	var sb = full_view ? '' : ',scrollbars=yes';
	var wnd = window.open("", "popUp", "width=" + win_width + ",height=" + win_height + ",left=" + win_left + ",top=" + win_top + sb );
	var doc = wnd.document;
	doc.open();
				
	doc.write('<html><head><title>Extra</title></head>');
	if(full_view) {
		doc.write('<body style="margin: 0; background-color: #000000; background: url('+url+') no-repeat 0 0;">');
		doc.write('<div style="position: absolute; top:0; right:0; z-index: 10; height: 16px; padding: 2px;"><a href="javascript:print();" style="color: #efefef; text-decoration: none; font-family: verdana; font-size: 10px; font-weight: bold;"><img style="border: none" src="../img/print.gif"></a></div>');
		doc.write('<img src="'+url+'">');
	    doc.write('&nbsp;');
	}
	else {
		doc.write('<body style="margin: 0; background-color: #000000;">');
	    doc.write('<a href="javascript:self.close();">'); 
		doc.write('<img src="' + url + '" width="' + width + '" height="' + height + '" alt="" border="0">');
		doc.write('</a>');  
	}
	doc.write('</body></html>');
	doc.close();
	wnd.focus();
}

var pos;
var speed = 1;
var pos_initial;

function startAnim() {
	var e = document.getElementById('confbox');
	pos_initial = e.clientHeight - 10;
	pos = pos_initial;
	setInterval('anim()', 20);
}
function anim() {
	var e = document.getElementById('conflist');
	e.style.visibility = 'visible';
	e.style.top = Math.floor(pos) + 'px';
	pos = pos - speed;
	if(pos < -e.clientHeight) pos = pos_initial;
}
