// --------------------------------------------------------------------------------
/*
*/
// --------------------------------------------------------------------------------

// --------------------------------------------------------------------------------
// --------------------------------------------------------------------------------

var Show =
{
	SVCURI: "http://" + document.domain + ":" + window.location.port + "/ropemarks-5.0.0/shows/show_svc.php",
	//alert( SVCURI );

	// --------------------------------------------------------------------------------
	// Private section
	// --------------------------------------------------------------------------------
	
	__showXmlHttpRequest: function( /* string */ eventName, /* object */ xmlHttpRequest )
	{
		alert(	eventName + ": "			+ xmlHttpRequest							+ " \n\n " +
				"All response headers: \n"	+ xmlHttpRequest.getAllResponseHeaders()	+ " \n\n " +
				"readyState: "				+ xmlHttpRequest.readyState					+ " \n\n " +
				"responseText: "			+ xmlHttpRequest.responseText				+ " \n\n " +
				"responseXML: " 			+ xmlHttpRequest.responseXML				+ " \n\n " +
				"status: " 					+ xmlHttpRequest.status						+ " \n\n " +
				"statusText: "				+ xmlHttpRequest.statusText					+ " \n\n " 
		);
	},
	
	doLoaded: function( /*object*/xmlHttpRequest )
	{
//		this.__showXmlHttpRequest( "onLoaded", xmlHttpRequest );
	},
	doComplete: function( /*object*/xmlHttpRequest )
	{
//		this.__showXmlHttpRequest( "onComplete", xmlHttpRequest );
	},
	doSuccess: function( /*object*/xmlHttpRequest )
	{
//		this.__showXmlHttpRequest( "onSuccess", xmlHttpRequest );
	},
	doFailure: function( /*object*/xmlHttpRequest )
	{
//		this.__showXmlHttpRequest( "onFailure", xmlHttpRequest );
	},
	

	// --------------------------------------------------------------------------------
	// --------------------------------------------------------------------------------
	
	getShow: function( boxId, showId, langId )
	{
//		alert( "Show.getShow( " + boxId + ", " + showId + " ) " );
		
		var reqUri = this.SVCURI + "?showId="+ showId + "&langId=" + langId + "";
		var ajaxOptions = 
		{
			asynchronous: true, 
		    method: 'get',
			evalScripts: true,
			onLoaded: this.doLoaded.bind( this ),
			onComplete: this.doComplete.bind( this ),
			onSuccess: this.doSuccess.bind( this ),
			onFailure: this.doFailure.bind( this )
		}

		ajax = new Ajax.Updater( boxId, reqUri, ajaxOptions );
	}//,
	
}; // Class Show

/* EOF */