<!--
function LoadFuncs() {
initImgRotation();
}

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages(id, src) {
	document.getElementById(id).src = src;
}

function initImgRotation() {

  var rotator1 = new rotateImgObj('img1',6000);
  rotator1.addImages("f1.jpg","f2.jpg","f3.jpg","f4.jpg","f5.jpg","f6.jpg","f7.jpg","f8.jpg");
  //rotator1.rotate();
  
  var rotator2 = new rotateImgObj('img2',6000);
  rotator2.addImages("h1.jpg","h2.jpg","h3.jpg","h4.jpg","h5.jpg","h6.jpg","h7.jpg","h8.jpg");
  //rotator2.rotate();
  
  var rotator3 = new rotateImgObj('img3',6000);
  rotator3.addImages("e1.jpg","e2.jpg","e3.jpg","e4.jpg","e5.jpg","e6.jpg","e7.jpg","e8.jpg");
  //rotator3.rotate();
  
  rotateImgObj.start();  
}

rotateImgObj.imagesPath = "/images/rotimage/";


rotateImgObjs = []; 

function rotateImgObj(nm,s) {
  this.speed=s; this.timer=0;  
  this.imgObj = document.images[nm]; // get reference to the image object
  this.imgObj.ctr = 0;
	this.index = rotateImgObjs.length; rotateImgObjs[this.index] = this;
  this.animString = "rotateImgObjs[" + this.index + "]";
}

rotateImgObj.prototype = {
  addImages: function() { // preloads images
    this.imgObj.imgs = [];
    for (var i=0; i<arguments.length; i++) {
      this.imgObj.imgs[i] = new Image();
      this.imgObj.imgs[i].src = rotateImgObj.imagesPath + arguments[i];
    }
  },

  rotate: function() {
    if (this.imgObj.ctr < this.imgObj.imgs.length-1){
			this.imgObj.ctr++;
		}else{
			this.imgObj.ctr = 0;
		}
		$(this.imgObj).fadeOut(2000, function(){
			this.src = this.imgs[this.ctr].src;																			
			$(this).fadeIn(2000);
		});
	}
}


// sets up rotation for all defined rotateImgObjs
rotateImgObj.start = function() {
  for (var i=0; i<rotateImgObjs.length; i++) 
    rotateImgObjs[i].timer = setInterval(rotateImgObjs[i].animString + ".rotate()", rotateImgObjs[i].speed);                     
}
function showDisplay(id,display) { 
document.getElementById(id).style.display=display; 
} 

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}
// -->
