 /**
	Uniwits System, 2011
	http://www.uniwits.com
**/ var MESSAGE_ADJUST_XMLHR=null; function message_update_count() { if (MESSAGE_ADJUST_XMLHR) if (MESSAGE_ADJUST_XMLHR.readyState!=0 && MESSAGE_ADJUST_XMLHR.readyState!=4) return; var cookies=UNIWITS.Toolbox.parseCookies(); if (document.getElementById('unread_message_count_span')) { if (!MESSAGE_ADJUST_XMLHR) MESSAGE_ADJUST_XMLHR=UNIWITS.Toolbox.getXMLHttpRequest(message_update_count_do); MESSAGE_ADJUST_XMLHR.open('GET','qx-cmd-message.count.html',true); MESSAGE_ADJUST_XMLHR.send(null); } } function message_update_count_do() { if (MESSAGE_ADJUST_XMLHR.readyState==4 && MESSAGE_ADJUST_XMLHR.status==200) { var unread_message_count_span=document.getElementById('unread_message_count_span'); if (!unread_message_count_span) return; var count=parseInt(MESSAGE_ADJUST_XMLHR.responseText); if (count) unread_message_count_span.innerHTML='('+count+')'; else unread_message_count_span.innerHTML=''; } } function start_message_update_count() { setInterval('message_update_count()',300000); } start_message_update_count();