/*  toggle function to show/hide div content on main page  */

function toggleStd() {

var stdbox = document.getElementById('stdbox')

	if (stdbox.style.display=='none') {
		stdbox.style.display='block'
	} else {
		stdbox.style.display='none'
	}
}


function toggleEmp() {

var empbox = document.getElementById('empbox')

	if (empbox.style.display=='none') {
		empbox.style.display='block'
	} else {
		empbox.style.display='none'
	}
}


oldTextAry = new Array();

function swapText (fieldObj, newTexStr) {
	if (newTexStr == fieldObj.innerHTML) {
		fieldObj.innerHTML = oldTextAry[fieldObj.id];
	} else {
		oldTextAry[fieldObj.id] = fieldObj.innerHTML;
		fieldObj.innerHTML = newTexStr;
	}
}

oldTextAry2 = new Array();

function swapText2 (fieldObj, newTexStr2) {
	if (newTexStr2 == fieldObj.innerHTML) {
		fieldObj.innerHTML = oldTextAry2[fieldObj.id];
	} else {
		oldTextAry2[fieldObj.id] = fieldObj.innerHTML;
		fieldObj.innerHTML = newTexStr2;
	}
}



/*  function used to rotate graphics on main page  */

halPix = new Array("graphics/main/Campus_Scene.jpg",
		   "graphics/main/Main_Tower.jpg",
		   "graphics/main/South_Mall.jpg",
		   "graphics/main/West_Mall.jpg",
		   "graphics/main/Student_Services_Bldg.jpg")
		  
imgCt = halPix.length 

function rotatePic() {
	if (document.images) {
	randomNum = Math.floor((Math.random() * imgCt))
//	alert("ImageTest"+"\n\nhalPix.length: "+halPix.length+'\n\nrandomNum: ' + randomNum +"\n\nsrc=" + halPix[randomNum]);
	document.images['swapImage'].src = halPix[randomNum];
	} else {
	document.swapImage.src = halPix[randomNum];	
	}
}

