function getCookie(cookieName)
{
	if (document.cookie.length>0)
	{
		c_start=document.cookie.indexOf(cookieName + "=");
		if (c_start!=-1)
		{ 
			c_start=c_start + cookieName.length+1; 
			c_end=document.cookie.indexOf(";",c_start);
			if (c_end==-1) c_end=document.cookie.length;
				return unescape(document.cookie.substring(c_start,c_end));
		} 
	}
	return "";
}

function checkCookie()
{
	accessScOT = getCookie('scot');
	if (accessScOT==null || accessScOT=="")
	{
		document.location.href = "download.asp";
	}
}

function createCookie()
{
	var exdate=new Date();
	exdate.setDate(exdate.getDate()+1);
	document.cookie="scot=true;expires="+exdate.toGMTString();
	document.location.href = "register_form.asp";
 }
 
 function redirectToHomePage()
{
	document.location.href = "index.html";
}


