>Open a webpage that you want exit butler to load in a program such as Wordpad or Notepad and paste the above text (Ctrl 'V') in between the HEAD Tags of the document.
The head of your webpage should now look like the code directly below. Edit the RED text only to reflect the web address for exit butler that will be loaded if the viewer chooses..
function CreateCookie(name, value, expiredays)
var todayDate = new Date();
todayDate.setDate(todayDate.getDate() + expiredays);
document.cookie = name + " = " + value + "; expires=" +
todayDate.toGMTString() + ";";
var numOfCookies = document.cookie.length;
var nameOfCookie = cookiename + "=";
var cookieLen = nameOfCookie.length;
while (x <= numOfCookies)
var y = (x + cookieLen);
if (document.cookie.substring(x, y) == nameOfCookie)
x = document.cookie.indexOf(" ", x) + 1;
if (x == 0)
if ((endOfCookie = document.cookie.indexOf(";",val)) == -1)
endOfCookie = document.cookie.length;
return unescape(document.cookie.substring(val, endOfCookie));
// This is what the prompt will ask the visitor when the leave your website.
if (confirm("\nWould you like to visit another webmasters resource
// This is what the prompt will say if they choose to see what you asked above>
// This is what the prompt will say if they choose to not see what you asked
alert("\nSee you again\n Good Luck!\n");
var userCookie = ReadCookie("_chups");
if (userCookie == null)
// user is here at first time
//propose to visit site
//create coockie key (30 days)
CreateCookie("_chups", 1, 30);
Now you must tell the website that you want exit butler to load when the visitor exits your page. To do that include this line into yout <BODY tag.
After you have embedded the Head script into your page and you have added the body code correctly, you are ready to upload your pages!