/*<!--- do not compress --->
File:  		GreetingScript.js
Description: JavaScript to display the My Homes.com Greeting.
	The greeting is implemented in a script as a work around
	for a Netscape 3 bug (having to do with document.writes in
	nested tables). Also we avoid doing the write if this is
	Internet Explorer 3 or below as doc writes in script files
	seem to crash the browser.

Need:		JsUtilities.js to be loaded.
Author:		Carlos Fuentes
Date:		06/20/2000
*/

// Requires JsUtilities.js
Greeting = ReadCookie('MYGREETING');
/*
*/
// ColdFusion does not set a cookie which preserving case for the cookie name, 
// so check both MYGREETING and MyGreeting 
if ( (Greeting == null) || (Greeting.length == 0) ) {
	Greeting = ReadCookie('MyGreeting');
}

if (Greeting.length > 0) {
	GreetingMsg = "<B>Hello, " + Greeting + ".</B>";
	GreetingMsg = GreetingMsg + "<BR><B><A HREF='" + WebSite + "/My/StartUp.cfm'>Enter</A> | <A HREF='" + WebSite  + "/My/SignOff.cfm'>Logout</A></B>";
	GreetingMsg = GreetingMsg + "<BR> Click <A HREF='" + WebSite + "/My/SignOff.cfm'>here</A> if you're<BR> not " + Greeting + ".";
} else {
	GreetingMsg = "<B>Have you registered<BR> for My Homes.com?</B>";
	GreetingMsg = GreetingMsg + "<BR><B><A HREF='" + WebSite + "/My/SignOn.cfm?SignUp=1'>Register</A> | <A HREF='" + WebSite + "/My/SignOn.cfm'>Login</A></B>";
}

if (navigator.appName != "Microsoft Internet Explorer") {
	document.write(GreetingMsg);
}

