function ChangeStatus(message) {
	window.status = message;
}

function CS(message) {
	window.status = message;
}

function ChangeLocal(strURL, intSectionID) {
	var strLinkURL;
	
	strURL = strURL.replace("&", "||");
	strURL = strURL.replace(" ", "20%");
	strLinkURL = "/link.asp?url=" + strURL + "&section=" + intSectionID;
	document.location.href = strLinkURL;
}

function Default_Status() {
	window.status = "Buffalo.Com - Everything Buffalo!";
}

function DS() {
	window.status = "Buffalo.Com - Everything Buffalo!";
	return true;
}

var macNavigator = navigator.userAgent;
var strAppVer;

strAppVer = navigator.appVersion;
	
if (navigator.appName == 'Netscape') {
	if (macNavigator.indexOf("Mac") == -1) {
		if (macNavigator.indexOf("Netscape6") > -1) {
			document.write('<link rel="stylesheet" href="/includes/ns6.css" type="text/css">');
		} else {
			document.write('<link rel="stylesheet" href="/includes/ns.css" type="text/css">');
		}
	} else {
		document.write('<link rel="stylesheet" href="/includes/mac_ns.css" type="text/css">');
	}
} else if (navigator.appName == 'Microsoft Internet Explorer') {
	if (macNavigator.indexOf("Mac") == -1) {
		document.write('<link rel="stylesheet" href="/includes/ie.css" type="text/css">');
	} else {
		document.write('<link rel="stylesheet" href="/includes/mac_ie.css" type="text/css">');
	}
}

function getCookie(NameOfCookie) {
	if (document.cookie.length > 0) {
		begin = document.cookie.indexOf(NameOfCookie+"=");
		
		if (begin != -1) {
			begin += NameOfCookie.length+1; 
			end = document.cookie.indexOf(";", begin);
			if (end == -1) end = document.cookie.length;
			return unescape(document.cookie.substring(begin, end));
		} 
	}
	
	return null; 
}

function setCookie(NameOfCookie, value, expiredays) {
	var ExpireDate = new Date();

	ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));
	document.cookie = NameOfCookie + "=" + escape(value) + ((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString());
}

function delCookie (NameOfCookie) { 
	if (getCookie(NameOfCookie)) {
		document.cookie = NameOfCookie + "=" +	"; expires=Thu, 01-Jan-70 00:00:01 GMT";
	}
}

function Notice() {
	msgDisplayed = getCookie("DownNotice")
	
	if (msgDisplayed != 'yes') {
		alert('Due to network changes at Adelphia Communications, Buffalo.com\'s "IP\nAddress" must be be changed.  As a result, this site will be unavailable\nfrom 12:00 AM - 1:00 AM, July 18th. Thank you for your patience.\n\nThe Buffalo.com web team');
		setCookie("DownNotice","yes",2);
	}	
}
