function CookieHandler() {

  this.setCookie = function (name, value, seconds) {

    if (typeof(seconds) != 'undefined') {
      var date = new Date();
      date.setTime(date.getTime() + (seconds*1000));
      var expires = "; expires=" + date.toGMTString();
    }
    else {
      var expires = "";
    }

    document.cookie = name+"="+value+expires+"; path=/";
  }

  this.getCookie = function (name) {

    name = name + "=";
    var carray = document.cookie.split(';');

    for(var i=0;i < carray.length;i++) {
      var c = carray[i];
      while (c.charAt(0)==' ') c = c.substring(1,c.length);
      if (c.indexOf(name) == 0) return c.substring(name.length,c.length);
    }

    return null;
  }

  this.deleteCookie = function (name) {
    this.setCookie(name, "", -1);
  }

}
    

function newHome(newHomePage) {
  var Cookies = new CookieHandler();
  Cookies.setCookie('FaFhp', newHomePage, 365*60*60);
}

function ExitNotice()  {
        if(confirm("You are now leaving First & Farmers National Bank's public web site.  The privacy policy of the site to which you are going may differ from the First & Farmers National Bank's privacy policy.  To remain at our site, click Cancel. To leave our site for the link you selected, click OK.  Thank you for visiting FirstandFarmers.com.")) {
       return true;
      } 
history.go(0);
return false;
}    
