// following added by Don M. Deck to display random pictures using JavaScript
// original script referred to messages, revised is for images

// Script Author - Wildman Tim ( http://www.wildmantim.com ) modified by Don M. Deck
// this script is Public Domain

var sid="mitnamdliw_wildmantim";
//var showimage="graphics/myflcover1.jpg; //added by DMD
var showimage_so="2008cutouts/20070908bishop_fr6983trujillo99caeg120ccutouth250hq.jpg width=125 height=250";
		
//--- Array for Netscape 2.0x and 3.0x
function MakeArray(n) {                 
   this.length = n;
   for (var i = 1; i <= n; i++) { 
     this[i] = 0 }
     return this
 }

//this produces a randomly generated HTML code that is inserted on your page 
function RandomNumber(sid) {
  var today = new Date();
  var num= Math.abs(Math.sin(today.getTime()/1000));
  return num;  
}

function ImgWizard() {

//tailor to the browser capabilities
var appname= navigator.appName;             
var appversion=parseInt(navigator.appVersion);

         if (appname == "Netscape" && appversion >= 3){
 //( Netscape 3.0 or higher)
	var testNum = Math.random(); }
	else {
//all others use this call       
	var testNum = RandomNumber(sid);}
	
//remember to change this according to the 
//number of images in the array below
	var NoOfImg=25;

//-- images array --

var x=0;
var y=0;
var images = new MakeArray(NoOfImg);
images[0]=NoOfImg;
//load the array with images NOTE: when starting new year adjust the path as needed
images[1]="2008cutouts/20070908bishop_fr6983trujillo99caeg120ccutouth250hq.jpg width=125 height=250";
images[2]="2008cutouts/20070915boron_rk7428gray23c2b26g133cutouth250hq.jpg width=127 height=250";
images[3]="2008cutouts/20070922kern_valley_fr7879morris10cb30ccutouth250hq.jpg width=121 height=250";
images[4]="2008cutouts/20070922kern_valley_fr7911orrickc56cb27ccutoutw250hq.jpg width=125 height=250";
images[5]="2008cutouts/20070922kern_valley_fr7916orricks33cb41ccutouth250hq.jpg width=110 height=250";
images[6]="2008cutouts/20070922kern_valley_jr7935devore22cb24ccutouth250hq.jpg width=157 height=250";
images[7]="2008cutouts/20070922kern_valley_jr7946graef44cb56ccutouth250hq.jpg width=110 height=250";
images[8]="2008cutouts/20070922kern_valley_sr8012oliver8cb43ccutouth250hq.jpg width=118 height=250";
images[9]="2008cutouts/20070922kern_valley_sr8069martin44passtd2cb34ccutouth250hq.jpg width=156 height=250";
images[10]="2008cutouts/20070929bishop_fr8186higgs39cb40ccutouth250hq.jpg width=162 height=250";
images[11]="2008cutouts/20070929bishop_fr8253weir52cb30ccutouth250hq.jpg width=130 height=250";
images[12]="2008cutouts/20070929bishop_jr8296trujillo10cb20g126ccutouth300hq.jpg width=145 height=300";
images[13]="2008cutouts/20070929bishop_jr8336liuag21cb40g126ccutouth250hq.jpg width=134 height=250";
images[14]="2008cutouts/20070929bishop_jr8338quezada38cb44g126ccutouth250hq.jpg width=141 height=250";
images[15]="2008cutouts/20070929bishop_jr8347hamilton32td1cb50g126ccutouth250hq.jpg width=104 height=250";
images[16]="2008cutouts/20070929bishop_rk8154mueller22c2b20cutouth250hq.jpg width=113 height=250";
images[17]="2008cutouts/20071013mojave_rk8703marquez40passcg153ccutouth250hq.jpg width=133 height=250";
images[18]="2008cutouts/20071013mojave_rk8723mclin66cg166ccutouth250hq.jpg width=161 height=250";
images[19]="2008cutouts/20071020boron_jr9146escobar50pa2cfg126ccutouth250hq.jpg width=126 height=250";
images[20]="2008cutouts/20071020boron_rk8907ramirez63td3cg159ccutouth250hq.jpg width=177 height=250";
images[21]="2008cutouts/20071020boron_sr9171toranzo35cg146ccutouth250hq.jpg width=134 height=250";
images[22]="2008cutouts/20071027cal_city_rk9261marquez40cg133ccutouth250hq.jpg width=127 height=250";
images[23]="2008cutouts/20071027cal_city_sr9533martin44cg146ccutouth250hq.jpg width=107 height=250";
images[24]="2008cutouts/20071103po1_bishop_jr9647wormhoudt39cg153ccutouth250hq.jpg width=108 height=250";
images[25]="2008cutouts/20071103po1_bishop_jr9672trujillo10td1cg159ccutouth250hq.jpg width=139 height=250";


//calculate the image to show
//original did a document.write ... DMD changed to create a variable value for the image display
//in the appropriate position in the page.
//NOTE: Images may be as wide as 300 pixels
y=1/NoOfImg;
for(x= 1; x <= NoOfImg; x++) {
	while(sid!="mitnamdliw_wildmantim"){};
	if ( testNum > ( NoOfImg  - x ) * y ) {
		showimage_all = "<CENTER><IMG SRC=" + images[x] + " BORDER=0></CENTER>";
		break;
		}
}	

     }
        ImgWizard();
