// Projet Dispam
// Stephane DAGUET - s.daguet@mb2i.fr
//
// $Id: application.js,v 1.1.1.1 2004/10/04 13:23:11 stephane_d Exp $
//

function SoumettreFormulaire(form_objet) {

    form_objet.submit();

}

function DonneFocusLogin() {

    document.forms[0].nom.focus();

}

function Inactive() {

}

function Redirige (url) {
    window.location.href = url;
}


function fixPNG(myImage)
{
    if (window.ie55up)
    {
        var imgID = (myImage.id) ? "id='" + img.id + "' " : ""
        var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
        var imgTitle = (myImage.title) ? "title='" + myImage.title + "' " : "title='" + myImage.alt + "' "
        var imgStyle = "display:inline-block;" + myImage.style.cssText
        var strNewHTML = "<span " + imgID + imgClass + imgTitle
        strNewHTML += " style=\"" + "width:" + myImage.width + "px; height:" + myImage.height + "px;" + imgStyle + ";"
        strNewHTML += "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
        strNewHTML += "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>"
        myImage.outerHTML = strNewHTML
    }

}

function OuvreFenetre(windowName,url,targetName,specs){
    eval(windowName+"=window.open('"+url+"','"+targetName+"','"+specs+"')")
}

function ImprimeFacture(url) {

    var Message = "Le chargement de la version imprimable peut demander quelques instants !\n"
    Message += "Attendez simplement la fenetre de selection d'imprimante\n\n"
    Message += "Confirmez vous l'impression ?\n"
    if (confirm(Message)) {
        window.location.href = url;
    }

}
