//------------------------------------------------------------------------------
// Class:  AddPhotos
//------------------------------------------------------------------------------
// Author:  CL
// Date:  2008/01/25
// Description:  This class defines the functions used by the add photo section.
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
function AddPhotos()
{	
	//--------------------------------------------------------------------------
	// Methods:
	this.deleteAlbum = deleteAlbum;
	this.deleteAlbumConfirm = deleteAlbumConfirm;
	this.deleteAlbumConfirmClose = deleteAlbumConfirmClose;
	this.uploadingAlbum = uploadingAlbum;
	this.uploadingAlbumClose = uploadingAlbumClose;
	this.showHTMLupload = showHTMLupload;
	this.uploadPhotosHTML = uploadPhotosHTML;
	//--------------------------------------------------------------------------
	
	function deleteAlbum()
	{
		document.frmManageAlbum.isDelete.value = 1;
		document.frmManageAlbum.submit();
	}
	
	//--------------------------------------------------------------------------

	function deleteAlbumConfirm(idString,iAlbumID)
	{
		theElement = document.getElementById(idString);
		if (theElement.style.display == "none")
		{
			theElement.style.display = "block";
		}
		YAHOO.deleteAlbum.container.deleteAlbum = new YAHOO.widget.ResizePanel('deleteAlbum', { width:'300px', close:false, draggable:false, fixedcenter:true, visible:true, constraintoviewport:false } );
		YAHOO.deleteAlbum.container.deleteAlbum.render();
		YAHOO.util.Event.addListener("closeDeleteAlbum", "click", YAHOO.deleteAlbum.container.deleteAlbum.hide, YAHOO.deleteAlbum.container.deleteAlbum, true);
		document.frmManageAlbum.deleteAlbumID.value = iAlbumID;
	}
	
	//--------------------------------------------------------------------------
	
	function deleteAlbumConfirmClose()
	{
		document.frmManageAlbum.deleteAlbumID.value = 0;
	}
	
	//--------------------------------------------------------------------------

	function uploadingAlbum()
	{
		YAHOO.uploadStatus.container.wait = new YAHOO.widget.ResizePanel('wait', { width:'300px', close:false, draggable:false, fixedcenter:true, visible:true, zindex: 4, modal: true, constraintoviewport:false } );
		YAHOO.uploadStatus.container.wait.setHeader("Uploading...please wait....");
		YAHOO.uploadStatus.container.wait.render(document.body);
	}
	
	//--------------------------------------------------------------------------

	function uploadingAlbumClose()
	{
		YAHOO.uploadStatus.container.wait.hide();
	}
	
	//--------------------------------------------------------------------------
	
	function showHTMLupload()
	{
		document.getElementById('htmlUploadSection').style.display = "block";
	}
	
	//--------------------------------------------------------------------------
	
	function uploadPhotosHTML()
	{
		document.getElementById('htmlUploadSection').style.display = "block";
		document.addPhotos.isAddPhotoHTML.value = 1;
		document.addPhotos.isAddPhoto.value = 0;
		document.getElementById("overlay").style.height = YAHOO.util.Dom.getDocumentHeight()+"px";
		document.getElementById("overlay").style.width = YAHOO.util.Dom.getDocumentWidth()+"px";
		document.getElementById("overlay").style.display ="block";
		document.getElementById("popcontent").style.display ="block";
		document.addPhotos.submit();
	}
}

// Create Object
oAddPhotos = new AddPhotos();

//--------------------------------------------------------------------------
