function verif_rech(){
if (document.form1.mot.value=="")
         {
      alert("Vous n'avez pas fourni le l'élément à rechercher !!!.");
      return false;
         }
return true;

}


function validation(msg)
{
	var email   = document.formulaire.email.value;
	var verif   = /^[a-zA-Z0-9_-]+@[a-zA-Z0-9-]{2,}[.][a-zA-Z]{2,3}$/
	if (verif.exec(email) == null)
	{
		alert(msg);
		return false;
	}
	else
		return true;
}

function verif_AddDownloadform(){
if (document.addDownload.title.value==""){
	alert("Veuillez saisir le titre du fichier.");
	return false;
}
else if((document.addDownload.fichier.value=="")&&((document.addDownload.url.value=="http://")||(document.addDownload.url.value==""))){
		alert("Veuillez saisir un des liens sur le fichier.");
		return false;
	}
	else if (document.addDownload.description.value==""){
		  alert("Veuillez saisir une description du fichier.");
		  return false;
		}
}

function verif_form(){
if (document.form2.fichier.value==""){
      alert("Vous n'avez pas fourni le fichier !\n Cliquez sur Browser pour le faire.");
      return false;
}
else{
for (var i=0;i<6;i++){
   if (document.form2.type[i].checked){return true;}
}
alert("   Veuillez choisir le type du fichier S.V.P. entre\n Khassaide (écrit), Image, Sons,video ou Autres.");
return false;
}
}

function verif_login(){
if ((document.form_login.login.value=='')||(document.form_login.passwd.value=='')){
      alert("Vous n'avez pas rempli tous les champs.");
     return false;}
else{return true;}
}

 function FenImage(nom,url,width,height,format,taille,date,auteur) {
twidth=300;theight=250;
fenwidth=450;fenheight=400;
if (height<theight) fenheight=theight;
imwidth=width;imheight=height;
a=twidth/(2*imwidth);
b=theight/imheight;
coef=b;
if (a<b) coef=a;
if (imwidth>twidth/2) {imwidth=coef*imwidth;imheight=coef*imheight;}

fen = window.open ("","",
"width="+fenwidth+",resizable=no,height="+fenheight+",scrollbars=no,toolbar=no,location=no,directories=yes,status=yes,menubar=yes,titlebar=yes");
fen.document.write("<html><head><title>"+nom+"</title>\
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'></head>\
<body bgcolor='white' text='#000000'  bgcolor='#E7E7E7'>\
<table border=0 width='100%' align='center' width="+twidth+" height="+theight+">\
<tr><td align=' left' valign='top'>\
<b>Nom :</b> "+nom+"<br>\
<b>Format :</b> "+format+"<br>\
<b>Taille :</b> "+taille/1000.0+" Kb<br>\
<b>Dimensions :</b> <br>width="+width+" - height="+height+"<br>\
<b>Date :</b> "+date+"<br>\
<b>Auteur :</b> "+auteur+"<br>\
</td>\
<td align='center' valign='top'>\
<img src="+url+" width="+imwidth+" height="+imheight+">\
<div align='center'>\
<font size=+2 color='#000000'>"+nom+"</font></div>\
</td></tr>\
<tr><td align='center' colspan=2>\
<div align='center'>\
<font size=+1 color='#000000'>Dieuredieuf Serigne Touba<br>\
Diârâma Mame Cheikh Ibrahima Fall<br>\
Di gnane Serigne Saliou Mbacké yaguefi lôl té wér\
</font></div></td></tr></table>\
</body></html>");
fen.document.close();
  }


function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
