﻿// we need to store the interval ID so we can stop the interval
var intervalID;

function getFlashMovieElement(name)
{
	if (document.all)
	{
		return document.all(name);
	}
	else if (document.getElementById)
	{
		return document.getElementById(name);
	}
	else
	{
		return null;
	}
}
 
// this method will be called repeatedly every 50 ms
function incrementSWFHeight()
{
	var swf = getFlashMovieElement("Main");
	if (swf.height < 560)
	{
	    //alert("Hello");
		swf.height = Number(swf.height) + 6;
	}
	else
	{
		swf.height = 560;
		clearInterval(intervalID);
	}
}

function StartAnimation()
{
    // start calling the incrementSWFWidth method every 50 ms
    intervalID = setInterval(incrementSWFHeight, 15);
}


// this method will be called repeatedly every 50 ms
function reduceSWFHeight()
{
	var swf = getFlashMovieElement("Main");
	if (swf.height > 242)
	{
	    //alert("Hello");
		swf.height = Number(swf.height) - 6;
	}
	else
	{
		swf.height = 242;
		clearInterval(intervalID);
	}
}
function EndAnimation()
{
    // start calling the reduceSWFWidth method every 50 ms
    intervalID = setInterval(reduceSWFHeight, 15);
}

