<!--
function createRequestObject() {
	var ro;
	var browser = navigator.appName;
	if(browser == "Microsoft Internet Explorer") {
		ro = new ActiveXObject("Microsoft.XMLHTTP");
	} else {
        	ro = new XMLHttpRequest();
	}
	return ro;
}

var http = createRequestObject();
var sequence = 0;
var online_update = 0;

function sndReqArg(action,arg) {
	if ((arg.length = 0) && (online_update > 5)) {
	   action = 'online_update';
	   online_update = 0;
	}   
	http.open('get', 'shout.php?action='+action+'&arg='+escape(arg)+'&seq='+sequence);
	http.onreadystatechange = handleResponse;
	http.send(null);
	online_update++;
}

function displayResponse(updatestr, beep) {

var update = new Array();

		if(updatestr.indexOf('|' != -1)) {
		
		update = updatestr.split('|');
		
			if (update[7] == 'ok') {
			  
			if (update[0].length > 0) document.getElementById('o_sms').innerHTML = update[0]; 
			if (update[1].length > 0) {
			  document.getElementById('o_shout').innerHTML = update[1];
			  if (beep == 1) {
  			    boing.src = 'kana.jama';
			    boing.src = 'gfx/boooiiinnng.wav';
			  }
			}  
			if (update[2].length > 0) document.getElementById('o_ilm').innerHTML = update[2];
			if (update[3].length > 0) document.getElementById('o_kesonsees').innerHTML = update[3];	
			if (update[4].length > 0) document.getElementById('o_varske').innerHTML = update[4];
			if (update[6].length > 0) document.getElementById('o_members').innerHTML = update[6];

			if (document.getElementById('o_bigshout') && update[5].length > 0)
			  document.getElementById('o_bigshout').innerHTML = update[5];

			oldsequence = sequence;  
			sequence = update[8];
			
		  }
		}   
}


function handleResponse() {
	if(http.readyState == 4) {
		var response = http.responseText;
		var update = new Array();
		displayResponse(unescape(response), 1);
		}
}


//-->