//JS by Sphere Concepts LLC
var min_h;
var max_h = 501;
var tmp_h;
var target_div;
var slide;
var smoothness = 5;
var speed = 5;

function enlargeFlash() 
{
	if (document.getElementById('flashcontent') != null)
	{
		tmp_h = 350;
		target_div = "flashcontent";
	}
	else
	{
		tmp_h = 300;
		target_div = "flashcontent2";
	}
	slide = setInterval("enlargeFrame()",speed);
	min_h = tmp_h;
}

function enlargeFrame()
{
	if (tmp_h<(max_h-1))
	{
		eval("document.getElementById('"+target_div+"').style.height = '"+tmp_h+"px'");
		tmp_h = tmp_h+((max_h-tmp_h)/smoothness);
	} 
	else 
	{
		eval("document.getElementById('"+target_div+"').style.height = '"+max_h+"px'");
		clearInterval(slide);
		tmp_h = min_h;
	}
}

function restoreFlash() 
{
	clearInterval(slide);
	eval("document.getElementById('"+target_div+"').style.height = '"+min_h+"px'");
}

//----------------------------- VIDEO CALL TO FLASH
function getFlashMovie(movieName) 
{
	if (navigator.appName.indexOf("Microsoft") != -1) 
	{
		return document.getElementById(movieName);
	}
	else 
	{
		if (document[movieName].length != undefined)
		{
			return document[movieName][1];
		}
		return document[movieName];
	}
}

function launchVideoInFlash(flash,tgt) 
{	
	getFlashMovie(flash).sendToActionscript(tgt);
}