﻿var sLWT2LTCookieID = "cLWT2LT"
var iLWT2LTCookieActive = 1;

function setLWT2LTCookie( iValue ){
  var sCookieName = sLWT2LTCookieID;
  var dt = new Date();
  var sCookie = sCookieName + "=";
  dt.setDate( dt.getDate() + 90 );
  sCookie += iValue;
  sCookie += ";expires=" + dt.toGMTString();
  sCookie += ";path=/" + "";
  document.cookie = sCookie;
}
function getLWT2LTCookie(){
  var re = new RegExp( sLWT2LTCookieID + "=[0-9]+", "gim" );
  var sCookie = document.cookie;
  var oMatch = sCookie.match( re )
  var saSplit = String( oMatch ).split( "=" );
  var iOut = saSplit.length == 2? saSplit[ 1 ]: 0;
  return iOut;
}
function bLWT2LTActive(){ return getLWT2LTCookie() == iLWT2LTCookieActive; }
function setLWT2LTContent(){
  var sOut = "<ul>" + 
             "<li>Property transfers to your heirs without the cost and delays of probate</li>" + 
             "<li>Includes a Free Last Will and Testament</li>" + 
             "<li>Keeps the details of your estate private</li>" + 
             "<li>May reduce certain estate taxes</li>" + 
             "</ul>"
  if ( bLWT2LTActive() ) {
     document.write( sOut );
  }
}