/* opens the book preview popup */
function previewBook (iProduct) { openWindow('/popups/previewBook.cfm?mpid=' + iProduct, 'previewWindow', 620, 500); }

/* opens the newsletter preview popup */
function previewNewsletter (iProduct) { openWindow('/popups/previewNewsletter.cfm?mpid=' + iProduct, 'previewWindow', 620, 500); }

/* opens the book premium popup */
function bonusBook (iProduct) { openWindow('/popups/bookPremiumDetails.cfm?mpid=' + iProduct, 'bonusWindow', 440, 410); }

/* opens the newsletter premium popup */
function bonusNewsletter (iProduct, numReport) { openWindow('/popups/newsletterPremiumDetails.cfm?mpid=' + iProduct + '#r' + numReport, 'bonusWindow', 400, 550); }

/* opens the newsletter guarantee popup */
function moreDetails (iProduct) { openWindow('/popups/moreDetails.cfm?mpid=' + iProduct, 'moreDetailsWindow', 350, 275); }

/* opens the healthy living free tools popup */
function freeTools (vSKU) { openWindow('/healthyliving/popups/' + vSKU + '.cfm', 'freeToolsWindow', 425, 450); }

/* this function opens a popup window */
function openWindow(strURL, strWindowName, numWinWidth, numWinHeight) {
    var strSizeSpec;
	var objWindow;
	strSizeSpec='toolbar=0,location=0,directories=0,left=10,top=10,status=no,menubar=0,scrollbars=1,resizable=yes,width='+numWinWidth+',height='+numWinHeight;

	objWindow = window.open(strURL,strWindowName,strSizeSpec);
	objWindow.focus();

	return;
}

/* this function clears the text in a form field */
function clearText(strFormName, strInput) { document.forms[strFormName][strInput].value = ''; }