function SetCookie (name,value) {
//  var base = new Date(0)
//  var dateAdjustment = base.getTime()
//  var expDate = new Date()
//  var dateInSecs = expDate.getTime()
//  var oneWkFromNow = (7 * 24 * 60 * 60 * 1000) + dateInSecs - (2 * dateAdjustment)  
//  expDate.setTime(oneWkFromNow)
//  var expParam = "; expires=" + expDate.toGMTString()
//  document.cookie = name + "=" + escape(value) + expParam
  document.cookie = name + "=" + escape (value)
}

function testValidDir()	{
	username = document.userpass.usrname.value.toLowerCase();
	password = document.userpass.pwd.value.toLowerCase();
//      alert(password);
//	password = document.userpass.pwd.value;
	url = '';
	if (username == 'training')
		{
		url = 'sabretalk/sabretalk_current.html';
		if (password == 'database')
			{

			SetCookie ("sabretalk","logged")
			location = url;
			
			}
		else
			{
			alert("Your password is incorrect.");
			}
		}
	else
		{
		alert("You must have a valid User Name and Password to enter this area.  Please contact your Sabre Hotels account manager for further assistance");
		}
	}
        