function lancer_recherche()
{
    if (document.forms[0].rechercher.value != 'rechercher' && document.forms[0].rechercher.value != '')
        document.forms[0].submit();
}

function afficher_popup(largeur, hauteur, url, titre)
{
    window.open(url, titre, 'left=' + ((screen.width-largeur)/2) + ',top=' + ((screen.height-hauteur)/2) + ',toolbar=0,location=0,directories=0,status=0,scrollbars=0,resizable=0,copyhistory=0,menubar=0,width=' + largeur + ',height=' + hauteur);
}


function anneecour()
{
today=new Date(); debut=1997; x=today.getYear(); if (x<300) { x+=1900;}  
if (x>debut) { valeur='-'+x;} else { valeur=' ';}
return valeur;
}


function suppr_espaces(valeur)
{
    regex = new RegExp("(^ +)|( +$)", "g");
    valeur = valeur.replace(regex, "");

    return valeur;
}

function taille_fenetre()
{
    var largeur = 0, hauteur = 0;

    if (typeof(window.innerWidth) == 'number')
    {
        // !IE
        largeur = window.innerWidth;
        hauteur = window.innerHeight;
    }
    else if (document.documentElement &&
               (document.documentElement.clientWidth || document.documentElement.clientHeight))
    {
        // IE 6+
        largeur = document.documentElement.clientWidth;
        hauteur = document.documentElement.clientHeight;
    }
    else if (document.body && (document.body.clientWidth || document.body.clientHeight))
    {
        // IE 4
        largeur = document.body.clientWidth;
        hauteur = document.body.clientHeight;
    }

    return [ largeur, hauteur ];
}

function scroll_fenetre()
{
    var scroll_gauche = 0, scroll_haut = 0;

    if (typeof(window.pageYOffset) == 'number')
    {
        // NS
        scroll_haut = window.pageYOffset;
        scroll_gauche = window.pageXOffset;
    }
    else if (document.body && (document.body.scrollLeft || document.body.scrollTop))
    {
        // DOM
        scroll_haut = document.body.scrollTop;
        scroll_gauche = document.body.scrollLeft;
    }
    else if (document.documentElement && (
             document.documentElement.scrollLeft || document.documentElement.scrollTop))
    {
        // IE6
        scroll_haut = document.documentElement.scrollTop;
        scroll_gauche = document.documentElement.scrollLeft;
    }

    return [ scroll_gauche, scroll_haut ];
}



 




		