// JavaScript Document
function efface(champ) {
	//alert(champ.value);
	champ.value='';
}

function dispptr(){
	target=document.getElementsByTagName('ul')[0].firstChild;
	while (target !=null) {
		alert("Ce noeud a pour nom: " + target.nextSibling.nodeName);
		target = target.nextSibling.nextSibling;
		}
}

function samPassVerif(){
	target1=document.getElementById('sam_pass').value;
	target2=document.getElementById('sam_pass_verif').value;
	if (target1!=target2){
		alert ("Le mot de passe renseigné dans le champ de vérification ne correspond pas à celui indiqué dans le champ password!");
		document.getElementById('sam_pass').value='';
		document.getElementById('sam_pass_verif').value='';
	}
}

//Prochains matches
function getMatch(passedCat,shiftDate){
	var pars = '';
	cat=document.getElementById('tablePM');
	if (passedCat && passedCat!=''){cat.title=passedCat;}
	dateRef=document.getElementById('datePM');
	//alert ("Catégorie: "+cat.title+"\n"+"Décalage: "+shiftDate);
	//Construction de l'url
	url="sam_includes/sam_process/getmatch.php?cat="+cat.title+"&dateref="+dateRef.title+"&shiftdate="+shiftDate;
	//alert(url);
	new Ajax.Updater('tablePM', url, {
					 method: 'post',encoding: 'utf-8', parameters: pars,
					});

}
