// JavaScript Document javaRules.js

<!-- ENGAGE CLOAK 

// Rollover

<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

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_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->

// Make the picture gallery

var Gallery = new Array(12)
	Gallery[0] = "file_store/sosmart_01.jpg";
	Gallery[1] = "file_store/sosmart_02.jpg";
	Gallery[2] = "file_store/sosmart_03.jpg";
	Gallery[3] = "file_store/sosmart_04.jpg";
	Gallery[4] = "file_store/sosmart_05.jpg";
	Gallery[5] = "file_store/sosmart_06.jpg";
	Gallery[6] = "file_store/sosmart_07.jpg";
	Gallery[7] = "file_store/sosmart_08.jpg";
	Gallery[8] = "file_store/sosmart_09.jpg";
	Gallery[9] = "file_store/sosmart_10.jpg";
	Gallery[10] = "file_store/sosmart_11.jpg";
	Gallery[11] = "file_store/sosmart_12.jpg";


// Second Gallery
	var Gallery2 = new Array(11)
	Gallery2[0] = "file_store/smash_01.jpg";
	Gallery2[1] = "file_store/smash_02.jpg";
	Gallery2[2] = "file_store/smash_03.jpg";
	Gallery2[3] = "file_store/smash_04.jpg";
	Gallery2[4] = "file_store/smash_05.jpg";
	Gallery2[5] = "file_store/smash_06.jpg";
	Gallery2[6] = "file_store/smash_07.jpg";
	Gallery2[7] = "file_store/smash_08.jpg";
	Gallery2[8] = "file_store/smash_09.jpg";
	Gallery2[9] = "file_store/smash_10.jpg";
	Gallery2[10] = "file_store/smash_11.jpg";

// Third Gallery
	var Gallery3 = new Array(10)
	Gallery3[0] = "file_store/boatrace01.jpg";
	Gallery3[1] = "file_store/boatrace02.jpg";
	Gallery3[2] = "file_store/boatrace03.jpg";
	Gallery3[3] = "file_store/boatrace04.jpg";
	Gallery3[4] = "file_store/boatrace05.jpg";
	Gallery3[5] = "file_store/boatrace06.jpg";
	Gallery3[6] = "file_store/boatrace07.jpg";
	Gallery3[7] = "file_store/boatrace08.jpg";
	Gallery3[8] = "file_store/boatrace09.jpg";
	Gallery3[9] = "file_store/boatrace10.jpg";
	Gallery3[10] = "file_store/boatrace11.jpg";
	Gallery3[11] = "file_store/boatrace12.jpg";

// Fourth Gallery
	var Gallery4 = new Array(12)
	Gallery4[0] = "file_store/towerHat000.jpg";
	Gallery4[1] = "file_store/towerHat001.jpg";
	Gallery4[2] = "file_store/towerHat002.jpg";
	Gallery4[3] = "file_store/towerHat003.jpg";
	Gallery4[4] = "file_store/towerHat004.jpg";
	Gallery4[5] = "file_store/towerHat005.jpg";
	Gallery4[6] = "file_store/towerHat006.jpg";
	Gallery4[7] = "file_store/towerHat007.jpg";
	Gallery4[8] = "file_store/towerHat008.jpg";
	Gallery4[9] = "file_store/towerHat009.jpg";
	Gallery4[10] = "file_store/towerHat010.jpg";
	Gallery4[11] = "file_store/towerHat011.jpg";
	


// variables for the cycling pictures

var thisPic = 0
var picct = 12

// The function that cycles the pictures

function cycleGallery() {
	if (document.images) {
	  thisPic++ 
	if (thisPic == picct) {
	     thisPic = 0 
        
          }

// Objects that put pictures in separate cells in a table
        
	document.GalleryCycle.src=Gallery[thisPic];

// A timer to rotate the pictures
	
        setTimeout("cycleGallery()", 2 * 2000)
      }
     
       
}

// variables for the browsing pictures
	var nextPic = 0
	var next = 11
	

// Browse Gallery Function

 function browseGallery() {
	if (document.images) {
	nextPic++ 
	if (nextPic == next) {
	nextPic = 0 
        }
		// Objects that put pictures in separate cells in a table to browse gallery
        
		document.GalleryBrowse.src=Gallery2[nextPic];
		
		
// End of object
		}
    }

// end of this function


// Browse Gallery2 Function

var nextPic2 = 0
	var next2 = 10

 function browseGallery2() {
	if (document.images) {
	nextPic2++ 
	if (nextPic2 == next2) {
	nextPic2 = 0 
        }
		// Objects that put pictures in separate cells in a table to browse gallery
        
		document.GalleryBrowse2.src=Gallery3[nextPic2];
		
// End of object
		}
    }

// end of this function

// Browse Gallery2 Function

var nextPic2 = 0
	var next2 = 0

 function galleryBrowse(gallery, pics) {
	if (document.images) {
	next2 = pics
	nextPic2++ 
	if (nextPic2 == next2) {
	nextPic2 = 0 
        }
		// Objects that put pictures in separate cells in a table to browse gallery
        
		document.galleryBrowse.src=gallery[nextPic2];
		
// End of object
		}
    }

// end of this function


//END CLOAK -->
