//MakeStyle("menus", "Tahoma", "Helvetica", "bold", "italic", "#ffcfd5", "#000000","#ffbfc5",12);
function setupBody()
{
	
	if (isForPrintScreen())
	{
		document.bgColor="#FFFFFF";
	}
	else
	{
		document.bgColor="#e6ffea";
   		if (document.layers)
		 {
			 window.captureEvents(Event.RESIZE) ;
			 window.onresize = reload;
		 }
		 else if (document.all)
		 {
			 window.onresize = reload;
		 }
		 else if (window.addEventListener)
		 {
			 window.addEventListener("resize" , reload , false) ;
		 };

	}
}
function getHeaderBottom()
{
	if (isIE())
	{
		return 120;
	}
	return 117;
}
function isIE()
{
	return (navigator.userAgent.indexOf("Microsoft")!=-1 || 
			 navigator.userAgent.indexOf("MSIE")!=-1);
}
function reload()
{
	window.location=window.location;
}
function isForPrintScreen()
{
	if (window.location.href.indexOf("?print")!=-1)
	{
		return true;
	}
	else
	{
		return false;
	}
}
function omitNavigation()
{
	if (window.location.href.indexOf("?omitnav")!=-1)
	{
		return true;
	}
	else
	{
		return false;
	}
}
function getWidth()
{
       d=document
       if (typeof window.innerWidth!='undefined') {
        return window.innerWidth;
       } else {
        if (d.documentElement &&
         typeof d.documentElement.clientWidth!='undefined' &&
          d.documentElement.clientWidth!=0) {
         return d.documentElement.clientWidth
        } else {
         if (d.body &&  typeof d.body.clientWidth!='undefined') {
          return d.body.clientWidth
         }
        }
       }
}
function getContentWidth()
{
	cw=getWidth()-225;
	if (cw<600) cw=600;
	return cw;
}
function showHeader(headerPrefix, path)
{
	if (isForPrintScreen()||omitNavigation())
	{
		return;
	}
	width=getWidth()-40;
	if (width<780)
	{
		width=780;
	}
	htop=0;
	if (isIE()) htop=-3;
	document.write("<div style='position:relative;top:"+htop+";width:"+width+";border-width:1px;background-color:#e6ffea; border-color:#888888;border-style:solid;padding:0px;'><img src='"+headerPrefix+"header.jpg'></div>");
	document.write("<div class='content' style='position:absolute;left:10px;top:"+
	getHeaderBottom()+"px;width:"+ width +"px;border-width:1px;border-color:#888888;font-weight: bold; background-color:#ffcfd5; border-style:solid;'>"+path+"</div>");

//icons
//makeIcon(x,y,height,width,imageUrl,link, style, toolTip, newWindow)
pos=getWidth();
if (pos<780) pos=780;
makeIcon(pos-89, getHeaderBottom()-7,33,37,headerPrefix+"images/mail.gif",
	headerPrefix+"images/mailHover.gif",
	"mailto:Office@ladyrosary.org", "icons","Contact parish staff via eMail", false);

makeIcon(pos-129,getHeaderBottom()-10,33,37,headerPrefix+"images/printer.gif",
	headerPrefix+"images/printerHover.gif",
	document.URL+"?print", "icons","Printer friendly version", true);

makeIcon(pos-169,getHeaderBottom()-10,33,37,headerPrefix+"images/help.gif",
	headerPrefix+"images/helpHover.gif",
	headerPrefix+"help.html", "icons","Help with navigation", false);

//alert("openEditorPage(\""+headerPrefix+"\",\""+path+"\");");
makeDynamicIcon(pos-209,getHeaderBottom()-7,33,37,headerPrefix+"images/UpdateRequest.gif",
	headerPrefix+"images/UpdateRequestHover.gif",
	"openEditorPage('"+headerPrefix+"','"+escape(document.location)+"');",
    "icons","Submit Update Request", false);

}
function openEditorPage(prefix,escapedPath)
{
  document.location=prefix+"EditorPage?path="+escapedPath;
}

function declareContents()
{
	if (isForPrintScreen()||omitNavigation())
	{
		document.write("<div class=\"content\" style=\""+
		"position: absolute; left: 5px;top: 5px;width:"+(getWidth()-10)+"px;min-width:600px;\">\n");
	}
	else
	{
		document.write("<div class=\"content\" style=\""+
		"position: absolute; left: 188px;top: "+(getHeaderBottom()+26)+"px;width:"+getContentWidth()+"px;min-width:600px;\">\n");
	}
}
function handlePossiblePrint()
{
	if (isForPrintScreen())
	{
		document.write("<script>window.print()</script>\n");
	}
}

function showNavBar(navBarPrefix)
{
	if (isForPrintScreen()||omitNavigation())
	{
		return;
	}
	menuTop=getHeaderBottom()+18;
	subMenuIcon=navBarPrefix+"code/submenuIcon.gif";
	var itemHeight=20;
 	mainMenu=new Array(14);
	mainMenuLinks=new Array(14);
	mainMenu[0]="Welcome & Info";
	mainMenuLinks[0]= navBarPrefix+"welcome.html";
	mainMenu[1]="Parish Staff";
	mainMenuLinks[1]=navBarPrefix+"staff.html";

	mainMenu[2]="Calendar Of Events";
	mainMenuLinks[2]="menu:schedule";

 		schedule=new Array(3);
		scheduleLinks=new Array(3);
		schedule[0]="OLOR Calendar";
		scheduleLinks[0]="http://parishcalendar.com:8080/133/14248";
		//schedule[1]="This Month at OLOR";
		//scheduleLinks[1]="http://www.ladyrosary.org/bulletins/BulletinViewer?bn=February2005-&pn=1&tp=1";
		schedule[1]="Mass";
		scheduleLinks[1]=navBarPrefix+"mass.html";
		schedule[2]="Reconciliation";
		scheduleLinks[2]=navBarPrefix+"sacraments/Reconciliation.html";
		colWidths=Array(1);
		colWidths[0]=160;
		MakeMenu("schedule", 175,menuTop+itemHeight*2,schedule, scheduleLinks, itemHeight,colWidths, 3, "navPanel", true, true,1, subMenuIcon, 20);

	mainMenu[3]="Weekly Bulletin";
	mainMenuLinks[3]=navBarPrefix+"bulletins/bulletin.html";

	mainMenu[4]="Weekly Homilies";
	mainMenuLinks[4]=navBarPrefix+"Homilies/Homilies.html";
	
	

	mainMenu[5]="Sacraments";
	mainMenuLinks[5]="menu:sacraments";

 		sacraments=new Array(7);
		sacramentsLinks=new Array(7);
		sacraments[0]="Anointing of the Sick";
		sacramentsLinks[0]=navBarPrefix+"sacraments/sick.html";
		sacraments[1]="Baptism";
		sacramentsLinks[1]=navBarPrefix+"sacraments/baptism.html";
		sacraments[2]="Confirmation";
		sacramentsLinks[2]=navBarPrefix+"sacraments/confirmation.html";
		sacraments[3]="Eucharist";
		sacramentsLinks[3]=navBarPrefix+"sacraments/Eucharist.html";
		sacraments[4]="Holy Orders";
		sacramentsLinks[4]=navBarPrefix+"sacraments/holyOrders.html";
		sacraments[5]="Holy Matrimony";
		sacramentsLinks[5]=navBarPrefix+"sacraments/holymatrimony.html";
		sacraments[6]="Reconciliation";
		sacramentsLinks[6]=navBarPrefix+"sacraments/Reconciliation.html";
		colWidths[0]=180;
		MakeMenu("sacraments", 175,menuTop+itemHeight*4,sacraments, sacramentsLinks, itemHeight,colWidths, 3, "navPanel", true, true,1, subMenuIcon, 20);


	mainMenu[6]="Marriage";
	mainMenuLinks[6]=navBarPrefix+"sacraments/holymatrimony.html";



	mainMenu[7]="Religious Education";
	mainMenuLinks[7]="menu:education:"+navBarPrefix+"education/ReligiousEducation.html";

 		education=new Array(4);
		educationLinks=new Array(4);
		education[0]="Young Disciples (K-6)";
		educationLinks[0]=navBarPrefix+"education/elem.html";
		education[1]="Rite of Christian Initiation of Adults (RCIA)";
		educationLinks[1]=navBarPrefix+"education/rcia.html";
		education[2]="Rite of Christian Initiation of Teens (RCIT)";
		educationLinks[2]=navBarPrefix+"education/rcit.html";
		education[3]="Rite of Christian Initiation of Children (RCIC)";
		educationLinks[3]=navBarPrefix+"education/rcic.html";
		colWidths[0]=360;
		MakeMenu("education", 175,menuTop+itemHeight*6,education, educationLinks, itemHeight,colWidths, 3,"navPanel", true, true,1, subMenuIcon, 20);

	mainMenu[8]="Youth Ministry";
	mainMenuLinks[8]="menu:youthMinistry";

 		youthMinistry =new Array(4);
		youthMinistryLinks=new Array(4);
		youthMinistry[0]="The Edge (Middle School)";
		youthMinistryLinks[0]=navBarPrefix+"YouthMinistry/k/middle.html";
		youthMinistry[1]="Life Teen (High School)";
		youthMinistryLinks[1]=navBarPrefix+"YouthMinistry/k/LifeTeen/LifeTeenMain.html";
		youthMinistry[2]="Scouts";
		youthMinistryLinks[2]=navBarPrefix+"YouthMinistry/scouts.html";
		youthMinistry[3]="Forms";
		youthMinistryLinks[3]=navBarPrefix+"YouthMinistry/forms.html";
		colWidths[0]=200;
		MakeMenu("youthMinistry", 175,menuTop+itemHeight*7, youthMinistry, youthMinistryLinks, itemHeight,colWidths, 3, "navPanel", true, true,1, subMenuIcon, 20);

	mainMenu[9]="Ministries";
	mainMenuLinks[9]="menu:ministries";

 		ministries =new Array();
		ministriesLinks=new Array();
		ministries[0]="Spiritual Enrichment Opportunities";
		ministriesLinks[0]=navBarPrefix+"ministries/SpiritualEnrichment.html";
		ministries[1]="Christian Faith Formation";
		ministriesLinks[1]=navBarPrefix+"ministries/FaithFormation.html";
		ministries[2]="Sacramental Preparation Ministries";
		ministriesLinks[2]=navBarPrefix+"ministries/SacramentalPrep.html";
		ministries[3]="Liturgical Ministries";
		ministriesLinks[3]=navBarPrefix+"ministries/Liturgical.html";
		ministries[4]="Music Ministry";
		ministriesLinks[4]=navBarPrefix+"ministries/Music.html";
		ministries[5]="Outreach Ministries";
		ministriesLinks[5]=navBarPrefix+"ministries/Outreach.html";
		ministries[6]="Parish Leadership";
		ministriesLinks[6]=navBarPrefix+"ministries/Leadership.html";
		ministries[7]="Justice Committees";
		ministriesLinks[7]=navBarPrefix+"ministries/Justice.html";
		ministries[8]="Parish Life";
		ministriesLinks[8]=navBarPrefix+"ministries/ParishLife.html";
		ministries[9]="Buildings and Grounds";
		ministriesLinks[9]=navBarPrefix+"ministries/BuildingAndGrounds.html";
		

		colWidths=Array(1);
		colWidths[0]=285;
		MakeMenu("ministries", 175,menuTop+itemHeight*8, ministries, ministriesLinks, itemHeight,colWidths, 3, "navPanel", true, true,1, subMenuIcon, 20);


	mainMenu[10]="Stewardship";
	mainMenuLinks[10]="menu:stewardship";

 		stewardship =new Array();
		stewardshipLinks=new Array();
		stewardship[0]="Annual Pastoral Appeal";
		stewardshipLinks[0]=navBarPrefix+"stewardship/APA.html";
		stewardship[1]="Time, Talent & Treasure";
		stewardshipLinks[1]=navBarPrefix+"stewardship/TimeTalentTreasure.html";
		stewardship[2]="Financial Statements";
		stewardshipLinks[2]=navBarPrefix+"stewardship/Financials.html";
		

		colWidths=Array(1);
		colWidths[0]=285;
		MakeMenu("stewardship", 175,menuTop+itemHeight*9, stewardship, stewardshipLinks, itemHeight,colWidths, 3, "navPanel", true, true,1, subMenuIcon, 20);


	mainMenu[11]="Event Photos";
	mainMenuLinks[11]=navBarPrefix+"PhotoAlbums/index.html";
	colWidths=Array(1);
   colWidths[0]=168;

 		
	mainMenu[12]="Resources & Links";
	mainMenuLinks[12]=navBarPrefix+"resources.html";
	colWidths=Array(1);
   colWidths[0]=168;

	mainMenu[13]="Papa Ron's Blog";
	mainMenuLinks[13]="http://www.ScatteredThoughtsFromPapaRon.blogspot.com";

	MakeMenu("mainMenu",14, menuTop, mainMenu, mainMenuLinks, itemHeight, colWidths, 3, "navPanel", true, false,1, subMenuIcon, 0);

}

//-----------------------------------------------------------
//               General Purpose Menu Routines
//-----------------------------------------------------------
//name - to be referenced in the MakeMenu function; alternately, MakeMenu can use
//       any style defined in the HTML header.
//primaryFont - 'arial', 'helveltica', 'courier', 'serif', 'monospace', etc
//secondaryFont - the font to use if primary font is not available on client browser
//fontWeight - one of; 'extra-light', 'light', 'demi-light', 'medium', 'demi-bold', 'bold',
//                     or 'extra-bold'
//fontStyle - one of; 'normal', 'italic', or 'obique'
//bgColor - name of background color or '#rrggbb', where rr, gg, and bb are 2 digit hexidecimal
//          numbers from 00 to FF
//fgColor - foreground color
//borderColor - color of the border separating items
//fontSizePts - fonbt
function MakeStyle(name, primaryFont, secondaryFont, fontWeight, fontStyle,
	bgColor, fgColor, borderColor, fontSizePts)
{
	style="<style type=\"text/css\">\n<!--\n"+
		"."+name+" {position: absolute; color:"+fgColor+"; background-color:"+
		bgColor+"; font-family:"+primaryFont+", "+secondaryFont+
	        "; font-weight:"+fontWeight+"; font-style: "+fontStyle+
		"; font-size: "+fontSizePts+"pt; text-decoration: none;border-color:"+
		borderColor+"; border-style:solid; border-width:1px;\"}\n"+
		"-->\n</style>\n";
	//window.alert(style);
	document.write(style);
}
function makeQuickLinkBar(quickLinkPrefix, ypositioning, items, itemWidths, styleName, addBorder)
{
	makeQuickLinkBarIcons(quickLinkPrefix, ypositioning, items, itemWidths, styleName, addBorder, 19, true, true);
}
function makeQuickLinkBarIcons(quickLinkPrefix, ypositioning, items, itemWidths, styleName, addBorder, height, insertTopBar, insertBottomBar)
{
	if (isForPrintScreen()||omitNavigation())
	{
		return;
	}
	width=0;
	for (loop=0;loop<itemWidths.length;loop++)
	{
		width+=itemWidths[loop];
	}
	iconOffset=33;
	leftMostSpacing=10;
	left=Math.round((getContentWidth()-(width+leftMostSpacing*2+iconOffset))/2);
	borderCode="";
	if (addBorder)
	{
		borderCode="border-style:solid;border-width:thin;border-color:black;";
	}
	//icon
	if (insertTopBar)
	{
		document.write("<div style=\"position:relative;top: "+ (ypositioning+11) +
			"px;left:"+left+"px;width:"+(iconOffset)+"px;\"><img src=\""+
			quickLinkPrefix+"code/QuickLinks.gif\"></div>\n");
	}
	//main container
	document.write("<div style=\"position:relative;top: "+
		(ypositioning-4) +"px;left:"+left+"px;width:"+
		(width+ leftMostSpacing*2 +iconOffset)+"px;\">\n");
	//top line
	if (insertTopBar)
	{
		document.write("<div style=\"position:absolute;top:0px;left:"+ iconOffset
				+"px;width:"+(width+leftMostSpacing)+"px;\"><img height=\"5\" width=\""+
					(width+leftMostSpacing*2)+"\" src=\""+quickLinkPrefix+"code/horizontalLine.gif\"></div>\n");
	}
	itemLeft=iconOffset+leftMostSpacing;
	for (loop=0;loop<items.length;loop++)
	{		
		document.write("<div class=\""+styleName+
		"\" style=\"position: absolute; top: 3px; left:"+
		itemLeft+"px;width:"+itemWidths[loop]+"px;z-index:5;text-align:center;"+
		borderCode+"\">\n");

		firstTildeIndex= items[loop].indexOf("~");
		label=items[loop].substring(0,firstTildeIndex);
		link=items[loop].substring(firstTildeIndex+1);
		document.write("<a href=\""+link+"\">"+label+"</a></div>\n");
		itemLeft+=itemWidths[loop];
	}
	//bottom line
	if (insertBottomBar)
	{
	document.write("<div style=\"position:absolute;top:"+height+"px;left:0px;width:"+
		(width+iconOffset+leftMostSpacing*2)+"px;\"><img height=\"5\" width=\""+
		(width+iconOffset+leftMostSpacing*2)+"\" src=\""+quickLinkPrefix+"code/horizontalLine.gif\"></div>\n");
	}
	document.write("</div>\n");

}
function makeDynamicIcon(x,y,height,width, imageUrl, hoverImageUrl, onClickFunctionSignature, style,toolTip)
{
	document.write("<div class=\""+style+"\" style=\"position:absolute; left:"+x+
		"px;top:"+y+"px;width:"+width+"px;height:"+height+
		"px;\"><a title=\""+toolTip+"\" onClick=\""+onClickFunctionSignature+"\"><img class=\""+style+"\" src=\""+imageUrl+"\" onMouseOver=\""+
		"this.src='"+hoverImageUrl+"';\" onMouseOut=\""+
		"this.src='"+imageUrl+"';\"></a></div>");
}
function makeIcon(x,y,height,width, imageUrl, hoverUrl, link, style,toolTip, newWindow)
{
	target="";
	if (newWindow)
	{
		target="target=\"_blank\"";
	document.write("<div class=\""+style+"\" style=\"position:absolute; left:"+x+
		"px;top:"+y+"px;width:"+width+"px;height:"+height+
		"px;\"><a title=\""+toolTip+"\" href=\"#\" onClick='window.open(\""+
		link+"\", \"newWindow\", \"WIDTH=640, HEIGHT=480, scrollbars=yes\");'"+
		"><img class=\""+style+"\" src=\""+imageUrl+"\" onMouseOver=\""+
		"this.src='"+hoverUrl+"';\" onMouseOut=\""+
		"this.src='"+imageUrl+"';\"></a></div>");
	}
	else
	{
	document.write("<div class=\""+style+"\" style=\"position:absolute; left:"+x+
		"px;top:"+y+"px;width:"+width+"px;height:"+height+
		"px;\"><a title=\""+toolTip+"\" href=\""+link+
		"\"><img class=\""+style+"\" src=\""+imageUrl+"\" onMouseOver=\""+
		"this.src='"+hoverUrl+"';\" onMouseOut=\""+
		"this.src='"+imageUrl+"';\"></a></div>");
	}
}

//-----------------------------------------------------------
//name - name of menu
//items - array of strings for menu items
//itemLinks - array of strings that represent the links of the menu items
//            to trigger a popup, start the link with "menu:"
//smallCaps - true to make the font-variant small-caps, otherwise false
//colWidths - array of column widths (to match nCols respectively)
//popup - true indicates visibility is normally false and must be linked
//ncols - number of columns in the menu
//lipSize - the size of the horizontal lip on the first menu item.
//-----------------------------------------------------------

function MakeMenu(name, x, y, items, itemLinks, itemHeight, colWidths, leftIndent,
	styleName, smallCaps, popup, nCols, submenuIcon, lipSize)
{
	var rows=Math.round(items.length/nCols);
	if (items.length % rows !=0) rows++;
	var totalHeight=rows*itemHeight;

	//find all the popups!!
	popups=new Array(0);
	for (loop=0;loop<itemLinks.length;loop++)
	{
	    if (itemLinks[loop].indexOf("menu:")==0)
	    {
		menuToShow=trim(itemLinks[loop].substr(5));
		if (menuToShow.indexOf(":")!=-1)
		{
			menuToShow=menuToShow.substr(0,menuToShow.indexOf(":"));
		}
		popups.push(menuToShow);
	    }
	}

	mouseOutFunctions="";
	addlStyleDetails="";

    //calculate the complete width of the menu
    totalWidth=0;
	for (loop=0;loop<nCols;loop++)
	{
	   totalWidth+=colWidths[loop];
	}

	zIndex=12;
	if (popup)
	{
	    addlStyleDetails="visibility: hidden;border-style:none;";
		zIndex=13;
  	    //insert layer hider
	    menu="<div id=\""+name+"Hider\" class=\""+styleName+"\" style=\"position: absolute;top: "+(y-40)+
		"px; left:"+(x-300)+"px; width:"+(totalWidth+600)+
		"px; height:"+(totalHeight+190)+"px;background-color:transparent;z-index:11;"+addlStyleDetails+"\""+
		" onMouseOver=\"hideMe('"+name+"');hideMe('"+name+"Hider');\"></div>\n";
	}	else
	{
	    menu="";
	}
	//insert menu layer

        menu+="<div id=\""+name+"\" class=\""+styleName+"\" style=\"position: absolute;top: "+y+
		"px; left:"+x+"px; width:"+totalWidth+
		"px; height:"+totalHeight+"px;z-index:"+zIndex+";border-style:none; background-color:transparent; "+addlStyleDetails+"\""+
		">\n";
	var colNo=1;
	var itemX=0;
	var itemY=0;
	for (loop=0;loop<items.length;loop++)
	{
	    if (popups.length==0)
	    {
	    	mouseOverFunctions="";
	    }
	    else
	    {
		mouseOverFunctions=" onMouseOver=\"";
	    }
	    menuToShow="";
		baseURL="#";
	    if (itemLinks[loop].indexOf("menu:")==0)
	    {
			menuToShow=trim(itemLinks[loop].substr(5));
			semiIndex=menuToShow.indexOf(":");
			if (semiIndex!=-1)
			{
				baseURL=menuToShow.substr(semiIndex+1);
				menuToShow=menuToShow.substr(0,semiIndex);
			}
		}
		for (loop2=0;loop2<popups.length;loop2++)
		{
	   		if (popups[loop2]!=menuToShow)
	   		{
				mouseOverFunctions+="hideMe('"+popups[loop2]+"');hideMe('"+popups[loop2]+"Hider');";
		   	}
		}
	    if (smallCaps==true)
	    {
	        fontVariant="font-variant: small-caps;"
	    }
	    else
	    {
		fontVariant="";
	    }
	    if (itemLinks[loop].indexOf("menu:")==0)
	    {
			mouseOverFunctions+="showMe('"+menuToShow+"');showMe('"+menuToShow+"Hider');\"";
			link="href=\""+baseURL+"\"";

			//insert popup menu icon
			menu+="<div style=\"position: absolute; top: "+(itemY*itemHeight)+"px; left:"+
			(colWidths[colNo-1]*(itemX+1)-20)+"px;z-index:14;\""+mouseOverFunctions+"><img src=\""+submenuIcon+"\"></div>\n";
			//alert("mouseOverFunctions="+mouseOverFunctions);
	    }
	    else
	    {
  			mouseOverFunctions+="\"";
		   	link="href=\""+itemLinks[loop]+"\"";
	    }

	    //insert actual item
		var offset=0;
		var frameoffset=0;
		var counterOffset=0;
		if (popup)
		{
			offset=lipSize;
			if (loop==0) counterOffset= lipSize;
			else frameoffset= lipSize;
		}
	    //figure out where this column starts
		left=0;
		for (leftLoop=0;leftLoop<colNo-1;leftLoop++)
	   {
		left+=colWidths[leftLoop];
	   }
	    //build outer item
		menu+="<div class=\""+styleName+"\" style=\"position:absolute; z-index:11; left:"+
			(left+frameoffset)+
			"px; border-style:solid;border-size:1px;top:"+
			(itemHeight*itemY)+"px;height:"+(itemHeight)+
		   "px;width:"+(colWidths[colNo-1]-frameoffset+offset-1)+"px;\"> ";
		//build link
       menu+="<a class=\""+styleName+"\" style=\"position:absolute; border-style:none;"+
				"left:"+(counterOffset+ leftIndent) +"px;width:"+(colWidths[colNo-1]-leftIndent-3)+"px;"+fontVariant+"\" "+
				link+mouseOverFunctions+">"+items[loop]+"</a></div>\n";
			//alert("mouseOverFunctions="+mouseOverFunctions);

		//now increment cols and rows
		if (colNo<nCols)
		{
			itemX++;
			colNo++;
		}
		else
		{
			itemX=0;
			itemY++;
			colNo=1;
		}

	}
	menu+="</div>\n";
	//window.alert(menu);
	document.write(menu);
}

function showMe (elementId)
{
   if (document.all)
     document.all[elementId].style.visibility = 'visible';
   else if (document.getElementById)
     document.getElementById(elementId).style.visibility = 'visible';
}

function hideMe (elementId)
{
   if (document.all)
     document.all[elementId].style.visibility = 'hidden';
   else if (document.getElementById)
       document.getElementById(elementId).style.visibility = 'hidden';
}
function trim(a)
{
  return a.replace(/^\s+/,'').replace(/\s+$/,'')
}


