function ajax_obj()
{
	this.isIE               = false;
	this.ajaxhandler         = null;
	this.receive_n_act = function() {}
	this.loading_fired		= 0;
}

ajax_obj.prototype.xml_init = function()
{
	try
	{
		this.ajaxhandler = new XMLHttpRequest();
		this.ie        = false;
		this.allow_use = true;
		return true;
	}
	catch(e)
	{
		try
		{
			this.ajaxhandler = new ActiveXObject('Microsoft.XMLHTTP');
			this.ie        = true;
			this.allow_use = true;
			return true;
		}
		catch(e)
		{
			this.ie        = true;
			this.allow_use = false;
			return false;
		}
	}
}

ajax_obj.prototype.process = function( url, type, post )
{
	
	type = type == "POST" ? "POST" : "GET";
	
	var mydate = new Date();
	url = url + mydate.getTime() + '/';
	
	if ( ! this.ajaxhandler )
	{
		this.xml_init();
	}
	
	if ( ! this.readystate_notready() )
	{
		this.ajaxhandler.open(type, url, true);
		if ( type == "GET" )
		{
			this.ajaxhandler.send(null);
		}
		else
		{
			if ( typeof( this.ajaxhandler.setRequestHeader ) != "undefined" )
			{
				this.ajaxhandler.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
			}
			this.ajaxhandler.send( post );
		}
		
		if ( this.ajaxhandler.readyState == 4 && this.ajaxhandler.status == 200 )
		{
			return true;
		}
	}
	
	return false;
}

ajax_obj.prototype.get_element_text_ns = function(prefix, local, parentElem, index)
{
    var result = "";
    
    if ( prefix && this.isIE )
    {
        result = parentElem.getElementsByTagName(prefix + ":" + local)[index];
    }
    else
    {
        result = parentElem.getElementsByTagName(local)[index];
    }
    
    if ( result )
    {
        if (result.childNodes.length > 1)
        {
            return result.childNodes[1].nodeValue;
        }
        else
        {
            return result.firstChild.nodeValue;    		
        }
    }
    else
    {
        return "n/a";
    }
}


ajax_obj.prototype.readystate_notready = function()
{
	return ( this.ajaxhandler.readyState && ( this.ajaxhandler.readyState < 4 ) );
}


ajax_obj.prototype.readystate_ready = function()
{
	return ( this.ajaxhandler.readyState == 4 && this.ajaxhandler.status == 200 ) ? true : false;
}

ajax_obj.prototype.onreadystatechange = function( event )
{
	if ( ! this.ajaxhandler )
	{
		this.xml_init();
	}

	if ( typeof(event) == 'function' )
	{
		this.ajaxhandler.onreadystatechange = event;
	}
}