

// variables
	// user-agent identity
	var version = parseInt(navigator.appVersion);
	var isNS  = (navigator.appName.indexOf("Netscape") >= 0);
	var isNS4 = (isNS && version == 4);
	var isNS5 = (isNS && version > 4);
	var isFF  = (navigator.userAgent.indexOf("Firefox") >= 0);
	var isIE  = !isNS;
	var isIE4 = (isIE && version == 4);
	var isIE5 = (isIE && version > 4);
	var isMac = (navigator.appVersion.indexOf("Macintosh") >= 0);
	var isWin = !isMac;
	var isAOL = (navigator.userAgent.indexOf("AOL") >= 0);

	// Flash detection; minimum: version 4.0
	var flashVersion = 0;
	for (var i = 4; i <= 10; i++)
	{
		if (isIE)
		{
			document.write('<script language="VBScript" type="text/vbscript">\n');
			document.write('On Error Resume Next\n');
			document.write('CreateObject("ShockwaveFlash.ShockwaveFlash." & i)\n');
			document.write('If Err = 0 Then\n');
			document.write('flashVersion = i\n');
			document.write('End If\n');
			document.write('</script>\n');
		}
		else
		{
			var plugin = navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin;
			if (plugin && parseInt(plugin.description.substring(plugin.description.indexOf(".") - 1)) >= i)
			{
				flashVersion = i;
			}
		}
	}

	// events
	var clickURL;
	var mouseX = 0;
	var mouseY = 0;
	var pageWidth = 0;
	var pageHeight = 0;
	
	// settings
	var menuDelay = 100;
	var allowFrame = true;

	// page tools
	var windows = new Array();
	var pageURL = (window != top) ? document.referrer : location.href;
	var emailURL = "email.html?title=%%title%%&url=%%url%%";
	var printURL = "print.html?id=%%id%%";
	var similarURL = "search.html?similar=%%url%%";
	var contextStyles =
	[
		["intro", "cite", "ital-off"],
		["bio", "cite", "ital-off"]
	];

// cookie management
	function readCookie(name)
	{
		var cookieArray = document.cookie.split("; ");
		for (var i = 0; i < cookieArray.length; i++)
		{
			var nameValueArray = cookieArray[i].split("=", 2);
			if (nameValueArray[0] == name) return(nameValueArray[1]);
		}
		return(null);
	}

	function writeCookie(name, value, expires)
	{
		if (expires)
		{
			document.cookie = name + "=" + value + "; expires=" + expires.toGMTString();
		}
		else
		{
			document.cookie = name + "=" + value;
		}
	}
	
// query extraction
	function getQueryVariable(name)
	{
		var query = window.location.search.substring(1);
		var vars = query.split("&");
		for (var i = 0; i < vars.length; i++)
		{
			var pair = vars[i].split("=");
			if (pair[0] == name)
			{
				return pair[1];
			}
		}
		return null;
	}

// event capturing
	if (isNS4)
	{
		window.captureEvents(Event.ONLOAD);
		window.onLoad = pageLoad;
		window.captureEvents(Event.ONUNLOAD);
		window.onUnload = pageUnload;
		document.captureEvents(Event.CLICK);
		document.onClick = mouseClick;
		document.captureEvents(Event.MOUSEMOVE);
		document.onMouseMove = mouseMove;
	}

	if (isNS5)
	{
		window.addEventListener("load", pageLoad, false);
		window.addEventListener("unload", pageUnload, false);
		document.addEventListener("click", mouseClick, false);
		document.addEventListener("mousemove", mouseMove, false);
	}

	if (isIE)
	{
		window.attachEvent("onload", pageLoad);
		window.attachEvent("onunload", pageUnload);
		document.attachEvent("onclick", mouseClick);
		document.attachEvent("onmousemove", mouseMove);
	}

// event handlers
	function pageLoad(evt)
	{
		// frame break
		if (window != top && allowFrame != true) top.location.replace(location.href);

		// display hover
		if (window.showPromo) showPromo();

		// set contextual styles
		setContextStyles();

		if (window.channelLoad) channelLoad();
	}

	function pageUnload(evt)
	{
		// close child windows
		for (var i = 0; i < windows.length; i++)
		{
			if (typeof windows[i] == "object" && !windows[i].closed) windows[i].close();
		}

		if (window.channelUnload) channelUnload();
	}

	function mouseOver(evt)
	{
		obj = (evt.target) ? evt.target : evt.srcElement;
		if (obj.over) obj.src = obj.over.src;
		if (obj.tip) showTip(obj);
		if (obj.menu) showMenu(obj, evt);
	}

	function mouseOut(evt)
	{
		obj = (evt.target) ? evt.target : evt.srcElement;
		if (obj.out) obj.src = obj.out.src;
		if (obj.tip) hideTip(obj);
		if (obj.menu) delayHideMenu();
	}

	function mouseClick(evt)
	{
		if (isNS4)
		{
			clickURL = evt.target.href;
		}
		else if (isNS5)
		{
			node = evt.target;
			while (node.tagName != "A" && node.tagName != "HTML")
			{
				node = node.parentNode;
			}
			clickURL = node.href;
		}
		else if (isIE)
		{
			element = evt.srcElement;
			while (element.tagName != "A" && element.tagName != "HTML")
			{
				element = element.parentElement;
			}
			clickURL = element.href;
		}

		if (clickURL == null) clickURL = "";
	}

	function mouseMove(evt)
	{
		if (isNS)
		{
			mouseX = evt.pageX;
			mouseY = evt.pageY;
			pageWidth = window.innerWidth;
			pageHeight = window.innerHeight;
		}
		else
		{
			mouseX = evt.clientX;
			mouseY = evt.clientY;
			if (document.compatMode && document.compatMode == "CSS1Compat")
			{
				pageWidth = document.body.parentNode.clientWidth;
				pageHeight = document.body.parentNode.clientHeight;
			}
			else
			{
				pageWidth = document.body.clientWidth;
				pageHeight = document.body.clientHeight;
			}
		}
		
		if (tipVisible)
		{
			moveTip();
		}
	}

	function addMouseEvents(obj)
	{
		if (isNS5)
		{
			obj.addEventListener("mouseover", mouseOver, false);
			obj.addEventListener("mouseout", mouseOut, false);
		}
		if (isIE)
		{
			obj.detachEvent("onmouseover", mouseOver);
			obj.attachEvent("onmouseover", mouseOver);
			obj.detachEvent("onmouseout", mouseOut);
			obj.attachEvent("onmouseout", mouseOut);
		}
	}

// mouseovers; incompatible with NS4
	//
	// Usage:
	// <a href="LINK"><img src="IMAGE.EXT" onload="mouseLoad(this);" width="WIDTH" height="HEIGHT" title="ALT" /></a>
	// 
	// Note: mouseover image must be named IMAGE_over.EXT
	//
	function mouseLoad(obj)
	{
		if (isNS4 || obj.out) return;
		
		obj.out = new Image();
		obj.out.src = obj.src;
		obj.over = new Image();
		obj.over.src = obj.src.replace(/.gif$/, "_over.gif").replace(/.jpg$/, "_over.jpg");
		
		addMouseEvents(obj);
	}

// dropdown menu
	//
	// Usage:
	// <img src="IMAGE.EXT" onload="menuLoad(this, menuX, 'WIDTH', 'LEFT|RIGHT');" width="WIDTH" height="HEIGHT" title="ALT" />
	//
	// Note: create menu items in a separate JavaScript file
	//
	var menuObject;
	
	if (!isNS4) document.write('<div id="dropdownMenu" style="visibility: hidden; width: 0px;" onmouseover="clearHideMenu();" onmouseout="delayHideMenu();"></div>');

	function menuLoad(obj, menu, width, align)
	{
		if (isNS4 || obj.menu) return;

		obj.menu = menu;
		obj.menuWidth = width;
		obj.menuAlign = align;
		
		addMouseEvents(obj);
	}
	
	function showMenu(obj, evt)
	{
		if (isNS4 || ! obj.menu) return;

		if (window.event)
		{
			event.cancelBubble = true;
		}
		else if (evt.stopPropagation)
		{
			evt.stopPropagation();
		}
		clearHideMenu();
		menuObject = document.getElementById ? document.getElementById("dropdownMenu") : dropdownMenu;
		menuObject.innerHTML = obj.menu.join("");

		menuObject.widthObj = menuObject.style;
		menuObject.widthObj.width = obj.menuWidth + "px";
		if (evt.type == "click" && obj.visibility == hidden || evt.type == "mouseover")
		{
			menuObject.style.visibility = "visible";
		}
		else if (evt.type == "click")
		{
			menuObject.style.visibility = "hidden";
		}

		var horizontalOffset;
		var verticalOffset;
		if (obj.menuAlign == 'right')
		{
			horizontalOffset = obj.offsetLeft + obj.offsetWidth;
		}
		else
		{
			horizontalOffset = obj.offsetLeft;
		}
		verticalOffset = obj.offsetTop + obj.offsetHeight;
		var parentElement = obj.offsetParent;
		while (parentElement != null)
		{
			horizontalOffset = horizontalOffset + parentElement.offsetLeft;
			verticalOffset = verticalOffset + parentElement.offsetTop;
			parentElement = parentElement.offsetParent;
		}
		if (obj.menuAlign == 'right')
		{
			menuObject.x = horizontalOffset - obj.menuWidth;
		}
		else
		{
			menuObject.x = horizontalOffset;
		}
		menuObject.y = verticalOffset;
		menuObject.style.left = menuObject.x;
		menuObject.style.top = menuObject.y;
	}

	function delayHideMenu()
	{
		if (isNS4) return;

		menuTimeout = setTimeout("hideMenu()", menuDelay);
	}

	function hideMenu()
	{
		if (isNS4) return;

		if (typeof menuObject != "undefined")
		{
			menuObject.style.visibility = "hidden";
		}
	}

	function clearHideMenu()
	{
		if (typeof menuTimeout != "undefined") clearTimeout(menuTimeout);
	}

	document.onclick = hideMenu;

// help tips
	//
	// Usage:
	// <img src="IMAGE.EXT" onload="tipLoad(this, 'MESSAGE');" width="WIDTH" height="HEIGHT" title="ALT" />
	//
	var tipVisible = false;
	
	function tipLoad(obj, message)
	{
		if (isNS4 || obj.tip) return;
		
		obj.tip = message;

		addMouseEvents(obj);
	}
	
	function showTip(obj)
	{
		tipVisible = true;

		var tipDiv = document.getElementById('tip');
		if (!tipDiv)
		{
			tipDiv = document.createElement('div');
			tipDiv.setAttribute('id', 'tip');
			var pageDiv = document.getElementById('page');
			if (pageDiv) pageDiv.appendChild(tipDiv);
		}
		
		if (tipDiv)
		{
			tipDiv.innerHTML = obj.tip;
			
			moveTip();
	
			if (isNS4)
			{
				tipDiv.visibility = 'show';
			}
			else
			{
				tipDiv.style.visibility = 'visible';
			}
		}
	}

	function hideTip()
	{
		tipVisible = false;

		var tipDiv = document.getElementById('tip');
		if (tipDiv)
		{
			if (isNS4)
			{
				tipDiv.visibility = 'hide';
			}
			else
			{
				tipDiv.style.visibility = 'hidden';
			}
		}
	}
	
	function moveTip()
	{
		var tipDiv = document.getElementById('tip');		
		if (tipDiv)
		{
			var tipX = (((mouseX) > pageWidth) ? (pageWidth) : mouseX) + 10;
			var tipY = mouseY + 25;
			if (isNS4)
			{
				tipDiv.left = tipX;
				tipDiv.top = tipY;
			}
			else
			{
				tipDiv.style.left = tipX;
				tipDiv.style.top = tipY;
			}
		}
		
	}

// page tools
	//
	// email this page
	// Usage:
	// <a href="javascript:emailPage();">LINK</a>
	//
	function emailPage(url)
	{
		if (url != null)
		{
			windows[windows.length] = window.open(url);
		}
		else
		{			
			thisURL = emailURL.replace("%%title%%", escape(document.title)).replace("%%url%%", escape(pageURL));
			windows[windows.length] = window.open(thisURL, "emailWindow", "width=520,height=350,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=0");
		}
	}

	//
	// print this page
	// Usage:
	// <a href="javascript:printPage(ID);">LINK</a>
	//
	function printPage(id)
	{
		windows[windows.length] = window.open(printURL.replace("%%id%%", id), "printWindow", "width=600,height=400,toolbar=0,location=0,directories=0,status=0,menubar=1,scrollbars=1,resizable=1");
	}
	
	//
	// bookmark this page (compatible with IE only)
	// Usage:
	// <a href="javascript:bookmarkPage();">LINK</a>
	//
	function bookmarkPage()
	{
		if (isMac || isAOL)
		{
			alert("Sorry, this feature is not supported by your browser.");
			return;
		}

		if (!isNS)
		{
			window.external.AddFavorite(this.location.href, document.title);
		}
		else
		{
			alert("Click \"OK\", then type CTRL-D to add this page to your list of bookmarks.");
		}
	}
	
	//
	// set as homepage (compatible with IE only)
	// Usage:
	// <a href="javascript:setHomepage();">LINK</a>
	//
	function setHomepage()
	{
		if (!isIE || isAOL)
		{
			alert("Sorry, this feature is not supported by your browser.");
			return;
		}
	
		document.body.style.behavior = "url(#default#homePage)";
		document.body.setHomePage(pageURL);
	}

	//
	// find similar pages
	// Usage:
	// <a href="javascript:findSimilar();">LINK</a>
	//
	function findSimilar()
	{
		top.location.href = similarURL.replace("%%url%%", pageURL);
	}

	//
	// adjust font size (incompatible with NS4)
	// Usage:
	// <a href="javascript:fontSize(-1|+1);">LINK</a>
	//
	function fontSize(amt)
	{
		if (isNS4)
		{
			alert("Sorry, this feature is not supported by your browser.");
			return;
		}

		if (amt == 1)
		{
			
		}
		else if (amt == -1)
		{
			
		}
	}

	//
	// toggle highlighting (incompatible with NS4)
	// Usage:
	// <a href="javascript:toggleHighlight();">LINK</a>
	//
	function toggleHighlight()
	{
		if (isNS4)
		{
			alert("Sorry, this feature is not supported by your browser.");
			return;
		}

		var elementList = document.getElementsByTagName("*");
		for (i = 0; i < elementList.length; i++)
		{
			elementList[i].className = (elementList[i].className == "highlight") ? "highlight_disabled" : "highlight";
		}
		writeCookie("highlight", ((readCookie("highlight") != "false") ? "false" : "true"));
	}

// page load routines
	// set contextual styles (incompatible with NS4)
	function setContextStyles()
	{
		if (isNS4) return;

		var elementList = document.getElementsByTagName("*");
		for (i = 0; i < elementList.length; i++)
		{
			for (j = 0; j < contextStyles.length; j++)
			{
				if (elementList[i].className == contextStyles[j][0])
				{
					currentNode = elementList[i].firstChild;
					while (currentNode)
					{
						if (currentNode.className == contextStyles[j][1])
						{
							switch (contextStyles[j][2])
							{
								case "ital-off":
									currentNode.style.fontStyle = "normal";
									break;
								case "ital-on":
									currentNode.style.fontStyle = "italic";
									break;
								case "bold-off":
									currentNode.style.fontWeight = "normal";
									break;
								case "bold-on":
									currentNode.style.fontWeight = "bold";
									break;
								default:
									break;
							}
						}
						currentNode = currentNode.nextSibling;
					}
				}
			}
		}
	}

//Pop ups
	var win=null;
	function NewWindow(mypage,myname,w,h,scroll,pos){
	if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
	if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
	else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
	settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=yes,menubar=no,toolbar=no,resizable=no';
	win=window.open(mypage,myname,settings);}

<!-- Begin SLIDESHOW-POPUP SIZES AND OPTIONS CODE
function popUpSlideshow(URL) {
var slideshow_width = 550
var slideshow_height = 450
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width='+slideshow_width+',height='+slideshow_height+'');");
}
// End -->



/*

FREESTYLE MENUS v1.0 RC (c) 2001-2006 Angus Turnbull, http://www.twinhelix.com
Altering this notice or redistributing this file is prohibited.

*/

var isDOM=document.getElementById?1:0,isIE=document.all?1:0,isNS4=navigator.appName=='Netscape'&&!isDOM?1:0,isOp=self.opera?1:0,isDyn=isDOM||isIE||isNS4;function getRef(i,p){p=!p?document:p.navigator?p.document:p;return isIE?p.all[i]:isDOM?(p.getElementById?p:p.ownerDocument).getElementById(i):isNS4?p.layers[i]:null};function getSty(i,p){var r=getRef(i,p);return r?isNS4?r:r.style:null};if(!self.LayerObj)var LayerObj=new Function('i','p','this.ref=getRef(i,p);this.sty=getSty(i,p);return this');function getLyr(i,p){return new LayerObj(i,p)};function LyrFn(n,f){LayerObj.prototype[n]=new Function('var a=arguments,p=a[0],px=isNS4||isOp?0:"px";with(this){'+f+'}')};LyrFn('x','if(!isNaN(p))sty.left=p+px;else return parseInt(sty.left)');LyrFn('y','if(!isNaN(p))sty.top=p+px;else return parseInt(sty.top)');if(typeof addEvent!='function'){var addEvent=function(o,t,f,l){var d='addEventListener',n='on'+t,rO=o,rT=t,rF=f,rL=l;if(o[d]&&!l)return o[d](t,f,false);if(!o._evts)o._evts={};if(!o._evts[t]){o._evts[t]=o[n]?{b:o[n]}:{};o[n]=new Function('e','var r=true,o=this,a=o._evts["'+t+'"],i;for(i in a){o._f=a[i];r=o._f(e||window.event)!=false&&r;o._f=null}return r');if(t!='unload')addEvent(window,'unload',function(){removeEvent(rO,rT,rF,rL)})}if(!f._i)f._i=addEvent._i++;o._evts[t][f._i]=f};addEvent._i=1;var removeEvent=function(o,t,f,l){var d='removeEventListener';if(o[d]&&!l)return o[d](t,f,false);if(o._evts&&o._evts[t]&&f._i)delete o._evts[t][f._i]}}function FSMenu(myName,nested,cssProp,cssVis,cssHid){this.myName=myName;this.nested=nested;this.cssProp=cssProp;this.cssVis=cssVis;this.cssHid=cssHid;this.cssLitClass='highlighted';this.menus={root:new FSMenuNode('root',true,this)};this.menuToShow=[];this.mtsTimer=null;this.showDelay=0;this.switchDelay=125;this.hideDelay=500;this.showOnClick=0;this.hideOnClick=true;this.animInSpeed=0.2;this.animOutSpeed=0.2;this.animations=[]};FSMenu.prototype.show=function(mN){with(this){menuToShow.length=arguments.length;for(var i=0;i<arguments.length;i++)menuToShow[i]=arguments[i];clearTimeout(mtsTimer);if(!nested)mtsTimer=setTimeout(myName+'.menus.root.over()',10)}};FSMenu.prototype.hide=function(mN){with(this){clearTimeout(mtsTimer);if(menus[mN])menus[mN].out()}};FSMenu.prototype.hideAll=function(){with(this){for(var m in menus)if(menus[m].visible&&!menus[m].isRoot)menus[m].hide(true)}};function FSMenuNode(id,isRoot,obj){this.id=id;this.isRoot=isRoot;this.obj=obj;this.lyr=this.child=this.par=this.timer=this.visible=null;this.args=[];var node=this;this.over=function(evt){with(node)with(obj){if(isNS4&&evt&&lyr.ref)lyr.ref.routeEvent(evt);clearTimeout(timer);clearTimeout(mtsTimer);if(!isRoot&&!visible)node.show();if(menuToShow.length){var a=menuToShow,m=a[0];if(!menus[m]||!menus[m].lyr.ref)menus[m]=new FSMenuNode(m,false,obj);var c=menus[m];if(c==node){menuToShow.length=0;return}clearTimeout(c.timer);if(c!=child&&c.lyr.ref){c.args.length=a.length;for(var i=0;i<a.length;i++)c.args[i]=a[i];var delay=child?switchDelay:showDelay;c.timer=setTimeout('with('+myName+'){menus["'+c.id+'"].par=menus["'+node.id+'"];menus["'+c.id+'"].show()}',delay?delay:1)}menuToShow.length=0}if(!nested&&par)par.over()}};this.out=function(evt){with(node)with(obj){if(isNS4&&evt&&lyr&&lyr.ref)lyr.ref.routeEvent(evt);clearTimeout(timer);if(!isRoot&&hideDelay>=0){timer=setTimeout(myName+'.menus["'+id+'"].hide()',hideDelay);if(!nested&&par)par.out()}}};if(this.id!='root')with(this)with(lyr=getLyr(id))if(ref){if(isNS4)ref.captureEvents(Event.MOUSEOVER|Event.MOUSEOUT);addEvent(ref,'mouseover',this.over);addEvent(ref,'mouseout',this.out);if(obj.nested){addEvent(ref,'focus',this.over);addEvent(ref,'click',this.over);addEvent(ref,'blur',this.out)}}};FSMenuNode.prototype.show=function(forced){with(this)with(obj){if(!lyr||!lyr.ref)return;if(par){if(par.child&&par.child!=this)par.child.hide();par.child=this}var offR=args[1],offX=args[2],offY=args[3],lX=0,lY=0,doX=''+offX!='undefined',doY=''+offY!='undefined';if(self.page&&offR&&(doX||doY)){with(page.elmPos(offR,par.lyr?par.lyr.ref:0))lX=x,lY=y;if(doX)lyr.x(lX+eval(offX));if(doY)lyr.y(lY+eval(offY))}if(offR)lightParent(offR,1);visible=1;if(obj.onshow)obj.onshow(id);lyr.ref.parentNode.style.zIndex='2';setVis(1,forced)}};FSMenuNode.prototype.hide=function(forced){with(this)with(obj){if(!lyr||!lyr.ref||!visible)return;if(isNS4&&self.isMouseIn&&isMouseIn(lyr.ref))return show();if(args[1])lightParent(args[1],0);if(child)child.hide();if(par&&par.child==this)par.child=null;if(lyr){visible=0;if(obj.onhide)obj.onhide(id);lyr.ref.parentNode.style.zIndex='1';setVis(0,forced)}}};FSMenuNode.prototype.lightParent=function(elm,lit){with(this)with(obj){if(!cssLitClass||isNS4)return;if(lit)elm.className+=(elm.className?' ':'')+cssLitClass;else elm.className=elm.className.replace(new RegExp('(\\s*'+cssLitClass+')+$'),'')}};FSMenuNode.prototype.setVis=function(sh,forced){with(this)with(obj){if(lyr.forced&&!forced)return;lyr.forced=forced;lyr.timer=lyr.timer||0;lyr.counter=lyr.counter||0;with(lyr){clearTimeout(timer);if(sh&&!counter)sty[cssProp]=cssVis;var speed=sh?animInSpeed:animOutSpeed;if(isDOM&&speed<1)for(var a=0;a<animations.length;a++)animations[a](ref,counter,sh);counter+=speed*(sh?1:-1);if(counter>1){counter=1;lyr.forced=false}else if(counter<0){counter=0;sty[cssProp]=cssHid;lyr.forced=false}else if(isDOM){timer=setTimeout(myName+'.menus["'+id+'"].setVis('+sh+','+forced+')',50)}}}};FSMenu.animSwipeDown=function(ref,counter,show){if(show&&(counter==0)){ref._fsm_styT=ref.style.top;ref._fsm_styMT=ref.style.marginTop;ref._fsm_offT=ref.offsetTop||0}var cP=Math.pow(Math.sin(Math.PI*counter/2),0.75);var clipY=ref.offsetHeight*(1-cP);ref.style.clip=(counter==1?((window.opera||navigator.userAgent.indexOf('KHTML')>-1)?'':'rect(auto,auto,auto,auto)'):'rect('+clipY+'px,'+ref.offsetWidth+'px,'+ref.offsetHeight+'px,0)');if(counter==1||(counter<0.01&&!show)){ref.style.top=ref._fsm_styT;ref.style.marginTop=ref._fsm_styMT}else{ref.style.top=((0-clipY)+(ref._fsm_offT))+'px';ref.style.marginTop='0'}};FSMenu.animFade=function(ref,counter,show){var done=(counter==1);if(ref.filters){var alpha=!done?' alpha(opacity='+parseInt(counter*100)+')':'';if(ref.style.filter.indexOf("alpha")==-1)ref.style.filter+=alpha;else ref.style.filter=ref.style.filter.replace(/\s*alpha\([^\)]*\)/i,alpha)}else ref.style.opacity=ref.style.MozOpacity=counter/1.001};FSMenu.animClipDown=function(ref,counter,show){var cP=Math.pow(Math.sin(Math.PI*counter/2),0.75);ref.style.clip=(counter==1?((window.opera||navigator.userAgent.indexOf('KHTML')>-1)?'':'rect(auto,auto,auto,auto)'):'rect(0,'+ref.offsetWidth+'px,'+(ref.offsetHeight*cP)+'px,0)')};FSMenu.prototype.activateMenu=function(id,subInd){with(this){if(!isDOM||!document.documentElement)return;var fsmFB=getRef('fsmenu-fallback');if(fsmFB){fsmFB.rel='alternate stylesheet';fsmFB.disabled=true}var a,ul,li,parUL,mRoot=getRef(id),nodes,count=1;var lists=mRoot.getElementsByTagName('ul');for(var i=0;i<lists.length;i++){li=ul=lists[i];while(li){if(li.nodeName.toLowerCase()=='li')break;li=li.parentNode}if(!li)continue;parUL=li;while(parUL){if(parUL.nodeName.toLowerCase()=='ul')break;parUL=parUL.parentNode}a=null;for(var j=0;j<li.childNodes.length;j++)if(li.childNodes[j].nodeName.toLowerCase()=='a')a=li.childNodes[j];if(!a)continue;var menuID=myName+'-id-'+count++;if(ul.id)menuID=ul.id;else ul.setAttribute('id',menuID);var sOC=(showOnClick==1&&li.parentNode==mRoot)||(showOnClick==2);var evtProp=navigator.userAgent.indexOf('Safari')>-1||isOp?'safRtnVal':'returnValue';var eShow=new Function('with('+myName+'){var m=menus["'+menuID+'"],pM=menus["'+parUL.id+'"];'+(sOC?'if((pM&&pM.child)||(m&&m.visible))':'')+' show("'+menuID+'",this)}');var eHide=new Function('e','if(e.'+evtProp+'!=false)'+myName+'.hide("'+menuID+'")');addEvent(a,'mouseover',eShow);addEvent(a,'focus',eShow);addEvent(a,'mouseout',eHide);addEvent(a,'blur',eHide);if(sOC)addEvent(a,'click',new Function('e',myName+'.show("'+menuID+'",this);if(e.cancelable&&e.preventDefault)e.preventDefault();e.'+evtProp+'=false;return false'));if(subInd)a.insertBefore(subInd.cloneNode(true),a.firstChild)}if(isIE&&!isOp){var aNodes=mRoot.getElementsByTagName('a');for(var i=0;i<aNodes.length;i++){addEvent(aNodes[i],'focus',new Function('e','var node=this.parentNode;while(node){if(node.onfocus)node.onfocus(e);node=node.parentNode}'));addEvent(aNodes[i],'blur',new Function('e','var node=this.parentNode;while(node){if(node.onblur)node.onblur(e);node=node.parentNode}'))}}if(hideOnClick)addEvent(mRoot,'click',new Function(myName+'.hideAll()'));menus[id]=new FSMenuNode(id,true,this)}};var page={win:self,minW:0,minH:0,MS:isIE&&!isOp,db:document.compatMode&&document.compatMode.indexOf('CSS')>-1?'documentElement':'body'};page.elmPos=function(e,p){var x=0,y=0,w=p?p:this.win;e=e?(e.substr?(isNS4?w.document.anchors[e]:getRef(e,w)):e):p;if(isNS4){if(e&&(e!=p)){x=e.x;y=e.y};if(p){x+=p.pageX;y+=p.pageY}}if(e&&this.MS&&navigator.platform.indexOf('Mac')>-1&&e.tagName=='A'){e.onfocus=new Function('with(event){self.tmpX=clientX-offsetX;self.tmpY=clientY-offsetY}');e.focus();x=tmpX;y=tmpY;e.blur()}else while(e){x+=e.offsetLeft;y+=e.offsetTop;e=e.offsetParent}return{x:x,y:y}};if(isNS4){var fsmMouseX,fsmMouseY,fsmOR=self.onresize,nsWinW=innerWidth,nsWinH=innerHeight;document.fsmMM=document.onmousemove;self.onresize=function(){if(fsmOR)fsmOR();if(nsWinW!=innerWidth||nsWinH!=innerHeight)location.reload()};document.captureEvents(Event.MOUSEMOVE);document.onmousemove=function(e){fsmMouseX=e.pageX;fsmMouseY=e.pageY;return document.fsmMM?document.fsmMM(e):document.routeEvent(e)};function isMouseIn(sty){with(sty)return((fsmMouseX>left)&&(fsmMouseX<left+clip.width)&&(fsmMouseY>top)&&(fsmMouseY<top+clip.height))}}

// End--!>


// BANNER OBJECT
function Banner(objName){
	this.obj = objName;
	this.aNodes = [];
	this.currentBanner = 0;
	
};

// ADD NEW BANNER
Banner.prototype.add = function(bannerType, bannerPath, bannerDuration, height, width, hyperlink) {
	this.aNodes[this.aNodes.length] = new Node(this.obj +"_"+ this.aNodes.length, bannerType, bannerPath, bannerDuration, height, width, hyperlink);
};

// Node object
function Node(name, bannerType, bannerPath, bannerDuration, height, width, hyperlink) {
	this.name = name;
	this.bannerType = bannerType;
	this.bannerPath = bannerPath;
	this.bannerDuration = bannerDuration;
	this.height = height
	this.width = width;
	this.hyperlink= hyperlink;
//	alert (name +"|" + bannerType +"|" + bannerPath +"|" + bannerDuration +"|" + height +"|" + width + "|" + hyperlink);
};

// Outputs the banner to the page
Banner.prototype.toString = function() {
	var str = ""
	for (var iCtr=0; iCtr < this.aNodes.length; iCtr++){
		str = str + '<span name="'+this.aNodes[iCtr].name+'" '
		str = str + 'id="'+this.aNodes[iCtr].name+'" ';
		str = str + 'class="m_banner_hide" ';
		str = str + 'bgcolor="#FFFCDA" ';	// CHANGE BANNER COLOR HERE
		str = str + 'align="center" ';
		str = str + 'valign="top" >\n';
		if (this.aNodes[iCtr].hyperlink != ""){
			str = str + '<a href="'+this.aNodes[iCtr].hyperlink+'">';
		}
			
		if ( this.aNodes[iCtr].bannerType == "FLASH" ){
			str = str + '<OBJECT '
			str = str + 'classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" '
			str = str + 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" '
			str = str + 'WIDTH="'+this.aNodes[iCtr].width+'" '
			str = str + 'HEIGHT="'+this.aNodes[iCtr].height+'" '
			str = str + 'id="bnr_'+this.aNodes[iCtr].name+'" '
			str = str + 'ALIGN="" '
			str = str + 'VIEWASTEXT>'
			str = str + '<PARAM NAME=movie VALUE="'+ this.aNodes[iCtr].bannerPath + '">'
			str = str + '<PARAM NAME=quality VALUE=high>'
			str = str + '<PARAM NAME=bgcolor VALUE=#FFFCDA>'
			str = str + '<EMBED ';
			str = str + 'src="'+this.aNodes[iCtr].bannerPath+'" '
			str = str + 'quality=high '
//			str = str + 'bgcolor=#FFFCDA '
			str = str + 'WIDTH="'+this.aNodes[iCtr].width+'" '
			str = str + 'HEIGHT="'+this.aNodes[iCtr].height+'" '
			str = str + 'NAME="bnr_'+this.aNodes[iCtr].name+'" '
			str = str + 'ALIGN="center" '
			str = str + 'TYPE="application/x-shockwave-flash" '
			str = str + 'PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">'
			str = str + '</EMBED>'
			str = str + '</OBJECT>'
		}else if ( this.aNodes[iCtr].bannerType == "IMAGE" ){
			str = str + '<img src="'+this.aNodes[iCtr].bannerPath+'" ';
			str = str + 'border="0" ';
			str = str + 'height="'+this.aNodes[iCtr].height+'" ';
			str = str + 'width="'+this.aNodes[iCtr].width+'">';
		}

		if (this.aNodes[iCtr].hyperlink != ""){
			str = str + '</a>';
		}

		str += '</span>';
	}
	return str;
};

// START THE BANNER ROTATION
Banner.prototype.start = function(){
	this.changeBanner();
	var thisBannerObj = this.obj;
	// CURRENT BANNER IS ALREADY INCREMENTED IN cahngeBanner() FUNCTION
	setTimeout(thisBannerObj+".start()", this.aNodes[this.currentBanner].bannerDuration * 1000);
}

// CHANGE BANNER
Banner.prototype.changeBanner = function(){
	var thisBanner;
	var prevBanner = -1;
	if (this.currentBanner < this.aNodes.length ){
		thisBanner = this.currentBanner;
		if (this.aNodes.length > 1){
			if ( thisBanner > 0 ){
				prevBanner = thisBanner - 1;
			}else{
				prevBanner = this.aNodes.length-1;
			}
		}
		if (this.currentBanner < this.aNodes.length - 1){
			this.currentBanner = this.currentBanner + 1;
		}else{
			this.currentBanner = 0;
		}
	}
	

	if (prevBanner >= 0){
		document.getElementById(this.aNodes[prevBanner].name).className = "m_banner_hide";
	}
	document.getElementById(this.aNodes[thisBanner].name).className = "m_banner_show";
}


//End -->


// Billboard

//List of transitional effects to be randomly applied to billboard:
var billboardeffects=["GradientWipe(GradientSize=1.0 Duration=0.7)", "Inset", "Iris", "Pixelate(MaxSquare=5 enabled=false)", "RadialWipe", "RandomBars", "Slide(slideStyle='push')", "Spiral", "Stretch", "Strips", "Wheel", "ZigZag"]

//var billboardeffects=["Iris"] //Uncomment this line and input one of the effects above (ie: "Iris") for single effect.

var tickspeed=5000 //ticker speed in miliseconds (2000=2 seconds)
var effectduration=500 //Transitional effect duration in miliseconds
var hidecontent_from_legacy=1 //Should content be hidden in legacy browsers- IE4/NS4 (0=no, 1=yes).

var filterid=Math.floor(Math.random()*billboardeffects.length)

document.write('<style type="text/css">\n')
if (document.getElementById)
document.write('.billcontent{display:none;\n'+'filter:progid:DXImageTransform.Microsoft.'+billboardeffects[filterid]+'}\n')
else if (hidecontent_from_legacy)
document.write('#contentwrapper{display:none;}')
document.write('</style>\n')

var selectedDiv=0
var totalDivs=0

function contractboard(){
var inc=0
while (document.getElementById("billboard"+inc)){
document.getElementById("billboard"+inc).style.display="none"
inc++
}
}

function expandboard(){
var selectedDivObj=document.getElementById("billboard"+selectedDiv)
contractboard()
if (selectedDivObj.filters){
if (billboardeffects.length>1){
filterid=Math.floor(Math.random()*billboardeffects.length)
selectedDivObj.style.filter="progid:DXImageTransform.Microsoft."+billboardeffects[filterid]
}
selectedDivObj.filters[0].duration=effectduration/1000
selectedDivObj.filters[0].Apply()
}
selectedDivObj.style.display="block"
if (selectedDivObj.filters)
selectedDivObj.filters[0].Play()
selectedDiv=(selectedDiv<totalDivs-1)? selectedDiv+1 : 0
setTimeout("expandboard()",tickspeed)
}

function startbill(){
while (document.getElementById("billboard"+totalDivs)!=null)
totalDivs++
if (document.getElementById("billboard0").filters)
tickspeed+=effectduration
expandboard()
}

if (window.addEventListener)
window.addEventListener("load", startbill, false)
else if (window.attachEvent)
window.attachEvent("onload", startbill)
else if (document.getElementById)
window.onload=startbill

//End -->