 var urlAddress = "http://www.hypergurl.com/randomimage.html";
 var pageName = "Random image javascript";

 function addToFavorites()
 {
  if (window.external)
  {
   window.external.AddFavorite(urlAddress,pageName)
  }
  else
  {
   alert("Sorry! Your browser doesn't support this function.");
  }
 }

 // This script was supplied free by Hypergurl
 // http://www.hypergurl.com
     // JavaScript to interpolate random images into a page.
     var ic = 10;     // Number of alternative images
     var xoxo = new Array(ic);  // Array to hold filenames

 xoxo[0] = "images/mainimg.jpg";
 xoxo[1] = "images/mainimg2.jpg";
 xoxo[2] = "images/mainimg3.jpg";
 xoxo[3] = "images/mainimg4.jpg";
 xoxo[4] = "images/mainimg5.jpg";
 xoxo[5] = "images/mainimg6.jpg";
 xoxo[6] = "images/mainimg7.jpg";
 xoxo[7] = "images/mainimg8.jpg";
 xoxo[8] = "images/mainimg9.jpg";
 xoxo[9] = "images/mainimg10.jpg";

 function pickRandom(range) {
 if (Math.random)
 return Math.round(Math.random() * (range-1));
 else {
 var now = new Date();
 return (now.getTime() / 1000) % range;
 }
 }

 // Write out an IMG tag, using a randomly-chosen image name.
 var choice = pickRandom(ic);
