//	Common Javascript for my MMBA site - Copyright (C) 2003-2012 Charles A Upsdell, All Rights Reserved; www.upsdell.com


function startList ( id_list )
{
if ( oAgent.isIE && (oAgent.version<7) )
  {
	for ( var i = 0; i < arguments.length; ++i )
	  {
		var id = arguments[i];
		navRoot = document.getElementById(id);
		if ( navRoot == null )
			continue;
		for ( var j = 0; j < navRoot.childNodes.length; ++j )
		  {
			node = navRoot.childNodes[j];
			if (node.nodeName=="LI")
			  {
				node.onmouseover=function() { this.className+=" over"; }
				node.onmouseout=function() { this.className=this.className.replace(" over", ""); }
			  }
		  }
	  }
  }
}

//	OnUnload Function
function myOnUnload( oPageStyle )
{
oPageStyle.saveActiveStylesheet();
oPageStyle.saveOptions();
}

// Scroll to a position, defaulting to top of page; return false if done
function myScrollTo ( left, top )
{
left = left || 0;
top = top || 0;
var value = true;
if ( typeof(window.scrollTo) != 'undefined' )
  {
 	window.scrollTo( left, top );
	value = false;
  }
return( value );
}



//Init
if ( typeof(cPageStyle) != 'undefined' )
	var oPageStyle = new cPageStyle( 'mmba', ['CalCultural','CalUpcoming'], ['Style 2008', 'Style 2004', 'Style 2007']  );

if ( typeof(cBrowser) != 'undefined' )
  {
	var oAgent = new cBrowser();
	if ( (typeof(oAgent)=='object') && ((oAgent.isIE && (oAgent.version.comp('5')>=0)) || oAgent.isG || oAgent.isK || (oAgent.isO && (oAgent.version.comp('7')>=0))) )
		; // browser is modern
	else if ( (typeof(oAgent)!='object') || oAgent.isIE || oAgent.isN || oAgent.isO )
		alert( 'Sorry, this site is not designed for ancient browsers' );
  }



