function ContainerContents(content,id)
{
	try
	{
		if (content.readyState == 4)
		{
			if(content.status == 200) 
			{ 
			    document.getElementById(id).innerHTML=content.responseText; 
				//trying to make TinyMCE work after a FUCKING AJAX call.
				//tinyMCE.init({ mode : "none", theme : "simple", convert_urls : false  }); 
				//tinyMCE.execCommand('mceAddControl', false, 'txaEditableContent');
				//tinyMCE.execCommand('mceAddControl', false, 'elm1');
			}
			else { alert('\n\nThere was a problem with the request.\n\nStatus code: '+content.status+'\n'+content.statusText); }
		}
	}
	catch(error) { alert('Error: '+error.name+' -- '+error.message); }
} // function ContainerContents()

function ReplaceElementID(url,id)
{
    document.getElementById(id).innerHTML='<div class="loading" style="text-align: center"><img src="greybox/indicator.gif"/></div>';
	var httpRequest;
	if (window.XMLHttpRequest)
	{
		try { httpRequest = new XMLHttpRequest(); }
		catch(e) {}
	} 
	else if (window.ActiveXObject)
	{
		try { httpRequest = new ActiveXObject("Msxml2.XMLHTTP"); } 
		catch(e)
		{
			try { httpRequest = new ActiveXObject("Microsoft.XMLHTTP"); } 
			catch(e) {}
		}
	}
	if(! httpRequest)
	{
		alert('\n\nGiving up :(\n\nCannot create an AJAX connection.');
		return false;
	}
	httpRequest.onreadystatechange = function() { ContainerContents(httpRequest,id); };
	httpRequest.open('GET',url,true);
	httpRequest.send('');
} // function makeRequestGET()


/* TINYMCE SHIT FOR AJAX BLAH
if(content.readyState == 4)
    {
        tinyMCE.execCommand("mceAddControl", true, "elm1");
    }
	*/