function getexpirydatet( nodays){
	var UTCstring;
	Today = new Date();
	nomilli=Date.parse(Today);
	Today.setTime(nomilli+nodays*24*60*60*1000);
	UTCstring = Today.toUTCString();
	return UTCstring;
}

function setCookiet(theName,theValue, theTime) {
	document.cookie = theName +
	'='
	+ theValue
	+ '; path=/' + ';EXPIRES=' + getexpirydatet(theTime);
}

function setUserCookiet(){
	if (document.loginform.remember.checked == true) {
		setCookiet('USERNAME',document.loginform.username.value, 365);
		setCookiet('PASSWORD',document.loginform.password.value, 365);
	}
	if (document.loginform.remember.checked == false) {
		setCookiet('USERNAME',document.loginform.username.value, 0);
		setCookiet('PASSWORD',document.loginform.password.value, 0);
	}
	return true;
}