

var detect = navigator.userAgent.toLowerCase();
var OS,browser,version,total,thestring;

if (checkIt('konqueror'))
{
	browser = "Konqueror";
	OS = "Linux";
}
else if (checkIt('safari')) browser = "Safari"
else if (checkIt('omniweb')) browser = "OmniWeb"
else if (checkIt('opera')) browser = "Opera"
else if (checkIt('webtv')) browser = "WebTV";
else if (checkIt('icab')) browser = "iCab"
else if (checkIt('msie')) browser = "Internet Explorer"
else if (!checkIt('compatible'))
{
	browser = "Netscape Navigator"
	version = detect.charAt(8);
}
else browser = "An unknown browser";

if (!version) version = detect.charAt(place + thestring.length);

if (!OS)
{
	if (checkIt('linux')) OS = "Linux";
	else if (checkIt('x11')) OS = "Unix";
	else if (checkIt('mac')) OS = "Mac"
	else if (checkIt('win')) OS = "Windows"
	else OS = "an unknown operating system";
}

function checkIt(string)
{
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}









var currentdate = 0
var core = 0

function StringArray (n) {
  this.length = n;
  for (var i =1; i <= n; i++) {
    this[i] = ' '

  }
}

image = new StringArray(18)
image[0]  = 'images/front-01.jpg'
image[1]  = 'images/front-02.jpg'
image[2]  = 'images/front-03.jpg'
image[3]  = 'images/front-04.jpg'
image[4]  = 'images/front-05.jpg'
image[5]  = 'images/front-06.jpg'
image[6]  = 'images/front-07.jpg'
image[7]  = 'images/front-08.jpg'
image[8]  = 'images/front-09.jpg'
image[9]  = 'images/front-10.jpg'
image[10] = 'images/front-13.jpg'
image[11] = 'images/front-15.jpg'
image[12] = 'images/front-18.jpg'
image[13] = 'images/front-20.jpg'
image[14] = 'images/front-21.jpg'
image[15] = 'images/front-22.jpg'
image[16] = 'images/front-23.jpg'
image[17] = 'images/front-24.jpg'

var ran = 60/image.length

function ranimage() {
  currentdate = new Date()
  core = currentdate.getSeconds()
  core = Math.floor(core/ran)
    return(image[core])
}

document.write("<img name='MainPhoto' src='" +ranimage()+ "' border=0>")

function swapPictureOnLoad()
{
	setTimeout('swapPicture()',9000);	
}

function swapPicture(pic)
{
	if ((browser == "Internet Explorer") && (OS = "Windows"))
		{
		document.images.MainPhoto.style.filter="blendTrans(duration=1.0)";
		document.images.MainPhoto.filters.blendTrans(duration=1.0).Apply();
		document.images.MainPhoto.filters.blendTrans.Play();
		}
    document.images.MainPhoto.src=pic;
}

