<!--
function Pop(url,name,features) { //v2.0
  window.open(url,name,features);
}

function open_popup(url, width, height)
{
window.open(url, '', 'resizable=no, location=no, width='
						+width+', height='+height+',status=no, scrollbars=yes, menubar=no');
}
function open_popbox(url, width, height)
{
window.open(url, 'popbox', 'resizable=no, location=no, width='
						+width+', height='+height+', status=no, scrollbars=no, menubar=no');
}
function getconfirm() {
	if(confirm("Confirmez-vous l'effacement ?")) {
		return true;
	} else {
		return false;
	}
}

function popup_alert(msg) 
{
 alert(msg);
}

function OG_jumpMenu(targ,selObj,restore, path){ //v3.0
  eval(targ+".location='"+path+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function mOvr(src,clrOver) {
 if (!src.contains(event.fromElement)) {
			src.style.cursor = 'hand';
			src.bgColor = clrOver;
		}
	}

function mOut(src,clrIn) {
 if (!src.contains(event.toElement)) {
			src.style.cursor = 'default';
			src.bgColor = clrIn;
		}
	}

function mClk(src) {
 if(event.srcElement.tagName=='TD'){
			src.children.tags('A')[0].click();
		}
	}

function setimgsrc(imageName, imageLocation) {
  if (document.images) document.images[imageName].src = imageLocation;
  return true; 

  }


/* Fonctions de gestions de la periode de recherche */ 

function choix_periode(choix){
	document.search_form.slcDef.value=choix;
	document.search_form.periode.selectedIndex=choix;
	ladate=new Date();
	nouveau=new Date();
	offset=1000*60*60*24;
	nouveau.setTime(ladate.getTime()+offset);
	if(choix=="1") offset*=1;
	if(choix=="2") offset*=3;
	if(choix=="3") offset*=7;
	if(choix=="4") offset*=31;
	if(choix=="5") offset*=61;
  
	if (parseInt(choix)==1)
		{
		nouveau.setTime(ladate.getTime()-offset);
		strdate=ecritDate(nouveau);
		
		document.search_form.pStop.value=strdate;
		document.search_form.pStart.value=strdate;
		} 
	else
		{
		if(parseInt(choix)>=1 && parseInt(choix)<=5)
			{
			document.search_form.pStop.value=ecritDate(ladate);
			nouveau.setTime(ladate.getTime()-offset);
			strdate=ecritDate(nouveau);
			document.search_form.pStart.value=strdate;
			}
		}
  
	if(choix=="6" )
	 {
	 document.search_form.pStart.focus();
	 }
  
	if(choix=="0")
	  {
	  document.search_form.pStart.value=ecritDate(ladate);
	  document.search_form.pStop.value=ecritDate(ladate);
	  }
	}
      
function Test(inf,sup) {
  ladate=new Date();
  unan=new Date();
  offset=1000*60*60*24;
  unan.setTime(ladate.getTime()-offset*365);
 
  if(inf.length>0)
    if((retinf=TstDate(inf))=="0")
      {
      document.search_form.pStart.value=inf;  
      document.search_form.pStart.focus();
      }
    else
      {
      var strinf=ecritDate(retinf)
      document.search_form.pStart.value=strinf
      document.search_form.borninf.value=strinf.substring(strinf.length-2,strinf.length) 
      }  
  if(sup.length>0)
    if((retsup=TstDate(sup))=="0")
      {
      document.search_form.pStop.value=sup  
      document.search_form.pStop.focus();
      }
    else
      {
      if(retsup.getTime()>ladate.getTime())        
        retsup.setTime(ladate.getTime());        
      var strsup=ecritDate(retsup)
      document.search_form.pStop.value=strsup
      document.search_form.bornsup.value=strsup.substring(strsup.length-2,strsup.length)
      }
}



function TstDate(chaine) {
  jj=""; 
  aa=""; 
  mm=""; 
  JJ=""; 
  AA=""; 
  MM=""; 
  i=0; 
  sep=0; 
  nb=0; 
  tst=true; 
  last=0;
  
  while(i<chaine.length)
    {  
    if(chaine.charAt(i)=="/")
      { 
      sep++;
      nb=0;
      }
    else
      { 
      if( chaine.charAt(i) != '0' || nb != 0 )
        { 
        if(sep==0) JJ+=chaine.charAt(i); 
        if(sep==1) MM+=chaine.charAt(i); 
        if(sep==2) AA+=chaine.charAt(i); 
        nb=1;
        }
      }
    i++;
    }
  jj=parseInt(JJ);
  mm=parseInt(MM);
  aa=parseInt(AA);

  seb_d = new Date();
  ref_sc = seb_d.getYear();
  if(ref_sc<1000) ref_sc+=1900;
  ref_s = parseInt(ref_sc)-2;

  if(sep>0)
    {
    if(sep!=2)
      {alert("Veuillez entrer la date sous la forme jj/mm/aa ou jj/mm/aaaa");return("0");}
    }
  else
    {
    if(chaine.length>0)
      if(chaine.length!=6 && chaine.length!=8)
        { alert("Vous pouvez entrer la date sous la forme jjm/mm/aa ou jj/mm/aaaa");return("0");}
  
    }  
  if(! (jj>0 && jj<=31 && mm>0 && mm<=12))
    { alert("date incorrecte"); return("0");}


  mm-=1;
  nouveau=new Date(aa,mm,jj);
  return(nouveau);  
  }


function ecritDate(objet){
  var s_jour="";
  var s_mois="";
  var s_anne="";
  s_jour+=objet.getDate();
  s_mois+=objet.getMonth()+1;
  s_anne+=objet.getYear();
  if (s_anne<1000) s_anne=1900+parseInt(s_anne);
  if(s_jour.length==1) s_jour='0'+s_jour;
  if(s_mois.length==1) s_mois='0'+s_mois;
  aa=parseInt(s_anne);  
  if(aa>=1900 && aa<=1950)
    aa=aa+100;
  chainedate=s_jour+"/"+s_mois+"/"+aa; //s_anne;
  return(chainedate);
  }
// -->