doPic()  
		
function doPic() {
//*--------------------------------------------------------
//* FISH HOUSE 
//* Display footer fish icons. First pic is random, next pics rotate.
//* Last image filename displayed is saved in a cookie.
//*--------------------------------------------------------                            

	var pic	= "footer-icons-1.gif";  			//* Default pic 
    
//*------------------------------------ 
//*  Place images in array. 
//*------------------------------------
	var p=new Array(); 	//* Pictures
	var ip = 0;  
  
	p[ip = ip + 0] = "footer-icons-1.gif";   
	p[ip = ip + 1] = "footer-icons-2.gif";

	var pcount =  p.length  // no. of array elments

// 	alert("pcount=" + pcount );

	var picindex = getCookie("thefooter");  
// 	alert("0 picindex=" + picindex );

//* get random pic the first time	
  	if (picindex == null || picindex == "NaN" || picindex == "") {
  		picindex = get_random(pcount); 
  	}
  	
 	picindex = parseInt(picindex);  // Converts string to a number
 
 	var iy = picindex + 1;
 	if (iy >= pcount) {iy = 0}; 
 	
 	setCookie("thefooter", iy); 
 	pic = p[iy];
 
 
// 	alert("picindex=" + picindex + " iy=" + iy + " " );
//*---------------------------------------------------------
//* FORMAT the HTML
//*--------------------------------------------------------- 

theIcon =  '<img src="../images/' +  pic +  '" width="660" height="75" border="0">';
 	
document.write(theIcon);				
 
} //* end doPic()

