/***********************************************************
Rotating picture script
***********************************************************/


function Pix(){ //constructor
	this.items=new Array;
	this.add=addPix;
	this.get=getPix;
	}
	
	function addPix(pixURL,pixCaption){ //method to add record
	var rec=new Object;
	rec.url=pixURL;
	rec.cap=pixCaption;
	var itemCount=this.items.length;
	this.items[itemCount]=rec;
	}
	
	function getPix(){ //method to get record
	var itemCount=this.items.length;
	var idx=Math.round(Math.random()*(itemCount-1));
	var rec=this.items[idx];
	var buf='<img src="' + rec.url + '" alt="Chaco Stratigraphy Project">';
	buf+='<div>' + rec.cap + '</div>';
	return buf;
	}
	
	var potd=new Pix; //create your list
	potd.add('indeximages/4123.jpg','<strong>UNM Field School at Chaco Canyon</strong>');
	potd.add('indeximages/5117.jpg','<strong>UNM Field School at Chaco Canyon</strong>');
	potd.add('indeximages/5119.jpg','<strong>UNM Field School at Chaco Canyon</strong>');
	potd.add('indeximages/6871.jpg','<strong>UNM Field School at Chaco Canyon</strong>');
	potd.add('indeximages/5318.jpg','<strong>UNM Field School at Chaco Canyon</strong>');
	potd.add('indeximages/6716.jpg','<strong>UNM Field School at Chaco Canyon</strong>');
	
	
	
