/*** frontpage.js ***/
_uacct = "UA-1575933-1";
var xmlDoc = new Object;
var current = 1;
var limit = 18;
var imagesrc = ["./photos/Rnd1.jpg", "./photos/Rnd2.jpg", "./photos/Rnd3.jpg", "./photos/Rnd4.jpg",
 "./photos/Rnd5.jpg", "./photos/Rnd6.jpg",  "./photos/Rnd7.jpg",  "./photos/Rnd8.jpg",
 "./photos/Rnd9.jpg", "./photos/Rnd10.jpg", "./photos/Rnd11.jpg", "./photos/Rnd12.jpg",
 "./photos/Rnd13.jpg", "./photos/Rnd14.jpg", "./photos/Rnd15.jpg", "./photos/Rnd16.jpg",
 "./photos/Rnd17.jpg", "./photos/Rnd18.jpg"]

function changePic()
{
  current = Math.floor(Math.random() * limit);
	if (imagesrc[current]) {
		document.getElementById("RndImg").src = imagesrc[current];
	}
}

function transformImage(perc) {
  var obj = document.getElementById("mainPic");
  var curLeft = curTop = 0;
  do {
	 curLeft += obj.offsetLeft;
	 curTop += obj.offsetTop;
  } while (obj = obj.offsetParent);
  curLeft += 8;
  curTop += 8;
  obj = document.getElementById("mainPic");  
  var h = obj.offsetHeight;
  h = Math.round((perc/100)*h);
  obj.style.height = h+"px";
  obj.style.left = curLeft+"px";
  obj.style.top = curTop+"px";
}

function selbk() {
	if (current>=0 && current<limit) {
		document.getElementById("mainPic").src = imagesrc[current];
	}
  document.getElementById("mainPic").style.height = "440px";	
  document.getElementById("mainPic").style.left = "372px";	
  document.getElementById("mainPic").style.top = "100px";	
	document.getElementById("mainPic").style.visibility = "visible"
}

function shrinkPic() {
  ti = setInterval("transformImage(90)",50);
  setTimeout("hidePic()",1000);
}

function hidePic() {
  clearInterval(ti);
 	document.getElementById("mainPic").style.visibility="hidden";
	document.body.style.cursor='auto';
}

function remPic() {
 	document.getElementById("mainPic").style.visibility="hidden";
}

function frontpage() {
  getActiveStyleSheet();
  remPic();
  changePic();
  urchinTracker();
}

swfobject.embedSWF("swf/cdown.swf?cd_date=200912221505", "flashbox", "180", "72", "7.0.0", "expressInstall.swf");

/*** of frontpage.js ***/
