/* JavaScript Document
Script used with the virtual tour of campus
*/

var pic_id_array = null; // holds the ids of the ids you want to show or hide

// jsout is used as a shortcut for document.write
function jsout(theString){
	document.write(theString);
}

// takes an id in and changes its visibility to visible
function makeVisible(idLabel){
	if (idLabel != "" || idLabel != null) {
		document.getElementById(idLabel).style.visibility="visible";
	}
}

// takes an id in and changes its visibility to hidden
function makeHidden(idLabel){
	if (idLabel != "" || idLabel != null) {
		document.getElementById(idLabel).style.visibility="hidden";
	}
}

// makes the passed in idLabel visible and hides the other pictures and text
function show(idLabel) {
	// hide all of the ones you don't want seen, and makes visible the one you want to see
	showWithArray(idLabel, pic_id_array);
}

// takes in an array of the ids you want to show or hide
function setIdsToChange(arrayOfIds) {
		pic_id_array = arrayOfIds;
}

// makes the passed in idLabel visible and hides the other pictures and text, pass in the array to check too
function showWithArray(idLabel, id_array) {
	// hide all of the ones you don't want seen, and makes visible the one you want to see
	if (id_array != null){
		for (i = 0; i < id_array.length; i++){
			if(id_array[i] != idLabel){
				makeHidden(id_array[i]);
			}else{
				makeVisible(id_array[i]);
			}
		}
	}
}