";
for (var i = 0; i < smilies.length; i++) {
if(ActualSmile!=smilies[i][1]) {
obj+="
";
obj+="
";
}
ActualSmile=smilies[i][1];
}
obj+="
"
document.getElementById("SmileyList").innerHTML=obj;
}
function appendSmiley(text) {
document.getElementById('chatbarText').value+=' '+text;
document.getElementById('chatbarText').focus();
}
function ShowHide(parent, enfant) {
txtParent=document.getElementById(parent).innerHTML;
etatEnfant=document.getElementById(enfant).style.display;
document.getElementById(parent).innerHTML=(txtParent=="+") ? "-" : "+";
document.getElementById(enfant).style.display=(etatEnfant=="none") ? "" : "none";
jalSmiley = (jal_getCookie("jalSmiley")==1) ? 0 : 1;
document.cookie = "jalSmiley="+jalSmiley+";expires=Fri, 09 Mar 2012 09:17:48 UTC;path=/;";
}
//initiates the first data query
function receiveChatText() {
jal_lastID = parseInt(document.getElementById('jal_lastID').value) - 1;
if (httpReceiveChat.readyState == 4 || httpReceiveChat.readyState == 0) {
httpReceiveChat.open("GET",GetChaturl + '&jal_lastID=' + jal_lastID + '&rand='+Math.floor(Math.random() * 1000000), true);
httpReceiveChat.onreadystatechange = handlehHttpReceiveChat;
httpReceiveChat.send(null);
jal_loadtimes++;
if (jal_loadtimes > 9) jal_timeout = jal_timeout * 5 / 4;
}
setTimeout('receiveChatText()',jal_timeout);
}
//deals with the servers' reply to requesting new content
function handlehHttpReceiveChat() {
if (httpReceiveChat.readyState == 4) {
firstarray = httpReceiveChat.responseText.split('\n');
if (firstarray.length == 2) { // if != 2, it failed, we should skip the processing part
if(firstarray[0]!="") replaceUserOnline(firstarray[0]); //inserts the new content into the page
results = firstarray[1].split('---'); //the fields are seperated by ---
if(results.length > 2 && document.getElementById('TheBox') && jalSound==1)
document.getElementById('TheBox').innerHTML='