CHazType.prototype = new CXMLHTTP();
CHazType.prototype.constructor = CHazType;

function CHazType( arg )
{
	var m_XMLHTTP = null;
	var m_Response = "";
	var nCode = 0;
	var nMesg = "";
	
	var names = new Array(	"user_id",
							"name",
							"description" );
	
	this.m_FormID = "id_haztype";
	this.ClassName = "CHazType";
		
	// this callback does not have access to 'this'.
	// it's as though it were static
	function _onReadyStateChange()
	{
		if( m_XMLHTTP.readyState == 4 )
		{
			m_Response = m_XMLHTTP.responseText;
			var elem = document.getElementById( "id_haztype_status" );
			
			nCode = g_GetCode( m_Response );
			nMesg = g_GetMesg( m_Response );
			
			elem.innerHTML = m_Response;			
			
			//alert( "CSignup _onReadyStateChange Response = " + m_Response );	
		}				
	}			
			
	m_XMLHTTP = this.getXMLHTTP();
	m_XMLHTTP.onreadystatechange = _onReadyStateChange;
	
	this.submit( "/processor/haz_type.php", this.makeForm( names ) );
}