 function CkPd(a,b,c,x)

{
	var t=new Date();
        var e=(Math.round(t.getTime()/1000))-1012023030;
	var d=(''+e+'');
// alert(a+' '+b+' '+c+' '+d+'  '+d.length);
        CkPd1(a,b,c,d);
}

 function CkPd1(a,b,c,d)

   { var ch=''; var x=123; var n=0; var c1=0; var c2=0; var lin=''; var sor='';
     while (x!=33)
	   {x=x-1;
	    if (x==96)  {x=95;}
	    if (x==94)  {x=90;}
	    if (x==64)  {x=63;}
	    if (x==62)  {x=61;}
	    if (x==60)  {x=57;}
	    if (x==47)  {x=46;}
	    if (x==44)  {x=43;}
	    if (x==42)  {x=36;}
	    if (x==35)  {x=33;}
	    ch = ch+eval("String.fromCharCode("+x+")");}
// alert(ch);
     if (!a) {alert('Login Absent..!'); return;}
     if (a == 'Identifiant') {alert('Identifiant Obligatoire..!'); return;}
     if (!b) {alert('Mot de Passe  Absent..!'); return;}
     if (b == 'Mot de passe') {alert('Mot de passe Obligatoire..!'); return;}
     var p=a+'='+b;
     
     n=d%9;
     lin+=d.substring(n,d.length)+d.substring(0,n);

     for (n=0;n<p.length;n++)
	 {x=n%d.length;
	  c1=ch.indexOf(lin.charAt(x));
	 // c1=ch.indexOf(d.charAt(x));
	  c2=ch.indexOf(p.charAt(n));
	  if((c1==-1)||(c2==-1))
	    {alert('Caractères Incorrects');
	     return;}
	  x=c1+(ch.length-c2);
	  if(x>=ch.length) {x=x-ch.length;}
	  sor+=ch.charAt(x);
	 }

// alert(sor);
     iris(c,d,sor);	
   }

 function iris(prg,id,crit)

   {
     var res = "/cgi-bin/iris.html?"+prg+"&amp;"+id+"&amp;"+crit+"";
// alert(res);
     window.location = (res);
   }

 function Imprimer()

   {
     window.print();
   }

