new XEQST()				;	

function	XEQST()
{
	var		myself = XEQST 	;

	
	myself.prototype._set_application_code = function()
	{
		alert( "FatalError>You must override '_set_application_code()' in this class" );
	}

	myself.prototype._get_properties = function()
	{
		alert( "FatalError>You must override '_get_properties()' in this class" );
		
		return(0)	;
	}

	myself.prototype._application_process = function()
	{
		alert( "FatalError>You must override '_application_process()' in this class" );
	}


	myself.prototype.setup = function()
	{
		this.allocate()		;

		this._set_application_code() ;
		this.set_post_process()		;
	}



	myself.prototype.set_post_process = function()
	{
		var	thisObject = this	;


		if( !thisObject )
		{
			alert( "FatalError>'thisObject@set_post_process' is NULL ." );

			return ;
		}


		this.XMLhttpObject.onreadystatechange = function()
		{
			if( thisObject.is_recieved() )
			{
				if( thisObject._get_properties() )			// 読込み済みの XML Property を格納する
				{
					thisObject._application_process()	; 	// 格納した XML Property に基づいて画面に変更を加える
				}
			}
		}
	}


	myself.prototype.get_rawtext = function ()
	{
		if( this.XMLhttpObject )
		{
			return( this.XMLhttpObject.responseText )	;
		}
		else
		{
			return( null )	;
		}
	}


	myself.prototype.set_request_url	= function ( url )
	{
		this.requestUrl 	= url + "&procseqid="+(new Date()).getTime()	;
		//this.requestUrl 	= url ;
	}

	myself.prototype.call_request	= function ()
	{
		this.XMLhttpObject.open("GET",this.requestUrl,true );
		this.XMLhttpObject.send("");
	}


	myself.prototype.get_response	= function ()	
	{
		if( this.XMLhttpObject )
		{
			return( this.XMLhttpObject.responseXML )	;
		}
		else
		{
			return( null )	;
		}
	}


	myself.prototype.is_recieved	 	= function ()
	{

		if( this.XMLhttpObject )
		{
			if( ( this.XMLhttpObject.readyState == 4 ) && ( this.XMLhttpObject.status == 200 ) )
			{
				return(1)	;
			}
		}
		else
		{

			alert("XMLhttpObject undefined") ;
			return(-1)	;
		}

		return(0)	;
	}


	myself.prototype.is_initialized	= function ()
	{
		if( this.XMLhttpObject )
		{
			return(1)	;
		}
		else
		{
			return(0)	;
		}
	}


	myself.prototype.get_property	= function ( identifier )
	{
		if( this.XMLhttpObject )
		{
			if( this.XMLhttpObject.responseXML )
			{
				return( this.XMLhttpObject.responseXML.getElementsByTagName( identifier ) )	; 
			}
		}
		return( null )	;
	}



	myself.prototype.allocate = function ()
	{
		try
		{
			this.XMLhttpObject = new XMLHttpRequest();
		}
		catch(e)
		{
			try
			{
				this.XMLhttpObject = new ActiveXObject("Msxml2.XMLHTTP");
			}
			catch(e)
			{
				try
				{
					this.XMLhttpObject = new ActiveXObject("Microsoft.XMLHTTP");
				}
				catch(e)
				{
					return null;
				}
			}
		}

		if (this.XMLhttpObject) 
		{
			//	this.XMLhttpObject.onreadystatechange = proc;
		}

		return this.XMLhttpObject;
	}


	myself.prototype.pop_property= function ( xml_nodes )
	{
		if( xml_nodes )
		{
			return ( xml_nodes.nodeValue )	;
		}
		else
		{
			return null	;
		}
	}


	myself.prototype.get_request_url= function ()
	{
		return( this.requestUrl )	;
	}


	myself.prototype.get_value	        = 	function ( identifier , num )
	{
		if( ( this.property = this.get_property( identifier ) ) )
		{
          	this.value = this.get_property_value( this.property , num ) ;

			return(this.value) ;
		}
		else
		{
			return( "" )	;
		}
	}


	myself.prototype.get_property_value= function ( property , num )
	{
		if( property[num].childNodes[0] )
		{
			return( property[num].childNodes[0].nodeValue )	;
		}
		else
		{
			return( "" )	;
		}
	}


	myself.prototype.set_request_process= function	( procStr )	
	{
		this.request_process = procStr	;
	}


	myself.prototype.get_request_process= function	()	
	{
		return( this.request_process )	;
	}


	myself.prototype.execute	= function	()	
	{
		this.setup()	;

		if( this.is_initialized() )
		{
			this.set_request_url( this.request_process	)	 ;
			this.call_request()  ;
		}
	}

	myself.prototype.call_request	= function ()
	{
		this.XMLhttpObject.open("GET",this.requestUrl,true );
		this.XMLhttpObject.send("");
	}


	myself.prototype.call_request_post	= function ()
	{
		this.XMLhttpObject.open("POST",this.requestUrl,true );
		this.XMLhttpObject.setRequestHeader("content-type","application/x-www-form-urlencoded;charset=UTF-8");


		this.XMLhttpObject.send( this.sendParamStr );
	}

	myself.prototype.set_post_params	= function	(str)	
	{
		this.sendParamStr = str	;
	}

	myself.prototype.execute_post	= function	()	
	{
		this.setup()	;

		if( this.is_initialized() )
		{
			this.set_request_url( this.request_process	)	 ;
			this.call_request_post()  ;
		}
	}
}



function is_property_exist( property,num )
{
	if( property[num].childNodes[0] )
	{
		return( 1 )	;
	}
	else
	{
		return( null )	;
	}
}



function _inherit(subClass, superClass) 
{
	for (var prop in superClass.prototype) 
	{
		subClass.prototype[prop] = superClass.prototype[prop];
	}
}


function inherit(subClass, superClass) 
{
	copy_undef_properties(superClass.prototype, subClass.prototype);
}

function copy_undef_properties(src, dest)
{
	for (var prop in src) 
	{
		if (typeof(dest[prop]) == "undefined") 
		{ 
			dest[prop] = src[prop];
		}
		else
		{
			//	alert("OverRide : " + prop )	;
		}
	}
}


/*
function $(IDStr)
{
	return ( document.getElementById(IDStr) );
}

*/


