<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function P7_autoLayers() { //v1.4 by PVII
 var g,b,k,f,args=P7_autoLayers.arguments;a=parseInt(args[0]);if(isNaN(a))a=0;
 if(!document.p7setc){p7c=new Array();document.p7setc=true;for(var u=0;u<10;u++){
 p7c[u]=new Array();}}for(k=0;k<p7c[a].length;k++){if((g=MM_findObj(p7c[a][k]))!=null){
 b=(document.layers)?g:g.style;b.visibility="hidden";}}for(k=1;k<args.length;k++){
 if((g=MM_findObj(args[k]))!=null){b=(document.layers)?g:g.style;b.visibility="visible";f=false;
 for(var j=0;j<p7c[a].length;j++){if(args[k]==p7c[a][j]) {f=true;}}
 if(!f){p7c[a][p7c[a].length++]=args[k];}}}
}

function myexpand(myid){
	if(document.getElementById(myid).style.visibility=='visible')	{
	document.getElementById(myid).style.visibility='hidden';
	document.getElementById(myid).style.display='none';
	}
	else if(document.getElementById(myid).style.visibility=='hidden')	{
	document.getElementById(myid).style.visibility='visible';
	document.getElementById(myid).style.display='block';
	}
}

function myshrink(myid){
	if(document.getElementById(myid).style.visibility=='visible')	{
	document.getElementById(myid).style.visibility='hidden';
	document.getElementById(myid).style.display='none';
	}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}







/* THESE FUNCTIONS ARE USED FOR THE TITANIC EVENTS AREA */
var ost_MAXDEPTHR = 1000;

/* need better name... put on Filters object*/
function ost_isAnchorNode(node) {
	return ostNodeNameFilter(node, 'a');
}
	
/* returns an array (actual array) of children - only useful if you filter */
function ostGetChildren(node, filter /* [, filterargs...] */) {
	var newargs = [node, 1].concat(Array.prototype.slice.call(arguments, 1));	/* probably not the most effecient way of doing this */
	return ostGetDescendents.apply(this, newargs);
}
/* compares the node.nodeName to the namespec insensitively */
function ostNodeNameFilter(node, tagName) {
	return !!node.nodeName && node.nodeName.toUpperCase() == tagName.toUpperCase();
}
function __getDescendentsCallback(node, gdobj) {
	gdobj.filterargs[0] = node;
	if (gdobj.filter.apply(this, gdobj.filterargs)) {
		gdobj.results.push(node);
	}
	return false /* don't stop the iterator */
}
/* dummy function that returns true
 * combine with similar functions in this file
 *  */
function __ostReturnTrue() { return true; }
function __ostReturnFalse() { return false; }
/* should also have unwind capability */
/* create an EX version with the extended caps */
/* returns an array containing the descendents matched by filterfunc */
function ostGetDescendents(parent, depth, filter /*, filterargs */) {
	var filterargs = Array.prototype.slice.call(arguments, 3);
	filterargs.unshift(null);
	 
	var gdObj = {
		results: new Array(),
		filter: filter || __ostReturnTrue,
		filterargs: filterargs
	 };
	ostIterateDescendents(parent, depth, __getDescendentsCallback, gdObj);
	return gdObj.results;	
}


/* the business end of iteratedescendents */
function __doIterateDescendents(parent, curdepth, maxdepth, func, args) {
	var retval = false;
	var children = parent.childNodes;
	if (!!children && !!children.length) {
		for (var n=0, l=children.length; n<l; ++n) {
			if (!!children[n]) { /* it is possible for children to have a null */
				args[0] = children[n];
				retval = func.apply(null, args);
				if (!retval && maxdepth > curdepth) __doIterateDescendents(args[0], curdepth+1, maxdepth, func, args); 
			}
		}
	}
	return retval;
}

/* general function to iterate the descendents of a node and perform an operation on them */
/* parent is the parent node (with .childNodes) */
/* any args past func will be passed to the callback function */
/* func is called in the global context (this==window) so be sure to bind if you need it
	to act on an object
	if func returns true (or something that evaluates as true, this stops)
	
	todo: need to be able to short circuit the unwind (check type)
	
	 */
	 
function ostIterateDescendents(parent, depth, func /*, args... */) {
	depth = depth || ost_MAXDEPTHR;
	/* ourargs is an array with arguments to send to callback function
		the first slot is reserved for the node we're looking at
	 */
	var ourargs = Array.prototype.slice.call(arguments, 3 /* ostIterateDescendents.length */);
	ourargs.unshift(null);
	return __doIterateDescendents(parent, 1, depth, func, ourargs);
}

function ostIsBoolean(v) {
	return typeof(v) == "boolean";
}

var iseventclassRE = /\bevent\b/;
var isactiveclassRE = /(\s*\bactive_event\b\s*)/;

function clearActiveEventCallback(node, true_active_node) {
		if (!!!node.className) return true;	// probably a text node
		if (node == true_active_node) {
			node.className = node.className + ' active_event';
		} else {
			node.className = node.className.replace(isactiveclassRE, ' ');//leaves a space	
		}
}

/* mouse over event handler */
function eventOnMouseOver() {
	if (this.className.search(isactiveclassRE) > -1) return false;
	ostIterateDescendents(this.parentNode, 1, clearActiveEventCallback, this);
}
var evcnt = 0;
function setEventOnMouseOverCallback(node) {
	if (node.nodeName == 'DIV' && !!node.className && node.className.search(iseventclassRE) > -1) {
		node.onmouseover = eventOnMouseOver;
		if (evcnt == 0) {
			eventOnMouseOver.apply(node);
		}
		evcnt++;

	}
	return false;
}
/* END OF FUNCTIONS FOR TITANIC EVENTS AREA */

/* functions for left menu dropdown - requires some of the events functions */

var  isdropdownmenuRE = /\bmenu-inline-dropdown\b/;
var isactivedropdownmenuRE = /\bmenu-inline-dropdown-active\b/;

function isLeftMenuDropDownDivFilter(node) {
	return 	node.nodeName == 'DIV' && !!node.className && node.className.search(isdropdownmenuRE) > -1;
}

function setupLeftMenuDropDowns() {
	var container = document.getElementById('leftmenu'); // jicd
	if (!!!container) {
		container = document;
	}
	var dropdowns = ostGetDescendents(container, 0, isLeftMenuDropDownDivFilter);
	for (var i=0; i< dropdowns.length; ++i) {
		var dropdown = dropdowns[i];
		// find the link
		var anchornodes = ostGetChildren(dropdown, ost_isAnchorNode);
		if (anchornodes.length != 1) {
			alert('malformed dropdown left menu');
			continue;
		}
		// attach the anchor node directly to the div tag for easy access later
		dropdown.menuAnchor = anchornodes[0];
		dropdown.menuAnchor.onmouseover = dropdownAnchor_onMouseOver; //.bind(dropdown.menuAnchor)  - browser applies;
		dropdown.menuAnchor.onclick = dropdownAnchor_onClick;
	}
}

function dropdownAnchor_onMouseOver(e) {
	var dropdown = this.parentNode;
	if (dropdown.className.search(isactivedropdownmenuRE) == -1) {	// not active
		// add the class (let the hover/class take care of the actual behavior
		dropdown.className = dropdown.className + " menu-inline-dropdown-active";
	}
	return true;
		
}
function dropdownAnchor_onClick(e) {
	var dropdown = this.parentNode;
	if (dropdown.className.search(isactivedropdownmenuRE) > -1) {
			// if it is active and it is clicked, remove the class
			dropdown.className = dropdown.className.replace(/\s*\bmenu-inline-dropdown-active\b\s*/, ' ');
			return false;
	}
	return true;
}




//-->
