/******************************* change settings in this area *************************************/
//center the name of the cookie. below if you are using this script on multiple pages 
//then make sure that every page has unique key. on the line below only change the value in "";
var cookieName = "gospelkeys500";
//optional. if you want to save a spefic value for a cookie then change the line below. on the line below only change the value in ""; 
var cookieValue = "gospelkeys500";

//if user has already visited this page before then enter the page where it should be automatically redirected
var redirect = "http://www.hearandplay.com/playgospel500.html"
/******************************* change  area  ends here *************************************/

// do not change the code below
function createCookie(name,value,days) 
{
	if (days) 
	{
		
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}
function isCookieAvailable(name) 
{
	return (readCookie(name)!=null);
}