<!-- Code r0x0red by IU East Web Team -->
function GetXHR()
{
  var XHR=null;
  try
    {
    // Firefox, Opera 8.0+, Safari
    XHR=new XMLHttpRequest();
    }
  catch (e)
    {
    // Internet Explorer
    try
      {
      XHR=new ActiveXObject("Msxml2.XMLHTTP");
      }
    catch (e)
      {
      XHR=new ActiveXObject("Microsoft.XMLHTTP");
      }
    }
  return XHR;
}

function makerequest(serverPage, obj, getOrPost, str)
{
	// These three lines allow legacy functionality with older
	// versions of the functions, which didn't use the 3rd and
	// 4th parameters. Old uses still need to now pass the 
	// actual object instead of just the ID of the object.
	var undefined;
	if (str == undefined) { str = null; }
	if (getOrPost == undefined || getOrPost.toUpperCase() != "POST") 
	{ getOrPost = "GET"; }
	
	var XHR;
	
	if(XHR = GetXHR()) {
		XHR.open (getOrPost, serverPage, true);
		if (getOrPost.toUpperCase() == "POST")
		{
			XHR.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
			XHR.setRequestHeader("Content-Length", str.length);
			XHR.setRequestHeader("Connection", "close");
		}
		XHR.onreadystatechange = function() {
			if (XHR.readyState == 4 && XHR.status == 200 && obj != null)
			{
				switch(typeof(obj)) {
					// Allows for AJAX chaining //
					case "function":
						obj(XHR.responseText);
						break;
					case "object":
						if (obj.innerHTML)	
						{ 
							obj.innerHTML = XHR.responseText;
						}
						else obj.src = XHR.responseText;
						break;
					
					default:
						obj = XHR.responseText; 
						break;
				}
	
			}
		}
		XHR.send(str);
	}
}

var JSON = {
	"re": /^(\s|[,:{}\[\]]|"(\\["\\bfnrtu]|[^\x00-\x1f"\\])*"|-?\d+(\.\d*)?([eE][+-]?\d+)?|true|false|null)+$/, 
	"parse": function (text) {
				return this.re.test(text) ? eval('(' + text + ')') : undefined;
			 }
};