//-------------------------------- This script is Copyright 2002 by Jimmy D. Brown --------------------- //
//------The script must be pasted right after the body tag. Then change variables in edit area   //

//---Attention. JavaScript is completely visible and has its own unique algorithm.            //
// So, if you are thinking of illegal use of it, please do not. Purchase from the authorized reseller to avoid theft charges. //
//----------------------------- The authorized distrubutor of this script is Jimmy D Brown, webmaster@profitsvault.com  ------------------- //


/////////////////////////////////////////////////////////////
// Edit Area                                              //
// Change only numers and text, do not Remove ";" symbol //
//////////////////////////////////////////////////////////


var l="mailto:subscribe@bookmorebusiness.com?subject=Subscribe_BOOK_MORE_BUSINESS_Tips";  //Your Download Link URL, must be within the Brackets
var a=34;                                           //Max Number of Attempts to show PopUp to the user, which do not want to subscribe, from 0 to 99
var s=24;                                         //Time in hours between attempts, any numeric
var p=30;                                        //Time interval in days before the next attempt to show PopUp to the user Who previously rejected all the attempts, any numeric.


//Message text Starts, edit content within the brackets only, do not remove ending ";" symbol

mtext1="FREE Offer to You! \n\n ====================== \n Here's YOUR chance to learn some terrific ideas on how to\n *Book More Business*.\n ====================== \n\n Click the OK button to be subscribed immediately.\n\n To ignore, click the CANCEL button";


//additional message control: t - attempt number to show message (must not be more than max attempts value), mtext - Message Text

usethem="no"; //if "no", additional options disabled, if "yes" - enabled

t2=2; // must start from 2, if 0 - no action
mtext2="Second message. Don't Close This Window! \n\n\n ***************** \n Just pressing OK you can get a Great E-book about ............ \n\n *****************";

t3=3;
mtext3="Third message. Don't Close This Window! \n\n\n ***************** \n Just pressing OK you can get a Great E-book about ............ \n\n *****************";

t4=4;
mtext4="Fourth message. Don't Close This Window! \n\n\n ***************** \n Just pressing OK you can get a Great E-book about ............ \n\n *****************";

t5=5;
mtext5="Fifth message. Don't Close This Window! \n\n\n ***************** \n Just pressing OK you can get a Great E-book about ............ \n\n *****************";

//last message, to show after all to the end of attempts, part of additional options

tlast=Math.max(t2,t3,t4,t5)+1; //if all time variables (t2,t3,t4,t5) are zero, it will be shown from a second attempt
mlast="Last message. Don't Close This Window! \n\n\n ***************** \n Just pressing OK you can get a Great E-book about ............ \n\n *****************";


// Message text Ends. Use  \n  as line breakers, DO NOT REMOVE Right and Left " ", put Your text inside
// Do not use (") symbol inside the text

//////////////////////////////////////////////////
//End of Edit Area                             //
////////////////////////////////////////////////






if (isNaN(a)) {alert('Variable "a" must be a numeric one, from 0 to 99')};if (isNaN(s)) {alert('Variable "s" must be a numeric one')};if (isNaN(p)) {alert('Variable "p" must be a numeric one')};s=Math.abs(s);p=Math.abs(p);mtext=mtext1;
var t;var c;var d;var r;var nz = new Date();var ny = new Date();d=document;c=d.cookie;start=c.indexOf("EbBst").valueOf();bs=c.substring(0,start);end=c.indexOf(";",start).valueOf();if (end<0)
{end=c.length;} 
if(start!=-1){c=c.substring(start,end)}else{c=""};p=p*24*60*60*1000;s=s*60*60*1000;a=Math.min(Math.abs(a),99);
function show(){if (confirm(mtext)){sf="directories=0"; objNewWindow=location.replace(l,"",sf); r="r";} sc();}
function sc() {if (r=="r") {c="y";} else {t="n";}  co=c.substring(7, 9); co++; if (co>99){co=99;} c=t; if(co.valueOf()<10){co="0"+co};c+=co.toString(); c+=nz.getTime(); ny.setFullYear(ny.getFullYear() + 10);d.cookie="EbBst="+c+"; expires="+ny.toGMTString();}
if (c.length==0) {show();}else {if (c.substring(6, 7)!="y"){b=c.substring(7, 9);if (b>a){if (nz.getTime().valueOf()-c.substring(9, c.length).valueOf()>p){show();}}else{if (usethem.toLowerCase()=="yes"){b++;if(b==t2){mtext=mtext2};if(b==t3){mtext=mtext3};
if(b==t4){mtext=mtext4};if(b==t5){mtext=mtext5}; if(b>=tlast){mtext=mlast};} if (nz.getTime().valueOf()-c.substring(9, c.length).valueOf()>s){show();}else{ }}}}
