// Build by vadim88
// www.php-d.com
// IPB 2.3.X

function updatestatus( str )
{
	//----------------------------------
	// Using fancy js?
	//----------------------------------

	if ( ! use_enhanced_js )
	{
		window.location = ipb_var_base_url + 'act=xmlout&do=updatestatus&mstatus=' + str;
		return false;
	}
	else
	{
		/*--------------------------------------------*/
		// Main function to do on request
		// Must be defined first!!
		/*--------------------------------------------*/

		do_request_function = function()
		{
			//----------------------------------
			// Ignore unless we're ready to go
			//----------------------------------

			if ( ! xmlobj.readystate_ready_and_ok() )
			{
				xmlobj.show_loading();
				return;
			}

			xmlobj.hide_loading();

			//----------------------------------
			// INIT
			//----------------------------------

			var returned = xmlobj.xmlhandler.responseText;
			document.getElementById('mstatustext').className = 'mstatus';

			document.getElementById( 'mstatustext' ).innerHTML = returned;
		};

		//----------------------------------
		// LOAD XML
		//----------------------------------

		xmlobj = new ajax_request();
		xmlobj.onreadystatechange( do_request_function );

		xmlobj.process( ipb_var_base_url + 'act=xmlout&do=updatestatus&mstatus=' + str);

		return false;
	}
};

function hide_div(div_id) {
    document.getElementById(div_id).style.display = 'none';
}

function show_div(div_id) {
    document.getElementById(div_id).style.display = 'inline';
}