/**
* Fonctions AJAX Générique
*
* MagicCorporation WebSystem v6.0
* Gestionnaire de Contenu pour site Internet
* 
* @package      MC6
* @author       Jean-Christophe Taisne <amonra@magiccorporation.com>
* @link         http://mc6.magiccorporation.com 
* @copyright    2000-2009 MagicCorporation
* @version      6.0 $Id: function.js 439 2009-02-04 04:21:26Z amonra $
*/

function ajax_file(rub, op, argv, status) {
    if(window.XMLHttpRequest) // FIREFOX
        xhr_object = new XMLHttpRequest(); 
    else if(window.ActiveXObject) // IE
        xhr_object = new ActiveXObject("Microsoft.XMLHTTP"); 
    else 
        return(false); 
    xhr_object.open("GET", 'mc.php?rub='+rub+'&file=ajax'+'&op='+op+'&'+argv, status); 
    xhr_object.send(null); 
    if(xhr_object.readyState == 4)
        if(xhr_object.status == 200)
            return(xhr_object.responseText);
        else
            return(false);
    else
        return(false);
}

function writediv(name, texte) {
    document.getElementById(name).innerHTML = texte;
}

function completediv(name, texte) {
    document.getElementById(name).innerHTML += texte;    
}