function printSelected( href ) {
    
    var form = document.forms[0];
    var lieux = form.elements['lieux[]'];
    var printOK = false;
    for ( var i = 0; i < lieux.length; i++ ) {
        if ( lieux[i].checked ) {
            printOK = true;
            break;
        }
    }
    
    if ( printOK ) {
        document.forms[0].action = href;
        document.forms[0].submit();
    }
    
    else {
        alert('Vous devez sélectionnez au moins un lieu.');
    }
    
    return false;
    
} // end of 'printSelected()'

function popup( href, width, height ) {

    var top     = ( screen.height - height ) / 2;
    var left    = ( screen.width - width ) / 2;
    var pWindow = window.open(href, 'popup', 'directories=no,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no,width=' + width + ',height=' + height + ',top=' + top + ',left=' + left);

    return false;
    
} // end of 'popup()'


function popupPrint( href, width, height ) {

    var top     = ( screen.height - height ) / 2;
    var left    = ( screen.width - width ) / 2;
    var pWindow = window.open(href, 'popup', 'directories=no,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,width=' + width + ',height=' + height + ',top=' + top + ',left=' + left);

    return false;
    
} // end of 'popup()'

function popupImg( href, width, height ) {

    var top     = ( screen.height - height ) / 2;
    var left    = ( screen.width - width ) / 2;
    var pWindow = window.open('popup.php?img=' + href, 'popup', 'directories=no,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no,width=' + width + ',height=' + height + ',top=' + top + ',left=' + left);

    return false;
    
} // end of 'popupImg()'
