function isForPrintScreen()
{
	if (window.location.href.indexOf("?print")!=-1)
	{
		return true;
	}
	else
	{
		return false;
	}	
}
function omitNavigation()
{
	if (window.location.href.indexOf("?omitnav")!=-1)
	{
		return true;
	}
	else
	{
		return false;
	}
}
function getHeaderBottom()
{
	if (navigator.userAgent.indexOf("Microsoft")!=-1 || 
			 navigator.userAgent.indexOf("MSIE")!=-1)
	{
		return 120;
	}
	return 117;
}
function showRandomQuote(x,y,width,height, styleName)
{
	if (isForPrintScreen()||omitNavigation())
	{
		return;
	}

	y=y+(getHeaderBottom()-117)+20;
	
	//show any special event menu items
	specialEventHeight=600; //145

	document.write("<div style=\"z-index:4;position:absolute;left:"+x+"px;top:"+(y-10)+"px;width:"+width+"px;height:"+ specialEventHeight +"px;\">");
	document.write("<br><br><br><center><a href=\"http://www.ladyrosary.org/ElijahCup/ElijahCup.html\"><img border=\"0\" width=\"150\" src=\"http://www.ladyrosary.org/links/Elijahs Cup.png\"></a></center>");
	document.write("<center><a href=\"http://www.ladyrosary.org/ElijahCup/ElijahCup.html\" style=\"font-family:arial;\"><small>Elijah Cup</small></a></center>");
	document.write("<center><a href=\"http://www.ladyrosary.org/ElijahCup/ElijahCup.html\" style=\"font-family:arial;\"><small>Praying for Vocations</small></a></center>");
	document.write("<br><center><a href=\"http://www.ladyrosary.org/RespectLife/index.html\"><img border=\"0\" src=\"http://www.ladyrosary.org/RespectLife/RespectLife.gif\"></a></center>");
	document.write("<br><a href=\"http://www.vladmission.org/index.htm\"><img border=\"0\" src=\"http://www.ladyrosary.org/MaryMotherofGod/MaryMotherofGod.gif\"></a>");
	document.write("</div>");
	
	//cheat and shrink height
	height=height-20;


	//build standard quote box
	quotes=getQuotes();
	pickedQuote=Math.round(Math.random()*quotes.length);
	if (pickedQuote>=quotes.length)
	{
		pickedQuote=quotes.length-1;
	}
	endIndex=quotes[pickedQuote].indexOf("~");
	saying=quotes[pickedQuote].substr(0,endIndex);
	author=quotes[pickedQuote].substr(endIndex+1);
	
	document.write("<div style=\"z-index:4;background-color:black;position:absolute;left:"+(x+5)+"px;top:"+(y+specialEventHeight+5)+"px;width:"+width+"px;height:"+height+"px;\"></div>");

	document.write("<div class=\""+styleName+"\" style=\"z-index:5;position:absolute;left:"+x+"px;top:"+(y+specialEventHeight)+"px;width:"+width+"px;height:"+height+"px;\">");
	document.write("<div style=\"position:absolute;left:5px;top:25px;width:"+
		(width-10)+"px;height:"+(height-25)+"px;padding: 0px;\">");
	document.write(saying);
	document.write("</div>");
	document.write("<div style=\"position:absolute;left:10px;top:"+(height-20)+"px;width:"+
		(width-10)+"px;height:15px;font-weight:bold;padding: 0px;\">");
	document.write("-  "+author);
	document.write("</div></div>");

}

function getQuotes()
{
quotes=new Array(0);
quotes.push("<br><br>Christ paid a debt He didn't owe because we owed a debt that we couldn't pay.~Dr. Scott Hahn");
quotes.push("<br><br>The truth is not always the same as the majority decision.~Pope John Paul II");
quotes.push("<br>The great danger for family life, in the midst of any society whose idol	s are pleasure, comfort and independence, lies in the fact that people close their hearts and become selfish.~Pope John Paul II");
quotes.push("<br>The cemetery of the victims of human cruelty in our century is extended to include yet another vast cemetery, that of the unborn.~Pope John Paul II");
quotes.push("<br><br>Ignorance of the Scriptures is ignorance of Christ.~St. Jerome");
quotes.push("<br><br>It is impossible to rightly govern the world without God and Bible.~George Washington");
quotes.push("<br><br>Who of you by worrying can add a single hour to his life?~Luke 12:25");
quotes.push("<br><br>For we walk by faith, not by sight.~2 Corinthians 5:7");
quotes.push("<br>To one who has faith, no explanation is necessary. To one without faith, no explanation is possible.~St. Thomas Aquinas");
quotes.push("<br><br>The things that we love tell us what we are.~St. Thomas Aquinas");
quotes.push("<br><br>Patience is the companion of wisdom.~Saint Augustine");
quotes.push("<br><br>We make ourselves a ladder out of our vices if we trample the vices themselves underfoot.~Saint Augustine");
quotes.push("<br>We are not social workers. We may be doing social work in the eyes of some people, but we must be contemplatives in the heart of the world.~Blessed (Mother) Teresa");
quotes.push("<br>The child is God's gift to the family. Each child is created in the special image and likeness of God for greater things - to love and to be loved.~Blessed (Mother) Teresa");
quotes.push("<br><br>If you can't feed a hundred people, then feed just one.~Blessed (Mother) Teresa");
quotes.push("<br><br>If you judge people, you have no time to love them.~Blessed (Mother) Teresa");
quotes.push("<br><br>How can there be too many children? That is like saying there are too many flowers.~Blessed (Mother) Teresa");
quotes.push("<br>The biggest disease today is not leprosy or tuberculosis but rather the feeling of being unwanted, uncared for and deserted by everybody~Blessed (Mother) Teresa");
quotes.push("Simple morality dictates that unless and until someone can prove the unborn human is not alive, we must give it the benefit of the doubt and assume it is (alive). And, thus, it should be entitled to life, liberty and the pursuit of happiness.~President Ronald Reagan");
quotes.push("<br><br>No one has the right to CHOOSE to do what is wrong.~President Abraham Lincoln");
quotes.push("<br><br>I set before you life and death...Choose life then, that you and your descendants may live.~Deuteronomy 30:19");
quotes.push("<br><br>It is a great poverty to decide that a child must die so that you may live as you wish.~Blessed (Mother) Teresa");
quotes.push("<br><br>No one in the world can change truth. What we do and should do is seek it and serve it when it is found.~St. Maximilian Kolbe");
return quotes;
}
