
  function getImage()  {  // which stack, 
 // 	ar = new Array(0,1,2);  // adjust to the corresponding number of image arrays
   	arImgSet = randyArray(arImgSet);
  
  	imgStr = '';
  	  	
  	for (i=0;i<arImgSet.length; i++) {
  		var arImg = arImgSet[i];  // which array to pick
  		ind = wandom(arImg.length);  // index of random image
  	//	document.write(ind )
  		ti = arImg[ind]; // the image
  		imgStr += '<img src="' + ti.src + '" height="' + ti.height + '" width="' + ti.width + '" border=0 alt="' + ti.alt +'">'
  	}
  	return imgStr;
  }
  
  function img(s,w,h,a) {
  	this.src = s;
  	this.width = w;
  	this.height = h;
  	this.alt = a;  
  }
  
  function wandom(x) {
  	if(x<0) {alert('negatve for random');}
  	return Math.floor(Math.random() * x);
  }
  
   function randyArray(ar) {
	   ar.sort(randOrd);
	   return ar.sort(randOrd);
   }
 
 
   function randOrd(){
	   return (Math.round(Math.random())-0.5); 
   }
   	