var PGPicturePath1, PGPicturePath2, PGPicturePath3, PGPicturePath4, PGPicturePath5;

var PGPictureText1, PGPictureText2, PGPictureText3, PGPictureText4, PGPictureText5;

var PGPictureLink1, PGPictureLink2, PGPictureLink3, PGPictureLink4, PGPictureLink5;

var PGPictureObject1, PGPictureObject2, PGPictureObject3, PGPictureObject4, PGPictureObject5;

var StoredAlbumPath;
var PGSlideArea
var PGLoopID

function PhotoGallery_onLoad()
{
	
	PhotoGallery_Define_Variables();

//Define Objects
	PGPictureObject1 = document.getElementById("PhotoGalleryPic1"); //Photo 1
	PGPictureObject2 = document.getElementById("PhotoGalleryPic2"); //Photo 2
	PGPictureObject3 = document.getElementById("PhotoGalleryPic3"); //Photo 3

	PGSlideArea = document.getElementById("PhotoGallerySlideArea");
	PGMainPic = document.getElementById("PhotoGalleryMainPicIMG");
	PicTitle = document.getElementById("txtPhotoGalleryInfoTitle");	

//Define Picture Path
	PGPicturePath1 = "./images/Photo_Gallery/01.jpg";
	PGPicturePath2 = "./images/Photo_Gallery/02.jpg";
	PGPicturePath3 = "./images/Photo_Gallery/03.jpg";


	PhotoGallery_LoadPicture(PGPicturePath1, PGPictureLink1, PGPictureText1);

//Loads Picture's Path
	PGPictureObject1.src	= PGPicturePath1;
	PGPictureObject2.src	= PGPicturePath2;
	PGPictureObject3.src	= PGPicturePath3;


//Loads Picture's Text
	PGPictureObject1.alt	= PGPictureText1;
	PGPictureObject2.alt	= PGPictureText2;
	PGPictureObject3.alt	= PGPictureText3;

}

function PhotoGallery_LoadAlbum()
{
	window.open(StoredAlbumPath, "PhotoGallery","width=800,height=300,toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes, resizable=yes");
}

function PhotoGallery_LoadPicture(Picture_Path, Picture_Link, Picture_Title)
{
	PGMainPic.src = Picture_Path;
	StoredAlbumPath = Picture_Link;
	PicTitle.value = "Album: " + Picture_Title;
}

function PhotoGallery_StopScroll() 
{
	clearTimeout(PGLoopID);
}

function PhotoGallery_Scroll(imgObj)
{
	if (imgObj == "PhotoGalleryPicLeft")
	{
		PhotoGallerySlideArea.scrollLeft -= 2;
		PGLoopID = setTimeout("PhotoGallery_Scroll('PhotoGalleryPicLeft')",1);
	}
	else
	{
		PhotoGallerySlideArea.scrollLeft += 2;
		PGLoopID = setTimeout("PhotoGallery_Scroll('PhotoGalleryPicRight')",1);
	}
}

function PhotoGallery_MouseOver(imgObj)
{
	imgObj.style.opacity = 0.6;
	imgObj.filters.alpha.opacity = 60;
}

function PhotoGallery_MouseOut(imgObj)
{
	imgObj.style.opacity = 1;
	imgObj.filters.alpha.opacity = 100;
}
