function GetLabel(image)
{
	var content="";
	if (image == "1"){
		content = "Jesus Blesses the Children";
	}
	if (image == "2"){
		content = "Jesus Gives The Keys to Peter";
	}
	if (image == "3"){
		content = "Jesus in the Synagogue";
	}
	if (image == "4"){
		content = "Jesus Saves Peter";
	}
	if (image == "5"){
		content = "St. Ann and St. Joachim Present Mary in the Temple";
	}
	if (image == "6"){
		content = "Death of St. Joseph";
	}
	if (image == "7"){
		content = "St. Patrick Preaching in Ireland";
	}
	if (image == "8"){
		content = "Sacred Heart Appears to St. Margaret Mary";
	}
	return(content);
}

function GetWindow()
{
	var intMaxImages = 8;  //maximum number of images that are possible banners
	var intFileNum;
	
	intFileNum = Math.random();
	intFileNum = intFileNum * intMaxImages;
	intFileNum = Math.round(intFileNum);

	if(intFileNum < 1) {
		intFileNum = 1;
	}
	
	if(intFileNum > intMaxImages) {
		intFileNum = intMaxImages;
	}
	
	intFileNum = "" + intFileNum;

	var strFilePath = "/images/windows/image_";
	var strFileExt = ".jpg";
	var strFullFile = strFilePath + intFileNum + strFileExt;

	var strPath 

	strPath = "<a href='/church/windows/index.shtml'>";
	strPath += "<img src='" + strFullFile + "' width='150' height='374' vspace='3' alt='";
	strPath += GetLabel(intFileNum) + "' border='0'></a><br>" 
	strPath += GetLabel(intFileNum);

	document.write (strPath);
}

