function changePhoto() //banner changer function
{
	var	id = Math.floor(Math.random()*13);
  	document.photos.src = banArray[id].src; //sets a new banner
}

//calls the changeBanner() function every 3 seconds
//change the timer as necessary (minutes * 60000) or (seconds * 1000)
var timer = window.setInterval("changePhoto()", 5000);

var popUpWin=0;
	scrW = screen.width /2 - 300;
	scrH = screen.height /2 - 200;

function popUpWindow(URLStr, width, height)

{

  if(popUpWin)

  {

    if(!popUpWin.closed) popUpWin.close();

  }

  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left= '+scrW+', top= '+scrH+',screenX= 600,screenY= 400');

}


var banArray = new Array(14); //for banners, increase size as necessary

if(document.images) //pre-load all banner images
{
  for(i = 0; i < 14; i++)
  {
    banArray[i] = new Image(158, 116);
    if (i + 1 < 10) { banArray[i].src = "images/photos/IMG00" + (i+1) + ".jpg"; }
    else
    { banArray[i].src = "images/photos/IMG0" + (i+1) + ".jpg"; }
  }
}


