var picR_width=303;   /*change to match the height of all your images */
var picR_height=213;   /* 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)
 {
	 picR1= new Image(picR_width,picR_height);
     picR1.src="../norgedata/1r.jpg";  
     picR2= new Image(picR_width,picR_height); 
     picR2.src="../norgedata/2r.jpg"; 
	 picR3= new Image(picR_width,picR_height);
     picR3.src="../norgedata/3r.jpg";  
	 picR4= new Image(picR_width,picR_height);
     picR4.src="../norgedata/4r.jpg";  
 }    


/* define alt and title tag contents */

var altR1="'Fokus Norge";
var altR2="'Fokus Norge";
var altR3="'Fokus Norge";
var altR4="'Fokus Norge";



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_ImageR()
{
 if (document.images)
 {
  var choose_one= get_random(4);  
  choose_one--;

   
  var picR= new Array(4) 
   picR[0]=picR1.src;
   picR[1]=picR2.src;
   picR[2]=picR3.src; 
   picR[3]=picR4.src; 

  
  var altR = new Array(4)
  altR[0]=altR1;
  altR[1]=altR2;
  altR[2]=altR3;
  altR[3]=altR4;



  document.write("<IMG SRC='"+picR[choose_one]+"' alt='"+altR[choose_one]+"' title='"+altR[choose_one]+"' width='"+picR_width+"' height='"+picR_height+"' border='"+border_size+"'>");
 }
 
}



