var ajaxmsg;

// DEFUNCT AJAX call.  DELETE this at some point when it's useless.
/*
var	callback;
function XajaxSend(call, msg, cb) {
	ajaxmsg = '';
	if (call.length==0) {
	  return;
	}
	callback = cb;	//Save the callback function for the reply

	if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
	  xmlhttp=new XMLHttpRequest();
	} else {// code for IE6, IE5
	  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
	}

	xmlhttp.onreadystatechange=function() {
	  if (xmlhttp.readyState==4 && xmlhttp.status==200) {
		ajaxmsg=xmlhttp.responseText;
		if(callback != null)
			callback();	//Call user function to handle ajaxmsg data
	  }
	}

	xmlhttp.open("GET",call+".php?"+msg, true);
	xmlhttp.send();
}
*/

function ajaxSend(call, msg, cb) {
	callback = cb;	//Save the callback function for the reply
	$.ajax({
		type: "GET",
		url: call,
		data: msg,
		dataType: "json",
		success: function(msg) {
			ajaxmsg = msg;
			if(cb != null)
				cb(ajaxmsg);	
		},
		fail: function(msg) {
			alert("AJAX:"+msg);
		}
	});
}

