/// Ajax Abstract Class
///	Written By: Matthew Gaddis <matthew_gaddis@yahoo.com>
/// Created: 2005-01-07

function cscAjax(strUrl, xmlDOMDoc, objHTTPRequest)
{
	///
	///	Ajax Init
	///
	
	if(arguments.length > 0) 
		this.init(strUrl, xmlDOMDoc, objHTTPRequest);

}

///
///	Ajax Methods
///

cscAjax.prototype.init = function(strUrl, xmlDOMDoc)
{
	///
	///	Ajax Properties	
	///
	
	this.url = strUrl;
	this.doc = xmlDOMDoc;
};

cscAjax.prototype.processHTTPRequestChange = function(intIndex)
{
	if (XmlHttp.req[intIndex].readyState == 4) 
	{
		// only if "OK"
		if (XmlHttp.req[intIndex].status == 200) 
		{
			this.doc = XmlHttp.req[intIndex].responseXML;
			//this.doc.normalize();
		}
	}	
};

cscAjax.prototype.load = function()
{
	var intIndex = XmlHttp.get(this.toString());

	if(intIndex != -1)
	{
		XmlHttp.req[intIndex].open("GET", this.url, true);
		
		if(XmlHttp.isIE)
			XmlHttp.req[intIndex].send();
		else
			XmlHttp.req[intIndex].send(null);
	}
	
	return intIndex;
};

cscAjax.prototype.toString = function() { return 'cscAjax'; }