/** GetAreaContent( int blog_cID, int ref_cID, string sTargetId, string arHandle)
 * Grabs Atrea content asynchronously and transplants the templated result to an element's innerHTML
 * NOTE: throwException() is part of /config/user_defined/js_main_library.js, the lot of which will be 
 * one day trimmed and rightfully placed in /js/
 * 
 * @param	blog_cID		cID of the Blog page in the Sitemap
 * @param	ref_cID			cID of the Page to reference; i.e. 1 would referecne the Home Page
 * @param	sTargetId		The ID of the HTML element where the result will be written
 * @param	arHandle		The name of the Area to grab content from
 * @param	arguments[4]	(optional) Block Type (.BlockType) and Template (.Template) info to pass to the Area
 *  
 * @returns	result			The Area contents
 * 
 * @since	5.3.0
*/
function GetAreaContent( blog_cID, ref_cID, sTargetId, arHandle)
{
	var QueryString = 
	{
		cID: blog_cID
		,ref_cID: ref_cID
		,arHandle: arHandle
	}
	
	if(arguments[4] && typeof(arguments[4].BlockType) != 'undefined')
	{
		QueryString.block_type = arguments[4].BlockType;
		QueryString.template = arguments[4].Template;
	}
	
	$.get(
		"/index.php"
		,QueryString
		,function(result)
		{
			try
			{ 
				
				$(sTargetId).html(result);
				if( arHandle === "Main Navigation" )
				{
					SetMenuAwareness();
				}
			}
			catch(e){ throwException( '/js/blog.js : GetAreaContent()', e.lineNumber, e, e.message ); }
		}	
	);
}
