/**
 * Script Javascript de Camelot
 *
 * PHP Version 4
 *
 * @category Void
 * @package  Void
 * @author   Logosapience <mousset@logosapience.fr>
 * @license  Logosapience http://www.logosapience.com
 * @link     http://www.logosapience.com
 */

/**
 * Fonction de chargement d'une page
 * 
 * @param Unknown init
 * 
 * @return Void
 */
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
    if (init == true) with (navigator) {
        if (appName == "Netscape" && parseInt(appVersion) == 4) {
            document.MM_pgW = innerWidth;
            document.MM_pgH = innerHeight;
            onresize        = MM_reloadPage;
        }
    }
    else if (innerWidth != document.MM_pgW || innerHeight != document.MM_pgH) {
        location.reload();
    }
}

/**
 * Fonction pour charger une image
 * 
 * @return Void
 */
function MM_preloadImages()
{ //v3.0
    var d = document;
    if (d.images) {
        if (!d.MM_p)
            d.MM_p = new Array();
    
        var i, j = d.MM_p.length, a = MM_preloadImages.arguments;
    
        for (i = 0; i < a.length; i++) {
            if (a[i].indexOf("#") != 0) {
                d.MM_p[j]       = new Image;
                d.MM_p[j++].src = a[i];
            }
        }
    }
}

/**
 * Fonction qui change l'image de fond
 * 
 * @param Object id
 * @param String img
 * 
 * @return Void
 */       
function style_background(id, img)
{
    id.style.background = "url(../css/img/" + img + ") no-repeat top left";
}

/**
 * Fonction qui change l'image de fond
 * 
 * @param Object id
 * @param String img
 * 
 * @return Void
 */
function style_background2(id, img)
{
    id.style.background = "url(../css/img/" + img + ") yrepeat top left";
}

/**
 * Fonction qui ouvre un pop-up
 * 
 * @param String url
 * 
 * @return Boolean false
 */
function openWindow(url) 
{
    window.open(url, '', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=500px,height=500px');
    return false;
}

/**
 * Fonction qui ferme une fenetre
 * 
 * @return Void
 */
function fermer()
{
    window.close();
}

/**
 * Fonction qui submit
 * 
 * @return Void
 */
function recharger()
{
    document.FormName.submit();
}
