
// <![CDATA[

$(document).ready(function() {

	
	/*
	Purpose
		Used to insert a post include into a forum page.
	Parameters
		Selector (String) = The selector identifying the element we will write to.
		ForumID (String) = The forum identifier. This is used to create the path to the file we're loading.
			For example, "AmalgamFillings" will translate into part of the path we're posting to:
				"/Forum/PostIncludes/AmalgamFillings/MyFile.html"
		IncludeFile (String) = The name of the file we're loading. The file suffix should be included.
	*/
	function GetPostInclude(Selector, ForumID, IncludeFile) {
		
		// Configuration
		// The directory containing post includes (it's root location)
		var RootDir = "/Forum/PostIncludes";

		// Assemble the filespec of the file we're going to load
		var FileSpec = RootDir + "/" + ForumID + "/" + IncludeFile;
		
		// Load the file and inject it
		$(Selector).load(FileSpec);
		
	}
	
	
	//$("#InsertHere").html("Here is some new text");
	//$("#InsertHere").css("background-color", "#FFFFCC");
	//$("#InsertHere").load("/Forum/PostIncludes/AmalgamFillings/OtherThingsThatMayInterestYou.html");
	
 });


// ]]>

