Hi, I'm working on Guessing game for my college assignment but I'm stuck on the last question and I have already spent a lot of hours trying to figure it out so I'm hoping that someone will help me.

The last part of my assignment is to store cookies for the game so that if you reload the page it will remember random number and attempts so you will continue to play. Does anyone have any idea?
<!DOCTYPE html>

	<meta content="en-ie" http-equiv="Content-Language">
	<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
	<link id="stylesheet" href="css/style.css" rel="stylesheet" type="text/css">
	<script src="./JavaScript/Functions.js" type="text/javascript"></script>
	<script src="./JavaScript/Persistence.js" type="text/javascript"></script>
	<script type="text/javascript">
		// The number which the user will try to guess
		var Number = getRandomInt(1, 100);
		// Max allowed guesses (Not used.. yet)
		var Guesses = 5;
		var Attempts = 0;
		function GuessNumber()
			if (Guesses == Attempts) 
				window.alert("Game Over, the number was: " + Number + "") ;
				return false;			
			// 1. Read the value from the form
			var guess = document.guessForm.guess.value;
			//Add one to the times attempted to guess
			// 2. Check if number was guessed corrrectly
			if (guess == Number) 
			// If it was then inform the user using an alert and return true
				window.alert("Congratulations, the number was: " + Number + "") ;
				return true;
			// If not then let user know if they were too low or too high and return false
			if (guess < Number) 
				document.getElementById("wrongGuess").innerHTML = "Guess Too Low!";
				return false;			
			if (guess > Number) 
				document.getElementById("wrongGuess").innerHTML = "Guess Too High!";
				return false;			
			// Note For incorrect guesses, feedback should be displayed
			// in the '<span id="wrongGuess"></span>' element (see below)

function setCookie(ranNumber,value,exdays)
var exdate=new Date();
exdate.setDate(exdate.getDate() + exdays);
var c_value=escape(value) + ((exdays==null) ? "" : "; expires="+exdate.toUTCString());
document.cookie=ranNumber + "=" + c_value;


	<body onload="checkCookie()">
		<div id="content">
			<h1>Guess The Number Game</h1>
				<!--	The Guess Number form
						Note the onsubmit event handler - you are required to write the JavaScript
						for the GuessNumber function
						The value returned by GuessNumber will determine if the form is reset (and the page reloaded) or not
						true - reset form
						false - form will not be reset 	
						Note that JavaScript values will be retained between guesses unless
						the form is reset or the page is reloaded.
				<form name="guessForm" method="" action="" onsubmit="return GuessNumber();">
						<legend>Guess the number (between 1 and 100)</legend>
								<label for="firstName">My Guess:</label>
								<input type="text" name="guess"/>
								<!-- Display Wrong guess feedback in the folowing element (hint: innerHTML)-->
								<span id="wrongGuess"></span>
								<input type="submit" name="SubmitForm" value="Guess" class="submit" />