function cycle_top_image(){
	// display the next image in the sequence
	clearTimeout(topTimer);
	top_image_position += 1;
	if (top_image_position >= top_image_array.length) top_image_position = 0;
	objTopImage.src='/images/full/'+top_image_array[top_image_position];

	// start the timer!!
	topTimer = setTimeout("cycle_top_image()",5000);
}

function previous_top_image(){
	// step back an image...
	clearTimeout(topTimer);
	top_image_position -= 1;
	if (top_image_position < 0) top_image_position = top_image_array.length-1;
	
	objTopImage.src='/images/full/'+top_image_array[top_image_position];

	// start the timer!!
	topTimer = setTimeout("cycle_top_image()",5000);
}

function item_toggle(obj_id){
	obj = document.getElementById(obj_id);
	if (obj){
		if (obj.style.display == "block"){
			obj.style.display = "none";
		} else {
			obj.style.display = "block";
		}
	}
}
function item_off(obj_id){
	obj = document.getElementById(obj_id);
	if (obj){
		obj.style.display = "none";
	}
}


sfHover = function() {
	if (document.getElementById("nav")){
	var sfEls = document.getElementById("nav").getElementsByTagName("li");
		for (var i=0; i<sfEls.length; i++) {
			sfEls[i].onmouseover=function() {
				this.className+=" sfhover";
			}
			sfEls[i].onmouseout=function() {
				this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
			}
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);

function toggle_submenu(obj){
	// toggle the submenu
//	alert(obj.id);
	var list = obj.children.tags("LI");
//	alert(list.length);
}

