// JavaScript Document

var galleryTimerInterval;

function openGallery()
{
	$e('photoDisplay').style.top = posTop() + 'px';
	//$e('photoDisplay').style.visibility = 'visible';
	$e('photoDisplay').style.width = pageWidth() + 'px';
	$e('photoDisplay').style.height = pageHeight() + 'px';	
	
	galleryTimerInterval = setInterval(galleryTimer, 10);
}

function galleryTimer()
{
	$e('photoDisplay').style.top = posTop() + 'px';
}

function closeGallery()
{
	$e('photoDisplay').style.width = 0;
	$e('photoDisplay').style.height = 0;
	clearInterval(galleryTimerInterval);
	
	//fixes ie7 redraw issue
	$e('pageContainer').style.visibility = 'hidden';
	$e('pageContainer').style.visibility = 'visible';
}