// JavaScript Document

function ReDirect (URL) {

GetCookie('SplashSkip');

if (Splash == 'TRUE') {
  window.location=(URL);
  }
else {}
}

var Splash = GetCookie('SplashSkip');

function getCookieVal (offset) {
  var endstr = document.cookie.indexOf (";", offset);
  if (endstr == -1)
    endstr = document.cookie.length;
  return unescape(document.cookie.substring(offset, endstr));
}

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;
}

ReDirect('home.html');


function SetCookie (name, value) {
  // Enter number of days the cookie should persist
  var expDays = 30;
  var exp = new Date(); 
  exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
  expirationDate = exp.toGMTString();
  // Set cookie with name and value provided
  // in function call and date from above
  document.cookie = name + "=" + escape(value)
  document.cookie += "; expires=" + exp.toGMTString();
}

