/* Redirect to frames page if content page is loaded independently */

if( top.frames.length == 0 )
{
	top.location="http://www.jonathanmooney.com/frames.pl?path=" + window.location.pathname;
}


/* Set down state of buttons in flash nav */

/* -----------------------------------------------------------
	Univeral method for javascript->flash setvariable
	This script is based on the version by Mustardlab.com:
	http://www.mustardlab.com/developer/flash/jscommunication/
----------------------------------------------------------- */

/* -----------------------------------------------------------
	function flashEvent(swf, event, params)
----------------------------------------------------------- */
function flashEvent(inSwf, inEvent, inParams) {	
	
	var divcontainer = "flash_setvariables_" + inSwf;	
	if(!document.getElementById(divcontainer)){
		var divholder = document.createElement("div");
		divholder.id = divcontainer;
		document.body.appendChild(divholder);
	}
	var divinfo = "<embed src='http://www.jonathanmooney.com/nav/gateway.swf' FlashVars='lc=" + inSwf + "&ev=" + escape(inEvent) + "," + escape(inParams) + "' width='0' height='0' type='application/x-shockwave-flash'></embed>";
	document.getElementById(divcontainer).innerHTML = "";
	document.getElementById(divcontainer).innerHTML = divinfo;
}
