//<script>

function setCookie(name, value)
{
	document.cookie = name + "=" + value + ";expires;path=/"
}

function getCookie(name)
{
	try
	{
		wholeCookie = document.cookie;
	
		allCookies=wholeCookie.split(";");

		for (a=0; a < allCookies.length; a++)
		{
			thisCookie = allCookies[a].split("=");
	
			key = thisCookie[0];
	
			for (b=0; b < key.length; b++)
			{
				if (key.substr(0,1) == " ")
				{
					key = key.substr(1);
				}
			}		
					
			if (key == name)
			{
				return thisCookie[1];
			}
		}
	}
	catch(e){;}
}

//</script>
