<!-- Start popup box code -->
DaysToLive = 10; // Use 0 (zero) for session cookie.
function SetCookie() {
var exp = '';
if(DaysToLive > 0) {
	var now = new Date();
	then = now.getTime() + (DaysToLive * 24 * 60 * 60 * 1000);
	now.setTime(then);
	exp = '; expires=' +
	now.toGMTString();
	}
document.cookie = 'wpPopBox=displayed' + exp;
} // end of function SetCookie()

function GetCookie() {
var cookiecontent = '';
if(document.cookie.length > 0) {
	var cookiename = 'wpPopBox=';
	var cookiebegin = document.cookie.indexOf(cookiename);
	var cookieend = 0;
	if(cookiebegin > -1) {
		cookiebegin += cookiename.length;
		cookieend = document.cookie.indexOf(";",cookiebegin);
		if(cookieend < cookiebegin) { cookieend = document.cookie.length; }
		cookiecontent = document.cookie.substring(cookiebegin,cookieend);
		}
	}
return cookiecontent;
} // end of function GetCookie()

function OpenPopBoxIfOkay() {
var cookie = GetCookie();
if(cookie == 'displayed') { return; }
OpenNoKillPopBox();
SetCookie();
} // end of function OpenPopBoxIfOkay()

function OpenNoKillPopBox() {
var NoKillPopBox = 'BetterThanPopup'; // Must have same value as id of no-kill pop box DIV
if (navigator.userAgent.indexOf("Opera") != -1)     // Opera
	{ document.getElementById(NoKillPopBox).style.visibility="visible"; }
else if(navigator.userAgent.indexOf("Gecko") != -1) // NS6+
	{ document.getElementById(NoKillPopBox).style.visibility="visible"; }
else if(document.layers)                            // NS4
	{ eval('document.' + NoKillPopBox + '.visibility="show"'); }
else if(document.all)                               // IE and clones
	{ eval(NoKillPopBox + '.style.visibility="visible"'); }
else           // Might or might not work on other types of browsers.
	{ eval(NoKillPopBox + '.style.visibility="visible"'); }
} // end of function OpenNoKillPopBox()

function CloseNoKillPopBox() {
var NoKillPopBox = 'BetterThanPopup'; // Must have same value as id of no-kill pop box DIV
if (navigator.userAgent.indexOf("Opera") != -1)     // Opera
	{ document.getElementById(NoKillPopBox).style.visibility="hidden"; }
else if(navigator.userAgent.indexOf("Gecko") != -1) // NS6+
	{ document.getElementById(NoKillPopBox).style.visibility="hidden"; }
else if(document.layers)                            // NS4
	{ eval('document.' + NoKillPopBox + '.visibility="hide"'); }
else if(document.all)                               // IE and clones
	{ eval(NoKillPopBox + '.style.visibility="hidden"'); }
else           // Might or might not work on other types of browsers.
	{ eval(NoKillPopBox + '.style.visibility="hidden"'); }
} // end of function CloseNoKillPopBox()
<!-- End popup box code -->


<!-- Start of D&B Web Logo code snippet -->
var strSealURL='weblogos.dnb.com';
var sealID='C1A4C43E-C635-4798-943E-6AA002E1704B';
var strDuns='099911328';
var strRWSPath='express.dnbsearch.com';
var strCountry='US';
var increment='true';
var strLang='EN';
<!-- End of D&B Web Logo code snippet -->

function Rcertify() {
	popupWin = window.open ('http://www.bbbonline.org/cks.asp?id=102041813363823013', 'Participant','location=yes,scrollbars=yes,width=450,height=300');
	window.name = 'opener';
} 

function resetForm () {
	document.forms[0].value="";
}


function validateSubscription  (form) {

	form.name.value = form.name.value.valtrim();
	form.email.value = form.email.value.valtrim();


	if (form.name.value.length == 0) {
		alert ("Please enter your name.");
		form.name.focus();
		return false;
	}
	else if (form.email.value.length == 0) {
		alert ("Please enter your email address.");
		form.email.focus();
		return false;
	}
	else {
		return true;
	}
}

function popUp(URL) {
	day = new Date();
	id = day.getTime();
	var w = 510;
	var h = 720;
    var left = parseInt ((screen.availWidth - w) /2);
    var top = parseInt ((screen.availHeight - h) /2);
 	eval ("page" + id + " = this.open (URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=' + w + ',height=' + h + ',left=' + left + ',top=' + top);");
}

function validatePopUpSubscription (form) {

        form.name.value = form.name.value.valtrim();
        form.email.value = form.email.value.valtrim();
        

        if (form.name.value.length == 0) {
                alert ("Please enter your name.");
                form.name.focus();
                return false;
        }       
        else if (form.email.value.length == 0) {
                alert ("Please enter your email address.");
                form.email.focus();
                return false;
        }       
        else {
                form.action="pht-popupsubscribe.php?name=" + form.name.value + "&email=" + form.email.value + "&r=" + form.r.value;
		form.submit();
                return true;
        }

}

function validateForm (form) {

	if (form.name.value.length == 0) {
		alert ("Please enter your name.");
		form.name.focus();
		return false;
	}
	else if (form.email.value.length == 0) {
		alert ("Please enter your email address.");
		form.email.focus();
		return false;
	}
	else if (form.phone.value.length == 0) {
		alert ("Please enter your phone number.");
		form.phone.focus();
		return false;
	}
	else {
		return true;
	}
}

String.prototype.valtrim = function() {
	return this.replace(/\s+$/,'').replace(/^\s+/,'');
}

<!-- Start of D&B Web Logo code snippet -->
var strSealURL='weblogos.dnb.com';
var sealID='C1A4C43E-C635-4798-943E-6AA002E1704B';
var strDuns='099911328';
var strRWSPath='express.dnbsearch.com';
var strCountry='US';
var increment='true';
var strLang='EN';
<!-- End of D&B Web Logo code snippet -->

