/**
	***---------------------------------------------------------***
	*	ClientManager.js
	***---------------------------------------------------------***
	*	Artware Studios
	*	Send A Blessing
	*	18 February 2007	tb
	*	3 March 2007	tb
	*
	*	This file sets the size of the browser window.  
	*	It also contains global variables and functions.  
	*	It is included in the frameset page,  index.html .
	*/

	//Global variables for managing  personalizeCardForm  in  personalizeCardPage.php .
		//Variables for data persistence through  changeCard()  and  openAddressWindow() .
var globalMessage = '';						//Member's personal message for selected card.  
//This global variable is used to preserve member's message across pages in mainFrame.
//Other variables are preserved instead by passing parameters in the HTTP header (due to problems encountered with globals?).
var globalSignature = '';					//Signature on selected card.

var globalCardID = 0;							//Selected card ID.
var globalLangauge = 0;						//Form index for selected language.
var globalGreeting = 0;						//The  greetingID  of selected greeting.
var globalDateToSend = 0;					//Send immediately (0) or on selected date (1).
var globalSendDay = 0;						//Form index for day to send card.
var globalSendMonth = 0;					//Form index for month to send card.
var globalSendYear = 0;						//Form index for year to send card.

var masterAddressWindow = null;		//Variable stored in  PersonalizeTools.js  instead.

function closeTheAddressWindow()
{
alert("Entering closeAddressWindow");
	if ( (masterAddressWindow != null) && (!masterAddressWindow.closed) )
	{
alert("(addressWindow != null) && (!addressWindow.closed)");
		masterAddressWindow.close();
	}
if (masterAddressWindow == null)	alert("addressWindow is NULL");
if (masterAddressWindow.closed)	alert("addressWindow is CLOSED");
alert("Leaving closeAddressWindow");
}//function closeTheAddressWindow()

function writeMainFrame()
{//Does not work  --  with  indexNEW.html .
		var mainFrameSRC = (location.search.substring(1)) ? location.search.substring(1) : 'http://www.sendablessing.com/homePage.php';
		mainFrameSRC = decodeURIComponent(mainFrameSRC);
		var theMainFrame = '<frame src="' + ( mainFrameSRC ) + '" name="mainFrame" SCROLLING="YES" />';
		document.write(theMainFrame);
}//function writeMainFrame()

function replaceTheMainFrame(theAddress)
{
	window.mainFrame.location.href = theAddress;
}//function replaceTheMainFrame(theAddress)


//This code no longer used.
var w = screen.width;
var h = screen.height;
var browserIsNetscape = false;
if (navigator.appName.indexOf("Netscape") != -1 )
	browserIsNetscape = true;	
//This code no longer used.


