// 
// gets the name of the user 
//
////////////////////////////////////////////////
function getName()
{
    var msg = "Hello!!\n\nWelcome to the Team Zero 71z website!!\n\n" +
	      "Please enter your first name so that we may greet you" +
	      "when you return to see how the team is doing.\n\n" +
	      "Thank you!!  Enjoy the site!\n";

    var name = prompt( msg, 'your name here' );

    if( ( name == "null" ) || ( name == "undefined" ) || ( name == "your name here" ) ||
	( !name ) )
    {
	name = "unknown visitor";

	setCookie( 'userid', name, 'exp' );
    }
    else
    {
	setCookie( 'userid', name );
    }

    location = "http://www.katan.com/TeamZero71z/home.cgi";
    
    return false;
}

function setCookie( name, value, exp )
{
    // Get the current time
    var time = new Date();

    var time_raw = time.getTime();

    // Has 'exp' been set to something?  If so, then the userid is a 
    // temporary one.
    if( exp )
    {
	// Add time to it to allow "temporary" guest identifcation
	// 1000 = 1 sec ( e.g., 600000 = 10 minutes )
	time_raw += 600000;

	// If this is IE, it reports shit in UCE.. which isn't GMT...
	// God, I fucking hate M$...  This adds about a days worth
	// of time... 
	if( navigator.appName != "Netscape" )
        {
	    time_raw += 91600000;
	}
    }
    else
    {
	// Add an ridiculous amout of time to the expire value so it
	// doesn't expire... like... for a long time.
	// This is 2 years worth of time.
	time_raw += 63072000000;
    }

    var future = new Date( time_raw );

    document.cookie = name + "=" + escape( value ) + ";expires=" + future.toGMTString();
}





