<!--

/* Random Image Rotator JavaScript  */


function imgRotator() {

var imgNum;

var rtnPicture;


// Begin: image Array, ID's brand photos. Keep these three arrays in sync!


// list of images


var a = new Array();


    a[00]= "images/hero_01.jpg";
    a[01]= "images/hero_02.jpg";
    a[02]= "images/hero_03.jpg";






// list of alt texts


var b = new Array();


    b[00]= "Chinook News";
    b[01]= "Chinook News";
    b[02]= "Chinook News";


    
    


// list of links


var c = new Array();


    c[00]= "http://www.boeing.com/Microsites/IDS/2009/chinook/issue_01/index.html";
    c[01]= "http://www.boeing.com/Microsites/IDS/2009/chinook/issue_01/index.html";
	c[02]= "http://www.boeing.com/Microsites/IDS/2009/chinook/issue_01/index.html";



    
    


// End: image Array, ID's brand photos. Keep these three arrays in sync!



   imgNum = Math.floor( Math.random() * a.length );

   // error trap: just in case browser capability exceeded

   if(!isNaN(imgNum)) {   

   // construct valid image return string

// rtnPicture = "<IMG SRC='" + a[imgNum] + "' WIDTH='580' HEIGHT='435' BORDER='0' ALIGN='center'>"

     rtnPicture = '<a href="'  + c[imgNum] + '">' + '<IMG SRC="' + a[imgNum] + '" WIDTH="998" HEIGHT="334" BORDER="0" ALIGN="center" TITLE = "' + b[imgNum] + '">';


// window.alert(b[imgNum]);
// window.alert('This is the string I am sending' + rtnPicture);


// Set the td title tag for the image

var image_alt = document.getElementById('image_id');

image_alt.title = b[imgNum];


   }


   else {   


   // if image value fails to show up then load document with this background image.

   rtnPicture = "<IMG SRC='http://www.boeing.com/images/~vision_01.jpg' ALT='The Boeing Company' WIDTH='580' HEIGHT='435' BORDER='0' ALIGN='center'>" + " ";

   } 

   return rtnPicture;

}

//-->

