//PRELOAD IMAGES
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

//QUICK LINKS
function MM_jumpMenu(targ,selObj,restore){ //v3.0
	eval(targ+'.location="'+selObj.options[selObj.selectedIndex].value+'"');
	if (restore) selObj.selectedIndex=0;

}

//TEXT SIZE
var counter = 1;
var text_size = .75;
var default_size = .75; //DEFAULT TEXT SIZE = .75em
var text_change = .25;

function txtChange(id) {
	if (id == 'plus') {
		counter++;
		text_size = (text_change * counter) + default_size;
		document.getElementById("content").style.fontSize = text_size + "em";
	}
	if (id == 'minus') {
		counter--;
		text_size = (text_change * counter) + default_size;
		document.getElementById("content").style.fontSize = text_size + "em";
	}
	visibleImg();
}

function visibleImg() {
	if (counter >= -1 || counter <= 4) {
		document.getElementById("minus").style.visibility = "visible";
		document.getElementById("plus").style.visibility = "visible";
	}
	if (counter <= -1) { counter= -1; document.getElementById("minus").style.visibility = "hidden"; }
	if (counter >= 5) { counter = 5; document.getElementById("plus").style.visibility = "hidden"; }
}

//TABLE STRIPES
function colorStripes() {
        var b, r, t = document.getElementsByTagName("table");
        for (var i=0; i<t.length; i++) {
                var current_t = t[i];
                if (current_t.className && current_t.className == "holdings") {
                        b = current_t.getElementsByTagName("tbody");
                        for (var j=0; j<b.length; j++) {
                                var current_b = b[j];
                                r = current_b.getElementsByTagName("tr");
                                for (var k=0; k<r.length; k+=2) { r[k].className = "udda"; }
                        }
                }
        }
} 


//RANDOM QUOTES (XML)
/*
var xmlDoc = null;
if (window.ActiveXObject) { xmlDoc = new ActiveXObject("Microsoft.XMLDOM"); } //IE
else if (document.implementation.createDocument) { xmlDoc = document.implementation.createDocument("", "", null); } //NON-IE
else { alert('Your browser cannot read this XML script'); }

if (xmlDoc != null) {
	xmlDoc.async = false;
	xmlDoc.load("quotes/quotes.xml");

	//COUNT, SELECT RANDOM QUOTES
	var x = xmlDoc.getElementsByTagName("quote");
	var total = x.length;
	var rand = Math.round(Math.random() * (total - 1));
	
	var quote = x[rand].getElementsByTagName('text')[0].childNodes[0].nodeValue; //SET VARIABLE QUOTE
}
*/

//RANDOM QUOTES (JAVASCRIPT)
var quoteArray = new Array();
	//QUOTES
	quoteArray[0] = "Let us wake up there, open our eyes in apostolic charity, and if we are called, set out for any place where the work is great and difficult.<br /><br />Father Samuel Mazzuchelli";
	quoteArray[1] = "In philosophical terminology every existing thing is composed of substance and accidents, the first being its essential quality, the second its visible form.<br /><br />Ralph Adams Cram<br /><B>The Substance of Gothic</b>, 1917";
	quoteArray[2] = "The older people should constantly make vivid the war that we remember, because if you never lived through a war it is very easy to think that you believe in peace, to want peace; but it is also easy to be carried away by propaganda, perhaps, and by enthusiasm for ideals which are not real ideals.<br /><br />Eleanor Roosevelt";
	quoteArray[3] = "Yesterday, quietly, Oscar Hammerstein came to me and in his gentle voice asked, 'Do you think it would be possible for me to fly to Chicago so that I could see Sister Gregory?  Would there be any way for you to arrange it?'<br /><br />Mary Martin to Sister Gregory, letter of 29 July, 1959";
	quoteArray[4] = "The Catholics of this country give thanks to the supreme Ruler for the civil independence of that form of government which also makes their religion independent of laws that would persecute it.<br /><br />Father Samuel Mazzuchelli";
	quoteArray[5] = "You must be a citizen of your nation, and in being that, in shouldering willingly your full responsibility as a citizen of a democracy you will perhaps be able to make your country the kind of country which may exert sufficient moral influence to really be a factor in the world for the peace which all of us long for.<br /><br />Eleanor Roosevelt";
	quoteArray[6] = "Prejudice is an aquired vice, often unwittingly, it is true, but no less surely acquired, because children, God bless them, are never prejudiced until this subtle virus is instilled into them by their elders.<br /><br />from a radio interview with Sister Mary Ellen O'Hanlon, 1 December 1949";
	quoteArray[7] = "We chose our color: blue for Paradise<br /><br />A long day darkens, and the air grows cool<br /><br />While ravens gather in the raucous skies<br /><br />Our tall blue flowers do not waver at all.<br /><br />From <em>Pantoum in Autumn</em>, unpublished poem by Sister Jeremy Finnegan";
	quoteArray[8] = "The books came yesterday.  Thank you very much for your thoughtfulness.  Now pray that I may have time to read them.  Perhaps one should take off time now and then for a reading week or even a day.<br /><br />letter from Sister Aurelia Altenhofen to Dan Herr, 25 March, 1960";
	quoteArray[9] = "A Christian's own land is there where God calls him... so the act of leaving his birthplace to go into missionary lands was rather a setting out in search of his real country.<br /><br />Father Samuel Mazzuchelli";
	//END QUOTES

var total = quoteArray.length;
var rand = Math.round(Math.random() * (total - 1));
var quote = quoteArray[rand];