// JavaScript Document
var today = new Date();
var timerDateTime=0;
var semaine=new Semaine();
var mois=new Mois();
var _min=0;
var _sec=0;
var _hrs=0;

function Semaine(){
	this[0] = "Dimanche"; this[1] = "Lundi"; this[2] = "Mardi"; this[3] = "Mercredi"; this[4] = "Jeudi";  this[5] = "Vendredi"; this[6] = "Samedi";
}

function Mois(){
   this[0] = "Janvier"; this[1] = "F&eacute;vrier"; this[2] = "Mars"; this[3] = "Avril"; this[4] = "Mai"; this[5] = "Juin"; this[6] = "Juillet"; this[7] = "Ao&ucirc;t"; this[8] = "Septembre"; this[9] = "Octobre"; this[10] = "Novembre"; this[11] = "D&eacute;cembre";
}

function datejr(){
	today = new Date();
	annee = today.getFullYear();
	var result=today.getDate()+"/"+(today.getMonth()<=9?"0":"")+today.getMonth()+"/"+annee;
	//_hrs=today.getHours(); _hrs=(_hrs<=9)?("0"+_hrs):(_hrs);
	//_min=today.getMinutes(); _min=(_min<=9)?("0"+_min):(_min);
	//_sec=today.getSeconds(); _sec=(_sec<=9)?("0"+_sec):(_sec);	
	var _time = "";//_hrs+":"+_min+(bTimeWithseconds?(":"+_sec):(""));
	source=result;//+"&nbsp;-&nbsp;"+_time+"</b>&nbsp;&nbsp;";
	document.getElementById("datetime_area").innerHTML="&nbsp;";
	document.getElementById("datetime_area").innerHTML = source;
}


function datelong(id){
	today = new Date();
	annee = today.getFullYear();
	var result=semaine[today.getDay()]+" "+today.getDate()+" "+mois[today.getMonth()]+" "+annee;
	//_hrs=today.getHours(); _hrs=(_hrs<=9)?("0"+_hrs):(_hrs);
//	_min=today.getMinutes(); _min=(_min<=9)?("0"+_min):(_min);
//	_sec=today.getSeconds(); _sec=(_sec<=9)?("0"+_sec):(_sec);	
//	var _time = _hrs+<":"+_min+(bTimeWithseconds?(":"+_sec):(""));
	source=result;//+"&nbsp;-&nbsp;"+_time+"</b>&nbsp;&nbsp;";
	document.getElementById(id).innerHTML="&nbsp;";
	document.getElementById(id).innerHTML = source;
}

function DateTime(){
	//timerDateTime = setInterval('datejr()', (bTimeWithseconds?(1000):(60*1000)));
}
function datnaissance(_annee,mymois,jours){
	document.write("<select name=\""+jours+"\"  style=\"width:50px;\">");
	for(i=1;i<=31;i++){
	document.write("<option value=\""+i+"\">"+i+"</option>");
	}				
	document.write("</select>");				
	document.write("<select name=\""+mymois+"\" style=\"width:100px;\">");
	var month=Array('Janvier','F&eacute;vrier','Mars','Avril','Mai','Juin','Juillet','Aout','Septembre','Octobre','Novembre','D&eacute;cembre');
	for(i=0;i<month.length;i++){
		document.write("<option value=\""+i+"\">"+month[i]+"</option>");
	}				
	document.write("</select>");		
	document.write("<select name=\""+_annee+"\"  style=\"width:70px;\">");
	for(i=1971;i<=2010;i++){
		document.write("<option value=\""+i+"\">"+i+"</option>");
	}				
	document.write("</select>");
}

var waitingCode="<center><br><img src=\"images/icones/wait.gif\" width=\"32\" height=\"32\" /><br><b>Merci de bien vouloir patienter ...</b></center>";

function XMLReload(_id){
	document.getElementById(_id).innerHTML="<center>Votre navigateur ne supporte pas les objets XMLHTTPRequest...<br /><br />Impossible d&rsquo;afficher les donn&eacute;es.<br /><br /><a href=\"javascript:;\" onclick=\"window.location.reload();\" style=\"color:#666666;\" ><b>Recharger la page</b></a></center>";
	return;
}

function checkPhoneNumber(evt){
	var charCode = (evt.which) ? evt.which : event.keyCode;
	//alert(charCode); return true;
	return ((charCode>=48 && charCode<=57) || charCode==32 || (charCode>=37 && charCode<=39) || charCode==13 || charCode==8 || charCode==9 || charCode==43);
}

function fnValidMontEcheance(evt){
	var charCode = (evt.which) ? evt.which : event.keyCode;
	//alert(charCode); return true;
	return ((charCode>=48 && charCode<=57) || charCode==32 || (charCode>=37 && charCode<=39) || charCode==13 || charCode==8 || charCode==9);
}

function checkNumber(evt){
	var charCode = (evt.which) ? evt.which : event.keyCode;
	//alert(charCode); return true;
	return ((charCode>=48 && charCode<=57) || (charCode>=37 && charCode<=39) || charCode==13 || charCode==8 || charCode==9);
}

function checkFloatNumber(evt){
	var charCode = (evt.which) ? evt.which : event.keyCode;
	//alert(charCode); return true;
	return ((charCode>=48 && charCode<=57) || (charCode>=37 && charCode<=39) || charCode==8 || charCode==9 || charCode==13 || charCode==46);		// charCode==44 ||
}

// 
// Tiger-222, Mai 2009.
// 
// Description :
//	Changer la taille du texte sans recharger la page.
//
// Utilisation :
// 	<span onClick="tailleFonte('+');"> Augmenter </span>
//	<span onClick="tailleFonte(0);"> Rétablir </span>
//	<span onClick="tailleFonte('-');"> Diminuer </span>
//
function tailleFonte(modif){
	var reset 	= 11;	// Taille par défaut
	var min 	= 8;	// Taille minimale
	var max 	= 16;	// Taille maximale
	var actuelle 	= 0;	// Taille actuelle
	var nouvelle 	= 0;	// Nouvelle taille
	
	// Récupération de la taille actuelle :
	if ( window.getComputedStyle ) actuelle = window.getComputedStyle(document.body,null).fontSize;
	else actuelle = document.body.currentStyle.fontSize;
	
	// Suppression du suffixe 'px' :
	actuelle = actuelle.substring(0, (actuelle.length - 2));
	
	// Détermination de la nouvelle taille :
	if ( modif === 0 && actuelle !== reset ) document.getElementsByTagName('body')[0].style.fontSize = reset + 'px';
	else if ( modif == '+' && actuelle < max && actuelle !== reset ){
		nouvelle = new Number(actuelle) + 1;
		document.getElementsByTagName('body')[0].style.fontSize = nouvelle + 'px';
	} else if ( modif == '-' && actuelle > min && actuelle !== reset ){
		nouvelle = new Number(actuelle) - 1;
		document.getElementsByTagName('body')[0].style.fontSize = nouvelle + 'px';
	}
}

