<!-- begin

 var dir = location.href.substring(0,location.href.lastIndexOf('/')+1);
 var url = location.href.substring(dir.length,location.href.length+1);
 var affiliate_link_generator = "http://www.tigertom.com/second-pitch.php?" + url;

// var affiliate_link_generator = "http://www.tigertom.com/random-affiliate-links.php?" + window.location;
// this.location

// Cookie code
function getCookieVal (offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie (name) {
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg)
return getCookieVal (j);
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) 
break; 
}
return null;
}

function SetCookie (name, value) {
var argv = SetCookie.arguments;
var argc = SetCookie.arguments.length;
var expires = (2 < argc) ? argv[2] : null;
var path = (3 < argc) ? argv[3] : null;
var domain = (4 < argc) ? argv[4] : null;
var secure = (5 < argc) ? argv[5] : false;
document.cookie = name + "=" + escape (value) +
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
((path == null) ? "" : ("; path=" + path)) +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");
}

// Load popunder window
function DisplayInfo() {
var expdate = new Date();
var visit;
expdate.setTime(expdate.getTime() +  (24 * 60 * 60 * 1000 * 365)); 
if(!(visit = GetCookie("visit")))  
visit = 0;
visit++;
SetCookie("visit", visit, expdate, "/", ".tigertom.com", false);
var message;
if(visit > 12 && visit < 15) { 
loadpopunder() }
}


// Load popunder window
function DisplayInfo2() {
var expdate = new Date();
var visit;
expdate.setTime(expdate.getTime() +  (24 * 60 * 60 * 1000 * 365)); 
if(!(visit = GetCookie("visit")))  
visit = 0;
visit++;
SetCookie("visit", visit, expdate, "/", ".tigertom.com", false);
var message;
if(visit > 4 && visit < 7){ 
popup2() }
 
}


// Popunder function
function loadpopunder(){
win2=window.open(affiliate_link_generator,'','toolbar=1,location=0,status=0,menubar=1,scrollbars=1,resizable=1,width=400,height=200')
// win2=window.open('http://www.tigertom.com/lottery.shtml','','toolbar=1,location=0,status=0,menubar=1,scrollbars=1,resizable=1,width=500,height=400')
win2.blur()
window.focus()
}

// Popunder function
function loadpopunder2(){
win2=window.open('http://www.tigertom.com/web-design.shtml','','toolbar=1,location=0,status=0,menubar=1,scrollbars=1,resizable=1,width=540,height=400')
win2.blur()
window.focus()
}

// Popunder function
function loadpopunder3(){
win2=window.open('http://www.tigertom.com/web-fixer.html','','toolbar=1,location=0,status=0,menubar=1,scrollbars=1,resizable=1,width=300,height=500')
win2.blur()
window.focus()
}


// Popup function
function popup(){
window.open('http://www.tigertom.com/lottery.shtml','','toolbar=1,location=0,status=0,menubar=0,scrollbars=1,resizable=1,width=500,height=400')
}

// Popup function
function popup2(){
window.open('http://www.tigertom.com/download_popup.htm','','toolbar=1,location=0,status=0,menubar=0,scrollbars=1,resizable=1,width=200,height=150')
}

// Break frames

function breakFree() {
if (top.location) top.location.replace(self.location.href)
else top.document.location.replace(self.document.location.href);
}
if (top!= self) breakFree();

// end -->

