//------------------------------------------------------------------------------
// Class:  CustomizeHeader
//------------------------------------------------------------------------------
// Author:  CL
// Date:  2008/01/30
// Description:  This class defines the functions used by the customize header section.
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
function CustomizeHeader()
{	
	//--------------------------------------------------------------------------
	// Methods:
	this.resetToDefault = resetToDefault;
	this.save = save;
	this.preview = preview;
	this.imgLibraryOpen = imgLibraryOpen;
	this.imgLibPopup = new Object();
	//--------------------------------------------------------------------------
	
	function resetToDefault(URL)
	{
		document.frmHeaderCustomization.isSave.value = 0;
		document.frmHeaderCustomization.isResetToDefault.value = 1;
		document.frmHeaderCustomization.isPreviewHeader.value = 0;
		document.frmHeaderCustomization.target = 'parent';
		document.frmHeaderCustomization.action = URL;
		document.frmHeaderCustomization.submit();
	}

	//--------------------------------------------------------------------------
	
	function save(URL)
	{
		document.frmHeaderCustomization.isResetToDefault.value = 0;
		document.frmHeaderCustomization.isSave.value = 1;
		document.frmHeaderCustomization.isPreviewHeader.value = 0;
		document.frmHeaderCustomization.target = 'parent';
		document.frmHeaderCustomization.action = URL;
		document.frmHeaderCustomization.submit();
	}
	
	//--------------------------------------------------------------------------

	function preview(URL)
	{					
		var popUp = dhtmlwindow.open("Preview", "iframe", "about:blank", "Preview Header Customization", "width=950px,height=600px,resize=1,scrolling=1,center=1", "recal");
		document.frmHeaderCustomization.isPreviewHeader.value = 1;
		document.frmHeaderCustomization.isSave.value = 0;
		document.frmHeaderCustomization.isResetToDefault.value = 0;
		document.frmHeaderCustomization.target = '_iframe-Preview';
		document.frmHeaderCustomization.action = URL;
		document.frmHeaderCustomization.submit();
		popUp.focus();
	}
	
	//--------------------------------------------------------------------------
	
	function imgLibraryOpen(URL,sTitle,iHeight)
	{
		var sStyle = "width=750px,height="+ iHeight + ",resize=1,scrolling=1,center=1";
		this.imgLibPopup = dhtmlwindow.open("galleryadmin", "iframe", URL, sTitle, sStyle, "recal");
	}		
}

// Create Object
oCustomizeHeader = new CustomizeHeader();

//--------------------------------------------------------------------------