function embedEmail( idName ) {
	// Assumptions: 
	//   idName exists
	// 	 idName has links
	//	 email link has a title where the '@' is a '+' and the '.' is a '-'
	//	 email link rel='email'
//alert("embedEmail invoked. idName="+idName);
	var rtn = false;
	if ( !document.getElementsByTagName ) return rtn;
	if ( !document.getElementById ) return rtn;
	if ( !document.getElementById( idName )) return rtn;
	
	// Get array of links
	var links = $( idName ).getElementsByTagName( 'a' );
	// For all links
	for ( var i=0; i < links.length; i++ ) {
		var thisLink = links[i];
		if ( !thisLink.rel ) continue;
		// If the class is email
		if ( thisLink.getAttribute( 'rel' ).toUpperCase()=='EMAIL' && thisLink.title ){
			var title = thisLink.title;
			if ( title.indexOf( '+' )!=-1 && title.indexOf( '-' )!=-1) {
				var name = title.slice( 0, title.indexOf( '+' ) );
				var domain = title.slice( title.indexOf( '+' )+1, title.indexOf( '-' ) );
				var suffix = title.slice( title.indexOf( '-' )+1, title.length );
				newTitle = name + '@' + domain + '.' + suffix;
				thisLink.href = 'mai'+'lto:' + newTitle;
				thisLink.firstChild.nodeValue = newTitle;
				thisLink.title = newTitle;
				rtn = true;
			};
		};
	};
	return rtn;
};
function setExternalLinkage() {
//alert ("setExternalLinkage invoked");
	if ( !document.getElementsByTagName ) return false;
	var i, a;
	var rtn = false;
	a = document.getElementsByTagName('a');
	for (var i=0; i < a.length; i++) if( a[i].getAttribute( 'href' )&& a[ i ].getAttribute( 'rel' ) == 'external' ) 
	{ 
		a[i].target = '_blank';
		rtn = true;
	};
	return rtn;
};
function setCopyrightDate ( copyrightYear ) {
	if ( !document.getElementById ) return;
	if ( !document.getElementById( copyrightYear )) return;
	var copy = document.getElementById( copyrightYear );
	var copyText = document.createTextNode( new Date().getFullYear() );
	copy.replaceChild( copyText, copy.firstChild );
};
function animateLinks( thisOne ) {
	$$( '#' + thisOne + ' a' ).each( function( e ) {
		if ( !e.hasClass( 'image' ) && !e.hasClass( 'emailIcon' )) {
			if( e.getParent( '.secNav' ) == null ) {
				var fx = new Fx.Morph( e, { duration:350, wait:false });
				e.addEvent( 'mouseenter', function() {
					fx.start({ 'color': '#fff', 'background-color': '#329a9a' }); });
				e.addEvent('mouseleave', function(){
					fx.start({ 'color': '#329a9a', 'background-color': '#fff' }); });
			};
		};
	});
};
function embedFlashBanner()
{
	var flashvars = 
	{
		//xmlUrl: "/xml/filename.xml"	//Use to change XML filename or location
	};
	var params = 
	{
		scale: "noscale",
		menu: "false",
		wmode: "transparent",
		base: "/flash/"
	};                   
	var attributes = 
	{
		id: "banner_swf",
		name: "banner_swf"
	};                    
	swfobject.embedSWF( "/flash/banner.swf", "banner_swf", "574", "264", "9", "/flash/expressInstall.swf", flashvars, params, attributes);
};
function setBumpbox() 
{
	doBump( '.bumpbox', 				// Class name for bumpbox objects, note the dot in front of the class name itself
		750, 							// Effect speed to show bumpbox ( in ms )
		500, 							// Effect speed to remove bumpbox ( in ms )
		'111', 							// Hex color of bumpbox itself, omit #
		'222', 							// Hex color of the background overlay, omit #
		'0.8', 							// Opacity of the background overlay, values 0 - 1
		5, 								// Border radius of the bumpbox client window in px
		1,	 							// Border weight of the bumpbox client window 
		'333', 							// Hex color of the bumpbox client window, omit #
		15, 							// Shadow spread size in px
		'000', 							// Hex color of bumpbox shadow, omit #
		3, 								// Choose from 4 predefined icon sets
		null,							// Transition used for appearing 
		null,							// Transition used for disappearing
		null, 							// Background image to be used
		null, 							// Background position
		null 							// Background repeat
	);
};
// Set global vars for loaded functions
var prepareForms,
	invokeXmlStumpDisplay,
	invokeXmlArticleDisplay,
	invokeXmlStaffDisplay;
		

