// JavaScript Document
function loadComm()
{
valorcapa = document.getElementById("nom").value;
try 
{ 
xmlhttp = window.XMLHttpRequest?new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) { 
} 
xmlhttp.onreadystatechange = triggered;
xmlhttp.open("GET", "showcommform.php?nom="+valorcapa,"true");
xmlhttp.send(null);
}
function triggered() { 
if ((xmlhttp.readyState == 4) && (xmlhttp.status == 200)) {
document.getElementById("comentari").style.visibility = "visible";
document.getElementById("comentari").style.display = "block";
document.getElementById("comentari").innerHTML = xmlhttp.responseText;
document.getElementById("nom").disabled = true;
document.getElementById("nickbutton").disabled = true;
}
}
function loadConf(formulari)
{
var nick = formulari.nick.value;
var comentari = formulari.comment.value;
try 
{ 
xmlhttpb = window.XMLHttpRequest?new XMLHttpRequest(): new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) { 
} 
xmlhttpb.onreadystatechange = retriggered;
xmlhttpb.open("GET", "comment2.php?nick="+nick+"&comentari="+comentari,"true");
xmlhttpb.send(null);
}
function retriggered() { 
if ((xmlhttpb.readyState == 4) && (xmlhttpb.status == 200)) {
document.getElementById("confirma").style.visibility = "visible";
document.getElementById("confirma").style.display = "block";
document.getElementById("confirma").innerHTML = xmlhttpb.responseText;
document.getElementById("comment").disabled = true;
}
}
