var RowNum = 0;
var SubRowNum = 0;

//
// Menu functions
//
function MenuRow(in_Title, in_Link, in_MenuRowPopup)
{
	var Style = '';
	RowNum++;
	//in_MenuRowPopup = '';

	if (RowNum % 2)
		Style = 'TopMenuSub1';
	else
		Style = 'TopMenuSub2';
	
	// class="'+Style+'"
	return '<li><a class="'+Style+'" href="'+in_Link+'">'+in_Title+'</a>'+in_MenuRowPopup+'</li>';
}

function StartMenu(in_MenuName, in_Width, in_Height, in_Link, in_MenuRowWidth)
{
	RowNum = 0;

	return 	'<li  style="width:'+in_Width+'px;"><a href="'+in_Link+'">'
		+'<img src="/shared/spacer.gif" width="'+(in_Width-40)+'" height="'+in_Height+'" border="0" ></a>'
	+'<div><div style="width:'+in_MenuRowWidth+'px;top:0px;left:0px;"><ul style="">';
//		+'<ul style="width:'+in_MenuRowWidth+'px;top:0px;left:0px;">'
}

function EndMenu()
{	
	return '</ul></div></div></li>';
}

// Submenu functions
function SubMenuRow(in_Title, in_Link)
{
	var Style = '';
	SubRowNum++;

	if (SubRowNum % 2)
		Style = 'TopMenuSub1';
	else
		Style = 'TopMenuSub2';

	return '<li ><a class="'+Style+'" href="'+in_Link+'">'+in_Title+'</a></li>';
}
function StartSubMenu(in_Width, in_LeftOffset)
{
	SubRowNum = 0;
	return '<div><div style="width:'+in_Width+'px;top:-18px;left:'+in_LeftOffset+'px;"><ul style="">';
	//return '<div><ul style="width:'+in_Width+'px;top:-17px;left:'+in_LeftOffset+'px;"><div>';
}
function EndSubMenu()
{
	return '</ul></div></div>';
}

//
// Display popup menu if not AOL Mac
//
IsAolMac = false;
Browser = navigator.userAgent;
if ((Browser.indexOf("Macintosh") != -1) && (Browser.indexOf("AOL") != -1))
	IsAolMac = true;
	
if (IsAolMac)
{	
	document.write('<img src="'+ DefaultMenu +'" width="584" height="23" border="0" usemap="#Map">');
}
else
{

	//background-image:url(mainnav.gif);
	document.write('<div><div><div style="display:none;width:584;padding:0;margin:0;border:0"><ul id="imenus0" style="width:584px">');

// Treatment Options main menu
	MenuWidth = 141;
	Menu = StartMenu('Treatment', 120, 23, '/treatment/index.html', MenuWidth+3);
	
	Menu += MenuRow('Introduction', '/treatment/index.html', '');

	SubMenu = StartSubMenu(120, MenuWidth);
	SubMenu += SubMenuRow('Print', '/treatment/books/print.html');
	SubMenu += SubMenuRow('Online audio &amp; video', '/treatment/books/online.html');
	SubMenu += SubMenuRow('DVDs', '/treatment/books/dvd.html');
//	SubMenu += SubMenuRow('e-Cards', '/treatment/books/ecard.html');
	SubMenu += EndSubMenu();
	Menu += MenuRow('Books, Radio &amp; Media', '/treatment/books/print.html', SubMenu);
	
	
	
	SubMenu = StartSubMenu(100, MenuWidth);
	SubMenu += SubMenuRow('Facilities', '/treatment/detox/facilities.html');
	SubMenu += SubMenuRow('Alcohol', '/treatment/detox/alcohol.html');
	SubMenu += SubMenuRow('Cocaine', '/treatment/detox/cocaine.html');
	SubMenu += SubMenuRow('Opiates', '/treatment/detox/opiate.html');
	SubMenu += EndSubMenu();

	Menu += MenuRow('Detoxification', '/treatment/detox/facilities.html', SubMenu);

	Menu += MenuRow('Evaluate Yourself', '/treatment/evaluation.html', '');
	Menu += MenuRow('Finding Treatment', '/treatment/find_treatment.html', '');
	Menu += MenuRow('General Drug Abuse Info', '/treatment/general.html', '');
	Menu += MenuRow('International Locators', '/treatment/international.html', '');
	Menu += MenuRow('Intervention Services', '/treatment/intervention.html', '');
	Menu += MenuRow('Mental Health Practitioners', '/treatment/practitioners.html', '');

	SubMenu = StartSubMenu(100, MenuWidth);
	SubMenu += SubMenuRow('Message boards', '/treatment/mboard_chat/mboard.html');
	SubMenu += SubMenuRow('Blogs', '/treatment/mboard_chat/blogs.html');
	SubMenu += SubMenuRow('Chat rooms', '/treatment/mboard_chat/chat.html');
	SubMenu += SubMenuRow('Online meetings', '/treatment/mboard_chat/online_meet.html');
	
	SubMenu += EndSubMenu();

	Menu += MenuRow('Message Boards &amp; Chat', '/treatment/mboard_chat/mboard.html', SubMenu);

	SubMenu = StartSubMenu(107, MenuWidth);
        SubMenu += SubMenuRow('Introduction', '/treatment/nicotine/intro.html');
        SubMenu += SubMenuRow('Medications', '/treatment/nicotine/medications.html');
        SubMenu += SubMenuRow('Recovery resources', '/treatment/nicotine/recovery.html');
  	SubMenu += SubMenuRow('Treatment centers', '/treatment/nicotine/treatment.html');
      
        SubMenu += EndSubMenu();

        Menu += MenuRow('Nicotine Treatment', '/treatment/nicotine/intro.html', SubMenu);
	
	Menu += MenuRow('Online Treatment', '/treatment/online.html', '');
	Menu += MenuRow('Outdoor Therapy', '/treatment/outdoor.html', '');
	
	SubMenu = StartSubMenu(118, MenuWidth);
	SubMenu += SubMenuRow('12-step', '/treatment/recovery/12step.html');
	SubMenu += SubMenuRow('Meeting locator', '/treatment/recovery/meet_locator.html');
	SubMenu += SubMenuRow('Rational and secular', '/treatment/recovery/rational_secular.html');
	SubMenu += SubMenuRow('Religious-based', '/treatment/recovery/religious.html');
	SubMenu += SubMenuRow('Other programs', '/treatment/recovery/other.html');
	SubMenu += SubMenuRow('Nicotine dependence', '/treatment/recovery/nicotine.html');
	SubMenu += SubMenuRow('Online help', '/treatment/recovery/online_help.html');
	SubMenu += EndSubMenu();

	Menu += MenuRow('Recovery Programs', '/treatment/recovery/12step.html', SubMenu);
	
	SubMenu = StartSubMenu(117, MenuWidth);
	SubMenu += SubMenuRow('Introduction', '/treatment/residential/intro.html');
	SubMenu += SubMenuRow('Low cost treatment', '/treatment/residential/low_cost.html');
	SubMenu += SubMenuRow('Treatment centers', '/treatment/residential/centers.html');
	SubMenu += SubMenuRow('Center comparison', '/treatment/residential/compare.html');
	//SubMenu += SubMenuRow('Extended care', '/treatment/residential/extended.html');
	SubMenu += SubMenuRow('International centers', '/treatment/residential/international.html');
	SubMenu += SubMenuRow('For the disabled', '/treatment/residential/disabled.html');
	SubMenu += SubMenuRow('Holistic Treatment Centers', '/treatment/residential/holistic_treatment.html');
	SubMenu += SubMenuRow('Nicotine dependence', '/treatment/residential/nicotine.html');
	SubMenu += EndSubMenu();

	Menu += MenuRow('Residential Treatment', '/treatment/residential/intro.html', SubMenu);

	Menu += MenuRow('Resources for the Disabled', '/treatment/resources.html', '');
	Menu += MenuRow('Retreats', '/treatment/retreats.html', '');
	Menu += MenuRow('Sober Housing', '/treatment/housing.html', '');
	
	SubMenu = StartSubMenu(120, MenuWidth);
	SubMenu += SubMenuRow('Teenagers', '/treatment/youth/teens.html');
	SubMenu += SubMenuRow('Young adults', '/treatment/youth/young_adults.html');
	SubMenu += SubMenuRow('Parents', '/treatment/youth/parents.html');
	SubMenu += SubMenuRow('Residential Treatment', '/treatment/youth/residential.html');
	SubMenu += EndSubMenu();
	
	Menu += MenuRow('Youth Services', '/treatment/youth/teens.html', SubMenu);
	Menu += MenuRow('View All on One Page', '/treatment/view.html', '');

	Menu += EndMenu();

	// Addiction Medication
	Menu += StartMenu('Medication', 134, 23, '/medications/index.html', 122);

	Menu += MenuRow('Introduction', '/medications/index.html', '');
	Menu += MenuRow('Heroin &amp; Pain Pills', '/medications/heroin/index.html', '');
	Menu += MenuRow('Cocaine', '/medications/cocaine/index.html', '');
	Menu += MenuRow('Methamphetamine', '/medications/meth/index.html', '');
	Menu += MenuRow('Inhalant', '/medications/inhalant/index.html', '');
	Menu += MenuRow('Alcoholism', '/medications/alcoholism/index.html', '');
	Menu += MenuRow('Nicotine', '/medications/nicotine/index.html', '');
	Menu += MenuRow('General', '/medications/general/index.html', '');
	Menu += MenuRow('View All on One Page', '/medications/view.html', '');

	Menu += EndMenu();

	// Holistic Approaches
	Menu += StartMenu('Holistic', 125, 23, '/holistic/index.html', 127);

	Menu += MenuRow('Introduction', '/holistic/index.html', '');
	Menu += MenuRow('Acupuncture', '/holistic/acupuncture.html', '');
	Menu += MenuRow('Animal/Pet Therapy', '/holistic/pet.html', '');
	Menu += MenuRow('Aromatherapy', '/holistic/aromatherapy.html', '');
	Menu += MenuRow('Bioelectricity', '/holistic/bioelectric.html', '');
	Menu += MenuRow('Biofeedback', '/holistic/biofeedback.html', '');
	Menu += MenuRow('Brainwave Biofeedback', '/holistic/brainwave.html', '');
	Menu += MenuRow('Creative Arts Therapy', '/holistic/arts.html', '');
	Menu += MenuRow('Coloring Therapy', '/holistic/color.html', '');
	Menu += MenuRow('Herbal Therapy', '/holistic/herbal.html', '');
	Menu += MenuRow('Homeopathy', '/holistic/homeopathy.html', '');
	Menu += MenuRow('Hypnosis', '/holistic/hypnosis.html', '');
	Menu += MenuRow('Imagery', '/holistic/imagery.html', '');
	Menu += MenuRow('Massage &amp; Bodywork', '/holistic/massage.html', '');
	Menu += MenuRow('Meditation/Spirituality', '/holistic/meditation.html', '');
	Menu += MenuRow('Music', '/holistic/music.html', '');
	Menu += MenuRow('Nutrition', '/holistic/nutrition.html', '');
	Menu += MenuRow('Qigong', '/holistic/qigong.html', '');
	Menu += MenuRow('Yoga', '/holistic/yoga.html', '');
	Menu += MenuRow('View All on One Page', '/holistic/view.html', '');

	Menu += EndMenu();

	// Message Board 
	Menu += StartMenu('Board', 98, 23, '/message_board/', 154);

	Menu += MenuRow('Pain Pills', '/message_board/index.php?act=SF&f=19', '');
	Menu += MenuRow('Other Prescription Drugs', '/message_board/index.php?act=SF&f=18', '');
	Menu += MenuRow('Suboxone', '/message_board/index.php?act=SF&f=25', '');
	Menu += MenuRow('Heroin', '/message_board/index.php?act=SF&f=17', '');
	Menu += MenuRow('Cocaine / Crack Cocaine', '/message_board/index.php?act=SF&f=16', '');
	Menu += MenuRow('Methamphetamines', '/message_board/index.php?act=SF&f=20', '');
	Menu += MenuRow('Marijuana', '/message_board/index.php?act=SF&f=21', '');
	Menu += MenuRow('Alcohol', '/message_board/index.php?act=SF&f=15', '');
	Menu += MenuRow('Nicotine', '/message_board/index.php?act=SF&f=24', '');
	Menu += MenuRow('Other Drugs', '/message_board/index.php?act=SF&f=14', '');
	Menu += MenuRow('Other Addictions', '/message_board/index.php?act=SF&f=13', '');
	Menu += MenuRow('Families / Partners of Addicts', '/message_board/index.php?act=SF&f=22', '');
	Menu += MenuRow('Success Stories', '/message_board/index.php?act=SF&f=23', '');
	Menu += MenuRow('Recovery Diaries', '/message_board/index.php?act=SF&f=26', '');
	Menu += MenuRow('Recovery Milestones', '/message_board/index.php?act=SF&f=27', '');
	Menu += MenuRow('General / Miscellaneous', '/message_board/index.php?act=SF&f=10', '');
        Menu += MenuRow('Posting Guidelines', '/message_board/guidelines.html', '');
	Menu += MenuRow('View All Forums', '/message_board/', '');

	Menu += EndMenu();

	// Beyond Recovery
	Menu += StartMenu('Recovery', 107, 23, '/beyond/', 122);

	Menu += MenuRow('Introduction', '/beyond/', '');
	Menu += MenuRow('Relapse Prevention', '/beyond/relapse.html', '');
	Menu += MenuRow('Jobs', '/beyond/jobs.html', '');
	Menu += MenuRow('Housing', '/beyond/housing.html', '');
	Menu += MenuRow('Education', '/beyond/education.html', '');
	Menu += MenuRow('Legal', '/beyond/legal.html', '');
	Menu += MenuRow('Advocacy', '/beyond/advocacy.html', '');
	Menu += MenuRow('Volunteering', '/beyond/volunteer.html', '');
	Menu += MenuRow('View All on One Page', '/beyond/view.html', '');

	Menu += EndMenu();

document.write(Menu+'</ul><div style="clear:left;"></div></div></div></div>');

/*

          Tips & Tricks

             1: Adjust the "function menudata0()" numeric id in the statement below to match the numeric id of
                the id='imenus0' statement within the menu structure and links secion above.  The numbers must 
                match for the menu to work, multiple menus may be used on a single page by adding new sections 
                with new id's.

             2: To specifically define settings for an individual item or container, apply classes or inline styles
                directly to the UL and A tags in the HTML tags which define your menus structure and links above.

             3: Use the parameter options below to define borders and padding.  Borders and padding specified
                within the menus HTML structure may cause positioning and actual sizing to be offset a bit in
                some browsers.
 
*/




/*-------------------------------------------------
************* Parameter Settings ******************
---------------------------------------------------*/


function imenus_data0(){


	this.enable_visual_design_mode = false			//turns the visual design pad option on or off
	this.main_is_horizontal = true
	this.menu_showhide_delay = 180


   /*---------------------------------------------
   Expand Icon Images
   ---------------------------------------------*/

	this.main_expand_image = ""
	this.main_expand_image_hover = ""
	this.main_expand_image_width = ""
	this.main_expand_image_height = ""
	this.main_expand_image_offx = ""
	this.main_expand_image_offy = ""

	this.sub_expand_image = "/shared/arrow_sub.gif"
	this.sub_expand_image_hover = "/shared/arrow_sub.gif"
	this.sub_expand_image_width = "10"
	this.sub_expand_image_height = "13"
	this.sub_expand_image_offx = "0"
	this.sub_expand_image_offy = "0"



   /*---------------------------------------------
   Global Menu Styles
   ---------------------------------------------*/

	//Main Menu
//background-color:#06437d; 
	this.main_container_styles = "border-style:solid; border-color:#769bba; border-width:1px; padding-top:0px; padding-right:0px; padding-bottom:0px; padding-left:0px; "
	this.main_item_styles = "background-color:; background-image:; color:#e6e6e6; text-align:center; font-family:Arial; font-size:12px; font-weight:bold; text-decoration:none; padding-top:0px; padding-right:0px; padding-bottom:0px; padding-left:0px; border-style:none; border-color:#000000; border-width:0px; "
	this.main_item_hover_styles = "color:#E4E4E4; "
	this.main_item_active_styles = ""



	//Sub Menu
//background-color:#FBF6EA;
	this.subs_container_styles = "border-style:solid; border-color: #917B95; border-width:1px 1px 1px 1px; padding-top:0px; padding-right:0px; padding-bottom:0px; padding-left:0px; margin-left:1px;"
//	this.subs_item_styles = "background-color:#F7EBD5; color:#715272; text-align:left; font-family:arial; font-size:10px; font-weight:normal; text-decoration:none; padding-top:3px; padding-right:1px; padding-bottom:3px; padding-left:7px;"
	this.subs_item_styles = "background-color:#FBF6EA;color:#715272; text-align:left; font-family:arial; font-size:10px; font-weight:normal; text-decoration:none; padding-top:3px; padding-right:1px; padding-bottom:3px; padding-left:7px;"
/*
	this.subs_container_styles = "background-color:#cce3f8; border-style:solid; border-color:#356595; border-width:1px; padding-top:5px; padding-right:5px; padding-bottom:5px; padding-left:5px; "
	this.subs_item_styles = "color:#111111; text-align:left; font-size:11px; font-weight:normal; text-decoration:none; padding-top:2px; padding-right:5px; padding-bottom:2px; padding-left:5px; border-style:none; border-width:1px; "
*/
	this.subs_item_hover_styles = "background-color:#715272;font-weight:;text-decoration:;"
	this.subs_item_active_styles = "background-color:#715272; color:#E4E4E4; font-weight:; text-decoration:;"

/*
	this.subs_container_styles = "color:#715272;border-style:solid; border-color: #917B95; border-width:0 1px 1px 1px; padding-top:0px; padding-right:0px; padding-bottom:0px; padding-left:0px; margin-left:1px;"
//	this.subs_item_styles = "background-color:#F7EBD5; color:#715272; text-align:left; font-family:arial; font-size:10px; font-weight:normal; text-decoration:none; padding-top:3px; padding-right:1px; padding-bottom:3px; padding-left:7px;"
	this.subs_item_styles = "color:#715272; text-align:left; font-family:arial; font-size:10px; font-weight:normal; text-decoration:none; padding-top:3px; padding-right:1px; padding-bottom:3px; padding-left:7px;"
*/

}

} // end if IsAolMac
