/**
 * Live support function, for ajax checking the online status of support reps
 * 
 * @return
 */



function updateOnlineStatus(){
	// AJAX POST/GET
	var xhttp = makeAjaxObject(); // CALL FROM js/ajax.js

	if(!xhttp){

		//clearInterval(refreshSupportStatus);

		alert("Error while checking document for modifications:\n"+
				"Cannot Initalize AJAX object. Try another browser.");

	}else{

		xhttp.open('POST','support_check.php?owner_code=f206d6ddf1a0ff520891d59e882609ae',true);


		xhttp.onreadystatechange = function() {
			if(xhttp.readyState == 4){

				var obj = getEl("live_support");
				var response = xhttp.responseText;

				//alert(response);
				var arr = response.split(":",2);

				if(arr[0] == "1"){
					obj.src = "images/live_support_on.gif";
				}else{
					obj.src = "images/live_support_off.gif";
				}

			}
		}

		xhttp.send(null);



	}
}
