function lastVisit() {
  var lastvisit=new Object()
  lastvisit.firstvisitmsg="Welcome to Template Optimizer, the <u><b>World's #1 eBay Template List Software.</b></u>  Be sure to check out the more than 100+ templates and the new Video Training Tutorials.  You can click on the 'Training' tab in the upper right corner of the main menu.  As well, if you click on the 'My Account' tab you can update your personal information at any time including creating an easy to remember password.<br><br><center><embed name=\"csSWF\" src=\"templateoptimizerintro_controller.swf\" width=\"456\" height=\"362\" bgcolor=\"#1a1a1a\" quality=\"best\" allowScriptAccess=\"always\" allowFullScreen=\"true\" scale=\"showall\" flashVars=\"autostart=true\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\"></embed></center>"; //Change first visit message here
  lastvisit.subsequentvisitmsg="Welcome back! <br><br>It's now [displaydate].  Be sure to check out both the Newsflash and Frequently Asked Question updates below as there might be new information posted since your last visit.  And, please be sure to send us your <b>Template Optimizer Success Stories</b> so we can feature you on the homepage of TemplateOptimizer.com!<br><br>" // Change subsequent visit message here

  lastvisit.getCookie=function(Name) { // get cookie value
    var re=new RegExp(Name+"=[^;]+", "i"); // construct RE to search for target name/value pair
    if (document.cookie.match(re)) // if cookie found
      return document.cookie.match(re)[0].split("=")[1] // return its value
      return ""
  }
  lastvisit.setCookie=function(name, value, days) { // set cookie value
    var expireDate = new Date()
    //set "expstring" to either future or past date, to set or delete cookie, respectively
    var expstring=expireDate.setDate(expireDate.getDate()+parseInt(days))
    document.cookie = name+"="+value+"; expires="+expireDate.toGMTString()+"; path=/";
  }

  lastvisit.showmessage=function() {
  if (lastvisit.getCookie("visitcounter")=="") { // if first visit
    lastvisit.setCookie("visitcounter", 2, 730) // set "visitcounter" to 2 and for 730 days (2 years)
    document.write(lastvisit.firstvisitmsg)
  } else
    document.write(lastvisit.subsequentvisitmsg.replace("\[displaydate\]", new Date().toLocaleString()))
  }
  lastvisit.showmessage()
}
