/*----------------------------------------------------------------------------//
// Javascript pour le site client  -------------------------------------------//
//----------------------------------------------------------------------------//
// Client : -
// Note   : -
// Date   : -
//----------------------------------------------------------------------------*/

/*----------------------------------------------------------------------------*/
// Inclusion dynamique des fichiers externes javascripts
/*----------------------------------------------------------------------------*/
function importJavascript(src) {
    document.write("<script type=\"text/javascript\" src=\"" + src + "\"></scr" + "ipt>");
}
function importCss(href, media) {
    document.write('<link rel="stylesheet" type="text/css" media="' + media + '" href="' + href + '" />');
}

/*----------------------------------------------------------------------------*/
// IMPORTATION DE FICHIERS
/*----------------------------------------------------------------------------*/
importJavascript("/includes/plugins/abso.thickbox.js");
importCss("/includes/plugins/abso.thickbox.css", "screen");

/*----------------------------------------------------------------------------*/
// DÉCLARATIONS JQUERY
/*----------------------------------------------------------------------------*/


function OpenPopup(pTitle) {
    if (readCookie("popup") == null) {
        createCookie("popup", "1", 1);
        tb_show(pTitle, "#TB_inline?height=260&amp;width=380&amp;inlineId=BlocNouvelles", "");
    }
}

function createCookie(name, value, days) {
    if (days) {
        var date = new Date();
        date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
        var expires = "; expires=" + date.toGMTString();
    }
    else var expires = "";
    document.cookie = name + "=" + value + expires + "; path=/";
}

function readCookie(name) {
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');
    for (var i = 0; i < ca.length; i++) {
        var c = ca[i];
        while (c.charAt(0) == ' ') c = c.substring(1, c.length);
        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
    }
    return null;
}