onloader = new Array();
function load() {
	for(i=0;i<onloader.length;i++){
		setTimeout(onloader[i],100);
	}
}
window.onload= load;

function addloader(str){
	onloader[onloader.length] = str;	
}

// Menus for within the main categories, ie. whale watching
function submenu(obj) {
	if(obj == null){
		obj = 'nav_subcat';
	}
	with(document.getElementById(obj).style) {
		display = (display == "none") ? "" : "none";
	}
}
function doForAll(objIDs) {
	for(var i=1; i<arguments.length; i++) {
		with(document.getElementById(arguments[i])) {
			switch(arguments[0]) {
				case 'click':
					click();
					break;
					
				case 'check':
					checked = 'checked';
					break;
				case 'uncheck':
					checked = '';
					break;
				
				case 'hide':
					style.display = 'none';
					break;
				case 'show':
					style.display = '';
					break;
			}
		}
	} 
}

function showHide(objID) {
	if(arguments.length>1){
		shcss = (arguments[1] > 0) ? 'block' : 'none';
		document.getElementById(objID).style.display=shcss;
	} else {
		with(document.getElementById(objID).style) {
			display = (display == 'none') ? '' : 'none';
		}
	}
}
function fcs(objID) {
	document.getElemenentById(objID).focus();
}

startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
  }
  node.onmouseout=function() {
  this.className=this.className.replace(" over", "");
   }
   }
  }
 }
}
addloader('startList()');
/*
function toggleClass(obj,class) {
	with(document.getElementById(obj)) {
		if(arguments.length > 2) {
			className = (arguments[2]>0) ? class : '';
		} else {
			className = (className != class) ? class : '';
		}
	}
}
*/
function toggleOpac(obj,num,value) {
	with(document.getElementById(obj).style){
		if(arguments[2]<1){
			opacity = num/100;
			filter = alpha(opacity=num);
		} else {
			opacity = 1;
			filter = alpha(opacity=100);
		}
	}
}
