function file(fichier)
{
     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", fichier, false);
     xhr_object.send(null);
     
     if(xhr_object.readyState == 4)
        return(xhr_object.responseText);
     else
        return(false);
}

function toggleHistory(id, lang)
{
    var contentDiv = document.getElementById('historyContent_' + id);
    var searchDiv = document.getElementById('tagItem');
    var stxt = searchDiv.getAttribute('content');
    
    if (contentDiv.getAttribute('content') == 'news')
    {
        contentDiv.innerHTML = file('history.php?simple=no&id=' + id + '&stxt=' + stxt + '&lang=' + lang);
        contentDiv.setAttribute('content', 'history');
    }
    else if (contentDiv.getAttribute('content') == 'history')
    {
        contentDiv.innerHTML = file('history.php?simple=yes&id=' + id + '&stxt=' + stxt + '&lang=' + lang);
        contentDiv.setAttribute('content', 'news');
    }
}
