var usr;var pw;//var sv;// This Javascript object is used to check to see if a user has entered there correct Domino credientialsvar loginObj={	login : function(){																//Main function//	saveme()	Element.show('processing');														//Display busy animation	username = $F("username");														//Get the field values	password = $F('password');	if(username=="" || password==""){ this.resetLogin(); return false; }	var hostname=location.hostname;													//Set the posting URL -the Names.nsf?login - uses a CGI Variable SERVER_NAME	var url = 'http://'+location.hostname +'/names.nsf?login';	var pars="Username="+encodeURIComponent(username)+"&Password="+encodeURIComponent(password);	//Encode the parameters	var myAjax = new Ajax.Request( url, { method: 'post', parameters: pars, onComplete: this.processResponse.bindAsEventListener(this) });	},	processResponse: function(originalRequest){		test=originalRequest.responseText.indexOf("invalid username or password");				//Check response to see if the error message is in the string		if(test==-1){//			location.replace(window.location);											//Not present so just reload the page as the user is logged in			location.replace("/checkout.html");		} else {			alert('Incorrect username or password');									//Got a login error so alert the user and reset the login form			this.resetLogin();			return false;		}	},	resetLogin:function(){		Element.hide('processing');		//Form.reset('_login');	}}function getme() {	var doc = document.forms['loginhdr'];	usr = doc.username;	pw = doc.password;//	sv = doc.save;	if (GetCookie('username') != null)	{		usr.value = GetCookie('username')		pw.value = GetCookie('password')//		if (GetCookie('save') == 'true') sv[0].checked=true	}}function saveme() {	var doc = document.forms['loginhdr'];	if (usr.value.length==0) {		alert('You must enter an email address');		doc.username.focus()		return false;	}	if (pw.value.length==0) {		alert('You must enter your password');		doc.password.focus()		return false;	}/*	if (sv[0].checked) {			var doc = document.forms[0];		usr = doc.username;		pw = doc.password;		sv = doc.save;		expdate = new Date();		expdate.setTime(expdate.getTime()+(365 * 24 * 60 * 60 * 1000));		SetCookie('username', usr.value, expdate);		SetCookie('password', pw.value, expdate);		SetCookie('save', 'true', expdate);	} else {		DeleteCookie('username');		DeleteCookie('password');		DeleteCookie('save');	}*/	return true;}
