/**
 * mm_menu 20MAR2002 Version 6.0
 * Andy Finnell, March 2002
 * Copyright (c) 2000-2002 Macromedia, Inc.
 *
 * based on menu.js
 * by gary smith, July 1997
 * Copyright (c) 1997-1999 Netscape Communications Corp.
 *
 * Netscape grants you a royalty free license to use or modify this
 * software provided that this copyright notice appears on all copies.
 * This software is provided "AS IS," without a warranty of any kind.
 */
function mmLoadMenus() {
	if (window.mm_menu_0326155020_0) return;

	window.mm_menu_0326155020_0_1 = new Menu("KOTC",100,22,"Times New Roman, Times, serif",12,"#ffffff","#ffff00","#666666","#666666","left","middle",5,0,100,-5,7,true,true,true,5,false,true);
	mm_menu_0326155020_0_1.addMenuItem("Format","location='/format.asp'");
	mm_menu_0326155020_0_1.addMenuItem("Schedule","location='/schedule-kotc.asp'");
	mm_menu_0326155020_0_1.addMenuItem("Registration","location='/registration.asp?type=KOTC'");
	mm_menu_0326155020_0_1.addMenuItem("Results","location='/2004/'");
	mm_menu_0326155020_0_1.fontWeight="bold";
	mm_menu_0326155020_0_1.hideOnMouseOut=true;
	mm_menu_0326155020_0_1.menuBorder=1;
	mm_menu_0326155020_0_1.menuLiteBgColor='#ffffff';
	mm_menu_0326155020_0_1.menuBorderBgColor='#333333';
	mm_menu_0326155020_0_1.bgColor='#555555';

	window.mm_menu_0326155020_0_2 = new Menu("WindFest",100,22,"Times New Roman, Times, serif",12,"#ffffff","#ffff00","#666666","#666666","left","middle",5,0,100,-5,7,true,true,true,5,false,true);
	mm_menu_0326155020_0_2.addMenuItem("Overview","location='/windfest.asp'");
	mm_menu_0326155020_0_2.addMenuItem("Schedule","location='/schedule-wf.asp'");
	mm_menu_0326155020_0_2.addMenuItem("Registration","location='/registration.asp?type=WINDFEST'");
	mm_menu_0326155020_0_2.fontWeight="bold";
	mm_menu_0326155020_0_2.hideOnMouseOut=true;
	mm_menu_0326155020_0_2.menuBorder=1;
	mm_menu_0326155020_0_2.menuLiteBgColor='#ffffff';
	mm_menu_0326155020_0_2.menuBorderBgColor='#333333';
	mm_menu_0326155020_0_2.bgColor='#555555';

	window.mm_menu_0326155020_0_3 = new Menu("Kids&nbsp;Camp",100,22,"Times New Roman, Times, serif",12,"#ffffff","#ffff00","#666666","#666666","left","middle",5,0,100,-5,7,true,true,true,5,false,true);
	mm_menu_0326155020_0_3.addMenuItem("Overview","location='/kidscamp.asp'");
	mm_menu_0326155020_0_3.addMenuItem("Volunteers","location='/kidscamp2.asp'");
	mm_menu_0326155020_0_3.addMenuItem("Schedule","location='/schedule-kk.asp'");
	mm_menu_0326155020_0_3.addMenuItem("Registration","location='registration.asp?type=KIDSCAMP'");
	mm_menu_0326155020_0_3.fontWeight="bold";
	mm_menu_0326155020_0_3.hideOnMouseOut=true;
	mm_menu_0326155020_0_3.menuBorder=1;
	mm_menu_0326155020_0_3.menuLiteBgColor='#ffffff';
	mm_menu_0326155020_0_3.menuBorderBgColor='#333333';
	mm_menu_0326155020_0_3.bgColor='#555555';

	window.mm_menu_0326155020_0 = new Menu("root",100,22,"Times New Roman, Times, serif",12,"#ffffff","#ffff00","#666666","#666666","left","middle",5,0,100,-5,7,true,true,true,5,false,true);
	mm_menu_0326155020_0.addMenuItem(mm_menu_0326155020_0_1);
	mm_menu_0326155020_0.addMenuItem(mm_menu_0326155020_0_2);
	mm_menu_0326155020_0.addMenuItem(mm_menu_0326155020_0_3);
	mm_menu_0326155020_0.addMenuItem("Directions","location='/directions.asp'");
	mm_menu_0326155020_0.addMenuItem("Lodging","location='/lodging.asp'");
	mm_menu_0326155020_0.fontWeight="bold";
	mm_menu_0326155020_0.childMenuIcon="/images/arrows.gif";
	mm_menu_0326155020_0.hideOnMouseOut=true;
	mm_menu_0326155020_0.menuBorder=1;
	mm_menu_0326155020_0.menuLiteBgColor='#ffffff';
	mm_menu_0326155020_0.menuBorderBgColor='#333333';
	mm_menu_0326155020_0.bgColor='#555555';

	window.mm_menu_0326155600_1_6 = new Menu("2004&nbsp;Event",100,22,"Times New Roman, Times, serif",12,"#ffffff","#ffff00","#666666","#666666","left","middle",5,0,100,-5,7,true,true,true,5,false,true);
	mm_menu_0326155600_1_6.addMenuItem("Results","location='/2004/'");
	mm_menu_0326155600_1_6.addMenuItem("Photos","location='/2004/photos.asp'");
	mm_menu_0326155600_1_6.fontWeight="bold";
	mm_menu_0326155600_1_6.hideOnMouseOut=true;
	mm_menu_0326155600_1_6.menuBorder=1;
	mm_menu_0326155600_1_6.menuLiteBgColor='#ffffff';
	mm_menu_0326155600_1_6.menuBorderBgColor='#333333';
	mm_menu_0326155600_1_6.bgColor='#555555';

	window.mm_menu_0326155600_1_1 = new Menu("2003&nbsp;Event",100,22,"Times New Roman, Times, serif",12,"#ffffff","#ffff00","#666666","#666666","left","middle",5,0,100,-5,7,true,true,true,5,false,true);
	mm_menu_0326155600_1_1.addMenuItem("Results","location='/2003/'");
	mm_menu_0326155600_1_1.addMenuItem("Photos","location='/2003/photos.asp'");
	mm_menu_0326155600_1_1.fontWeight="bold";
	mm_menu_0326155600_1_1.hideOnMouseOut=true;
	mm_menu_0326155600_1_1.menuBorder=1;
	mm_menu_0326155600_1_1.menuLiteBgColor='#ffffff';
	mm_menu_0326155600_1_1.menuBorderBgColor='#333333';
	mm_menu_0326155600_1_1.bgColor='#555555';

	window.mm_menu_0326155600_1_2 = new Menu("2002&nbsp;Event",100,22,"Times New Roman, Times, serif",12,"#ffffff","#ffff00","#666666","#666666","left","middle",5,0,100,-5,7,true,true,true,5,false,true);
	mm_menu_0326155600_1_2.addMenuItem("Results","location='/2002/'");
	mm_menu_0326155600_1_2.addMenuItem("Photos","location='/2002/photos.asp'");
	mm_menu_0326155600_1_2.addMenuItem("Video","location='/2002/video/'");
	mm_menu_0326155600_1_2.fontWeight="bold";
	mm_menu_0326155600_1_2.hideOnMouseOut=true;
	mm_menu_0326155600_1_2.menuBorder=1;
	mm_menu_0326155600_1_2.menuLiteBgColor='#ffffff';
	mm_menu_0326155600_1_2.menuBorderBgColor='#333333';
	mm_menu_0326155600_1_2.bgColor='#555555';

	window.mm_menu_0326155600_1_3 = new Menu("2001&nbsp;Event",100,22,"Times New Roman, Times, serif",12,"#ffffff","#ffff00","#666666","#666666","left","middle",5,0,100,-5,7,true,true,true,5,false,true);
	mm_menu_0326155600_1_3.addMenuItem("Results","location='/2001/'");
	mm_menu_0326155600_1_3.addMenuItem("Photos","location='/2001/photos.asp'");
	mm_menu_0326155600_1_3.fontWeight="bold";
	mm_menu_0326155600_1_3.hideOnMouseOut=true;
	mm_menu_0326155600_1_3.menuBorder=1;
	mm_menu_0326155600_1_3.menuLiteBgColor='#ffffff';
	mm_menu_0326155600_1_3.menuBorderBgColor='#333333';
	mm_menu_0326155600_1_3.bgColor='#555555';

	window.mm_menu_0326155600_1_4 = new Menu("2000&nbsp;Event",100,22,"Times New Roman, Times, serif",12,"#ffffff","#ffff00","#666666","#666666","left","middle",5,0,100,-5,7,true,true,true,5,false,true);
	mm_menu_0326155600_1_4.addMenuItem("Results","location='/2000/'");
	mm_menu_0326155600_1_4.addMenuItem("Photos","location='/2000/photos.asp'");
	mm_menu_0326155600_1_4.fontWeight="bold";
	mm_menu_0326155600_1_4.hideOnMouseOut=true;
	mm_menu_0326155600_1_4.menuBorder=1;
	mm_menu_0326155600_1_4.menuLiteBgColor='#ffffff';
	mm_menu_0326155600_1_4.menuBorderBgColor='#333333';
	mm_menu_0326155600_1_4.bgColor='#555555';

	window.mm_menu_0326155600_1_5 = new Menu("1999&nbsp;Event",100,22,"Times New Roman, Times, serif",12,"#ffffff","#ffff00","#666666","#666666","left","middle",5,0,100,-5,7,true,true,true,5,false,true);
	mm_menu_0326155600_1_5.addMenuItem("Results","location='/1999/'");
	mm_menu_0326155600_1_5.addMenuItem("Photos","location='/1999/photos.asp'");
	mm_menu_0326155600_1_5.addMenuItem("Video","location='/1999/video/'");
	mm_menu_0326155600_1_5.fontWeight="bold";
	mm_menu_0326155600_1_5.hideOnMouseOut=true;
	mm_menu_0326155600_1_5.menuBorder=1;
	mm_menu_0326155600_1_5.menuLiteBgColor='#ffffff';
	mm_menu_0326155600_1_5.menuBorderBgColor='#333333';
	mm_menu_0326155600_1_5.bgColor='#555555';

	window.mm_menu_0326155600_1 = new Menu("root",100,22,"Times New Roman, Times, serif",12,"#ffffff","#ffff00","#666666","#666666","left","middle",5,0,100,-5,7,true,true,true,5,false,true);
	mm_menu_0326155600_1.addMenuItem(mm_menu_0326155600_1_6);
	mm_menu_0326155600_1.addMenuItem(mm_menu_0326155600_1_1);
	mm_menu_0326155600_1.addMenuItem(mm_menu_0326155600_1_2);
	mm_menu_0326155600_1.addMenuItem(mm_menu_0326155600_1_3);
	mm_menu_0326155600_1.addMenuItem(mm_menu_0326155600_1_4);
	mm_menu_0326155600_1.addMenuItem(mm_menu_0326155600_1_5);
	mm_menu_0326155600_1.fontWeight="bold";
	mm_menu_0326155600_1.hideOnMouseOut=true;
	mm_menu_0326155600_1.childMenuIcon="/images/arrows.gif";
	mm_menu_0326155600_1.menuBorder=1;
	mm_menu_0326155600_1.menuLiteBgColor='#ffffff';
	mm_menu_0326155600_1.menuBorderBgColor='#333333';
	mm_menu_0326155600_1.bgColor='#555555';
	
	mm_menu_0326155600_1.writeMenus();
} // mmLoadMenus()

function Menu(label, mw, mh, fnt, fs, fclr, fhclr, bg, bgh, halgn, valgn, pad, space, to, sx, sy, srel, opq, vert, idt, aw, ah) 
{
	this.version = "020320 [Menu; mm_menu.js]";
	this.type = "Menu";
	this.menuWidth = mw;
	this.menuItemHeight = mh;
	this.fontSize = fs;
	this.fontWeight = "plain";
	this.fontFamily = fnt;
	this.fontColor = fclr;
	this.fontColorHilite = fhclr;
	this.bgColor = "#555555";
	this.menuBorder = 1;
	this.menuBgOpaque=opq;
	this.menuItemBorder = 1;
	this.menuItemIndent = idt;
	this.menuItemBgColor = bg;
	this.menuItemVAlign = valgn;
	this.menuItemHAlign = halgn;
	this.menuItemPadding = pad;
	this.menuItemSpacing = space;
	this.menuLiteBgColor = "#ffffff";
	this.menuBorderBgColor = "#777777";
	this.menuHiliteBgColor = bgh;
	this.menuContainerBgColor = "#cccccc";
	this.childMenuIcon = "arrows.gif";
	this.submenuXOffset = sx;
	this.submenuYOffset = sy;
	this.submenuRelativeToItem = srel;
	this.vertical = vert;
	this.items = new Array();
	this.actions = new Array();
	this.childMenus = new Array();
	this.hideOnMouseOut = true;
	this.hideTimeout = to;
	this.addMenuItem = addMenuItem;
	this.writeMenus = writeMenus;
	this.MM_showMenu = MM_showMenu;
	this.onMenuItemOver = onMenuItemOver;
	this.onMenuItemAction = onMenuItemAction;
	this.hideMenu = hideMenu;
	this.hideChildMenu = hideChildMenu;
	if (!window.menus) window.menus = new Array();
	this.label = " " + label;
	window.menus[this.label] = this;
	window.menus[window.menus.length] = this;
	if (!window.activeMenus) window.activeMenus = new Array();
}

function addMenuItem(label, action) {
	this.items[this.items.length] = label;
	this.actions[this.actions.length] = action;
}

function FIND(item) {
	if( window.mmIsOpera ) return(document.getElementById(item));
	if (document.all) return(document.all[item]);
	if (document.getElementById) return(document.getElementById(item));
	return(false);
}

function writeMenus(container) {
	if (window.triedToWriteMenus) return;
	var agt = navigator.userAgent.toLowerCase();
	window.mmIsOpera = agt.indexOf("opera") != -1;
	if (!container && document.layers) {
		window.delayWriteMenus = this.writeMenus;
		var timer = setTimeout('delayWriteMenus()', 500);
		container = new Layer(100);
		clearTimeout(timer);
	} else if (document.all || document.hasChildNodes || window.mmIsOpera) {
		document.writeln('<span id="menuContainer"></span>');
		container = FIND("menuContainer");
	}

	window.mmHideMenuTimer = null;
	if (!container) return;	
	window.triedToWriteMenus = true; 
	container.isContainer = true;
	container.menus = new Array();
	for (var i=0; i<window.menus.length; i++) 
		container.menus[i] = window.menus[i];
	window.menus.length = 0;
	var countMenus = 0;
	var countItems = 0;
	var top = 0;
	var content = '';
	var lrs = false;
	var theStat = "";
	var tsc = 0;
	if (document.layers) lrs = true;
	for (var i=0; i<container.menus.length; i++, countMenus++) {
		var menu = container.menus[i];
		if (menu.bgImageUp || !menu.menuBgOpaque) {
			menu.menuBorder = 0;
			menu.menuItemBorder = 0;
		}
		if (lrs) {
			var menuLayer = new Layer(100, container);
			var lite = new Layer(100, menuLayer);
			lite.top = menu.menuBorder;
			lite.left = menu.menuBorder;
			var body = new Layer(100, lite);
			body.top = menu.menuBorder;
			body.left = menu.menuBorder;
		} else {
			content += ''+
			'<div id="menuLayer'+ countMenus +'" style="position:absolute;z-index:1;left:10px;top:'+ (i * 100) +'px;visibility:hidden;color:' +  menu.menuBorderBgColor + ';">\n'+
			'  <div id="menuLite'+ countMenus +'" style="position:absolute;z-index:1;left:'+ menu.menuBorder +'px;top:'+ menu.menuBorder +'px;visibility:hide;" onmouseout="mouseoutMenu();">\n'+
			'	 <div id="menuFg'+ countMenus +'" style="position:absolute;left:'+ menu.menuBorder +'px;top:'+ menu.menuBorder +'px;visibility:hide;">\n'+
			'';
		}
		var x=i;
		for (var i=0; i<menu.items.length; i++) {
			var item = menu.items[i];
			var childMenu = false;
			var defaultHeight = menu.fontSize+2*menu.menuItemPadding;
			if (item.label) {
				item = item.label;
				childMenu = true;
			}
			menu.menuItemHeight = menu.menuItemHeight || defaultHeight;
			var itemProps = '';
			if( menu.fontFamily != '' ) itemProps += 'font-family:' + menu.fontFamily +';';
			itemProps += 'font-weight:' + menu.fontWeight + ';fontSize:' + menu.fontSize + 'px;';
			if (menu.fontStyle) itemProps += 'font-style:' + menu.fontStyle + ';';
			if (document.all || window.mmIsOpera) 
				itemProps += 'font-size:' + menu.fontSize + 'px;" onmouseover="onMenuItemOver(null,this);" onclick="onMenuItemAction(null,this);';
			else if (!document.layers) {
				itemProps += 'font-size:' + menu.fontSize + 'px;';
			}
			var l;
			if (lrs) {
				var lw = menu.menuWidth;
				if( menu.menuItemHAlign == 'right' ) lw -= menu.menuItemPadding;
				l = new Layer(lw,body);
			}
			var itemLeft = 0;
			var itemTop = i*menu.menuItemHeight;
			if( !menu.vertical ) {
				itemLeft = i*menu.menuWidth;
				itemTop = 0;
			}
			var dTag = '<div id="menuItem'+ countItems +'" style="position:absolute;left:' + itemLeft + 'px;top:'+ itemTop +'px;'+ itemProps +'">';
			var dClose = '</div>'
			if (menu.bgImageUp) dTag = '<div id="menuItem'+ countItems +'" style="background:url('+menu.bgImageUp+');position:absolute;left:' + itemLeft + 'px;top:'+ itemTop +'px;'+ itemProps +'">';

			var left = 0, top = 0, right = 0, bottom = 0;
			left = 1 + menu.menuItemPadding + menu.menuItemIndent;
			right = left + menu.menuWidth - 2*menu.menuItemPadding - menu.menuItemIndent;
			if( menu.menuItemVAlign == 'top' ) top = menu.menuItemPadding;
			if( menu.menuItemVAlign == 'bottom' ) top = menu.menuItemHeight-menu.fontSize-1-menu.menuItemPadding;
			if( menu.menuItemVAlign == 'middle' ) top = ((menu.menuItemHeight/2)-(menu.fontSize/2)-1);
			bottom = menu.menuItemHeight - 2*menu.menuItemPadding;
			var textProps = 'position:absolute;left:' + left + 'px;top:' + top + 'px;';
			if (lrs) {
				textProps +=itemProps + 'right:' + right + ';bottom:' + bottom + ';';
				dTag = "";
				dClose = "";
			}
			
			if(document.all && !window.mmIsOpera) {
				item = '<div align="' + menu.menuItemHAlign + '">' + item + '</div>';
			} else if (lrs) {
				item = '<div style="text-align:' + menu.menuItemHAlign + ';">' + item + '</div>';
			} else {
				var hitem = null;
				if( menu.menuItemHAlign != 'left' ) {
					if(window.mmIsOpera) {
						var operaWidth = menu.menuItemHAlign == 'center' ? -(menu.menuWidth-2*menu.menuItemPadding) : (menu.menuWidth-6*menu.menuItemPadding);
						hitem = '<div id="menuItemHilite' + countItems + 'Shim" style="position:absolute;top:1px;left:' + menu.menuItemPadding + 'px;width:' + operaWidth + 'px;text-align:' 
							+ menu.menuItemHAlign + ';visibility:visible;">' + item + '</div>';
						item = '<div id="menuItemText' + countItems + 'Shim" style="position:absolute;top:1px;left:' + menu.menuItemPadding + 'px;width:' + operaWidth + 'px;text-align:' 
							+ menu.menuItemHAlign + ';visibility:visible;">' + item + '</div>';
					} else {
						hitem = '<div id="menuItemHilite' + countItems + 'Shim" style="position:absolute;top:1px;left:1px;right:-' + (left+menu.menuWidth-3*menu.menuItemPadding) + 'px;text-align:' 
							+ menu.menuItemHAlign + ';visibility:visible;">' + item + '</div>';
						item = '<div id="menuItemText' + countItems + 'Shim" style="position:absolute;top:1px;left:1px;right:-' + (left+menu.menuWidth-3*menu.menuItemPadding) + 'px;text-align:' 
							+ menu.menuItemHAlign + ';visibility:visible;">' + item + '</div>';
					}
				} else hitem = null;
			}
			if(document.all && !window.mmIsOpera) item = '<div id="menuItemShim' + countItems + '" style="position:absolute;left:0px;top:0px;">' + item + '</div>';
			var dText	= '<div id="menuItemText'+ countItems +'" style="' + textProps + 'color:'+ menu.fontColor +';">'+ item +'&nbsp</div>\n'
						+ '<div id="menuItemHilite'+ countItems +'" style="' + textProps + 'color:'+ menu.fontColorHilite +';visibility:hidden;">' 
						+ (hitem||item) +'&nbsp</div>';
			if (childMenu) content += ( dTag + dText + '<div id="childMenu'+ countItems +'" style="position:absolute;left:0px;top:3px;"><img src="'+ menu.childMenuIcon +'"></div>\n' + dClose);
			else content += ( dTag + dText + dClose);
			if (lrs) {
				l.document.open("text/html");
				l.document.writeln(content);
				l.document.close();	
				content = '';
				theStat += "-";
				tsc++;
				if (tsc > 50) {
					tsc = 0;
					theStat = "";
				}
				status = theStat;
			}
			countItems++;  
		}
		if (lrs) {
			var focusItem = new Layer(100, body);
			focusItem.visiblity="hidden";
			focusItem.document.open("text/html");
			focusItem.document.writeln("&nbsp;");
			focusItem.document.close();	
		} else {
		  content += '	  <div id="focusItem'+ countMenus +'" style="position:absolute;left:0px;top:0px;visibility:hide;" onclick="onMenuItemAction(null,this);">&nbsp;</div>\n';
		  content += '   </div>\n  </div>\n</div>\n';
		}
		i=x;
	}
	if (document.layers) {		
		container.clip.width = window.innerWidth;
		container.clip.height = window.innerHeight;
		container.onmouseout = mouseoutMenu;
		container.menuContainerBgColor = this.menuContainerBgColor;
		for (var i=0; i<container.document.layers.length; i++) {
			proto = container.menus[i];
			var menu = container.document.layers[i];
			container.menus[i].menuLayer = menu;
			container.menus[i].menuLayer.Menu = container.menus[i];
			container.menus[i].menuLayer.Menu.container = container;
			var body = menu.document.layers[0].document.layers[0];
			body.clip.width = proto.menuWidth || body.clip.width;
			body.clip.height = proto.menuHeight || body.clip.height;
			for (var n=0; n<body.document.layers.length-1; n++) {
				var l = body.document.layers[n];
				l.Menu = container.menus[i];
				l.menuHiliteBgColor = proto.menuHiliteBgColor;
				l.document.bgColor = proto.menuItemBgColor;
				l.saveColor = proto.menuItemBgColor;
				l.onmouseover = proto.onMenuItemOver;
				l.onclick = proto.onMenuItemAction;
				l.mmaction = container.menus[i].actions[n];
				l.focusItem = body.document.layers[body.document.layers.length-1];
				l.clip.width = proto.menuWidth || body.clip.width;
				l.clip.height = proto.menuItemHeight || l.clip.height;
				if (n>0) {
					if( l.Menu.vertical ) l.top = body.document.layers[n-1].top + body.document.layers[n-1].clip.height + proto.menuItemBorder + proto.menuItemSpacing;
					else l.left = body.document.layers[n-1].left + body.document.layers[n-1].clip.width + proto.menuItemBorder + proto.menuItemSpacing;
				}
				l.hilite = l.document.layers[1];
				if (proto.bgImageUp) l.background.src = proto.bgImageUp;
				l.document.layers[1].isHilite = true;
				if (l.document.layers.length > 2) {
					l.childMenu = container.menus[i].items[n].menuLayer;
					l.document.layers[2].left = l.clip.width -13;
					l.document.layers[2].top = (l.clip.height / 2) -4;
					l.document.layers[2].clip.left += 3;
					l.Menu.childMenus[l.Menu.childMenus.length] = l.childMenu;
				}
			}
			if( proto.menuBgOpaque ) body.document.bgColor = proto.bgColor;
			if( proto.vertical ) {
				body.clip.width  = l.clip.width +proto.menuBorder;
				body.clip.height = l.top + l.clip.height +proto.menuBorder;
			} else {
				body.clip.height  = l.clip.height +proto.menuBorder;
				body.clip.width = l.left + l.clip.width  +proto.menuBorder;
				if( body.clip.width > window.innerWidth ) body.clip.width = window.innerWidth;
			}
			var focusItem = body.document.layers[n];
			focusItem.clip.width = body.clip.width;
			focusItem.Menu = l.Menu;
			focusItem.top = -30;
            focusItem.captureEvents(Event.MOUSEDOWN);
            focusItem.onmousedown = onMenuItemDown;
			if( proto.menuBgOpaque ) menu.document.bgColor = proto.menuBorderBgColor;
			var lite = menu.document.layers[0];
			if( proto.menuBgOpaque ) lite.document.bgColor = proto.menuLiteBgColor;
			lite.clip.width = body.clip.width +1;
			lite.clip.height = body.clip.height +1;
			menu.clip.width = body.clip.width + (proto.menuBorder * 3) ;
			menu.clip.height = body.clip.height + (proto.menuBorder * 3);
		}
	} else {
		if ((!document.all) && (container.hasChildNodes) && !window.mmIsOpera) {
			container.innerHTML=content;
		} else {
			container.document.open("text/html");
			container.document.writeln(content);
			container.document.close();	
		}
		if (!FIND("menuLayer0")) return;
		var menuCount = 0;
		for (var x=0; x<container.menus.length; x++) {
			var menuLayer = FIND("menuLayer" + x);
			container.menus[x].menuLayer = "menuLayer" + x;
			menuLayer.Menu = container.menus[x];
			menuLayer.Menu.container = "menuLayer" + x;
			menuLayer.style.zindex = 1;
		    var s = menuLayer.style;
			s.pixeltop = -300;
			s.pixelleft = -300;
			s.top = '-300px';
			s.left = '-300px';

			var menu = container.menus[x];
			menu.menuItemWidth = menu.menuWidth || menu.menuIEWidth || 140;
			if( menu.menuBgOpaque ) menuLayer.style.backgroundColor = menu.menuBorderBgColor;
			var top = 0;
			var left = 0;
			menu.menuItemLayers = new Array();
			for (var i=0; i<container.menus[x].items.length; i++) {
				var l = FIND("menuItem" + menuCount);
				l.Menu = container.menus[x];
				l.Menu.menuItemLayers[l.Menu.menuItemLayers.length] = l;
				if (l.addEventListener || window.mmIsOpera) {
					l.style.width = menu.menuItemWidth + 'px';
					l.style.height = menu.menuItemHeight + 'px';
					l.style.pixelWidth = menu.menuItemWidth;
					l.style.pixelHeight = menu.menuItemHeight;
					l.style.top = top + 'px';
					l.style.left = left + 'px';
					if(l.addEventListener) {
						l.addEventListener("mouseover", onMenuItemOver, false);
						l.addEventListener("click", onMenuItemAction, false);
						l.addEventListener("mouseout", mouseoutMenu, false);
					}
					if( menu.menuItemHAlign != 'left' ) {
						l.hiliteShim = FIND("menuItemHilite" + menuCount + "Shim");
						l.hiliteShim.style.visibility = "inherit";
						l.textShim = FIND("menuItemText" + menuCount + "Shim");
						l.hiliteShim.style.pixelWidth = menu.menuItemWidth - 2*menu.menuItemPadding - menu.menuItemIndent;
						l.hiliteShim.style.width = l.hiliteShim.style.pixelWidth;
						l.textShim.style.pixelWidth = menu.menuItemWidth - 2*menu.menuItemPadding - menu.menuItemIndent;
						l.textShim.style.width = l.textShim.style.pixelWidth;	
					}
				} else {
					l.style.pixelWidth = menu.menuItemWidth;
					l.style.pixelHeight = menu.menuItemHeight;
					l.style.pixelTop = top;
					l.style.pixelLeft = left;
					if( menu.menuItemHAlign != 'left' ) {
						var shim = FIND("menuItemShim" + menuCount);
						shim[0].style.pixelWidth = menu.menuItemWidth - 2*menu.menuItemPadding - menu.menuItemIndent;
						shim[1].style.pixelWidth = menu.menuItemWidth - 2*menu.menuItemPadding - menu.menuItemIndent;
						shim[0].style.width = shim[0].style.pixelWidth + 'px';
						shim[1].style.width = shim[1].style.pixelWidth + 'px';
					}
				}
				if( menu.vertical ) top = top + menu.menuItemHeight+menu.menuItemBorder+menu.menuItemSpacing;
				else left = left + menu.menuItemWidth+menu.menuItemBorder+menu.menuItemSpacing;
				l.style.fontSize = menu.fontSize + 'px';
				l.style.backgroundColor = menu.menuItemBgColor;
				l.style.visibility = "inherit";
				l.saveColor = menu.menuItemBgColor;
				l.menuHiliteBgColor = menu.menuHiliteBgColor;
				l.mmaction = container.menus[x].actions[i];
				l.hilite = FIND("menuItemHilite" + menuCount);
				l.focusItem = FIND("focusItem" + x);
				l.focusItem.style.pixelTop = -30;
				l.focusItem.style.top = '-30px';
				var childItem = FIND("childMenu" + menuCount);
				if (childItem) {
					l.childMenu = container.menus[x].items[i].menuLayer;
					childItem.style.pixelLeft = menu.menuItemWidth -11;
					childItem.style.left = childItem.style.pixelLeft + 'px';
					childItem.style.pixelTop = (menu.menuItemHeight /2) -4;
					childItem.style.top = childItem.style.pixelTop + 'px';
					l.Menu.childMenus[l.Menu.childMenus.length] = l.childMenu;
				}
				l.style.cursor = "hand";
				menuCount++;
			}
			if( menu.vertical ) {
				menu.menuHeight = top-1-menu.menuItemSpacing;
				menu.menuWidth = menu.menuItemWidth;
			} else {
				menu.menuHeight = menu.menuItemHeight;
				menu.menuWidth = left-1-menu.menuItemSpacing;
			}

			var lite = FIND("menuLite" + x);
			var s = lite.style;
			s.pixelHeight = menu.menuHeight +(menu.menuBorder * 2);
			s.height = s.pixelHeight + 'px';
			s.pixelWidth = menu.menuWidth + (menu.menuBorder * 2);
			s.width = s.pixelWidth + 'px';
			if( menu.menuBgOpaque ) s.backgroundColor = menu.menuLiteBgColor;

			var body = FIND("menuFg" + x);
			s = body.style;
			s.pixelHeight = menu.menuHeight + menu.menuBorder;
			s.height = s.pixelHeight + 'px';
			s.pixelWidth = menu.menuWidth + menu.menuBorder;
			s.width = s.pixelWidth + 'px';
			if( menu.menuBgOpaque ) s.backgroundColor = menu.bgColor;

			s = menuLayer.style;
			s.pixelWidth  = menu.menuWidth + (menu.menuBorder * 4);
			s.width = s.pixelWidth + 'px';
			s.pixelHeight  = menu.menuHeight+(menu.menuBorder*4);
			s.height = s.pixelHeight + 'px';
		}
	}
	if (document.captureEvents) document.captureEvents(Event.MOUSEUP);
	if (document.addEventListener) document.addEventListener("mouseup", onMenuItemOver, false);
	if (document.layers && window.innerWidth) {
		window.onresize = NS4resize;
		window.NS4sIW = window.innerWidth;
		window.NS4sIH = window.innerHeight;
		setTimeout("NS4resize()",500);
	}
	document.onmouseup = mouseupMenu;
	window.mmWroteMenu = true;
	status = "";
}

function NS4resize() {
	if (NS4sIW != window.innerWidth || NS4sIH != window.innerHeight) window.location.reload();
}

function onMenuItemOver(e, l) {
	MM_clearTimeout();
	l = l || this;
	a = window.ActiveMenuItem;
	if (document.layers) {
		if (a) {
			a.document.bgColor = a.saveColor;
			if (a.hilite) a.hilite.visibility = "hidden";
			if (a.Menu.bgImageOver) a.background.src = a.Menu.bgImageUp;
			a.focusItem.top = -100;
			a.clicked = false;
		}
		if (l.hilite) {
			l.document.bgColor = l.menuHiliteBgColor;
			l.zIndex = 1;
			l.hilite.visibility = "inherit";
			l.hilite.zIndex = 2;
			l.document.layers[1].zIndex = 1;
			l.focusItem.zIndex = this.zIndex +2;
		}
		if (l.Menu.bgImageOver) l.background.src = l.Menu.bgImageOver;
		l.focusItem.top = this.top;
		l.focusItem.left = this.left;
		l.focusItem.clip.width = l.clip.width;
		l.focusItem.clip.height = l.clip.height;
		l.Menu.hideChildMenu(l);
	} else if (l.style && l.Menu) {
		if (a) {
			a.style.backgroundColor = a.saveColor;
			if (a.hilite) a.hilite.style.visibility = "hidden";
			if (a.hiliteShim) a.hiliteShim.style.visibility = "inherit";
			if (a.Menu.bgImageUp) a.style.background = "url(" + a.Menu.bgImageUp +")";;
		} 
		l.style.backgroundColor = l.menuHiliteBgColor;
		l.zIndex = 1;
		if (l.Menu.bgImageOver) l.style.background = "url(" + l.Menu.bgImageOver +")";
		if (l.hilite) {
			l.hilite.style.visibility = "inherit";
			if( l.hiliteShim ) l.hiliteShim.style.visibility = "visible";
		}
		l.focusItem.style.pixelTop = l.style.pixelTop;
		l.focusItem.style.top = l.focusItem.style.pixelTop + 'px';
		l.focusItem.style.pixelLeft = l.style.pixelLeft;
		l.focusItem.style.left = l.focusItem.style.pixelLeft + 'px';
		l.focusItem.style.zIndex = l.zIndex +1;
		l.Menu.hideChildMenu(l);
	} else return;
	window.ActiveMenuItem = l;
}

function onMenuItemAction(e, l) {
	l = window.ActiveMenuItem;
	if (!l) return;
	hideActiveMenus();
	if (l.mmaction) eval("" + l.mmaction);
	window.ActiveMenuItem = 0;
}

function MM_clearTimeout() {
	if (mmHideMenuTimer) clearTimeout(mmHideMenuTimer);
	mmHideMenuTimer = null;
	mmDHFlag = false;
}

function MM_startTimeout() {
	if( window.ActiveMenu ) {
		mmStart = new Date();
		mmDHFlag = true;
		mmHideMenuTimer = setTimeout("mmDoHide()", window.ActiveMenu.Menu.hideTimeout);
	}
}

function mmDoHide() {
	if (!mmDHFlag || !window.ActiveMenu) return;
	var elapsed = new Date() - mmStart;
	var timeout = window.ActiveMenu.Menu.hideTimeout;
	if (elapsed < timeout) {
		mmHideMenuTimer = setTimeout("mmDoHide()", timeout+100-elapsed);
		return;
	}
	mmDHFlag = false;
	hideActiveMenus();
	window.ActiveMenuItem = 0;
}

function MM_showMenu(menu, x, y, child, imgname) {
	if (!window.mmWroteMenu) return;
	MM_clearTimeout();
	if (menu) {
		var obj = FIND(imgname) || document.images[imgname] || document.links[imgname] || document.anchors[imgname];
		x = moveXbySlicePos (x, obj);
		y = moveYbySlicePos (y, obj);
	}
	if (document.layers) {
		if (menu) {
			var l = menu.menuLayer || menu;
			l.top = l.left = 1;
			hideActiveMenus();
			if (this.visibility) l = this;
			window.ActiveMenu = l;
		} else {
			var l = child;
		}
		if (!l) return;
		for (var i=0; i<l.layers.length; i++) { 			   
			if (!l.layers[i].isHilite) l.layers[i].visibility = "inherit";
			if (l.layers[i].document.layers.length > 0) MM_showMenu(null, "relative", "relative", l.layers[i]);
		}
		if (l.parentLayer) {
			if (x != "relative") l.parentLayer.left = x || window.pageX || 0;
			if (l.parentLayer.left + l.clip.width > window.innerWidth) l.parentLayer.left -= (l.parentLayer.left + l.clip.width - window.innerWidth);
			if (y != "relative") l.parentLayer.top = y || window.pageY || 0;
			if (l.parentLayer.isContainer) {
				l.Menu.xOffset = window.pageXOffset;
				l.Menu.yOffset = window.pageYOffset;
				l.parentLayer.clip.width = window.ActiveMenu.clip.width +2;
				l.parentLayer.clip.height = window.ActiveMenu.clip.height +2;
				if (l.parentLayer.menuContainerBgColor && l.Menu.menuBgOpaque ) l.parentLayer.document.bgColor = l.parentLayer.menuContainerBgColor;
			}
		}
		l.visibility = "inherit";
		if (l.Menu) l.Menu.container.visibility = "inherit";
	} else if (FIND("menuItem0")) {
		var l = menu.menuLayer || menu;	
		hideActiveMenus();
		if (typeof(l) == "string") l = FIND(l);
		window.ActiveMenu = l;
		var s = l.style;
		s.visibility = "inherit";
		if (x != "relative") {
			s.pixelLeft = x || (window.pageX + document.body.scrollLeft) || 0;
			s.left = s.pixelLeft + 'px';
		}
		if (y != "relative") {
			s.pixelTop = y || (window.pageY + document.body.scrollTop) || 0;
			s.top = s.pixelTop + 'px';
		}
		l.Menu.xOffset = document.body.scrollLeft;
		l.Menu.yOffset = document.body.scrollTop;
	}
	if (menu) window.activeMenus[window.activeMenus.length] = l;
	MM_clearTimeout();
}

function onMenuItemDown(e, l) {
	var a = window.ActiveMenuItem;
	if (document.layers && a) {
		a.eX = e.pageX;
		a.eY = e.pageY;
		a.clicked = true;
    }
}

function mouseupMenu(e) {
	hideMenu(true, e);
	hideActiveMenus();
	return true;
}

function getExplorerVersion() {
	var ieVers = parseFloat(navigator.appVersion);
	if( navigator.appName != 'Microsoft Internet Explorer' ) return ieVers;
	var tempVers = navigator.appVersion;
	var i = tempVers.indexOf( 'MSIE ' );
	if( i >= 0 ) {
		tempVers = tempVers.substring( i+5 );
		ieVers = parseFloat( tempVers ); 
	}
	return ieVers;
}

function mouseoutMenu() {
	if ((navigator.appName == "Microsoft Internet Explorer") && (getExplorerVersion() < 4.5))
		return true;
	hideMenu(false, false);
	return true;
}

function hideMenu(mouseup, e) {
	var a = window.ActiveMenuItem;
	if (a && document.layers) {
		a.document.bgColor = a.saveColor;
		a.focusItem.top = -30;
		if (a.hilite) a.hilite.visibility = "hidden";
		if (mouseup && a.mmaction && a.clicked && window.ActiveMenu) {
 			if (a.eX <= e.pageX+15 && a.eX >= e.pageX-15 && a.eY <= e.pageY+10 && a.eY >= e.pageY-10) {
				setTimeout('window.ActiveMenu.Menu.onMenuItemAction();', 500);
			}
		}
		a.clicked = false;
		if (a.Menu.bgImageOver) a.background.src = a.Menu.bgImageUp;
	} else if (window.ActiveMenu && FIND("menuItem0")) {
		if (a) {
			a.style.backgroundColor = a.saveColor;
			if (a.hilite) a.hilite.style.visibility = "hidden";
			if (a.hiliteShim) a.hiliteShim.style.visibility = "inherit";
			if (a.Menu.bgImageUp) a.style.background = "url(" + a.Menu.bgImageUp +")";
		}
	}
	if (!mouseup && window.ActiveMenu) {
		if (window.ActiveMenu.Menu) {
			if (window.ActiveMenu.Menu.hideOnMouseOut) MM_startTimeout();
			return(true);
		}
	}
	return(true);
}

function hideChildMenu(hcmLayer) {
	MM_clearTimeout();
	var l = hcmLayer;
	for (var i=0; i < l.Menu.childMenus.length; i++) {
		var theLayer = l.Menu.childMenus[i];
		if (document.layers) theLayer.visibility = "hidden";
		else {
			theLayer = FIND(theLayer);
			theLayer.style.visibility = "hidden";
			if( theLayer.Menu.menuItemHAlign != 'left' ) {
				for(var j = 0; j < theLayer.Menu.menuItemLayers.length; j++) {
					var itemLayer = theLayer.Menu.menuItemLayers[j];
					if(itemLayer.textShim) itemLayer.textShim.style.visibility = "inherit";
				}
			}
		}
		theLayer.Menu.hideChildMenu(theLayer);
	}
	if (l.childMenu) {
		var childMenu = l.childMenu;
		if (document.layers) {
			l.Menu.MM_showMenu(null,null,null,childMenu.layers[0]);
			childMenu.zIndex = l.parentLayer.zIndex +1;
			childMenu.top = l.Menu.menuLayer.top + l.Menu.submenuYOffset;
			if( l.Menu.vertical ) {
				if( l.Menu.submenuRelativeToItem ) childMenu.top += l.top + l.parentLayer.top;
				childMenu.left = l.parentLayer.left + l.parentLayer.clip.width - (2*l.Menu.menuBorder) + l.Menu.menuLayer.left + l.Menu.submenuXOffset;
			} else {
				childMenu.top += l.top + l.parentLayer.top;	
				if( l.Menu.submenuRelativeToItem ) childMenu.left = l.Menu.menuLayer.left + l.left + l.clip.width + (2*l.Menu.menuBorder) + l.Menu.submenuXOffset;
				else childMenu.left = l.parentLayer.left + l.parentLayer.clip.width - (2*l.Menu.menuBorder) + l.Menu.menuLayer.left + l.Menu.submenuXOffset;
			}
			if( childMenu.left < l.Menu.container.clip.left ) l.Menu.container.clip.left = childMenu.left;
			var w = childMenu.clip.width+childMenu.left-l.Menu.container.clip.left;
			if (w > l.Menu.container.clip.width)  l.Menu.container.clip.width = w;
			var h = childMenu.clip.height+childMenu.top-l.Menu.container.clip.top;
			if (h > l.Menu.container.clip.height) l.Menu.container.clip.height = h;
			l.document.layers[1].zIndex = 0;
			childMenu.visibility = "inherit";
		} else if (FIND("menuItem0")) {
			childMenu = FIND(l.childMenu);
			var menuLayer = FIND(l.Menu.menuLayer);
			var s = childMenu.style;
			s.zIndex = menuLayer.style.zIndex+1;
			if (document.all || window.mmIsOpera) {
				s.pixelTop = menuLayer.style.pixelTop + l.Menu.submenuYOffset;
				if( l.Menu.vertical ) {
					if( l.Menu.submenuRelativeToItem ) s.pixelTop += l.style.pixelTop;
					s.pixelLeft = l.style.pixelWidth + menuLayer.style.pixelLeft + l.Menu.submenuXOffset;
					s.left = s.pixelLeft + 'px';
				} else {
					s.pixelTop += l.style.pixelTop;
					if( l.Menu.submenuRelativeToItem ) s.pixelLeft = menuLayer.style.pixelLeft + l.style.pixelLeft + l.style.pixelWidth + (2*l.Menu.menuBorder) + l.Menu.submenuXOffset;
					else s.pixelLeft = (menuLayer.style.pixelWidth-4*l.Menu.menuBorder) + menuLayer.style.pixelLeft + l.Menu.submenuXOffset;
					s.left = s.pixelLeft + 'px';
				}
			} else {
				var top = parseInt(menuLayer.style.top) + l.Menu.submenuYOffset;
				var left = 0;
				if( l.Menu.vertical ) {
					if( l.Menu.submenuRelativeToItem ) top += parseInt(l.style.top);
					left = (parseInt(menuLayer.style.width)-4*l.Menu.menuBorder) + parseInt(menuLayer.style.left) + l.Menu.submenuXOffset;
				} else {
					top += parseInt(l.style.top);
					if( l.Menu.submenuRelativeToItem ) left = parseInt(menuLayer.style.left) + parseInt(l.style.left) + parseInt(l.style.width) + (2*l.Menu.menuBorder) + l.Menu.submenuXOffset;
					else left = (parseInt(menuLayer.style.width)-4*l.Menu.menuBorder) + parseInt(menuLayer.style.left) + l.Menu.submenuXOffset;
				}
				s.top = top + 'px';
				s.left = left + 'px';
			}
			childMenu.style.visibility = "inherit";
		} else return;
		window.activeMenus[window.activeMenus.length] = childMenu;
	}
}

function hideActiveMenus() {
	if (!window.activeMenus) return;
	for (var i=0; i < window.activeMenus.length; i++) {
		if (!activeMenus[i]) continue;
		if (activeMenus[i].visibility && activeMenus[i].Menu && !window.mmIsOpera) {
			activeMenus[i].visibility = "hidden";
			activeMenus[i].Menu.container.visibility = "hidden";
			activeMenus[i].Menu.container.clip.left = 0;
		} else if (activeMenus[i].style) {
			var s = activeMenus[i].style;
			s.visibility = "hidden";
			s.left = '-200px';
			s.top = '-200px';
		}
	}
	if (window.ActiveMenuItem) hideMenu(false, false);
	window.activeMenus.length = 0;
}

function moveXbySlicePos (x, img) { 
	if (!document.layers) {
		var onWindows = navigator.platform ? navigator.platform == "Win32" : false;
		var macIE45 = document.all && !onWindows && getExplorerVersion() == 4.5;
		var par = img;
		var lastOffset = 0;
		while(par){
			if( par.leftMargin && ! onWindows ) x += parseInt(par.leftMargin);
			if( (par.offsetLeft != lastOffset) && par.offsetLeft ) x += parseInt(par.offsetLeft);
			if( par.offsetLeft != 0 ) lastOffset = par.offsetLeft;
			par = macIE45 ? par.parentElement : par.offsetParent;
		}
	} else if (img.x) x += img.x;
	return x;
}

function moveYbySlicePos (y, img) {
	if(!document.layers) {
		var onWindows = navigator.platform ? navigator.platform == "Win32" : false;
		var macIE45 = document.all && !onWindows && getExplorerVersion() == 4.5;
		var par = img;
		var lastOffset = 0;
		while(par){
			if( par.topMargin && !onWindows ) y += parseInt(par.topMargin);
			if( (par.offsetTop != lastOffset) && par.offsetTop ) y += parseInt(par.offsetTop);
			if( par.offsetTop != 0 ) lastOffset = par.offsetTop;
			par = macIE45 ? par.parentElement : par.offsetParent;
		}		
	} else if (img.y >= 0) y += img.y;
	return y;
}


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);

var MESSAGE = "";
var SPEED = 4;
var id,pause=0,position=0;
function banner() {
	// variables declaration 
	var i,k,msg=MESSAGE; /*document.form1.message.value*/;
	// increase msg 
	k=(66/msg.length)+1;
	for(i=0;i<=k;i++) msg+=" "+msg;
	// show it to the window 
	document.form2.banner.value=msg.substring(position,position+90);
	// show it to the status bar 
	//window.status=msg.substring(position,position+66);
	// set new position 
	if(position++==msg.length /*document.form1.message.value.length*/) position=0;
	// repeat at entered speed 
	id=setTimeout("banner()",1000/SPEED); 
}

function action() {
	if(!pause) {
		// stop rolling 
		clearTimeout(id);
		pause=1; 
	} else {
		// continue rolling 
		banner();
		pause=0; 
	} 
}

/* ********************************************************************************** 
    * This code was created by Jim Young of www.requestcode.com .                *
    * You may use this code at no charge.  All I ask is that you give me             *
    * credit.  Please visit my site for more scripts like this one.                          *
    **********************************************************************************
    Enter your links or text in the array below that you want to scroll.  Mak sure that you use single quotes within 
    the double quotes 
*/
var msg=new Array()
msg[0]="<FONT size='3' face='Verdana, Arial, Helvetica, sans-serif'><B><I><A HREF='http://www.kingofthecape.com/2004/'>Congratulations Tati Frans, 2004 King of the Cape!!</A><I></B></FONT>"
msg[1]="<FONT size='3' face='Verdana, Arial, Helvetica, sans-serif'><B><I><A HREF='http://www.kingofthecape.com/2004/'>Congratulations Clay Emer, 2004 Am Men Winner!!</A><I></B></FONT>"
msg[2]="<FONT size='3' face='Verdana, Arial, Helvetica, sans-serif'><B><I><A HREF='http://www.kingofthecape.com/2004/'>World class freestyle pros on Cape Cod!!</A><I></B></FONT>"
msg[3]="<FONT size='3' face='Verdana, Arial, Helvetica, sans-serif'><B><I><A HREF='http://www.kingofthecape.com/2004/'>Congratulations Brad Louw, 2004 Am Junior Winner!!</A><I></B></FONT>"
msg[4]="<FONT size='3' face='Verdana, Arial, Helvetica, sans-serif'><B><I><A HREF='http://www.kingofthecape.com/2004/'>Congratulations Chris Caron, 2004 Nov Men Winner!!</A><I></B></FONT>"
msg[5]="<FONT size='3' face='Verdana, Arial, Helvetica, sans-serif'><B><I><A HREF='http://www.kingofthecape.com/2004/'>World class freestyle pros on Cape Cod!!</A><I></B></FONT>"
msg[6]="<FONT size='3' face='Verdana, Arial, Helvetica, sans-serif'><B><I><A HREF='http://www.kingofthecape.com/2004/'>Congratulations Kye Wheeler, 2004 Nov Junior Winner!!</A><I></B></FONT>"
/* The variables below are the ones you want to change  */

speed=150                      // Sets the speed in milliseconds at which the link or text scrolls.
var divwidth=500            // Sets the width of the div or layer in pixels.  You will have to play with this to get it set correctly.
var divheight=20            // Sets the height of the div or layer in pixels.  Same as above.

/*
   The variables divincbt, divinctb, divincrl and divinclr set the increment in pixels that the div that contains the text
    or links is moved.  Which one is used is determined by the direction that you pick in the variable whichscroll.
    The variable divinctb would be used if you set whichscroll to 1, divinctb if you set whichscroll to 2, divincrl if
     you set whichscroll to 3 and divinclr if you set whichscroll to 4.  You can change these variables to speed up
     or slow down the movement of the scroll.
*/

var divincbt=1                 
var divinctb=-1
var divincrl=10
var divinclr=-10

var divpause=1000        // Sets how long to pause in milliseconds before scrolling the next link or text. 

var divtop="0"              // divtop and divleft set the top and left positions of the container div or layer in pixels. 
var divleft="0"               

var divcolor="#000066"      // Sets the background color of the div or layer

var divname1="scroll2"  // Sets the name of your div or layer for the first link or text that is displayed
var divname2="scroll3"  // Sets the name of your div or layer for the next link or text to be displayed

/*
   The variable whichscroll is used to set the direction of the scrolling.  It is currently set to 1.
    1 = Bottom to Top
    2 = Top to Bottom
    3 = Right to Left
    4 = Left to Right
*/
var whichscroll="3"

/* END OF CONFIGURATION VARIABLES */

/* THERE IS NO NEED TO CHANGE THE VARIABLES OR SCRIPTS BELOW */

var divinc
var stopposa
var stopposb
var scrollmsga
var scrollmsgb 
var thediva
var thedivb
var posa
var posb
var i=msg.length
var firsttime="y"
var divprop
var whichdiv=divname1
if(whichscroll=="1")
  {
   stopposa=0
   stopposb=divheight*-1
   divprop="top"
   divinc=divincbt
  }
if(whichscroll=="2")
  {
   stopposa=0
   stopposb=divheight
   divprop="top"
   divinc=divinctb
  }
if(whichscroll=="3")
  {
   stopposa=0
   stopposb=divwidth*-1
   divprop="left"
   divinc=divincrl
  }
if(whichscroll=="4")
  {
   stopposa=1
   stopposb=divwidth+2
   divprop="left"
   divinc=divinclr
  }

function Scrollboxa(obja)
     {
         savobja=obja
         posa=posa-divinc
         if(((whichscroll=="1" || whichscroll=="3")&&(posa<=stopposa))||
           ((whichscroll=="2" || whichscroll=="4")&&(posa>=stopposa)))
           {
            clearTimeout(scrollmsga)
            setTimeout("scrollit()",divpause)
           } 
         else
             {
              if(document.getElementById) // IE5 and NS6
                {
                 eval("elma.style."+divprop+"=posa")
                 elma.style.visibility="visible"
                }
              if(document.layers)    // NS4+
                {
                 eval("obja."+divprop+"=posa")
                 document.main.visibility="show"
                }
              scrollmsga=setTimeout("Scrollboxa(savobja)",speed)
             }
     }
function Scrollboxb(objb)
     {
         savobjb=objb
         posb=posb-divinc
         if(((whichscroll=="1" || whichscroll=="3")&&(posb<=stopposb))||
            ((whichscroll=="2" || whichscroll=="4")&&(posb>=stopposb)))
           {
            clearTimeout(scrollmsgb)
           }
         else
              {
               if(document.getElementById) // IE5 and NS6
                 {
                  eval("elmb.style."+divprop+"=posb")
                 }
               if(document.layers)  // NS4+
                 {
                  eval("objb."+divprop+"=posb")
                  objb.visibility="show"
                 }
               scrollmsgb=setTimeout("Scrollboxb(savobjb)",speed)
              }
     }
function scrollit()
   {
    i++
    if(i>=msg.length)
      {i=0}
    posa=stopposb*-1
    posb=0
    if(firsttime=="y")
      {
       firsttime= "n"
       if(document.getElementById)      // IE5 and NS6
         {
          elma=document.getElementById(divname1)
          elma.innerHTML=msg[i]
         }
      if(document.layers)   // NS4+
        {
         thediva=eval("document.main.document."+divname1)
         thediva.document.write(msg[i])
         thediva.document.close()
        }
       Scrollboxa(thediva)
      }
    else
      {
       if(whichdiv==divname1)
         {
          if(document.getElementById)  // IE5 and NS6
            {
             elmb=document.getElementById(divname1)
             elma=document.getElementById(divname2)
             elma.innerHTML=msg[i]
            }
          if(document.layers)  //  NS4+
            {
             thedivb=eval("document.main.document."+divname1)
             thediva=eval("document.main.document."+divname2)  
             thediva.document.write(msg[i])
             thediva.document.close()
            }
          Scrollboxb(thedivb)
          whichdiv=divname2
          Scrollboxa(thediva)
         }
       else
         {
          if(document.getElementById)   // IE5 and NS6
            {
             elmb=document.getElementById(divname2)
             elma=document.getElementById(divname1)
             elma.innerHTML=msg[i]
             }
          if(document.layers)  // NS4+
            {
             thedivb=eval("document.main.document."+divname2)
             thediva=eval("document.main.document."+divname1)
             thediva.document.write(msg[i])
             thediva.document.close()
             }
          Scrollboxb(thedivb)
          whichdiv=divname1
          Scrollboxa(thediva)
         }
      }
  }
  
/*
 * Update form routines used to dynamically change the form depending on the input values.
 */
    
function UpdateRegTypeCompetitor(form) 
{ 
	form.Division.style.background='white'
	form.Class.style.background='white'
	form.SailNumber.style.background='white'

	form.SailNumber.disabled = false;
	form.Division.disabled = false;
	form.Class.disabled = false;
	form.ReleaseFormAck.disabled = false;
}

function UpdateRegTypeNonCompetitor(form) 
{ 
	form.Division.style.background='#CCCCCC'
	form.Class.style.background='#CCCCCC'
	form.SailNumber.style.background='#CCCCCC'

	form.SailNumber.value = "";
	form.Division.value = "";
	form.Class.value = "";
	form.ReleaseFormAck.checked = false;

	form.SailNumber.disabled = true;
	form.Division.disabled = true;
	form.Class.disabled = true;
	form.ReleaseFormAck.disabled = true;
} 

function EnableCreditCard(form) 
{ 
	form.CardType.style.background='white'
	form.CardNumber.style.background='white'
	form.CardExp.style.background='white'

	form.CardNumber.value = "Card Number...";
	form.CardExp.value = "Exp...";

	form.CardType.disabled = false;
	form.CardNumber.disabled = false;
	form.CardExp.disabled = false;
}

function DisableCreditCard(form) 
{ 
	form.CardType.style.background='#CCCCCC'
	form.CardNumber.style.background='#CCCCCC'
	form.CardExp.style.background='#CCCCCC'

	form.CardNumber.value = "";
	form.CardExp.value = "";

	form.CardType.disabled = true;
	form.CardNumber.disabled = true;
	form.CardExp.disabled = true;
} 
/*
DepSelectOne: Dependen Select Lists V1.0
copyright 2003 Richard Cornford

constructor parameters for DepSelectOne(masterSelect)
masterSelect = a reference to the select element that is the
first select box in the chain of dependent select boxes.
If more than one instance of the DepSelectOne is required
the name attribute of the masteSelect element for each should
be unique (as the names are used to reference instances of the
Class)

The constructor should additionally be passed one or more
string that contain the same names as the names of the select
elements that are intended to be dependent on the master select
element, in the order in which each shall be dependent on the previous.
The names should be unique within a form.

Example:
&lt;body onload="new DepSelectOne(document.forms['formName'].elements['level_1'], 'level_2', 'level_3', ... , 'level_n');"&gt;

The maximum number of dependent select boxes is not defined in, or
limited by, this code and will probably depend on the JavaScript
implementation. It will be bigger than will ever actually be needed
and performance will drop off if the list gets big, at least in part
because the HTML will become impracticably large.
*/
function DepSelectOne(masterSelect){
	var frm = masterSelect.form;
	this.selectedBlock = 0;
	this.selBoxes = new Array(masterSelect);
	if((frm)&&(typeof window.Option != 'undefined')){
		for(var c = 1;c < arguments.length;c++){
			var selObj = frm[arguments[c]];
			if((selObj)&&(selObj.type == 'select-one')&&(selObj.options.length > 2)){
				this.selBoxes[this.selBoxes.length] = frm[arguments[c]];
			}
		}
		if((this.selBoxes.length >1)&&(this.selBoxes.length == arguments.length)){
			this.selectElement = this.selBoxes[0];
			DepSelectOne.inst[this.index = this.selectElement.name] = this;	//keep global record of this object instance.
			this.selBoxes[0] = this;
			this.optionBlock = new OptionBlock(0, this.selectElement, this.selectElement.options[0].value, this, 0);
			this.next = new DepSelectOneNext(this.selBoxes, 1);
			this.next.setSelection(this.optionBlock.getSelection());
			this.selectElement.onchange = new Function('DepSelectOne.inst[\''+this.index+'\'].handleChange(0)');
		}else{
			alert('DepSelectOne constructor could not find\nsufficient properly configured SELECT elements\nto initialise.');
		}
	}
}
DepSelectOne.inst = new Object();	//Globally accessible object to hold instances of the DepSelectOne Class.
//call chain terminating functions.
DepSelectOne.prototype.validateNext = DepSelectOne.prototype.reset = DepSelectOne.prototype.setSelection = DepSelectOne.prototype.setSelectedFromChild = function(){return true;}
DepSelectOne.prototype.validate = function(){
	return ((this.optionBlock.lastSelection < 0)?false:this.next.validateNext());
}
DepSelectOne.prototype.init = function(selectedBlock){
	if(selectedBlock >= 0){
		this.optionBlock.lastSelection = selectedBlock;
	}
	if(this.optionBlock.lastSelection >= 0){
		this.optionBlock.doElement();
		if(window.setTimeout)setTimeout('DepSelectOne.inst[\''+this.index+'\'].refresh();', 5); //fix for Opera 7 timing problem. Harmless otherwise.
	}
}
DepSelectOne.prototype.handleChange = function(ind){
	this.selBoxes[ind].changed();
	if(window.setTimeout)setTimeout('DepSelectOne.inst[\''+this.index+'\'].refresh();', 5); //fix for Opera 7 timing problem. Harmless otherwise.
}
DepSelectOne.prototype.refresh = function(){
	this.selectElement.selectedIndex = this.optionBlock.lastSelection;
	this.next.reset();
}
DepSelectOne.prototype.changed = function(){
	this.optionBlock.readState();
	this.next.setSelection(this.optionBlock.getSelection());
}

function DepSelectOneNext(selBoxes, selBoxIndex){
	this.selectedBlock = -1;
	this.classObj = selBoxes[0];
	this.previous = selBoxes[(selBoxIndex-1)]
	this.selectElement = selBoxes[selBoxIndex];
	selBoxes[selBoxIndex] = this;
	this.selectElement.onchange = new Function('DepSelectOne.inst[\''+this.classObj.index+'\'].handleChange('+selBoxIndex+')');
	this.seperatorOption = new DepOption(this.selectElement.options[0]);
	this.optionBlocks = new Array();
	var startIndex = 1;
	while(startIndex < this.selectElement.options.length){
		var nextIndex = this.optionBlocks.length;
		this.optionBlocks[nextIndex] = new OptionBlock(startIndex, this.selectElement, this.selectElement.options[0].value, this, nextIndex);
		startIndex += this.optionBlocks[nextIndex].getOptionsTotal();
	}
	for(var cnt = 0,c = 0;c < this.optionBlocks.length;c++){
		this.optionBlocks[c].blockStart = cnt;
		cnt += this.optionBlocks[c].getItems();
	}
	if(++selBoxIndex < selBoxes.length){
		this.next = new DepSelectOneNext(selBoxes, selBoxIndex);
	}else{
		this.next = this.classObj;
		this.previous.init(this.selectedBlock);
	}
}
DepSelectOneNext.prototype.reset = function(){
	if((this.selectedBlock >= 0)&&(this.optionBlocks[this.selectedBlock].lastSelection >= 0)){
		this.selectElement.selectedIndex = this.optionBlocks[this.selectedBlock].lastSelection;
		this.next.reset();
	}
}
DepSelectOneNext.prototype.setSelection = function(selBlock){
	this.selectedBlock = selBlock;
	if(this.selectedBlock < 0){
		var opt = this.selectElement.options;
		opt.length = 0; //clear options
		opt[0] = this.seperatorOption.getOption();
		this.selectElement.selectedIndex = 0;
		this.next.setSelection(-1);
	}else{
		var blk = this.optionBlocks[this.selectedBlock];
		blk.doElement();
		this.next.setSelection(blk.getSelection());
	}
}
DepSelectOneNext.prototype.changed = function(){
	if(this.selectedBlock >= 0){
		var blk = this.optionBlocks[this.selectedBlock];
		blk.readState();
		this.next.setSelection(blk.getSelection());
	}
}
DepSelectOneNext.prototype.setSelectedFromChild = function(blockIndex){
	if(this.selectedBlock < 0){	//only set from OptonBlock on the first attempt.
		this.selectedBlock = blockIndex;
	}
}
DepSelectOneNext.prototype.init = function(selBlock){
	if(selBlock >= 0){
		var blockIndex = 0;
		while(!this.optionBlocks[blockIndex++].nextBlockTest(selBlock));
	}
	this.previous.init(this.selectedBlock);
}
DepSelectOneNext.prototype.validateNext = function(){
	return (((this.selectedBlock < 0)||(this.optionBlocks[this.selectedBlock].lastSelection < 0))?false:this.next.validateNext());
}

function DepOption(optEl){
	this.value = optEl.value;
	this.text = optEl.text;
}
DepOption.prototype.getOption = function(){
	return new Option(this.text, this.value);
}

function OptionBlock(startIndex, selectElement, seperatorValue, owner, blockIndex)
{
	this.blockStart = 0;
	this.owner = owner;
	this.index = blockIndex;
	this.selectElement = selectElement;
	this.seperators = new Array();
	this.optionBlock = new Array();
	this.lastSelection = -1;
	var opts = this.selectElement.options;
	while((startIndex < opts.length)&&(opts[startIndex].value == seperatorValue)){
		this.seperators[this.seperators.length] = new DepOption(opts[startIndex++]);
	}
	while((startIndex < opts.length)&&(opts[startIndex].value != seperatorValue)){
		if((this.lastSelection < 0)&&(opts[startIndex].selected == true)){
			this.lastSelection = this.optionBlock.length; //record first item selected, if any.
		}
		this.optionBlock[this.optionBlock.length] = new DepOption(opts[startIndex++]);
	}
	if(this.lastSelection >= 0)this.owner.setSelectedFromChild(this.index)
}

OptionBlock.prototype.getOptionsTotal = function()
{
	return (this.seperators.length + this.optionBlock.length);
}
OptionBlock.prototype.getItems = function(){
	return this.optionBlock.length;
}
OptionBlock.prototype.nextBlockTest = function(selBlock){
	if((selBlock >= this.blockStart)&&(selBlock < this.blockStart+this.optionBlock.length)){
		this.lastSelection = selBlock - this.blockStart;
		this.owner.selectedBlock = this.index;
		return true;
	}
	return false;
}
OptionBlock.prototype.getSelection = function(){
	return ((this.lastSelection < 0)?-1:(this.blockStart+this.lastSelection));
}
OptionBlock.prototype.doElement = function(){
	var opt = this.selectElement.options;
	opt.length = 0; //clear options
	if((this.lastSelection < 0)&&(this.seperators.length > 0)){
		opt[opt.length] = this.seperators[(this.seperators.length-1)].getOption();
	}
	for(var c = 0;c < this.optionBlock.length;c++){
		opt[opt.length] = this.optionBlock[c].getOption();
	}
	this.selectElement.selectedIndex = ((this.lastSelection < 0)?0:this.lastSelection);
}
OptionBlock.prototype.readState = function(){
	if(this.lastSelection < 0){
		this.lastSelection = (this.selectElement.selectedIndex - 1);
		this.doElement();
	}else{
		this.lastSelection = this.selectElement.selectedIndex;
	}
}


/*
demonstration use of validate function of DepSelectOne Class
*/
function testSel(){
	if(  DepSelectOne.inst['level_1'].validate()  ){ //note the use of the name of the first SELECT Element in the chain to reference the object instance.
		alert('Selection is complete and valid');
	}else{
		alert('Selection is in-complete and NOT valid');
	}
}
