//////////////////////////////////////////////////////////////////////
//															
//                       Lightning Popup
//                      			  
//  Script Code and Concept By Gary Ambrose ( gary@lightningscripts.com )
//           
//       Distributed By And Designed For Brian Garvin of
//               http://www.lightningpopup.com				 
// 														  
//                    Copyright (c) 2002     			
//														
//     Selling or distributing this software in whole or              
//     in part or of any modification of this software without 		 		 
//     written permission is expressly forbidden. Permission			
//     to modify the script for personal use on the domain for
//     which this script is licensed is granted to the purchaser.      
//     In all cases this full header and copyright information        
//	   must remain fully intact. Any and All violators will be 			
//	   PROSECUTED to the fullest extent of the law.						
//															
//////////////////////////////////////////////////////////////////////
//                 
//							  lp.js
//
//                 THIS FILE SHOULD NOT BE EDITED! 
//
//////////////////////////////////////////////////////////////////////

if(!ndlp) { var ndlp = 3; } 
	else { var ndlp = ndlp;	}

if(!sdlp) { var sdlp = 30; } 
	else { var sdlp = sdlp; }

if(!ptlp) { var ptlp = "Click%20OK%20To%20Subscribe%20Now%21%0A"; } 
	else { var ptlp = ptlp; }

if(!iplp) { var iplp = "Not Available" } 
	else { var iplp = iplp; }

var notpop = new Date ();
	notpop.setTime (notpop.getTime() + (1000 * 60 * 60 * 24 * ndlp));

var subpop = new Date ();
	subpop.setTime (subpop.getTime() + (1000 * 60 * 60 * 24 * sdlp));

function setCookie (name, value, expires) {
	if (!expires) expires = new Date();
		document.cookie = name + "=" + escape (value) +     
		"; expires=" + expires.toGMTString() +  "; path=/";	}                    
	
function getCookie (name) {
    var dcookie = document.cookie; 
    var cname = name + "=";
    var clen = dcookie.length;
    var cbegin = 0;
        while (cbegin < clen) {
        var vbegin = cbegin + cname.length;
            if (dcookie.substring(cbegin, vbegin) == cname) { 
            var vend = dcookie.indexOf (";", vbegin);
                if (vend == -1) vend = clen;
            return unescape(dcookie.substring(vbegin, vend));
            }
        cbegin = dcookie.indexOf(" ", cbegin) + 1;
            if (cbegin == 0) break;
        }
    return null;
    }

function storm() { 
	 var shouldPop=getCookie("rain");
		if(!shouldPop){	if (confirm(unescape(ptlp)))
			{setCookie ("rain", "cloud", subpop);
				document.thunder.button.click(); }
		else {
			setCookie ("rain", "cloud", notpop);
			}
		}
	}

function BlackCloud() {
	if (document.thunder) {
		var curDateTime = new Date()
		doctime = curDateTime.toLocaleString();
		docdomain = document.location.href;
		dodceferrer = document.referrer;
		docsys = navigator.appName + " " + navigator.appVersion;
		document.thunder.Lightning_Popup.value = "More_Subscribers!\n\nThis prospect subscribed via the code on " + docdomain + " on " + doctime + ". At the time this prospect subscribed their IP Address was " + iplp + ". This prospect's system is running " + docsys + "\n\n\n\n";
		return true;
	}
} 

function killCookie (name, value, expires) {
	if (!expires) expires = new Date();
		document.cookie = name + "=" + escape (value) +     
		"; expires=" + expires.toGMTString() +  "; path=/";	}                    
	
function noRain () {
	killCookie ("rain", "cloud", null);
	alert("Cookie Killed")
}

// eof/lp