/***********************************************************************************
*	(c) Ger Versluis 2000 version 5.411 24 December 2001 (updated Jan 31st, 2003 by Dynamic Drive for Opera7)
*	For info write to menus@burmees.nl		          *
*	You may remove all comments for faster loading	          *		
***********************************************************************************/

	var NoOffFirstLineMenus=1;			// Number of first level items
	var LowBgColor='#427650';			// Background color when mouse is not over
	var LowSubBgColor='#427650';			// Background color when mouse is not over on subs
	var HighBgColor='#DCD9B8';			// Background color when mouse is over
	var HighSubBgColor='#DCD9B8';			// Background color when mouse is over on subs
	var FontLowColor='#FFFFFF';			// Font color when mouse is not over
	var FontSubLowColor='#FFFFFF';			// Font color subs when mouse is not over
	var FontHighColor='#000000';			// Font color when mouse is over
	var FontSubHighColor='#000000';			// Font color subs when mouse is over
	var BorderColor='#204F24';			// Border color
	var BorderSubColor='#204F24';			// Border color for subs
	var BorderWidth=0;				// Border width
	var BorderBtwnElmnts=1;				// Border between elements 1 or 0
	var FontFamily="Helvetica,Arial"		// Font family menu items
	var FontSize=10;				// Font size menu items
	var FontBold=0;					// Bold menu items 1 or 0
	var FontItalic=0;				// Italic menu items 1 or 0
	var MenuTextCentered='left';			// Item text position 'left', 'center' or 'right'
	var MenuCentered='center';			// Menu horizontal position 'left', 'center' or 'right'
	var MenuVerticalCentered='top';			// Menu vertical position 'top', 'middle','bottom' or static
	var ChildOverlap=0;				// horizontal overlap child/ parent
	var ChildVerticalOverlap=0;			// vertical overlap child/ parent
	var StartTop=147;				// Menu offset x coordinate
	var StartLeft=185;				// Menu offset y coordinate
	var VerCorrect=0;				// Multiple frames y correction
	var HorCorrect=0;				// Multiple frames x correction
	var LeftPaddng=10;				// Left padding
	var TopPaddng=6;				// Top padding
	var FirstLineHorizontal=1;			// SET TO 1 FOR HORIZONTAL MENU, 0 FOR VERTICAL
	var MenuFramesVertical=1;			// Frames in cols or rows 1 or 0
	var DissapearDelay=1000;			// delay before menu folds in
	var TakeOverBgColor=1;				// Menu frame takes over background color subitem frame
	var FirstLineFrame='navig';			// Frame where first level appears
	var SecLineFrame='space';			// Frame where sub levels appear
	var DocTargetFrame='space';			// Frame where target documents appear
	var TargetLoc='';				// span id for relative positioning
	var HideTop=0;					// Hide first level when loading new document 1 or 0
	var MenuWrap=0;					// enables/ disables menu wrap 1 or 0
	var RightToLeft=0;				// enables/ disables right to left unfold 1 or 0
	var UnfoldsOnClick=0;				// Level 1 unfolds onclick/ onmouseover
	var WebMasterCheck=0;				// menu tree checking on or off 1 or 0
	var ShowArrow=0;				// Uses arrow gifs when 1
	var KeepHilite=1;				// Keep selected path highligthed
	var Underline=0;
	var Arrws=['hvmenu_tri.gif',0,0,'hvmenu_tridown.gif',0,0,'hvmenu_trileft.gif',0,0];	// Arrow source, width and height

function BeforeStart(){return}
function AfterBuild(){return}
function BeforeFirstOpen(){return}
function AfterCloseAll(){return}


var Menu1, Menu2, Menu3, Menu4, Menu5, Menu6;


function createMenus( root_path, account_type, script_name )
{
    //  Menu tree
    //	MenuX=new Array(Text to show, Link, background image (optional), number of sub elements, height, width);
    //	For rollover images set "Text to show" to:  "rollover:Image1.jpg:Image2.jpg"

    if ( account_type == 'none' )
    {
	NoOffFirstLineMenus = 4;
	
	Menu1=new Array( "Home", root_path+"features/content_page/index.cfm", "", 0, 25, 55 );
	Menu2=new Array( "Amenities", "", "", 4, 19, 75 );
	    Menu2_1=new Array( "Golf", root_path+"features/content_page/index.cfm?page=golf", "", 0, 25, 150 );
	    Menu2_2=new Array( "Tennis", root_path+"features/content_page/index.cfm?page=tennis", "", 0 );	
	    Menu2_3=new Array( "Swimming", root_path+"features/content_page/index.cfm?page=swimming", "", 0 );	
	    Menu2_4=new Array( "Social", root_path+"features/content_page/index.cfm?page=social", "", 0 );
	Menu3=new Array( "Membership", root_path+"features/content_page/index.cfm?page=membership", "", 0, 25, 90 );
	Menu4=new Array( "Guest Information", root_path+"features/content_page/index.cfm?page=guest_information", "", 0, 25, 125 );
    }
    else if ( account_type == 'Board' )
    {
	StartLeft=106;
	NoOffFirstLineMenus = 6;
	Menu1=new Array( "Home", root_path+"features/announcements/index.cfm?page=announcements_announcements", "", 0, 25, 55 );
	Menu2=new Array( "Board Trustees", root_path+"features/announcements_docs/index.cfm?page=announcements_docs_board_trustees", "", 0, 25, 110 );
	Menu3=new Array( "Activities", "", "", 6, 25, 73 );
	    Menu3_1=new Array( "Golf >", "", "", 2, 25, 120 );
		Menu3_1_1=new Array( "Golf News", root_path+"features/announcements_docs/index.cfm?page=announcements_docs_golf_news", "", 0, 25, 160 );
		Menu3_1_2=new Array( "Tee Times", root_path+"features/TeeTimes/redirect.cfm?page="+script_name, "", 0);
	    Menu3_2=new Array( "Tennis >", "", "", 1 );
		    Menu3_2_1=new Array( "Tennis News", root_path+"features/announcements_docs/index.cfm?page=announcements_docs_tennis_news", "", 0, 25, 160 );
     	//	Menu3_2_2=new Array( "Court Times", "future_use", "", 0);
	    Menu3_3=new Array( "Swimming", root_path+"features/announcements_docs/index.cfm?page=announcements_docs_swimming", "", 0 );
	    Menu3_4=new Array( "Dining", root_path+"features/announcements_docs/index.cfm?page=announcements_docs_dining", "", 0 );
	    Menu3_5=new Array( "Bridge Clubs", root_path+"features/announcements_docs/index.cfm?page=announcements_docs_bridge_clubs", "", 0 );
	    Menu3_6=new Array( "Youth Activities", root_path+"features/announcements_docs/index.cfm?page=announcements_docs_youth_activities", "", 0 );
	Menu4=new Array( "Club Information", "", "", 7, 25, 115 );
	    Menu4_1=new Array( "Newsletter", root_path+"features/documents/index.cfm?page=documents_newsletter", "", 0, 25, 155 );
	    Menu4_2=new Array( "Calendar", root_path+"features/calendar/index.cfm", "", 0 );
	    Menu4_3=new Array( "Photo Gallery", root_path+"features/photogallery/index.cfm?page=photogallery_photo_gallery", "", 0 );
	    Menu4_4=new Array( "Member Directory", root_path+"features/member_directory/index.cfm?page=roster", "", 0 );
	    Menu4_5=new Array( "Web Links", root_path+"features/links/index.cfm?page=links_web", "", 0 );
	    Menu4_6=new Array( "Reference Documents", root_path+"features/documents/index.cfm?page=documents_reference_documents", "", 0 );
	    Menu4_7=new Array( "Account Statement", root_path+"features/statements/statements_content.cfm", "", 0 );
	Menu5=new Array( "Preferences", "", "", 4, 25, 90 );
	    Menu5_1=new Array( "Member Input", root_path+"features/email_form/index.cfm?page=suggestion_box", "", 0, 25, 160);
	    Menu5_2=new Array( "Email Subscriptions", root_path+"features/email_lists/index.cfm?page=users_list", "", 0 );
	    Menu5_3=new Array( "Website Preferences", root_path+"admin/index.cfm?page=settings", "", 0 );
	    Menu5_4=new Array( "My Contact Information", root_path+"features/member_directory/index.cfm?page=edit_self", "", 0 );
	Menu6=new Array( "[LOG OFF]", root_path+"admin/sign_out.cfm", "", 0, 25, 80 );
    }
    else if ( account_type == 'Member' )
    {
	StartLeft=161;
	NoOffFirstLineMenus = 5;
	Menu1=new Array( "Home", root_path+"features/announcements/index.cfm?page=announcements_announcements", "", 0, 25, 55 );
	Menu2=new Array( "Activities", "", "", 6, 25, 73 );
	    Menu2_1=new Array( "Golf >", "", "", 2, 25, 120 );
			Menu2_1_1=new Array( "Golf News", root_path+"features/announcements_docs/index.cfm?page=announcements_docs_golf_news", "", 0, 25, 160 );
			Menu2_1_2=new Array( "Tee Times", root_path+"features/TeeTimes/redirect.cfm?page="+script_name, "", 0);
	    Menu2_2=new Array( "Tennis >", "", "", 1 );
		    Menu2_2_1=new Array( "Tennis News", root_path+"features/announcements_docs/index.cfm?page=announcements_docs_tennis_news", "", 0, 25, 160 );
     	//	Menu2_2_2=new Array( "Court Times", "future_use", "", 0);
	    Menu2_3=new Array( "Swimming", root_path+"features/announcements_docs/index.cfm?page=announcements_docs_swimming", "", 0 );
	    Menu2_4=new Array( "Dining", root_path+"features/announcements_docs/index.cfm?page=announcements_docs_dining", "", 0 );
	    Menu2_5=new Array( "Bridge Clubs", root_path+"features/announcements_docs/index.cfm?page=announcements_docs_bridge_clubs", "", 0 );
	    Menu2_6=new Array( "Youth Activities", root_path+"features/announcements_docs/index.cfm?page=announcements_docs_youth_activities", "", 0 );
	Menu3=new Array( "Club Information", "", "", 7, 25, 115 );
	    Menu3_1=new Array( "Newsletter", root_path+"features/documents/index.cfm?page=documents_newsletter", "", 0, 25, 155 );
	    Menu3_2=new Array( "Calendar", root_path+"features/calendar/index.cfm", "", 0 );
	    Menu3_3=new Array( "Photo Gallery", root_path+"features/photogallery/index.cfm?page=photogallery_photo_gallery", "", 0 );
	    Menu3_4=new Array( "Member Directory", root_path+"features/member_directory/index.cfm?page=roster", "", 0 );
	    Menu3_5=new Array( "Web Links", root_path+"features/links/index.cfm?page=links_web", "", 0 );
	    Menu3_6=new Array( "Reference Documents", root_path+"features/documents/index.cfm?page=documents_reference_documents", "", 0 );
	    Menu3_7=new Array( "Account Statement", root_path+"features/statements/statements_content.cfm", "", 0 );
	Menu4=new Array( "Preferences", "", "", 4, 25, 90 );
	    Menu4_1=new Array( "Member Input", root_path+"features/email_form/index.cfm?page=suggestion_box", "", 0, 25, 160);
	    Menu4_2=new Array( "Email Subscriptions", root_path+"features/email_lists/index.cfm?page=users_list", "", 0 );
	    Menu4_3=new Array( "Website Preferences", root_path+"admin/index.cfm?page=settings", "", 0 );
	    Menu4_4=new Array( "My Contact Information", root_path+"features/member_directory/index.cfm?page=edit_self", "", 0 );
	Menu5=new Array( "[LOG OFF]", root_path+"admin/sign_out.cfm", "", 0, 25, 80 );
 
    }
    else
    {
	StartLeft=80;
	NoOffFirstLineMenus = 6;
	Menu1=new Array( "Home", root_path+"features/announcements/index.cfm?page=announcements_announcements", "", 0, 25, 55 );
	Menu2=new Array( "Board Trustees", root_path+"features/announcements_docs/index.cfm?page=announcements_docs_board_trustees", "", 0, 25, 110 );
	Menu3=new Array( "Activities", "", "", 6, 25, 73 );
	    Menu3_1=new Array( "Golf >", "", "", 2, 25, 120 );
			Menu3_1_1=new Array( "Golf News", root_path+"features/announcements_docs/index.cfm?page=announcements_docs_golf_news", "", 0, 25, 160 );
			Menu3_1_2=new Array( "Tee Times", root_path+"features/TeeTimes/redirect.cfm?page="+script_name, "", 0);
	    Menu3_2=new Array( "Tennis >", "", "", 1 );
		    Menu3_2_1=new Array( "Tennis News", root_path+"features/announcements_docs/index.cfm?page=announcements_docs_tennis_news", "", 0, 25, 160 );
     		//Menu3_2_2=new Array( "Court Times", "future_use", "", 0);
	    Menu3_3=new Array( "Swimming", root_path+"features/announcements_docs/index.cfm?page=announcements_docs_swimming", "", 0 );
	    Menu3_4=new Array( "Dining", root_path+"features/announcements_docs/index.cfm?page=announcements_docs_dining", "", 0 );
	    Menu3_5=new Array( "Bridge Clubs", root_path+"features/announcements_docs/index.cfm?page=announcements_docs_bridge_clubs", "", 0 );
	    Menu3_6=new Array( "Youth Activities", root_path+"features/announcements_docs/index.cfm?page=announcements_docs_youth_activities", "", 0 );
	Menu4=new Array( "Club Information", "", "", 7, 25, 115 );
	    Menu4_1=new Array( "Newsletter", root_path+"features/documents/index.cfm?page=documents_newsletter", "", 0, 25, 155 );
	    Menu4_2=new Array( "Calendar", root_path+"features/calendar/index.cfm", "", 0 );
	    Menu4_3=new Array( "Photo Gallery", root_path+"features/photogallery/index.cfm?page=photogallery_photo_gallery", "", 0 );
	    Menu4_4=new Array( "Member Directory", root_path+"features/member_directory/index.cfm?page=roster", "", 0 );
	    Menu4_5=new Array( "Web Links", root_path+"features/links/index.cfm?page=links_web", "", 0 );
	    Menu4_6=new Array( "Reference Documents", root_path+"features/documents/index.cfm?page=documents_reference_documents", "", 0 );
	    Menu4_7=new Array( "Account Statement", root_path+"features/statements/statements_content.cfm", "", 0 );
	Menu5=new Array( "Preferences", "", "", 4, 25, 90 );
	    Menu5_1=new Array( "Member Input", root_path+"features/email_form/index.cfm?page=suggestion_box", "", 0, 25, 160);
	    Menu5_2=new Array( "Email Subscriptions", root_path+"features/email_lists/index.cfm?page=users_list", "", 0 );
	    Menu5_3=new Array( "Website Preferences", root_path+"admin/index.cfm?page=settings", "", 0 );
	    Menu5_4=new Array( "My Contact Information", root_path+"features/member_directory/index.cfm?page=edit_self", "", 0 );

	if ( account_type == 'Admin' || account_type == 'SuperAdmin' || account_type == 'Guest' )
	{
	    StartLeft=76;
	    NoOffFirstLineMenus++;	
	    Menu6=new Array( "Update", root_path+"admin/index.cfm", "", 0, 25, 60 );
	    Menu7=new Array( "[LOG OFF]", root_path+"admin/sign_out.cfm", "", 0, 25, 80 );
	}
	else
	{
	    StartLeft=61;
	    Menu6=new Array( "[LOG OFF]", root_path+"admin/sign_out.cfm", "", 0, 25, 80 );
	}
    }

    // adjusts the menu position to check for resizing
//    adjustStartingLeftPos( account_type );
}


function adjustStartingLeftPos( account_type )
{
    if (document.layers)
    {
       browseWidth=window.outerWidth;
       browseHeight=window.outerHeight;
    }

    if (document.all)
    {
       browseWidth=document.body.clientWidth;
       browseHeight=document.body.clientHeight;
    }

    if ( browseWidth < 760 )
    {
	MenuCentered='left';
    }
}

