////////////////////////////////////////////////////////////////////////////////////
//  DateMaker1.0  - Please leave the following
//
//  By Sanjay Mehrotra (smehrotra@truefitsolutions.com)  Last modified 2000-02-27.
//
//
//  To find out what you may do and not, see the Artistic License at:
//  http://www.opensource.org/licenses/artistic-license.html
//  If you are uncertain about something, please contact smehrotra@truefitsolutions.com
//  Note that the Artistic License is not the final license for this script,
//  consider it as a guide as to what you may do.
////////////////////////////////////////////////////////////////////////////////////
var ReloadApp=null;
function MakeArray(n)
 {
	this.length = n
	return this
	
}
monthNames = new MakeArray(12)
monthNames[1] = "Jan"
monthNames[2] = "Feb"	
monthNames[3] = "March"	
monthNames[4] = "April"	
monthNames[5] = "May"	
monthNames[6] = "June"	
monthNames[7] = "July"	
monthNames[8] = "August"	
monthNames[9] = "Sep"	
monthNames[10] = "October"	
monthNames[11] = "November"	
monthNames[12] = "December"
dayNames = new MakeArray(7)
dayNames[1] = "Sunday"
dayNames[2] = "Monday"	
dayNames[3] = "Tuesday"	
dayNames[4] = "Wednesday"	
dayNames[5] = "Thursday"	
dayNames[6] = "Friday"	
dayNames[7] = "Saturday"		



function customDateString(OneDate)
{
	var theDay = dayNames[OneDate.getDay() + 1];
	var theMonth = monthNames[OneDate.getMonth() + 1];
	
	if (navigator.appName == "Netscape")
		var theYear = OneDate.getYear() + 1900;
	else
		var theYear = OneDate.getYear();
		
	return theDay + ", " + theMonth + " " + OneDate.getDate() + ", " + theYear;
}

var nwidth, nheight;
var newWindow = null;
var newWishListWindow = null;
var EditWishListWindow = null;
var link;
var windowHandle = null;
function open_window(url, nwidth, nheight)
{
	if (!newWindow)
		{
		newWindow = null;	
		}	
	else
		{
		if (newWindow || newWindow.location.href !== url)	
		{
			newWindow.close();
			newWindow = null;
		}	
		}	
	
	if (!newWindow ||newWindow.closed)
	{ 
		newWindow = window.open(url, "win", 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0,width='+nwidth +',height='+nheight);
		windowHandle = newWindow;
		newWindow.focus();
	}
	else
	{
		newWindow.focus();
	}
}
//function to destroy session variables
function AppOnReload()
{
	var bUnload = true;
	var newbasehref = "http://"+location.hostname.substring(0, location.href.lastIndexOf("/")+1)+ "/"+ HM_GL_InstallFolder;
	if (basehref == newbasehref)
	{
		bUnload=false;
	}
	if(bUnload)
	{
		var url=location.protocol+'\/\/'+location.hostname+"\/secure\/endSess.htm?";
		var ops='height=50,width=350,copyhistory=0,toolbar=0,status=0,location=0,menubar=0,directories=0,resizable=1,scrollbars=1';
		window.open(url,'endSessWin',ops);
		return bUnload;
	}
	else
	{
		return true;
	}
}