browser = navigator.appName;
ie = "Microsoft Internet Explorer";
netscape = "Netscape";
os = navigator.platform;
mac = 'MacPPC'

if (browser == netscape && os != mac) {
	document.write('<link rel="stylesheet" type="text/css" href="http://espn.go.com/insertfiles/nhl/css/pcnn_pos.css" title="master">');
} else if (browser == ie && os != mac) {
	document.write('<link rel="stylesheet" type="text/css" href="http://espn.go.com/insertfiles/nhl/css/pcie_pos.css" title="master">');
} else if (os == mac) {
	document.write('<link rel="stylesheet" type="text/css" href="http://espn.go.com/insertfiles/nhl/css/pcie_pos.css" title="master">');
}

ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false
function target(page) {
	if (ns4) {
		document.ADspota.document.ADstore.src = page;
	} else if (ie4) {
		parent.ADstore.document.location = page;
	}
}

if(!window.saveInnerWidth) {
	window.onresize = resize;
	window.saveInnerWidth = window.innerWidth;
	window.saveInnerHeight = window.innerHeight;
}

function resize() {
	if (saveInnerWidth < window.innerWidth || saveInnerWidth > window.innerWidth || saveInnerHeight > window.innerHeight || saveInnerHeight < window.innerHeight ) {
		window.history.go(0)
	}
}

function donothing() {}

function gotosite(site) {            
	if (site != "") {                    
		self.location=site; 
	}
}

function launchWindow (url, name, width, height) {
	var x = 0;
	var y = 0;
	if (navigator.appVersion.length > 0 && navigator.appVersion.charAt(0) > '3' && navigator.appVersion.charAt(0) <= '9') {
		if(width > screen.availWidth - 12) {
			width = screen.availWidth - 12;
		}
		if(height > screen.availHeight - 48) {
			height = screen.availHeight - 48;
		}
		x = (screen.availWidth - 12 - width) / 2;
		y = (screen.availHeight - 48 - height) / 2;
	}
	var params =  "status=1,scrollbars=1,resizable=1,screenX=" + x + ",screenY=" + y + ",width=" + width + ",height=" + height + ")";
	var windowvar = window.open(url, name, params);
}

function launchGameCastHockey(hteam,season,date) {
	window.name = "_gamecast";
	var url = "http://scores.espn.go.com/cgi/gamecast/nhl/index.asp?season="+season+"&date="+date+"&hteam="+hteam+"&live=true";
	var name = "gamecast_" + hteam;
	launchWindow (url, name, 650, 625);
}