// JavaScript Document

function menuItemMouseEvents(id,url,imgOver,imgOut){
			var d=document;
			d.Id=function(x){return this.getElementById(x)}
			d.Id(id).onclick=function(){d.location.href=url;}
			d.Id(id).onmouseover=function(){d.Id(id).style.backgroundImage='url('+imgOver+')';}
			d.Id(id).onmouseout=function(){d.Id(id).style.backgroundImage='url('+imgOut+')';}
		}
		function declareMenuEvents(){
			var numMenuItems=7;
			var page=new Array();
			page.length=numMenuItems+1;
			page[1]='index.html';
			page[2]='vida_nam.php';
			page[3]='conocenos.php';
			page[4]='ministerios.php';
			page[5]='contacto.php';
			page[6]='donativos.php';
			page[7]='recursos.php';
			for(i=1; i<numMenuItems+1; i++){
				menuItemMouseEvents('nav'+i,page[i],'images/nav'+i+'_over.gif','images/nav'+i+'_norm.gif');
		}
}

function openVoltage(){
window.open("voltage_youtube.html", "voltage", "height=355,width=425,scrollbars=no,toolbar=no,status=no,menubar=no,location=center")}

function openKids(){
window.open("kids_youtube.html", "kids", "height=355,width=425,scrollbars=no,toolbar=no,status=no,menubar=no,location=center")}

function openEnglish(){
window.open("english_youtube.html", "voltage", "height=355,width=425,scrollbars=no,toolbar=no,status=no,menubar=no,location=center")}

function openEspanol(){
window.open("espanol_youtube.html", "voltage", "height=355,width=425,scrollbars=no,toolbar=no,status=no,menubar=no,location=center")}

<!-- Banner Image Random Refresh

// Set up the image files to be used.
var theImages = new Array() // do not change this
// To add more image files, continue with the
// pattern below, adding to the array. Rememeber
// to increment the theImages[x] index!

theImages[0] = 'btm_page_banner1.jpg';
theImages[1] = 'btm_page_banner2.jpg';
theImages[2] = 'btm_page_banner3.jpg';

// ======================================
// do not change anything below this line
// ======================================

var j = 0;
var p = theImages.length;

var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}

var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write('<img src="images/'+theImages[whichImage]+'">');
}

//-->
