/*
*  SCRIPT CODED BY: Misha Peric (mi5ha@infosky.net)
*  COPYRIGHT: Newsletter Promote 2002.
*/
var caution = false;
var popupText = "Subscribe to our newsletter just click OK and you'll get:\n\nDigestion Report\nAccess to Back Issues\n\nYour privacy is protected and your email is never revealed to third parties.";
var delay = 10;
var email = "subscribe@roadtohealthmall.com";
var emailSubject = "Subscribe";
var buttonText = "Subscribe";
var buttonColor1 = "#FA6218";
var buttonColor2 = "#00639C";
function showNewsletterButton(){
var output = "";
if (emailSubject!=""){
output += "<form style='display:inline' id='frmSubscribe' method='post' action='mailto:"+email+"?subject="+emailSubject+"'>";
}
else {
output += "<form style='display:inline' id='frmSubscribe' method='post' action='mailto:"+email+"'>";
}
output += "<input id=btnSubscribe style='background:"+buttonColor1+";cursor:hand' type='submit' onMouseOver=\"this.style.backgroundColor = '"+buttonColor2+"'\" onMouseOut=\"this.style.backgroundColor = '"+buttonColor1+"'\" value='"+buttonText+"' name=btnSubscribe>";
output += "<input type=hidden value=submit name=submit>";
output += "</form>";
document.write( output );
}
function offerSubscription(lTxt){
var rval = confirm(lTxt);
if (rval) frmSubscribe.btnSubscribe.click();
}
function startPopUp(){
var tmpCookie = getCookie("npnewsletter");
if (tmpCookie==null) {
setCookie("npnewsletter", "beenhere");
setTimeout("offerSubscription(popupText);", delay * 1000);
}
}
function setCookie(name, value, expires, path, domain, secure) {
var curCookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : "")
if (!caution || (name + "=" + escape(value)).length <= 4000) {
document.cookie = curCookie
}
else {
if (confirm("Cookie exceeds 4KB and will be cut!")) document.cookie = curCookie;
}
}
function getCookie(name) {
var prefix = name + "=";
var cookieStartIndex = document.cookie.indexOf(prefix);
if (cookieStartIndex == -1) return null;
var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length);
if (cookieEndIndex == -1) cookieEndIndex = document.cookie.length;
return unescape(document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex))
}
