<!--
var displayText = "Congratulations!! You have been selected to receive up to 32% OFF all CertGear Products. \n\n To Redeem This Offer, Simply Register Using The Following Discount Entry Form. \n\n";
var delay = "10";
//var email = "phr@certgear.com";
var buttonText = "  Join Our Mailing List  ";
//var emailSubject = "Please Send Me 15% Discount On CertGear Products";
var cookie = "discounts40";

function optin(text){
if (getOptinCookie(cookie)==""){

	setOptinCookie();
	if(confirm(text)){
		// discount form
		openpopup (popurls[0]);
		}
	}
}

function showButton(){
document.write("<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>");
document.write("<form");
document.write("'><input type=hidden value=submit name=submit>");
// mailing list form
document.write("<input type='submit' onclick='openpopup (popurls[1]);' STYLE='cursor:hand;background:#d6ded9' onMouseOver=\"this.style.backgroundColor = '#FFFFFF'\" onMouseOut=\"this.style.backgroundColor = '#d6ded9'\" value='"+buttonText + " >");
document.write("' name=subscribe id=subscribe></form>");
}

function Go2(){
if (getOptinCookie(cookie)==""){
setTimeout("optin(displayText);",delay * 1000);
}
}

function getOptinCookie(cookieName) {
var id = cookieName + "=";
var cookievalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(id);
if (offset != -1) {
cookievalue = "x";
}
}
return cookievalue;
}
function setOptinCookie () {
var today = new Date();
var expdate = new Date(today.getTime() + 15 * 24 * 60 * 60 * 1000);
//var expdate = new Date(today.getTime() + 1);
document.cookie = cookie + "=done;expires=" + expdate.toGMTString();
}
function setPermanentCookie () {
var today = new Date();
var expdate = new Date(today.getTime() + 3000000000);
document.cookie = cookie + "=done;expires=" + expdate.toGMTString();
}


//JK Popup Window Script (version 3.0)- By JavaScript Kit (http://www.javascriptkit.com)
//Visit JavaScriptKit.com for free JavaScripts
//This notice must stay intact for legal use
//Win Type: Pop Up | 5 days period
    
//Specify URLs to randomly select from and popup/popunder:
//To display a single URL, just remove all but the first entry below:
var popurls=new Array()
popurls[0]="promo/discountForm2.html"
popurls[1]="promo/mailingListForm2.html"

function openpopup(popurl){
var winpops=window.open(popurl,"_form","width=600,height=355,status")
}

function get_cookie(Name) {
  var search = Name + "="
  var returnvalue = "";
  if (document.cookie.length > 0) {
    offset = document.cookie.indexOf(search)
    if (offset != -1) { // if cookie exists
      offset += search.length
      // set index of beginning of value
      end = document.cookie.indexOf(";", offset);
      // set index of end of cookie value
      if (end == -1)
         end = document.cookie.length;
      returnvalue=unescape(document.cookie.substring(offset, end))
      }
   }
  return returnvalue;
}

popfrequency="5 days"

function resetcookie(){
var expireDate = new Date()
expireDate.setDate(expireDate.getDate()-10)
document.cookie = "jkpopunder=;path=/;expires=" + expireDate.toGMTString()
}

function loadornot(){
if (get_cookie('jkpopunder')==''){
openpopup(popurls[Math.floor(Math.random()*(popurls.length))])
var expireDate = new Date()
expireDate.setDate(expireDate.getDate()+parseInt(popfrequency))
document.cookie = "jkpopunder="+parseInt(popfrequency)+";path=/;expires=" + expireDate.toGMTString()
}
}


//-->
