function afficheDate(){
jour = new Array ("الأحد","الإثنين","الثلاثاء","الإربعاء","الخميس","الجمعة","السبت");
mois = new Array ("جانفي","فيفري","مارس","أفريل","ماي","جوان","جويلية","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر");
date=new Date();
datejour=date.getDate();
heure=date.getHours();
minute=date.getMinutes();
seconde=date.getSeconds();
year=date.getFullYear();
if (date.getDate()<10) datejour="0"+datejour; 
if (heure<10) heure="0"+heure;
if (minute<10) minute="0"+minute;
if (seconde<10) seconde="0"+seconde;
document.getElementById("texteDate").innerHTML=jour[date.getDay()]+"       "+ datejour + "      " +mois[date.getMonth()]+"      " +year +"    "+ heure+":"+minute+":"+seconde;
setTimeout("afficheDate()", 1000);}

function afficheDateGauche(){
jour = new Array ("الأحد","الإثنين","الثلاثاء","الإربعاء","الخميس","الجمعة","السبت");
mois = new Array ("جانفي","فيفري","مارس","أفريل","ماي","جوان","جويلية","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر");
date=new Date();
datejour=date.getDate();

year=date.getFullYear();
if (date.getDate()<10) datejour="0"+datejour; 

document.getElementById("texteDateGauche").innerHTML=jour[date.getDay()]+"       "+ datejour + "      " +mois[date.getMonth()]+"      " +year;
}

var currentst=0;
var pas=13;
var time;
var theTime =200;
function scrolldiv(div,s) {
var objDiv = document.getElementById(div);
if (s=='t')
currentst=currentst-pas;
else
currentst=currentst+pas;
if (currentst<0)
currentst=objDiv.scrollHeight;
else
if (currentst>objDiv.scrollHeight)
currentst=0;
objDiv.scrollTop = currentst;
time = setTimeout('scrolldiv(\''+div+'\',\''+s+'\')',theTime);
}
function stopScroll()
{
	 clearTimeout(time)
}



function OpenPopUp(url,name,s,w,h,l,t)
{ 
window.open(url,name,'toolbar=0,menubar=0,resizable=0,dependent=0,status=0,scrollbars='+s+',width='+w+',height='+h+',left='+l+',top='+t )
}



function ValideMailAdress(nChamp) 
{
  if (nChamp.value.length > 0) {
    if ((nChamp.value.lastIndexOf(".") < nChamp.value.indexOf("@")+3
      || nChamp.value.lastIndexOf(".") > nChamp.value.length-3
      || nChamp.value.indexOf("@") < 1 )
      || nChamp.value.indexOf("@") != nChamp.value.lastIndexOf("@")) {

      alert("\nSaisie invalide!\nAssurez-vous d'entrer un format valide de courriel \"votrenom@serveur.com\".");
      nChamp.focus();
      nChamp.select();
    }
  }
}



