//<head><META HTTP-EQUIV="Refresh" CONTENT="0; URL=http://www.flyordie.com"></head><!--
// Returns cookie data.
function getCookie(cookieName) {
  thisCookie = document.cookie.split("; ");
  for (i=0; i < thisCookie.length; i++) {
    if (cookieName == thisCookie[i].split("=")[0]) {
       return thisCookie[i].split("=")[1];
    }
  }
  return 0;
}

// Stores cookie data.
function storeCookie(cookieName, cookieData) {
  thisCookie = document.cookie.split("; ");
  for (i=0; i < thisCookie.length; i++) {
    if (cookieName == thisCookie[i].split("=")[0]) {
       thisCookie[i].split("=")[1] = cookieData;
    }
  }
}

// Sets up document cookie and expire date.
expireDate = new Date;
expireDate.setMonth(expireDate.getMonth() + 6);

if (document.cookie == "") {
  document.cookie = "viewSplash=1;expires=" + expireDate.toGMTString();
  document.cookie = "glow=1;expires=" + expireDate.toGMTString();
  document.cookie = "autoLoad=0;expires=" + expireDate.toGMTString();
}

// Redirect to splash based on cookie and if coming from off-site.
if (getParam("nosplash") == 1) {
//    void
} else if ((getCookie("viewSplash") == 1) && (document.referrer.split("/")[2] != self.location.hostname)) {
    window.location.href = "http://www.flyordie.com/tanx/splash.html?url=" + self.window.location; 
}
//-->
