/* created this file by deleting a bunch of features that are not used by the goldbar
version of the FDU website, implemented 5/30/2008 */

//Rotating Image Script

var sign_num;
var scene_num;
var smile_num;
var fourth_num;
signtail = 'center.jpg" alt="Campus Sign" width="141" height="112" border="0"></a>';
scenetail = 'scene.jpg" alt="Campus Scene" width="281" height="112" border="0"></a>';
smiletail = '.jpg" alt="Campus Smile" width="137" height="112" border="0"></a>';
signfront = '<a href="http://view.fdu.edu/default.aspx?id=3173"><img src="http://cms.fdu.edu/files/';
scenefront = '<a href="http://view.fdu.edu/default.aspx?id=2228"><img src="http://cms.fdu.edu/files/';
smilefront = '<a href="http://view.fdu.edu/default.aspx?id=2752"><img src="http://cms.fdu.edu/files/';

//randomly select & display header photos:
function rand_order(numavail) {
var numavail;
var order_value = -1;
while ( (order_value < 1) || (order_value > numavail) || (isNaN(order_value)) ) 
{
order_value = parseInt(Math.random() * (numavail + 1));
}
return order_value;
}
smile_num = rand_order(50);
if (smile_num < 10) {smile_num = '0' + smile_num};
sign_num = rand_order(67);
if (sign_num < 10) {sign_num = '0' + sign_num};
scene_num = rand_order(30);
if (scene_num < 10) {scene_num = '0' + scene_num};
fourth_num = rand_order(67);
if (fourth_num < 10) {fourth_num = '0' + fourth_num};
/*smile_num = 4;
sign_num = 4;
scene_num = 4;*/

//quickfind menu:
function goto_URL(newPage)
 {
   nextPage = newPage.options[newPage.selectedIndex].value
   if (nextPage != "")
   { document.location.href = nextPage }
 }
 
 
//sitemap functions
function hide_collapse(parent_elemt){

	var item = document.getElementById(parent_elemt);
	if (item.style.display == 'none'){
		item.style.display = 'block';
	}else{
		item.style.display = 'none';
	}
}

function expand_it(){

	var lists = document.getElementsByTagName('UL');
	for (var i = 0; i < lists.length; i++) {
		if (lists[i].style.display == 'none'){
			lists[i].style.display = 'block';
		}
	}

}
function collapse_it(){

	var lists = document.getElementsByTagName('UL');
	for (var i = 0; i < lists.length; i++) {
		if (lists[i].style.display == 'block'){
			lists[i].style.display = 'none';
		}
	}

}

