CHazard.prototype = new CXMLHTTP();
CHazard.prototype.constructor = CHazard;

function CHazard( arg )
{
	var m_XMLHTTP = null;
	var m_Response = "";
	var nCode = 0;
	var nMesg = "";
	
	var names = new Array(	"pk",
							"lat",
							"lng",
							"haz_type",
							"context",
							"radius",
							"elevation",
							"uid",
							"name",
							"description",
							"gone",
							"op" );
	
	this.m_FormID = "id_hazard";
	this.ClassName = "CHazard";
		
	// 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_hazard_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/hazard.php", this.makeForm( names ) );
}