//------------------------------------------------------------------------
//-- ROLL OVER SCRIPT
//------------------------------------------------------------------------

function MM_preloadImages() { //v2.0
  if (document.images) {
    var imgFiles = MM_preloadImages.arguments;
    if (document.preloadArray==null) document.preloadArray = new Array();
    var i = document.preloadArray.length;
    with (document) for (var j=0; j<imgFiles.length; j++) if (imgFiles[j].charAt(0)!="#"){
      preloadArray[i] = new Image;
      preloadArray[i++].src = imgFiles[j];
  } }
}

function MM_swapImgRestore() { //v2.0
  if (document.MM_swapImgData != null)
    for (var i=0; i<(document.MM_swapImgData.length-1); i+=2)
      document.MM_swapImgData[i].src = document.MM_swapImgData[i+1];
}

function MM_swapImage() { //v2.0
  var i,j=0,objStr,obj,swapArray=new Array,oldArray=document.MM_swapImgData;
  for (i=0; i < (MM_swapImage.arguments.length-2); i+=3) {
    objStr = MM_swapImage.arguments[(navigator.appName == 'Netscape')?i:i+1];
    if ((objStr.indexOf('document.layers[')==0 && document.layers==null) ||
        (objStr.indexOf('document.all[')   ==0 && document.all   ==null))
      objStr = 'document'+objStr.substring(objStr.lastIndexOf('.'),objStr.length);
    obj = eval(objStr);
    if (obj != null) {
      swapArray[j++] = obj;
      swapArray[j++] = (oldArray==null || oldArray[j-1]!=obj)?obj.src:oldArray[j];
      obj.src = MM_swapImage.arguments[i+2];
  } }
  document.MM_swapImgData = swapArray; //used for restore
}

function SelectIt(){
        if (document.Links.Select.options[document.Links.Select.selectedIndex].value != "none"){ 
        location = document.Links.Select.options[document.Links.Select.selectedIndex].value}        
}


function new_window1(url) {
	link = window.open(url,"Link","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=375,height=282,left=50,top=50");
}
function new_window2(url) {
	link = window.open(url,"Link2","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=375,height=282,left=50,top=50");
}
function new_window3(url) {
	link = window.open(url,"Link3","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=375,height=282,left=50,top=50");
}
function new_window4(url) {
	link = window.open(url,"Link4","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=375,height=282,left=50,top=50");
}
function new_window5(url) {
	link = window.open(url,"Link5","toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=375,height=282,left=50,top=50");
}

function initImgRotation() {
	  // create rotating image objects here 
	  // arguments: image name, rotation speed
	  var rotator1 = new rotateImgObj('img1',3500);
	  // add the images to rotate into that image object  
	  rotator1.addImages("gallery_1.jpg", "gallery_2.jpg", "gallery_3.jpg", "gallery_4.jpg", "gallery_5.jpg","gallery_6.jpg", "gallery_7.jpg", "gallery_8.jpg", "gallery_9.jpg");
	  rotator1.rotate();
	  
	  rotateImgObj.start();
	}
	
	// If all the images you wish to display are in the same location, you can specify the path here 
	rotateImgObj.imagesPath = "../_images/";
	
	// no need to edit code below 
	/////////////////////////////////////////////////////////////////////
	rotateImgObjs = []; // holds all rotating image objects defined
	// constructor 
	function rotateImgObj(nm,s) {
	  this.speed=s; this.ctr=0; this.timer=0;  
	  this.imgObj = document.images[nm]; // get reference to the image object
	  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; arguments[i]; i++) {
		  this.imgObj.imgs[i] = new Image();
		  this.imgObj.imgs[i].src = rotateImgObj.imagesPath + arguments[i];
		}
	  },
	
	  rotate: function() {
		if (this.ctr < this.imgObj.imgs.length-1) this.ctr++;
		else this.ctr = 0;
		this.imgObj.src = this.imgObj.imgs[this.ctr].src;
	  }
	}
	
	// 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);                     
	}

<!--- Site popup --->
function initImgRotation2() {
	  // create rotating image objects here 
	  // arguments: image name, rotation speed
	  var rotator1 = new rotateImgObj('img2',3500);
	  // add the images to rotate into that image object  
	  rotator1.addImages("gallery_1.jpg","gallery_2.jpg", "gallery_3.jpg", "gallery_4.jpg", "gallery_5.jpg","gallery_6.jpg", "gallery_7.jpg", "gallery_8.jpg", "gallery_9.jpg");
	  rotator1.rotate();
	  
	  rotateImgObj.start();
	}
	
	// If all the images you wish to display are in the same location, you can specify the path here 
	rotateImgObj.imagesPath = "images/";
	
	// no need to edit code below 
	/////////////////////////////////////////////////////////////////////
	rotateImgObjs = []; // holds all rotating image objects defined
	// constructor 
	function rotateImgObj(nm,s) {
	  this.speed=s; this.ctr=0; this.timer=0;  
	  this.imgObj = document.images[nm]; // get reference to the image object
	  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; arguments[i]; i++) {
		  this.imgObj.imgs[i] = new Image();
		  this.imgObj.imgs[i].src = rotateImgObj.imagesPath + arguments[i];
		}
	  },
	
	  rotate: function() {
		if (this.ctr < this.imgObj.imgs.length-1) this.ctr++;
		else this.ctr = 0;
		this.imgObj.src = this.imgObj.imgs[this.ctr].src;
	  }
	}
	
	// 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);                     
	}

<!--- Cortland popup --->
function initImgRotation3() {
	  // create rotating image objects here 
	  // arguments: image name, rotation speed
	  var rotator1 = new rotateImgObj('img3',3500);
	  // add the images to rotate into that image object  
	  rotator1.addImages("gallery_1.jpg","gallery_2.jpg", "gallery_3.jpg", "gallery_4.jpg", "gallery_5.jpg","gallery_6.jpg", "gallery_7.jpg", "gallery_8.jpg", "gallery_9.jpg");
	  rotator1.rotate();
	  
	  rotateImgObj.start();
	}
	
	// If all the images you wish to display are in the same location, you can specify the path here 
	rotateImgObj.imagesPath = "images/";
	
	// no need to edit code below 
	/////////////////////////////////////////////////////////////////////
	rotateImgObjs = []; // holds all rotating image objects defined
	// constructor 
	function rotateImgObj(nm,s) {
	  this.speed=s; this.ctr=0; this.timer=0;  
	  this.imgObj = document.images[nm]; // get reference to the image object
	  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; arguments[i]; i++) {
		  this.imgObj.imgs[i] = new Image();
		  this.imgObj.imgs[i].src = rotateImgObj.imagesPath + arguments[i];
		}
	  },
	
	  rotate: function() {
		if (this.ctr < this.imgObj.imgs.length-1) this.ctr++;
		else this.ctr = 0;
		this.imgObj.src = this.imgObj.imgs[this.ctr].src;
	  }
	}
	
	// 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);                     
	}