document.write("<script type='text/javascript' src='/_js/base64.js'><\/script>");

function getCookie( cookieName ){
	var search = cookieName + "=";
	var cookie = document.cookie;
	
	if( cookie.length > 0 ){
		startIndex = cookie.indexOf( cookieName );
	
		if( startIndex != -1 ){
			startIndex += cookieName.length;
			endIndex = cookie.indexOf( ";", startIndex );
			if( endIndex == -1) endIndex = cookie.length;
			return unescape( cookie.substring( startIndex + 1, endIndex ) );
		}else{
			return "";
		}
	}else{
		return "";
	}
}

function setCookie( cookieName, cookieValue, expireDate ){
	document.cookie = cookieName + "=" + escape( cookieValue ) + "; path=/; expires=" + expireDate.toGMTString() + ";";
}

function deleteCookie( cookieName ) {
	var expDate = new Date();
	expDate.setDate( expDate.getDate() - 1 );
	document.cookie = cookieName + "= " + "; expires=" + expDate.toGMTString() + "; path=/";
}

function setValue(){
	if(sendform.saveID.checked){
		var expDate = new Date();
		expDate.setTime(expDate.getTime() + 1000*60*60*72);
		setCookie( "email", base64encode(sendform.entryemail.value), expDate );
		setCookie( "password", base64encode(sendform.entrypass.value), expDate)
	}
}

function getValue(){
	sendform.entryemail.value = base64decode(getCookie("email"));
	sendform.entrypass.value = base64decode(getCookie("password"));
}

