var paused = new Boolean(false);

function initEi(){}

function getFlashMovie(movieName)
{
	var isIE = navigator.appName.indexOf("Microsoft") != -1;
	return (isIE) ? window[movieName] : document[movieName];
}

function jsSend(movieName, func, data)
{
	getFlashMovie(movieName).eiJSSender(func, data);
}

function togglePlayPause(d)
{
	if (paused)
	{
		d.style.background = "url(images/play.gif) center no-repeat";
	}
	else {
		d.style.background = "url(images/pause.gif) center no-repeat";
	}
	paused = !paused;
	jsSend("flashcontent", "pause", null);
}

function changeImage(a)
{
	switch (a)
	{
		case "prev":
		jsSend("flashcontent", "prev", null);
		break;
		
		case "next":
		jsSend("flashcontent", "next", null);
		break;
	}
}