
function fullScreen(theURL) {
   //alert(window.screen.height);
   window.open(theURL, '', 'left=0,width='+window.screen.width+',fullscreen=no, scrollbars=auto');
}


var slideShowSpeed = 10000;
var crossFadeDuration = 3;
var Pic = new Array();
Pic[0]= 'images/hm_photo0.gif';
Pic[1]= 'images/hm_photo1.gif';
Pic[2]= 'images/hm_photo2.gif';
Pic[3]= 'images/hm_photo3.gif';
Pic[4]= 'images/hm_photo4.gif';
Pic[5]= 'images/hm_photo5.gif';
Pic[6]= 'images/hm_photo6.gif';
Pic[7]= 'images/hm_photo7.gif';
Pic[8]= 'images/hm_photo8.gif';
Pic[9]= 'images/hm_photo9.gif';
Pic[10]= 'images/hm_photo10.gif';
Pic[11]= 'images/hm_photo11.gif';
Pic[12]= 'images/hm_photo12.gif';



// =======================================
// do not edit anything below this line
// =======================================

var t;
var p = Pic.length;

var preLoad = new Array();
for (i = 0; i < p; i++){
   preLoad[i] = new Image();
   preLoad[i].src = Pic[i];
}
/*
function getRandomNumber(range) {
   if (Math.random) {
      return Math.round(Math.random() * (range-1))
   } else {
      var now = new Date();
      return (now.getTime() / 1000) % range; 
   }
}*/

function getRandomNumber(num){
	var i = Math.round(100*Math.random())
	return i % num
}


function runSlideShow(){
   if (document.all){
      document.images.SlideShow.style.filter="blendTrans(duration=2)";
      document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)";
      document.images.SlideShow.filters.blendTrans.Apply();      
   }
   var j = getRandomNumber(Pic.length);
   document.images.SlideShow.src = preLoad[j].src;
   if (document.all){
      document.images.SlideShow.filters.blendTrans.Play();
   }
   
   t = setTimeout('runSlideShow()', slideShowSpeed);
}


	
