var picL_width=693;   /*change to match the height of all your images */
var picL_height=215;   /* change to match the width of all your images */
var border_size=0;   /* change to the border size you want on the images */

/* define image urls */

if (document.images)
 {
     picL1= new Image(picL_width,picL_height);
     picL1.src="resources/images/iow_23.jpg";  
     picL2= new Image(picL_width,picL_height); 
     picL2.src="resources/images/iow_21.jpg"; 
	 picL3= new Image(picL_width,picL_height);
     picL3.src="resources/images/iow_5.jpg";  
	 picL4= new Image(picL_width,picL_height);
     picL4.src="resources/images/iow_18.jpg";  
	 picL5= new Image(picL_width,picL_height);
     picL5.src="resources/images/iow_9.jpg";  
	 picL6= new Image(picL_width,picL_height);
     picL6.src="resources/images/iow_8.jpg";  
	 picL7= new Image(picL_width,picL_height);
     picL7.src="resources/images/iow_22.jpg";  
	 picL8= new Image(picL_width,picL_height);
     picL8.src="resources/images/facts_1.jpg";  
	 picL9= new Image(picL_width,picL_height);
     picL9.src="resources/images/iow_24.jpg";  
	 picL10= new Image(picL_width,picL_height);
     picL10.src="resources/images/islefutures_2.jpg";  
	 picL11= new Image(picL_width,picL_height);
     picL11.src="resources/images/isleinbloom_mh.jpg";  
 }    


/* define alt and title tag contents */

var altL1="The Isle of Whithorn";
var altL2="The Isle of Whithorn";
var altL3="The Isle of Whithorn";
var altL4="The Isle of Whithorn";
var altL5="The Isle of Whithorn";
var altL6="The Isle of Whithorn";
var altL7="The Isle of Whithorn";
var altL8="The Isle of Whithorn";
var altL9="The Isle of Whithorn";
var altL10="The Isle of Whithorn";
var altL11="The Isle of Whithorn";

/* define link tag contents */

var lnkL1="";
var lnkL2="";
var lnkL3="";
var lnkL4="";
var lnkL5="";
var lnkL6="";
var lnkL7="";
var lnkL8="";
var lnkL9="";
var lnkL10="";
var lnkL11="";


function get_random(maxNum)
{
  if (Math.random && Math.round)
  {
    var ranNum= Math.round(Math.random()*(maxNum-1));
    ranNum+=1;
    return ranNum;
  }
  else
  {
  today= new Date();
  hours= today.getHours();
  mins=   today.getMinutes();
  secn=  today.getSeconds();
  if (hours==19)
   hours=18;
  var ranNum= (((hours+1)*(mins+1)*secn)%maxNum)+1;
  return ranNum;
  }
}

function get_Image()
{
 if (document.images)
 {
  var choose_one= get_random(11);  
  choose_one--;

  var picL= new Array(11) 
   picL[0]=picL1.src;
   picL[1]=picL2.src;
   picL[2]=picL3.src; 
   picL[3]=picL4.src;
   picL[4]=picL5.src;
   picL[5]=picL6.src; 
   picL[6]=picL7.src;
   picL[7]=picL8.src;
   picL[8]=picL9.src; 
   picL[9]=picL10.src;
   picL[10]=picL11.src;
   
  var altL = new Array(11)
  altL[0]=altL1;
  altL[1]=altL2;
  altL[2]=altL3;
  altL[3]=altL4;
  altL[4]=altL5;
  altL[5]=altL6;
  altL[6]=altL7;
  altL[7]=altL8;
  altL[8]=altL9;
  altL[9]=altL10;
  altL[10]=altL11;
  
    var lnkL = new Array(11)
  lnkL[0]=lnkL1;
  lnkL[1]=lnkL2;
  lnkL[2]=lnkL3;
  lnkL[3]=lnkL4;
  lnkL[4]=lnkL5;
  lnkL[5]=lnkL6;
  lnkL[6]=lnkL7;
  lnkL[7]=lnkL8;
  lnkL[8]=lnkL9;
  lnkL[9]=lnkL10;
  lnkL[10]=lnkL11;


  document.write("<a href='"+lnkL[choose_one]+"'><IMG SRC='"+picL[choose_one]+"' alt='"+altL[choose_one]+"' title='"+altL[choose_one]+"' width='"+picL_width+"' height='"+picL_height+"' border='"+border_size+"'></a>");
 }

 
}



