// FUNCTIONS TO LOAD ONCE DOM AVAILABLE
////////////////////////////////////////////////

addDOMLoadEvent(hidePage);
addDOMLoadEvent(loadContent);

function loadContent(){

		// <![CDATA[
  				
  		// Create new flash object
				var so = new SWFObject("/_site/swf/foundobj.swf", "FlashPage", "100%", "100%", "8", "#ffffff");
				
				//so.addParam("menu", "false");
				
		// Send Page Content
		
				so.addVariable('curPage', getID_Text("pageLoc"));						// Page Title
				
				so.addVariable('feedLink', getID_Attr("pgFeed","href"));				// Page Feed Link
				so.addVariable('feedType', getID_Text("pgFeed"));						// Page Feed Type
				
				so.addVariable("found_count", getID_Attr("found_count", "value"));		// Limit
				so.addVariable("found_desc", getID_Text("pgDescription"));		// Page Description
				
				for (var i_counter = 0; i_counter <= getID_Attr("found_count", "value"); i_counter++) {
					so.addVariable("fo" + i_counter + "b", getID_Text("fo" + i_counter + "b"));	// Body
					so.addVariable("fo" + i_counter + "t", getID_Text("fo" + i_counter + "t"));	// Title
					so.addVariable("fo" + i_counter + "d", getID_Text("fo" + i_counter + "d"));	// Date
					so.addVariable("fo" + i_counter + "p", getID_Attr("fo" + i_counter + "p", "src"));	// Photo
				}
				
				so.addVariable("urlHash", urlHash);
		
		// Write the Flash to the page and replace the page contents
		
				so.write("siteWrap");
				document.getElementById("siteWrap").style.height = "100%";
		// ]]>
}
