_SWF				= "wowTip";

g_bFlashReady		= false;
g_bTemplateReady	= false;


// EXTERNAL INTERFACE
// ==================
function findSWF( movieName )
{
	//return document.getElementById( movieName );
	return window.document[ movieName ];
}

function flash_debug( str )
{
	var isFound = str.indexOf( "&R" );

	while ( isFound != -1 )
	{
		str = str.replace( "&R", "\r" );
		isFound = str.indexOf( "&R" );
	}

	document.getElementById("flashMessage").value = str;
}

function flash_resize( divId, newW, newH )
{
	findSWF(_SWF).style.width = newW+"px";
	findSWF(_SWF).style.height = newH+"px";

	setValue( "movie_width", newW );
	setValue( "movie_height", newH );
}

function flash_ready()
{
	g_bFlashReady = true;

	// send template values to flash if template is finished loading
	if ( g_bTemplateReady )
		submitTemplate();
}
