/* Javascripts utilisés sur le site

 * Mettez l'ensemble de vos fonctions générique javascript ici

 * 

 * La liaison avec les page se fait à l'aide du code ci-dessous :

 * <script type="text/javascript" src="css-js/scripts.js"></script>

 */





function NewWindow(mypage,myname,w,h,scroll){

var winl = (screen.width-w)/2;

var wint = (screen.height-h)/2;

var settings ='height='+h+',';

settings +='width='+w+',';

settings +='top='+wint+',';

settings +='left='+winl+',';

settings +='scrollbars='+scroll+',';

settings +='resizable=yes';

win=window.open(mypage,myname,settings);

if(parseInt(navigator.appVersion) >= 4){win.window.focus();}

}

function popup_image(nId, nWidth, nHeight)

{

    if(typeof WindowPopUp != "undefined")

            WindowPopUp.close();

    

    WindowPopUp = window.open("popup_image.php?id="+nId, "image", "left="+((screen.width-nWidth)/2)+", top="+((screen.height-nHeight)/2)+", width="+nWidth+", height="+nHeight+", scrollbars=yes");

    WindowPopUp.focus();

    }



function PopUp(strFile, nWidth, nHeight)

{

    if((typeof WindowPopUp != "undefined") && (WindowPopUp != null))

        WindowPopUp.close();



    WindowPopUp = window.open("popup.php?file="+strFile, "popup", "left="+((screen.width-nWidth)/2)+", top="+((screen.height-nHeight)/2)+", width="+nWidth+", height="+nHeight);

    if(WindowPopUp != null)

        WindowPopUp.focus();

}
function PopUp2(nId, nWidth, nHeight)
{
    if(typeof WindowPopUp != "undefined")
            WindowPopUp.close();
    
    WindowPopUp = window.open("popup_image.php?id="+nId, "image", "left="+((screen.width-nWidth)/2)+", top="+((screen.height-nHeight)/2)+", width="+nWidth+", height="+nHeight);
    WindowPopUp.focus();
    }
function PopUp3(nId, nWidth, nHeight)
{
    if(typeof WindowPopUp != "undefined")
            WindowPopUp.close();
    
    WindowPopUp = window.open("popup_image2.php?id="+nId, "image", "left="+((screen.width-nWidth)/2)+", top="+((screen.height-nHeight)/2)+", width="+nWidth+", height="+nHeight);
    WindowPopUp.focus();
    }
function PopUp4(nId, nWidth, nHeight)
{
    if(typeof WindowPopUp != "undefined")
            WindowPopUp.close();
    
    WindowPopUp = window.open("popup_image3.php?id="+nId, "image", "left="+((screen.width-nWidth)/2)+", top="+((screen.height-nHeight)/2)+", width="+nWidth+", height="+nHeight);
    WindowPopUp.focus();
    }
function PopUpMovie(strFile, nWidth, nHeight)

{

    if((typeof WindowPopUp != "undefined") && (WindowPopUp != null))

        WindowPopUp.close();



    WindowPopUp = window.open("popup-movie.php?file="+strFile, "popup", "left="+((screen.width-nWidth)/2)+", top="+((screen.height-nHeight)/2)+", width="+nWidth+", height="+nHeight);

    if(WindowPopUp != null)

        WindowPopUp.focus();

}


