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';
        }
    }

}



var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		topnav_01 = newImage("../images/topnav_about_over.gif");
		topnav_02 = newImage("../images/topnav_locations_over.gif");
		topnav_03 = newImage("../images/topnav_partners_over.gif");
		topnav_04 = newImage("../images/topnav_news_over.gif");
		topnav_05 = newImage("../images/topnav_events_over.gif");
		
		footer_01 = newImage("../images/footer_contact_over.gif");
		footer_02 = newImage("../images/footer_sitemap_over.gif");
		footer_03 = newImage("../images/footer_privacy_over.gif");
		footer_03 = newImage("../images/footer_employment_over.gif");
		
		preloadFlag = true;
	}
}


//Home Rotating images. 
var homerotating = new Array(4);
homerotating[0]='';
homerotating[1]='<img src="images/home_rotating_01.jpg" alt="BENU - Benefits of Choice" width="421" height="293" border="0">';
homerotating[2]='<img src="images/home_rotating_02.jpg" alt="BENU - Benefits of Choice" width="421" height="293" border="0">';
homerotating[3]='<img src="images/home_rotating_03.jpg" alt="BENU - Benefits of Choice" width="421" height="293" border="0">';
homerotating[4]='<img src="images/home_rotating_04.jpg" alt="BENU - Benefits of Choice" width="421" height="293" border="0">';

//randomly select & display photos:
function rand_order(num_strings) {
spkr = 0;
var headPic = 1;
var order_value = -1;
	while ( (order_value < 1) || (order_value > num_strings) || (isNaN(order_value)) ) {
		order_value = parseInt(Math.random() * (num_strings + 1));
	}

return order_value;
}