/*
this script ensures that the 3 columns have equal height
*/

function subWrapperHeight() {
   
	var currHeight = 0;
	var maxHeight = 0;
	pageColumns = new Array('left-side-inner', 'right-side', 'sub-center', 'center-front');
	
	for (i = 0; i < pageColumns.length; i++) {
		if (document.getElementById(pageColumns[i])) {
			document.getElementById(pageColumns[i]).style.height = "";
			currHeight = document.getElementById(pageColumns[i]).offsetHeight;
			if (currHeight > maxHeight) {
				maxHeight = currHeight;
			}
		}
	}
	
	for (i = 0; i < pageColumns.length; i++) {
		if (document.getElementById(pageColumns[i])) {
			if (document.getElementById(pageColumns[i]).offsetHeight < maxHeight) {
				document.getElementById(pageColumns[i]).style.height = maxHeight+"px";
			}
		}
	}
}


//random image rotation on front page

//the array function

function makeArray(len) {
	for (var i=0; i<len; i++) this[i]=null;
this.length=len;
}

//create array

var images=new makeArray(10);
images[0]="<img src='/NACDA/images/front-rotation1.jpg' width='427' height='384' alt=''>";
images[1]="<img src='/NACDA/images/front-rotation2.jpg' width='427' height='384' alt=''>";
images[2]="<img src='/NACDA/images/front-rotation3.jpg' width='427' height='384' alt=''>";
images[3]="<img src='/NACDA/images/front-rotation4.jpg' width='427' height='384' alt=''>";
images[4]="<img src='/NACDA/images/front-rotation5.jpg' width='427' height='384' alt=''>";
images[5]="<img src='/NACDA/images/front-rotation6.jpg' width='427' height='384' alt=''>";
images[6]="<img src='/NACDA/images/front-rotation7.jpg' width='427' height='384' alt=''>";
images[7]="<img src='/NACDA/images/front-rotation8.jpg' width='427' height='384' alt=''>";
images[8]="<img src='/NACDA/images/front-rotation9.jpg' width='427' height='495' alt=''>";
images[9]="<img src='/NACDA/images/front-rotation10.jpg' width='427' height='384' alt=''>";

//random number generator
function rand(n) {
seed=(0x015a4e35 * seed) % 0x7fffffff;
return (seed>>16) % n;
}
var now=new Date()
var seed=now.getTime() % 0xffffffff;