<!--
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 getCookieData(Name)
{   
  var search = Name + "=";
  if (document.cookie.length > 0) // if there are any cookies
  { 
    offset = document.cookie.indexOf(search);
    if (offset != -1)  // if cookie exists
    {
      offset += search.length;
      // set index of beginning of value
      end = document.cookie.indexOf(";", offset);
      // set index of end of cookie value
      if (end == -1)
      {
        end = document.cookie.length;
      }
      return unescape(document.cookie.substring(offset, end));
    }
  }
}

function changeMainPic()
{
  var numOfPic = 12;
  var imageSources = new Array(numOfPic);
  
  imageSources[0] = "/Wrap032309/main_pict1.jpg";
  imageSources[1] = "/Wrap032309/main_pict2.jpg";
  imageSources[2] = "/Wrap032309/main_pict3.jpg";
  imageSources[3] = "/Wrap032309/main_pict4.jpg";
  imageSources[4] = "/Wrap032309/main_pict5.jpg";
  imageSources[5] = "/Wrap032309/main_pict6.jpg";
  imageSources[6] = "/Wrap032309/main_pict7.jpg";
  imageSources[7] = "/Wrap032309/main_pict8.jpg";
  imageSources[8] = "/Wrap032309/main_pict9.jpg";
  imageSources[9] = "/Wrap032309/main_pict10.jpg";
  imageSources[10] = "/Wrap032309/main_pict11.jpg";
  imageSources[11] = "/Wrap032309/main_pict12.jpg";

  if(document.images["mp"])
  {
    var cook = getCookieData("holycrosshospital");
    var intcook = parseInt(cook);

//    document.write(intcook.toString());
    if(cook == null)
    {
      var temp = get_random(numOfPic-1);
      document.cookie = "holycross.holycrosshospital=" + temp.toString();
      document.images["mp"].src = imageSources[temp];
    }
    else
    {
      intcook = (intcook+1)%numOfPic;
      var pic = new Image(215,216);
      pic.src = imageSources[intcook];
      document.images["mp"].src = pic.src;
      document.cookie = "holycross.holycrosshospital=" + intcook.toString();
    }
  }
}
-->