/******************************************************
*  广告轮播效
******************************************************/
 
<!--
 
function getCookieVal (offset) {
  var endstr = document.cookie.indexOf (";", offset);
  if (endstr == -1)
    endstr = document.cookie.length;
  return unescape(document.cookie.substring(offset, endstr));  }
 
function FixCookieDate (date) {
  var base = new Date(0);
  var skew = base.getTime(); // dawn of (Unix) time - should be 0
  if (skew > 0)  // Except on the Mac - ahead of its time
    date.setTime (date.getTime() - skew);  }
 
function GetCookie (name) {
  var arg = name + "=";
  var alen = arg.length;
  var clen = document.cookie.length;
  var i = 0;
  while (i < clen) {
    var j = i + alen;
    if (document.cookie.substring(i, j) == arg)
      return getCookieVal (j);
	i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) break; }
  return null;   }  
 
//  assign expiration date variable for cookie
 
var expdate = new Date ();
FixCookieDate(expdate); 
expdate.setTime(expdate.getTime() + (5 * 60 * 1000)) // 5 minutes  
 
//  initialize countimg variable to track images
countimg = (GetCookie("countimg") != null) ? (GetCookie("countimg")-1) : -1
countimg = (countimg <-1) ? -1 : countimg
IMGArray = new Array(2)
 
if (document.images) {
	IMGArray[0] = new Image(750,90)
	IMGArray[1] = new Image(750,90)
 	 }
 
//	Old browsers get an array of empty strings
 
else {
	IMGArray[0] = ""
	IMGArray[1] = ""
						}
	
// 此处填写轮播广告的图片地址和相应链接	
 
IMGArray[0].src = "http://www.nflchina.com/uploadfile/2010/0622/20100622020424132.jpg"
IMGArray[0].URL = "http://www.coors.com.cn/"
IMGArray[1].src = "http://www.nflchina.com/uploadfile/2012/0222/20120222012831749.jpg"
IMGArray[1].URL="https://gamepass.nfl.com/nflgp/secure/packages?campaign=GP_offseason_China_750"
 
 
function updateIM(countimg) { return countimg; }
 
//  functions for onMouseOver, onMouseOut, onClick event handlers
 
function Overhref2() { updateIM(countimg)
	if (IMGArray[countimg] != null ) { 
	window.status = IMGArray[countimg].URL; return true; }}
 
function Outhref2() { window.status = ""; return true; }
 
function clickhref2() { updateIM(countimg)
	if (IMGArray[countimg] != null ) { 
	window.open(IMGArray[countimg].URL) }}
 
//  Image swapping function
 
function showIMAGE() { updateIM(countimg++)
 
if (document.images) {
 
//	Make sure countimg does'nt get too big
 
	if ( countimg > IMGArray.length - 1 ) { countimg = IMGArray.length - IMGArray.length }
 
	document.images.banner.src = IMGArray[countimg].src 
	exbannerID = setTimeout("showIMAGE()",10000) }}
 
 
function setIt2() { updateIM(countimg)
	document.cookie = "countimg=" + countimg + "; expires=" + expdate.toGMTString()  }
 
//  get cookie countimg onblur, onload
 
function getIt2() { 
	countimg = (GetCookie("countimg") != null) ? (GetCookie("countimg")) : 0
	updateIM(countimg)
	if (exbannerID != null) { clearTimeout(exbannerID); showIMAGE() }}
 
function initCOOKIES() {
 
window.onunload = setIt2
window.onfocus = getIt2
window.onblur = setIt2 	}
 
function initBANNER() {
	
	showIMAGE() 
	cookieID = setTimeout("initCOOKIES()",1000) }
 
window.onload = initBANNER
 
// -->

