var slideNum;	//variable to track slide number of Flash banner

function setSlideNum(sNum) {
	slideNum = sNum;	//Set global variable
}

function setCookie(cookieName, cookieValue) {
// Set cookie to expire 6 months from today
	var nowDate = new Date();
	nowDate.setMonth(nowDate.getMonth() + 6);
	cookieExpires = nowDate.toUTCString();
	cookValue = escape(cookieValue);	//remove special characters
	document.cookie = cookieName + "=" + cookieValue + ";expires=" + cookieExpires + ";Path=/;";
}

function getCookie(cookieName) {
	var cookieValue = document.cookie;
	var cookieStartsAt = cookieValue.indexOf(" " + cookieName + "=");	//Find cookieName within the cookie string - space exists between individual cookie strings
	if(cookieValue == -1) {
		cookieStartsAt = cookieValue.indexOf(cookieName + "=");	//Cookie located at very beginning of cookie string
	}
	if(cookieValue == -1) {
		cookieValue = null;	//Cookie not found
	} else {
		cookieStartsAt = cookieValue.indexOf("=", cookieStartsAt) + 1;	//Set beginning position of cookie value
		var cookieEndsAt = cookieValue.indexOf(";", cookieStartsAt);	//Set end position of cookie value, if not last string in file
		if(cookieEndsAt == -1) {
			cookieEndsAt = cookieValue.length;	////Set end position of cookie value, if last string in file
		}
		cookieValue = unescape(cookieValue.substring(cookieStartsAt, cookieEndsAt));	//Get cookie
	}
	return cookieValue;
}


