<!-- Hide script 
var exit=true;
var days = 7; // valid for 7 days

function Get_Cookie(name) {
    var start = document.cookie.indexOf(name+"=");
    var len = start+name.length+1;
    if ((!start) && (name != document.cookie.substring(0,name.length))) return 'no';
    if (start == -1) return 'no';
    var end = document.cookie.indexOf(";",len);
    if (end == -1) end = document.cookie.length;
    return unescape(document.cookie.substring(len,end));
}

function Set_Cookie(name,value,expires) {
    document.cookie = name + "=" +escape(value) +
        ( (expires) ? ";expires=" + expires.toGMTString() : "");
}

function Delete_Cookie(name,path,domain) {
    if (Get_Cookie(name)) document.cookie = name + "=" +
        ( (path) ? ";path=" + path : "") +
        ( (domain) ? ";domain=" + domain : "") +
        ";expires=Thu, 01-Jan-1970 00:00:01 GMT";
}

function exitpage() {
  var siteid=31;
  var test=0;


  if (exit) {
    var viewedExitPopup = Get_Cookie('viewedExitPopup');
    if (viewedExitPopup == 'yes' && test == 0) {
       // Been there - don't go again
    }
    else  {
      var today = new Date();
      var zero_date = new Date(0,0,0);
      today.setTime(today.getTime() - zero_date.getTime());
      
      var todays_date = new
      Date(today.getYear(),today.getMonth(),today.getDate(),0,0,0);
      var expires_date = new Date(todays_date.getTime() + (days * 86400000));
      // Have not seen it - set cookie so we don't bug them again
	  Set_Cookie('viewedExitPopup','yes',expires_date);
	  myURL = 'http://www.betterlivingnyc.com/index.cfm?action=Contact&subaction=ContactPop&page_frame=popup';
  	  window.open(myURL,"hello","height=650,width=525,scrolling=no,resizable=yes,toolbar=0");      
    }
  }

}

// END EXIT BUTTON CODE -->
