var firstTimePhotos1 = true;
var volume1 = 0;
var initTimerID1 = null;
var playTimerID1 = null;

var hasVideos1 = false;
var hasPhotos1 = false;
var gallery1 = '';

function mediaGalleryInit1(gal, hasV, hasP)
{
	firstTimePhotos1 = true;
	gallery1 = gal;
	hasVideos1 = hasV;
	hasPhotos1 = hasP;
}

function initPhotos1()
{
	try
	{
		showPhotos1();
	}
	catch (err)
	{
		//alert(err);
		//initTimerID = self.setTimeout("initPhotos1()", 1000);
	}
}

function showPhotos1()
{
	if (firstTimePhotos1)
	{
		firstTimePhotos1 = false;
		UFO.create(FOphoto, 'image_rotator1');
	}

	var videosBlock = document.getElementById('video_player1');
	if (videosBlock != null)
	{
		videosBlock.style.height = '0px';
		videosBlock.style.left = '-10000px';
		videosBlock.style.visibility = 'hidden';
		videosBlock.style.display = 'none';
	}

	var photosBlock = document.getElementById('image_rotator1');
	if (photosBlock != null)
	{
		photosBlock.style.height = '320px';
		photosBlock.style.left = '0px';
		photosBlock.style.visibility = 'visible';
		photosBlock.style.display = 'block';
		var result = sendEvent('image_rotator_swf1', 'playitem', 0);
	}
	
	var videosLinkOn = document.getElementById('videos_link_on1');
	var videosLinkOff = document.getElementById('videos_link_off1');

	if (videosLinkOn != null)
	{
		videosLinkOn.style.display = 'inline';
		videosLinkOff.style.display = 'none';
	}

	var photosLinkOn = document.getElementById('photos_link_on1');
	var photosLinkOff = document.getElementById('photos_link_off1');

	if (photosLinkOn != null)
	{
		photosLinkOn.style.display = 'none';
		photosLinkOff.style.display = 'inline';
	}
}

function initVideos1()
{
	clearTimeout(initTimerID);

	try
	{
		showVideos1();
	}
	catch (err)
	{
		initTimerID = self.setTimeout("initVideos1()", 1000);
	}
}

function showVideos1()
{
	var photosBlock = document.getElementById('image_rotator1');
	if (photosBlock != null)
	{
		photosBlock.style.left = '-10000px';
		photosBlock.style.height = '0px';
		photosBlock.style.visibility = 'hidden';
		photosBlock.style.display = 'none';
	}

	var videosBlock = document.getElementById('video_player1');
	if (videosBlock != null)
	{
		videosBlock.style.left = '0px';
		videosBlock.style.height = '320px';
		videosBlock.style.visibility = 'visible';
		videosBlock.style.display = 'block';
	}

	var photosLinkOn = document.getElementById('photos_link_on1');
	var photosLinkOff = document.getElementById('photos_link_off1');

	if (photosLinkOn != null)
	{
		photosLinkOn.style.display = 'inline';
		photosLinkOff.style.display = 'none';
	}

	var videosLinkOn = document.getElementById('videos_link_on1');
	var videosLinkOff = document.getElementById('videos_link_off1');

	if (videosLinkOn != null)
	{
		videosLinkOn.style.display = 'none';
		videosLinkOff.style.display = 'inline';
	}
}

function sendEvent1(id, typ, prm)
{
	try
	{
		thisMovie1(id).sendEvent(typ, prm);
	}
	catch (err)
	{
		//alert(err);
	}
}

function thisMovie1(movieName)
{
    if (navigator.appName.indexOf("Microsoft") != -1)
    {
		return window[movieName];
	}
	else
	{
		return document[movieName];
	}
}

// NOT IN USE
function getUpdate1(typ, pr1, pr2)
{
	if (typ == "volume" && pr1 > 0)
	{
		volume = pr1;
	}
}