/**
 * Display a random image
*/
var path = "/content/system/modules/org.h2h.opencms.frontend.template/resources/images/";
AssocImgArray = [{"Alt":"\'I would recommend Helmets to Hardhats to anyone that has served or is serving because it is a program that provides quality careers and the people truly care.\' - Amber Derby, United States Navy to Reserves and IUOE Local 612", "photopath":"sdbrqut-ADerby.jpg"},
{"Alt":"\'Helmets to Hardhats really helped me to get where I needed to go. I had the skills, but they helped to push me down the right path.\' - Jason ORourke, United States Coast Guard to IBEW Local 300.", "photopath":"sdbrqut-JOrourke.jpg"},
{"Alt":"\'I enjoy working on something that I can look back on and see what was accomplished. MAybe one day my grandkids will say, \'My grandpa helped build that.\'\' - Jason Takeshita United States Army To Teamsters Local 631", "photopath":"sdbrqut-JTakeshita.jpg"},
{"Alt":"\'Helmets to Hardhats is more than a job website. There are real people behind the scenes that are working to make things happen.\' - Larry Murray, United States Army to Boilermakers Local 667", "photopath":"sdbrqut-LMurray.jpg"},
{"Alt":"\'I didn't just want a job when I left the Navy, I wanted a career and I found it. I am looking forward to my future.\' - Marlando James, United States Navy to Roofers Local 22", "photopath":"sdbrqut-MJames.jpg"},
{"Alt":"\'I learned about Helmets to Hardhats and registered. They gave my VIP status, put me in the front of the line, and soon I was a member.\' - Marvin Newton United States Army to Liuna Local 242", "photopath":"sdbrqut-MNewton.jpg"},
{"Alt":"\'Helmets to Hardhats seemed like a perfect way for me to get into the building and construction trades while using my military experience as an added bonus.\' - Mark Young, United States Navy to Insulators Local 6", "photopath":"sdbrqut-MYoung.jpg"},
{"Alt":"\'I have been speaking to everyone I know that is getting ready to separate from the military to check into Helmets to Hardhats. I believe in this program 100 percent.\' - Shane Anderson, United States Army to National Guard and IUEC Local 19", "photopath":"sdbrqut-SAnderson.jpg"},
{"Alt":"\'The program is especially beneficial for those in the Guard or Reserves because unions understand and support our service.\' - Tim Gurgol United States Marine Reserver and UA Local 120", "photopath":"sdbrqut-TGurgol.jpg"}];
var p = AssocImgArray.length;
var whichPair = Math.round(Math.random()*(p-1));
var whichPhoto = AssocImgArray[whichPair]["photopath"];
var whichAlt = AssocImgArray[whichPair]["Alt"];
function showPhoto(){
document.getElementById('quote').src = path + whichPhoto;
document.getElementById('quote').alt = whichAlt;
}

function newImage(arg) {
		if (document.images) {
			var rslt = new Image();
			rslt.src = arg;
			return rslt;
		}
	}
	
function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}
	
var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		header_tab_my_over = newImage("http://media.newjobs.com/id/www/h2h/nav/my_over.jpg");
		header_tab_search_over = newImage("http://media.newjobs.com/id/www/h2h/nav/search_over.jpg");
		header_tab_infocntr_over = newImage("http://media.newjobs.com/id/www/h2h/nav/infocenter_over.jpg");
		header_tab_emplyr_over = newImage("http://media.newjobs.com/id/www/h2h/nav/trade_over.jpg");
		preloadFlag = true;
	}
}
