/* ===========================================================================   messages.js	 Var definition for The Solar Almanac   jB  W 103006      from totw.js =========================================================================== */var name_of_month = [	"January", 	"February", 	"March", 	"April", 	"May", 	"June", 	"July", 	"August", 	"September", 	"October", 	"November", 	"December" ]; var length_of_month = [31,28,31,30,31,30,31,31,30,31,30,31]; today = new Date(); var todays_date = today.getDate(); //-----------------------------var SolarAlmanac_RenewMsg = "";	// 103006-X 	var SolarAlmanac_MonthlyPrice = "0.99"; var monthly_price = "_monthly-price_"; var	SolarAlmanac_EG_Tail = "\				<BR> \				Our customers get:<BR> \				&bull; more <A Href='../../JEBrown800/PressReleases/MercuryJupiter102206.html' Target='_blank'>animated sky charts</A><BR> \				&bull; e-mail alerts when special events occur <BR>\				&bull; moonrise and occultation predictions accurate to the minute <BR>\				<BR> \				Look at <A Href='../lastmonth.html' Target='_blank'>what our paying customers got last month</A>. <BR> \";var SolarAlmanac_ExpirationGreeting_Base = "\<TR><TD> \<Table Border=0 CellPadding=4 Align=center> \	<TR Class='darknight'> \		<TD Class='darknight'>\			<H1 Align=center Style='font-size: 72pt;' Style='color: magenta'><BLINK>*</BLINK></H1> \		<TD Class='darknight'> \			<P Align='center' Style='color: cyan'> \				Welcome back.<BR> \				We're glad you've enjoyed your free trial month of The Solar Almanac.<BR> \				To order the current Almanac, see the payment button below.<BR> \				The Solar Almanac is $" + SolarAlmanac_MonthlyPrice + " per month.<BR> \" + SolarAlmanac_EG_Tail; var SolarAlmanac_ExpirationGreeting_L_Base = "\<TR><TD> \<Table Border=0 CellPadding=4 Align=center> \	<TR Class='darknight'> \		<TD Class='darknight'>\			<H1 Align=center Style='font-size: 72pt;' Style='color: magenta'><BLINK>*</BLINK></H1> \		<TD Class='darknight'> \			<P Align='center' Style='color: cyan'> \				Welcome back.<BR> \				We're glad you've enjoyed The Solar Almanac.<BR> \				To order the current Almanac, see the payment button below.<BR> \" + SolarAlmanac_EG_Tail;// Insert before final table tag: //				<BR> \//				* * * January is free when you buy February * * *\	// 111506-A var SolarAlmanac_ExpirationGreeting, 	SolarAlmanac_ExpirationGreeting_L; var this_month_name = name_of_month[today.getMonth()]; var next_month = new Date(today.getTime()); 	next_month.setDate(1); next_month.setMonth(1 + today.getMonth()); var next_month_name = name_of_month[next_month.getMonth()]; 	{	two_month_offer = ""; 		if (todays_date >= 20 && todays_date <= length_of_month[today.getMonth()] - 3) 		two_month_offer = "<BR> * * * " + this_month_name + " is free when you buy " + next_month_name + " * * *"; 		end_table = "</Table> \"; 	SolarAlmanac_ExpirationGreeting = SolarAlmanac_ExpirationGreeting_Base	 + two_month_offer	 + end_table; 		SolarAlmanac_ExpirationGreeting_L = SolarAlmanac_ExpirationGreeting_L_Base 	 + two_month_offer	 + end_table; 	}// -----------------------// Dynamic text from 011807.html var nextmonthforsale = ( todays_date >= 20 	? next_month_name + " " + next_month.getFullYear() 	: this_month_name + " " +      today.getFullYear() ) ; function change_form_element_text(element) { 	if (element.value) 		if (element.value.indexOf('_') != -1) 			if (element.value.indexOf("_xclick") == -1) // to protect pmt form 				{				s = element.value; 				s = s.replace(/_nextmonthforsale_/, nextmonthforsale); 				s = s.replace(/_monthly-price_/,    SolarAlmanac_MonthlyPrice); 				if (element.value != s) 					element.value  = s; 				}}		function form_variable_substitutor(form) { 	// Variable Substitution: Operates on *all* form elements: 	for (var e = 0; e < form.elements.length; ++ e) 		change_form_element_text(form.elements[e]); }function document_variable_substitutor() { 	// Variable Substitution: Operates on *all* form elements: 	for (var f = 0; f < document.forms.length; ++ f) 		form_variable_substitutor(document.forms[f]); }// icons code   jB  031207 		var root_dir = ( window.location.href.indexOf("/private/") == -1 ? "" : "../" ) ; 		function icons_0(flags, bitsel, ilink, alt, space, glink) {		if (!(flags & bitsel)) 			document.write('<IMG Src="' + root_dir + 'images/spacer.gif" Height="1" Width="' + space + '">'); 		else			{			if (glink != "") 				document.write('<A Href="' + root_dir + 'glossary.html#' + glink + '" Target="_blank">'); 			document.write('<IMG Src="' + root_dir + 'images/' + ilink + '" Title="' + alt + '" Border="0" Align="middle" Width="' + space + '" Height="13">'); 			if (glink != "") 				document.write('</A>'); 			}	}		function icons(prefix, flags) {		icons_0(flags,  1, prefix + "0.gif", "Event occurs within 15&deg; of the Sun.", 15, ""); 		icons_0(flags,  2, prefix + "1.gif", "Not Visible: Event takes place below horizon.", 12, ""); 		icons_0(flags,  4, prefix + "2.gif", "Visible: Event takes place above horizon.", 12, ""); 		icons_0(flags,  8, prefix + "3.gif", "Part Visible: Object(s) below horizon during part of this event.", 12, ""); // obs: "during part of this time range" 		icons_0(flags, 16, prefix + "4.gif", "Geocentric (Event &amp; time computed as if seen from center of Earth)", 13, "geocentric"); 		icons_0(flags, 32, prefix + "5.gif", "Topocentric (Event &amp; time computed for your exact position)", 11, "topocentric"); 		document.write('&emsp;');	}		function bicons(flags) {		icons("b", flags); 	}		function wicons(flags) {		icons("w", flags); 	}// Glossary links   jB  011409 	function G(term) 	{		hash = term.replace(/ /g, '').toLowerCase(); 		document.write('<A Href="' + root_dir + 'glossary.html#' + hash + '" Target="_blank" Title="click for definition">' + term + '</A>'); 	}/* ======================================================================== */