//*** Handles Rotating ad reason images.
//*** picsokay is set in setup.js

var ix, picname, thePic ;
if (picsokay == "y")
{	
	// View a random jpg. Next time, get the next jpg in the array.
	// IE 4 up, NS 3 up.
	thePic = getCookie("wawpic");  
	if (thePic == null) {thePic = randNum(picArray.length); }  // get random pic the first time
	thePic = parseInt(thePic);  // Converts string to a number
	ix = thePic + 1;
	if (ix > picArray.length) {ix = 1}; 
	setCookie("wawpic", ix); 
	picname = picArray[ix];
	numname = numArray[ix];
 	document.write (' <div align="right"><p>&nbsp;</p><p><br>');
 	document.write ('<img src="../images/admonition.gif" alt="" width=120 height=16 border=0><br>');
 	document.write ('<img src="../images/' + numname + '.gif" alt="" width=120 height=17 border=0><br>');
 	document.write ('<img src="../images/' + picname + '.gif" alt="" width=120 height=180 border=0>');
	document.write (' <br></p></div>');
	
//	document.write ('<a href="home.html" onmouseover="window.status=\''  + alttext  + '    (Click to view a new picture)\';return true" onmouseout="window.status=\'  \';return true"><img src="../images/' + picname + '.gif" alt="' + alttext + bernd + '" width=183 height=155 border=0></a>');	
}	
else {
	// Older Browsers get a static pic.
	picname = "n03c";
	document.write ('<img src="../images/' + picname + '.gif" alt="" width=120 height=230 border=0>');
}