//--------------------------------------------------------------
// FUNCTIONS
//--------------------------------------------------------------
	
	function setCookie(name, value) { // use: setCookie("name", value);
	
		if (value != null && value != "") {
			document.cookie = name + "=" + escape(value) + "; expires=" + expiry.toGMTString();
		}
		
		bikky = document.cookie; // update bikky	
	}
	//--------------------------------------------------------------

	function go(link){
		location.href = link
	}
	//--------------------------------------------------------------

	function getCookie(NameOfCookie){
	
		if (document.cookie.length > 0) {              
			begin = document.cookie.indexOf(NameOfCookie+"=");       

			if (begin != -1) {           
				begin += NameOfCookie.length+1;       
				end = document.cookie.indexOf(";", begin);
				if (end == -1) end = document.cookie.length;
				return unescape(document.cookie.substring(begin, end));
			}
		}
	
		if (NameOfCookie.substring(1,2) == 'a'){
			return 'Abstard!';
		} else if (NameOfCookie.substring(1,2) == 'b'){
			return 'settings.html';
		}
		return '';
	}

//--------------------------------------------------------------
// END FUNCTIONS
//--------------------------------------------------------------
$(document).ready(function() {
	var bikky = document.cookie;
	var today = new Date();
	var expiry = new Date(today.getTime() + 9999 * 24 * 60 * 60 * 1000); // plus 28 days
//--------------------------------------------------------------
});//end ready function
