// Author: Al Sierra
// Version: 6.30.2008
// Description: AJAX for thought archive screen
var search_tag = {
	_dataURL: 'scripts/php/search.php',
	_docRef: false,
	_section: false,
	_ext: false,
	_id: false,
	
	Init: function(inDocumentRef,loc,section,tag_id)
	{
		this._docRef = inDocumentRef;
		this._dataURL = loc+this._dataURL;
		this._section = section;
		this._id = tag_id;
		this.Update(0);
		$('master').style.display = 'block';
	},
	ChangePage: function(pagenumber) 
	{	
	 	$('master').style.display = 'none';
		$('search_working_t').style.display = 'block';
	 	this.Update(pagenumber);	 	
	},
	Update: function(pagenumber) 
	{	
	 	var msg_data = {};
	 	msg_data.tag_id = this._id;
		msg_data.section = this._section;
		msg_data.pagenumber = pagenumber;
		
		new Ajax.Updater('master',this._dataURL+'?cmd=showtag', {
			parameters: $H(msg_data).toQueryString(),
			evalScripts: true,
			onComplete: function(){
				$('search_working_t').style.display = 'none';
				$('master').style.display = 'block';
			}			
			});
	}	
}
