/** The changeImage function for the main page*/

	progprobability = .0; //This is the probability a program picture will appear (Police dept, etc) rather than a person picture. 1 is 100% program, 0 is 0% program (all person). 
		
	totalprogimages=0;
	totalfaceimages = 7;	

	var base = "/images/newfaces/"	
	var imgsrc = "";
	var imgtxtsrc="";
	
	if(Math.random() < progprobability) 
	{//If showing a program picture
		var imagenum = Math.floor(Math.random() * totalprogimages)+1;
		imgsrc = base+"prog"+imagenum + ".jpg";
		prog = new Image();
		prog.src=imgsrc; //Preload
		imgtxtsrc = base+"progtxt"+imagenum + ".jpg";
		prog = new Image();
		prog.src = imgtxtsrc;
	}
	else 
	{//If showing a person picture picture
		var imagenum = Math.floor(Math.random() * totalfaceimages)+1;;

		imgsrc =  base+ "face" + imagenum + ".jpg";
		face = new Image();
		face.src=imgsrc; /*Preload*/
		imgtxtsrc = base+ "quote" + imagenum + ".jpg";
		quote = new Image();
		quote.src=imgtxtsrc; /*Preload*/
	}
	
	/*Call this using <body onLoad="changeImages()"> to switch the images*/
	function changeImages()
	{		
		document.face.src = imgsrc;
		document.quote.src = imgtxtsrc;
	}