////////////////////////////////////////////////////////////////////////////////////////////
//
//  CEA Technologies
//
////////////////////////////////////////////////////////////////////////////////////////////

// Array of images to be used in the header image rotation
var aHdr = new Array();
aHdr[0] = "ceaHeader1jumbo.jpg";
aHdr[1] = "ceaHeader2jumbo.jpg";
aHdr[2] = "ceaHeader3jumbo.jpg";
aHdr[3] = "ceaHeader4jumbo.jpg";
aHdr[4] = "ceaHeader5jumbo.jpg";
var hdrRotate = Math.floor(Math.random()*aHdr.length);

// Function to rotate through the array of header images
function showHeader() {
	document.write('<img src="' + aHdr[hdrRotate] + '" width="898" height="134" ></img>');
}

// Get the current year for the copyright date
function getCopyYr(){
	var d = new Date();
	d = d.getFullYear();
	document.write(d);
}

function swapPhoto(photoSRC) {
    document.images.imgPhoto.src = photoSRC;
    scrollTo(0,0);
}

// Swap Images
function swapImage(ImgId, newImg){
	if (document.getElementById) {
		var leImg = document.getElementById(ImgId);  // eval("document.images." + ImgID);
		leImg.src = newImg;
		scrollTo(0,0);
	}
}

// Toggle Divs
function swap(targetId,buttonId) {
	if (document.getElementById) {
		target = document.getElementById(targetId);
		buttonName = document.getElementById(buttonId);
		
		if (target.style.display == "none") {
				 target.style.display = "";
		} else {
			target.style.display = "none";
		}
		
		if (target.style.display == "none") {
			buttonName.src = "nav_open.gif";
		} else {
			buttonName.src = "nav_close.gif";
		}
	}
}




