// Remplace les images qui n'ont pas pu être chargées */
function remplaceImages(){
	for(i=0;i<document.images.length;i++){
		if(!document.images[i].complete){
			document.images[i].src="imgs/ar-404-images.png"
			document.images[i].width="85"
			document.images[i].height="85"
		}
	}
}
window.onload=remplaceImages;
/*fin*/
// Fonction controleur du billets d'actualités et l'hynme CDT (arabic version) */
function NewsDirectionLeft() { 
	this.news.direction = "left"; 
	this.news.start();
}
function NewsDirectionRight() { 
	this.news.direction = "right"; 
	this.news.start();
}
function HymneDirectionLeft() { 
	this.hymne.direction = "left";
	this.hymne.start();
}
function HymneDirectionRight() { 
	this.hymne.direction = "right"; 
	this.hymne.start();
}
/*fin*/
//Imprimer une zone */
function Imprimer(obj) 

{
// Définie la zone à imprimer
var zi = document.getElementById(obj).innerHTML;
var u = document.location.href;
// Ouvre une nouvelle fenetre
var f = window.open("", "", "height=650, width=650,toolbar=0, menubar=0, scrollbars=1, resizable=1,status=0, location=0, left=10, top=10");

// Définit le Style de la page
f.document.body.style.color = '#000000';
f.document.body.style.backgroundColor = '#FFFFFF';
f.document.body.style.padding = "16px";
f.document.body.style.direction = "rtl";

// Ajoute les Données
f.document.body.innerHTML += " " + zi + " "+ u + " ";

// Imprime et ferme la fenetre
f.window.print();
f.window.close();
}
/*fin*/
//confirmation de la suspenssion du message*/
function valide(msg, yes, no) {
    if (!confirm(msg)) {
          document.location.href = yes;
    } else {
        document.location.href   = no;
     }
}
/*fin*/
//redimenssionement de la fenêtre auto sous netscape*/
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
/*fin*/
// ajouter aux favoris (ie)*/
var bookmarkurl=document.location.href;
var bookmarktitle="Syndicat National des Tabacs"
function Favoris()
{ window.external.AddFavorite(bookmarkurl,bookmarktitle)
 }
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
/*fin*/
// taille du texte*/
var min=16;
var max=22;
function Agrandir() {
   var p = document.getElementsByTagName('p');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 18;
      }
      if(s!=max) {
         s += 1;
      }
      p[i].style.fontSize = s+"px"
   }
}
function Reduire() {
   var p = document.getElementsByTagName('p');
   for(i=0;i<p.length;i++) {
      if(p[i].style.fontSize) {
         var s = parseInt(p[i].style.fontSize.replace("px",""));
      } else {
         var s = 10;
      }
      if(s!=min) {
         s -= 1;
      }
      p[i].style.fontSize = s+"px"
   }   
}
/*fin*/
// envoyer a un ami*/
function newWindow(mypage,myname,w,h,features) {
  if(screen.width){
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  }else{winl = 0;wint =0;}
  if (winl < 0) winl = 0;
  if (wint < 0) wint = 0;
  var settings = 'height=' + h + ',';
  settings += 'width=' + w + ',';
  settings += 'top=' + wint + ',';
  settings += 'left=' + winl + ',';
  settings += features;
  win = window.open(mypage,myname,settings);
  win.window.focus();
}
/*fin*/
// langue du site*/
function english() {
	window.alert('Under Constraction');
	window.focus();
	}
/*fin*/
// animation d'image*/
imgPath = new Array;
SiClickGoTo = new Array;
if (document.images)
	{
	i0 = new Image;
	i0.src = 'medias/thumbnails/FlashCircleCode.png';
	SiClickGoTo[0] = "download.php?file=CodeDuTravailArabeCDT.pdf";
	imgPath[0] = i0.src;
	i1 = new Image;
	i1.src = 'medias/thumbnails/FlashCircleVideos.png';
	SiClickGoTo[1] = "arabe-videos.php";
	imgPath[1] = i1.src;
	i2 = new Image;
	i2.src = 'medias/thumbnails/FlashCircleGalerie.png';
	SiClickGoTo[2] = "arabe-galerie.php";
	imgPath[2] = i2.src;
	i3 = new Image;
	i3.src = 'medias/thumbnails/FlashCircleForums.png';
	SiClickGoTo[3] = "arabe-forums/index.php";
	imgPath[3] = i3.src;
	}
a = 0;
function ejs_img_fx(img)
	{
	if(img && img.filters && img.filters[0])
		{
		img.filters[0].apply();
		img.filters[0].play();
		}
	}

function StartAnim()
	{
	if (document.images)
		{
		document.write('<a href="#" onClick="ImgDest();return(false)"><img scr="medias/thumbnails/FlashCircleCode.png" border="0" alt="snt" name="defil" style="filter:progid:DXImageTransform.Microsoft.Pixelate(MaxSquare=100,Duration=1)"></a>');
		defilimg()
		}
	else
		{
		document.write('<a href="download.php?file=CodeDuTravailArabeCDT.pdf"><img src="medias/thumbnails/FlashCircleCode.png" border="0"></a>')
		}
	}
function ImgDest()
	{
	document.location.href = SiClickGoTo[a-1];
	}
function defilimg()
	{
	if (a == 4)
		{
		a = 0;
		}
	if (document.images)
		{
		ejs_img_fx(document.defil)
		document.defil.src = imgPath[a];
		tempo3 = setTimeout("defilimg()",7000);
		a++;
		}
	}
/*fin*/
//password weak*/
function evaluation(s)
{
	var cmpx = 0;
	
	if (s.length >= 6)
	{
		cmpx++;
		
		if (s.search("[A-Z]") != -1)
		{
			cmpx++;
		}
		
		if (s.search("[0-9]") != -1)
		{
			cmpx++;
		}
		
		if (s.length >= 8 || s.search("[\x20-\x2F\x3A-\x40\x5B-\x60\x7B-\x7E]") != -1)
		{
			cmpx++;
		}
	}
	
	if (cmpx == 0)
	{
		document.getElementById("weak").className = "nrm";
		document.getElementById("medium").className = "nrm";
		document.getElementById("strong").className = "nrm";
	}
	else if (cmpx == 1)
	{
		document.getElementById("weak").className = "red";
		document.getElementById("medium").className = "nrm";
		document.getElementById("strong").className = "nrm";
	}
	else if (cmpx == 2)
	{
		document.getElementById("weak").className = "yellow";
		document.getElementById("medium").className = "yellow";
		document.getElementById("strong").className = "nrm";
	}
	else
	{
		document.getElementById("weak").className = "green";
		document.getElementById("medium").className = "green";
		document.getElementById("strong").className = "green";
	}
}
/*fin*/
function GetFocus(obj) {
var toFocus = document.getElementById(obj);
toFocus.focus();
}
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->