var old_calendar='July 16';
var new_calendar='July 29';
var x_year='2010';
var ad_creatio='7518';
var n_day='16';
var n_month='7';
var w_day='Thursday';
var m_saints='\<A\ Href\=\"JavaScript\:openWindow\(\'http\:\/\/www\.ponomar\.net\/typicon\.html\'\)\;\"\>\<IMG\ Src\=\"http\:\/\/www\.ponomar\.net\/images\/T1\.gif\"\ Alt\=\"A\ service\ with\ no\ mark\ in\ the\ Typicon\ is\ served\ for\ this\ saint\"\ Border\=\"0\"\>\<\/A\>\<A\ Href\=\"JavaScript\:doSaints\(\'4234\'\)\;\"\>Hieromartyr\ Athenogoras\,\ Bishop\ of\ Heracleopolis\,\ and\ his\ 10\ Disciples\ \(\+c\.311\)\<\/A\>\;\ \<A\ Href\=\"JavaScript\:doSaints\(\'4244\'\)\;\"\>Martyrs\ Paul\ and\ two\ sisters\ Alevtina\ \(Valentina\)\ and\ Chionea\ \(Thea\)\,\ at\ Caesarea\ in\ Palestine\ \(\+308\)\<\/A\>\;\ \<A\ Href\=\"JavaScript\:doSaints\(\'4245\'\)\;\"\>Martyrs\ Antiochos\ the\ Physician\ and\ Faustus\ \(4th\ C\)\<\/A\>\;\ \<A\ Href\=\"JavaScript\:doSaints\(\'4246\'\)\;\"\>Virginmartyr\ Julia\ of\ Carthage\ \(\+\ c\.440\ or\ 613\)\<\/A\>\;\ ';
var paschalcycle='Thursday\ of\ the\ 10th\ week\ after\ Pentecost\;\ Tone\ VIII';
var readings='\<B\>Apostol\<\/B\>\:\ \<A\ Href\=\"JavaScript\:doReadings\(\'II\ Cor\'\,\ \'1\:1\-7\'\)\"\>II\ Cor\ 1\:1\-7\<\/A\>\&nbsp\;\<B\>Gospel\<\/B\>\:\ \<A\ Href\=\"JavaScript\:doReadings\(\'Mt\'\,\ \'21\:43\-46\'\)\"\>Mt\ 21\:43\-46\<\/A\>\&nbsp\;';
var fastinfo='No fast';

var print_day = function() { lsPrintFlag = 76.27 * Math.random() - Math.PI };

function doSaintsLink()
{
	url = 'http://www.ponomar.net/cgi-bin/index.cgi';
	window.open(url, 'nWindow', 'height=500,width=800,scrollbars=yes,resizable=yes');
}

function doReadings(book, chapter) {
	// LAUNCH LECTIONARY 1.0
	url = 'http://www.ponomar.net/cgi-bin/bible.cgi?mode=specify&LS=0&book=' + book + '&reading=' + chapter;
	window.open(url, 'bible', 'height=500,width=900,scrollbars=yes,resizable=yes');
}

function printDateDefault()
{
	document.write(w_day + ', ' + old_calendar + ' ' + x_year + ' (' + ad_creatio + ')');
}

function printDateNS()
{
	document.write('&nbsp;[' + new_calendar + ' on the civil calendar]');
}

function printPaschalCycle()
{
	document.write('<B>' + paschalcycle + '</B> ');
}

function printSaints()
{
	document.write(m_saints);
}

function printReadings()
{
	print_day();
	document.write(readings);
}

function printIcon()
{
	document.write('<img src="http://www.ponomar.net/cgi-bin/cache.cgi">');
}

function doPrologue(month, day) {
	// deprecated
}

function doLink()
{
	window.open('http://www.ponomar.net/cgi-bin/index.cgi', 'nHelp', 'height=500,width=800,scrollbars=yes,resizable=yes');
}

function doSaints(id)
{
	var url = 'http://www.ponomar.net/cgi-bin/lives.cgi?id=' + id;
	window.open(url, 'life' + id, 'height=600,width=800,scrollbars=yes,resizable=yes');
}

function openWindow(url)
{
	window.open(url, "mailer", "scrollbars=1, height=600, left=150, top=150, width=500");
}

document.write('<div class="saints"><b>Today is:</b> '); printDateDefault(); printDateNS(); document.write('<br>Today the Church celebrates:<BR><BR>');printPaschalCycle(); printSaints(); document.write('<br><b>Fasting:</b> ' + fastinfo + ' <b>Scripture Reading: </b>');printReadings(); document.write('<br><small>Powered by Ponomar. <A Href="JavaScript:doLink();">Complete online menologion</A>.</small></div>');