	var NoOffFirstLineMenus=5;		// Number of main menu  items
						// Colorvariables:
						// Color variables take HTML predefined color names or "#rrggbb" strings
						//For transparency make colors and border color ""
	var LowBgColor="#1F6BBE";			// Background color when mouse is not over
	var HighBgColor="#013983";			// Background color when mouse is over
	var FontLowColor="white";			// Font color when mouse is not over
	var FontHighColor="yellow";			// Font color when mouse is over
	var BorderColor="#3689D1";			// Border color
	var BorderWidthMain=0;			// Border width main items
	var BorderWidthSub=0;			// Border width sub items
 	var BorderBtwnMain=1;			// Borderwidth between elements
	var BorderBtwnSub=1;			// Borderwidth between elements sub items
	var FontFamily="tahoma,arial, helvetica";	// Font family menu items
	var FontSize=12;				// Font size menu items
	var FontBold=1;				// Bold menu items 1 or 0
	var FontItalic=0;				// Italic menu items 1 or 0
	var MenuTextCentered="center";		// Item text position left, center or left
	var MenuCentered="left";			// Menu horizontal position can be: left, center, left
	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=0;				// Menu offset x coordinate. If StartTop is between 0 and 1 StartTop is calculated as part of windowheight
	var StartLeft=0;				// Menu offset y coordinate. If StartLeft is between 0 and 1 StartLeft is calculated as part of windowheight
	var VerCorrect=0;				// Multiple frames y correction
	var HorCorrect=0;				// Multiple frames x correction
	var DistFrmFrameBrdr=0;			// Distance between main menu and frame border
	var LeftPaddng=10;				// Left padding
	var TopPaddng=-1;			// Top padding. If set to -1 text is vertically centered
	var FirstLineHorizontal=1;			// Number defines to which level the menu must unfold horizontal; 0 is all vertical
	var MenuFramesVertical=1;			// Frames in cols or rows 1 or 0
	var DissapearDelay=1000;			// delay before menu folds in
	var UnfoldDelay=10;			// delay before sub unfolds	
	var TakeOverBgColor=1;			// Menu frame takes over background color subitem frame
	var FirstLineFrame="";			// Frame where first level appears
	var SecLineFrame="";			// Frame where sub levels appear
	var DocTargetFrame="";			// Frame where target documents appear
	var TargetLoc="pulldownmenu";				// span id for relative positioning
	var MenuWrap=1;				// enables/ disables menu wrap 1 or 0
	var RightToLeft=0;				// enables/ disables left to left unfold 1 or 0
	var BottomUp=0;				// enables/ disables Bottom up unfold 1 or 0
	var UnfoldsOnClick=0;			// Level 1 unfolds onclick/ onmouseover
	//var BaseHref="http://www.avicode.com/";				// BaseHref lets you specify the root directory for relative links. 
	var BaseHref= getDomain(location.href); //192.168.10.10/";				// BaseHref lets you specify the root directory for relative links. 
						// The script precedes your relative links with BaseHref
						// For instance: 
						// when your BaseHref= "http://www.MyDomain/" and a link in the menu is "subdir/MyFile.htm",
						// the script renders to: "http://www.MyDomain/subdir/MyFile.htm"
						// Can also be used when you use images in the textfields of the menu
						// "MenuX=new Array("<img src=\""+BaseHref+"MyImage\">"
						// For testing on your harddisk use syntax like: BaseHref="file:///C|/MyFiles/Homepage/"

	var Arrws=[BaseHref+"images/tri.gif",5,10,BaseHref+"images/tridown.gif",0,0,BaseHref+"images/trileft.gif",5,10,BaseHref+"images/triup.gif",10,5];
//	var Arrws=[BaseHref+"images/tri.gif",0,0,BaseHref+"images/tridown.gif",0,0,BaseHref+"images/trileft.gif",0,0,BaseHref+"images/triup.gif",0,0];

						// Arrow source, width and height.
						// If arrow images are not needed keep source ""

	var MenuUsesFrames=0;			// MenuUsesFrames is only 0 when Main menu, submenus,
						// document targets and script are in the same frame.
						// In all other cases it must be 1
	var OverFormElements=1;			// Set this to 0 when the menu does not need to cover form elements.
	var RememberStatus=0;			// RememberStatus: When set to 1, menu unfolds to the presetted menu item. 
	var BuildOnDemand=1;			// 1/0 When set to 1 the sub menus are build when the parent is moused over
	var BgImgLeftOffset=5;			// Only relevant when bg image is used as rollover
	var ScaleMenu=0;				// 1/0 When set to 0 Menu scales with browser text size setting
						// When set to 2 only the relevant main item stays highligthed
						// The preset is done by setting a variable in the head section of the target document.
						// <head>
						//	<script type="text/javascript">var SetMenu="2_2_1";</script>
						// </head>
						// 2_2_1 represents the menu item Menu2_2_1=new Array(.......

	var HooverBold=0;				// 1 or 0
	var HooverItalic=0;				// 1 or 0
	var HooverUnderLine=0;			// 1 or 0
	var HooverTextSize=0;			// 0=off, number is font size difference on hoover
	var HooverVariant=0;			// 1 or 0

						// Below some pretty useless effects, since only IE6+ supports them
						// I provided 3 effects: MenuSlide, MenuShadow and MenuOpacity
						// If you don't need MenuSlide just leave in the line var MenuSlide="";
						// delete the other MenuSlide statements
						// In general leave the MenuSlide you need in and delete the others.
						// Above is also valid for MenuShadow and MenuOpacity
						// You can also use other effects by specifying another filter for MenuShadow and MenuOpacity.
						// You can add more filters by concanating the strings
	var MenuSlide="";
//	var MenuSlide="progid:DXImageTransform.Microsoft.RevealTrans(duration=.5, transition=1)";
//	var MenuSlide="progid:DXImageTransform.Microsoft.GradientWipe(duration=.5, wipeStyle=1)";

	var MenuShadow="";
//	var MenuShadow="progid:DXImageTransform.Microsoft.DropShadow(color=#888888, offX=2, offY=2, positive=1)";
//	var MenuShadow="progid:DXImageTransform.Microsoft.Shadow(color=#888888, direction=135, strength=3)";

	var MenuOpacity="";
//	var MenuOpacity="progid:DXImageTransform.Microsoft.Alpha(opacity=100)";

	function BeforeStart(){return}
	function AfterBuild(){return}
	function BeforeFirstOpen(){return}
	function AfterCloseAll(){return}

// Menu tree:
// MenuX=new Array("ItemText","Link","background image",number of sub elements,height,width,"bgcolor","bghighcolor",
//	"fontcolor","fonthighcolor","bordercolor","fontfamily",fontsize,fontbold,fontitalic,"textalign","statustext");
// Color and font variables defined in the menu tree take precedence over the global variables
// Fontsize, fontbold and fontitalic are ignored when set to -1.
// For rollover images ItemText or background image format is:  "rollover?"+BaseHref+"Image1.jpg?"+BaseHref+"Image2.jpg" 

//To add new menu items:  Add Menu1_X and submenus Menu1_X_N (numbers must be unique)
//Change main section variable Menu1=new Array("Products","","", X where X is the new total of menu items

Menu1=new Array("Homeownership","Homeownership/","",7,32,125,"","","#FFFFFF","","","",-1,-1,-1,"center","");
	Menu1_1=new Array("","","",0,2,180,"#B6E408","#B6E408","","","#555555","",11,0,-1,"left","");
	Menu1_2=new Array("for Homebuyers","Homeownership/for Homebuyers","",5,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");
		Menu1_2_1=new Array("First Time Homebuyer Guide","Homeownership/for Homebuyers/FirstTimeHomebuyerGuide.aspx","",0,20,200,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");
		Menu1_2_2=new Array("CHFA Homebuyer Mortgage Programs","Homeownership/for Homebuyers/Homebuyer Mortgage Programs","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");
		Menu1_2_3=new Array("Homebuyer Education","Homeownership/for Homebuyers/Homebuyer Education/default.aspx","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");
		Menu1_2_4=new Array("Frequently Asked Questions","Homeownership/for Homebuyers/FrequentlyAskedQuestions.aspx","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");		
		Menu1_2_5=new Array("Tools, Calculators and Look-ups","Homeownership/for Homebuyers/Tools Calculators and Look-ups/default.aspx","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");
	Menu1_3=new Array("for Homeowners at Risk","Homeownership/for Homeowners at Risk of Foreclosure/default.aspx","",3,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");
		Menu1_3_1=new Array("CT FAMLIES Program","Homeownership/for Homeowners at Risk of Foreclosure/CTFAMLIESProgram.aspx","",0,20,180,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");	
		Menu1_3_2=new Array("EMAP Program","Homeownership/for Homeowners at Risk of Foreclosure/EmergencyMortgageAssistanceProgram.aspx","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");	
		Menu1_3_3=new Array("Foreclosure Prevention Counseling","Homeownership/for Homeowners at Risk of Foreclosure/Foreclosure Prevention Counseling/default.aspx","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");	
	Menu1_4=new Array("for Current Homeowners","Homeownership/for Homeowners","",2,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");
		Menu1_4_1=new Array("Reverse Annuity Mortgage Program","Homeownership/for Homeowners/ReverseAnnuityMortgageProgram.aspx","",0,20,220,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");
		Menu1_4_2=new Array("Homeowner Resources","Homeownership/for Homeowners/HomeownerResources.aspx","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");	
	Menu1_5=new Array("for Lenders","Homeownership/for Lenders","",7,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");
		Menu1_5_1=new Array("Lender Guide","Homeownership/for Lenders/Lender Guide/default.aspx","",0,20,180,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");		
		Menu1_5_2=new Array("News and Announcements","Homeownership/for Lenders/Press Releases/default.aspx","",0,20,190,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");
		Menu1_5_3=new Array("Event Calendar","Homeownership/for Lenders/Event Calendar/default.aspx","",0,20,160,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");		
		Menu1_5_4=new Array("Loan Reservation System","Homeownership/for Lenders/Loan Reservation System/default.aspx","",0,20,160,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");		
		Menu1_5_5=new Array("Frequently Asked Questions","Homeownership/for Lenders/FrequentlyAskedQuestions.aspx","",0,20,160,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");		
		Menu1_5_6=new Array("Tools, Calculators and Look-ups","Homeownership/for Lenders/Tools Calculators and Look-ups/default.aspx","",0,20,160,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");		
		Menu1_5_7=new Array("Lender Document Library","Homeownership/for Lenders/Document Library/default.aspx","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");
	Menu1_6=new Array("Homeownership Contacts","Homeownership/HomeownershipCompanyContacts.aspx","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");		
	//Menu1_5=new Array("Document Library","Homeownership/Document Library/default.aspx","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");
	Menu1_7=new Array("","","",0,2,130,"#000000","#000000","","","#000000","",11,0,-1,"left","");


Menu2=new Array("Rental Housing","Rental Housing/default.aspx","",6,20,125,"","","","","","",-1,-1,-1,"center","");
	Menu2_1=new Array("","","",0,2,200,"#B6E408","#B6E408","","","#555555","",11,0,-1,"left","");
	Menu2_2=new Array("for Families and Individuals","Rental Housing/for Families and Individuals/default.aspx","",0,20,180,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");
		//Menu2_2_1=new Array("Find Affordable Housing","default.aspx","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");	
		//Menu2_2_2=new Array("Tenant Resources","default.aspx","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");		
	Menu2_3=new Array("for Developers and Sponsors","Rental Housing/for Developers and Sponsors/default.aspx","",5,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");	
		Menu2_3_1=new Array("News and Announcements","Rental Housing/for Developers and Sponsors/Press Releases/default.aspx","",0,20,180,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");							
		Menu2_3_2=new Array("Event Calendar","Rental Housing/for Developers and Sponsors/Event Calendar/default.aspx","",0,20,175,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");						
		Menu2_3_3=new Array("Funding Initiatives","Rental Housing/for Developers and Sponsors/Funding Initiatives/default.aspx","",0,20,175,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");
		//Menu2_4_4=new Array("Development Contacts","Rental Housing/for Developers and Sponsors/MultifamilyDevelopmentCompanyContacts.aspx","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");
		Menu2_3_4=new Array("Tools, Calculators and Look-ups","Rental Housing/for Developers and Sponsors/Tools, Calculators and Look-ups/default.aspx","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");
		Menu2_3_5=new Array("Developer Document Library","Rental Housing/for Developers and Sponsors/Document Library/default.aspx","",0,20,175,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");	
	Menu2_4=new Array("for Owners and Management Agents","Rental Housing/for Owners and Management Agents/default.aspx","",6,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");
		Menu2_4_1=new Array("News and Annoucements","Rental Housing/for Owners and Management Agents/Press Releases/default.aspx","",0,20,180,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");	
		Menu2_4_2=new Array("Event Calendar","Rental Housing/for Owners and Management Agents/Event Calendar/default.aspx","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");	
		Menu2_4_3=new Array("Compliance and Reporting","Rental Housing/for Owners and Management Agents/Compliance and Reporting/default.aspx","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");	
		Menu2_4_4=new Array("Capital Needs Funding","Rental Housing/for Owners and Management Agents/Capital Needs Funding/default.aspx","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");	
		Menu2_4_5=new Array("Tools, Calculators and Look-ups","Rental Housing/for Owners and Management Agents/Tools Calculators and Look-ups/default.aspx","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");							
		Menu2_4_6=new Array("Owner Document Library","Rental Housing/for Owners and Management Agents/Document Library/default.aspx","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");							
	Menu2_5=new Array("Rental Housing Contacts","Rental Housing/RentalHousingCompanyContacts.aspx","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");	
	Menu2_6=new Array("","","",0,2,140,"#000000","#000000","","","#000000","",11,0,-1,"left","");	

Menu3=new Array("CHFA Success Stories","CHFA Success Stories/default.aspx","",6,20,175,"","","","","","",12,-1,-1,"center","");
	Menu3_1=new Array("","","",0,2,200,"#B6E408","#B6E408","","","#555555","",11,0,-1,"left","");
	Menu3_2=new Array("Interagency Collaborations","CHFA Success Stories/Interagency Collaborations/default.aspx","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");
	Menu3_3=new Array("Affordable Housing Developments","CHFA Success Stories/Affordable Housing Developments/default.aspx","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");	
	Menu3_4=new Array("Responses to the Housing Crisis","CHFA Success Stories/Responses to the Housing Crisis/default.aspx","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");
	Menu3_5=new Array("Awards and Recognitions","CHFA Success Stories/Awards and Recognitions/default.aspx","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");
	Menu3_6=new Array("","","",0,2,140,"#000000","#000000","","","#000000","",11,0,-1,"left","");	

Menu4=new Array("Press Room","Press Room/default.aspx","",8,20,100,"","","","","","",-1,-1,-1,"center","");
	Menu4_1=new Array("","","",0,2,140,"#B6E408","#B6E408","","","#555555","",11,0,-1,"left","");
	Menu4_2=new Array("Press Releases","Press Room/Press Releases/default.aspx","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");
	Menu4_3=new Array("CHFA In the Media","Press Room/In the Media/default.aspx","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");
	Menu4_4=new Array("Event Calendar","Press Room/Event Calendar/default.aspx","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");
	Menu4_5=new Array("Investor Relations","Press Room/Investor Relations/default.aspx","",3,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");	
		Menu4_5_1=new Array("News and Announcements","/Press Room/Investor Relations/Press Releases/default.aspx","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");		
		Menu4_5_2=new Array("Annual Reports","/Press Room/Investor Relations/Annual Reports/default.aspx","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");
		Menu4_5_3=new Array("Bond Disclosure","/Press Room/Investor Relations/Bond Disclosure/default.aspx","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");
	Menu4_6=new Array("For Legislators","/Press Room/for Legislators/default.aspx","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");
	Menu4_7=new Array("CHFA Research Data","/Press Room/CHFA Research Data/default.aspx","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");
	Menu4_8=new Array("","","",0,2,140,"#000000","#000000","","","#000000","",11,0,-1,"left","");

Menu5=new Array("About Us","/About Us/","",8,20,85,"","","","","","",-1,-1,-1,"center","");
	Menu5_1=new Array("","","",0,2,140,"#B6E408","#B6E408","","","#555555","",11,0,-1,"left","");
	Menu5_2=new Array("Company History","About Us/Company History.aspx","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");
	//Menu5_3=new Array("Executive Director","default.aspx","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");	
	Menu5_3=new Array("Board of Directors","About Us/Board of Directors/default.aspx","",5,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");
		Menu5_3_1=new Array("Directors","About Us/Board of Directors/BoardOfDirectors.aspx","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");
		Menu5_3_2=new Array("Board Calendar","About Us/Board of Directors/Event Calendar/default.aspx","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");
		Menu5_3_3=new Array("Agendas and Materials","About Us/Board of Directors/Meeting Agendas/default.aspx","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");
		Menu5_3_4=new Array("Meeting Minutes","About Us/Board of Directors/Meeting Minutes/default.aspx","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");
		Menu5_3_5=new Array("Policy Statements","About Us/Board of Directors/Policy Statements/default.aspx","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");
	Menu5_4=new Array("CHFA Staff Listing","About Us/Staff Listing/","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");
	Menu5_5=new Array("Requests for Proposals","About Us/Requests for Proposals/","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");
	Menu5_6=new Array("Career Opportunities","About Us/Career Opportunities/","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");	
	Menu5_7=new Array("Driving Directions","About Us/Driving Directions/","",0,20,140,"#222222","#1F3563","","","#555555","",11,0,-1,"left","");	
	Menu5_8=new Array("","","",0,2,140,"#000000","#000000","","","#000000","",11,0,-1,"left","");	


function getDomain(str)
{
   var i;
   
   //if it is empty, don't bother
   if (str == null || str.length == 0)
      return "";
         
   //find the http://, if it is there   
   i = str.indexOf("//");
   if (i == -1)
   		i = 0;
      //str = str.substring(i+2); //, str.length - i);
      
   //now, if there is a slash in the url, take everything before it. 
   i = str.indexOf("/", i+2);
   if (i > -1)
      str = str.substring(0, i);
   
   str += "/";

   return str; 
}
