//ROLL OVER CODE
/***************************************/

var i_pre = "images/";

section1 = new Image();
section1.src = i_pre + "mainmenu_section1.jpg";

section1_over = new Image();
section1_over.src = i_pre + "mainmenu_section1_over.jpg";

section2_over = new Image();
section2_over.src = i_pre + "mainmenu_section2_over.jpg";

section3_over = new Image();
section3_over.src = i_pre + "mainmenu_section3_over.jpg";

section4_over = new Image();
section4_over.src = i_pre + "mainmenu_section4_over.jpg";

section5_over = new Image();
section5_over.src = i_pre + "mainmenu_section5_over.jpg";

section6_over = new Image();
section6_over.src = i_pre + "mainmenu_section6_over.jpg";

section7_over = new Image();
section7_over.src = i_pre + "mainmenu_section7_over.jpg";

section8_over = new Image();
section8_over.src = i_pre + "mainmenu_section8_over.jpg";

section9_over = new Image();
section9_over.src = i_pre + "mainmenu_section9_over.jpg";

section10_over = new Image();
section10_over.src = i_pre + "mainmenu_section1.jpg";


/*
info_over = new Image(); info_over.src = i_pre + "info" + i_over;
info_out = new Image(); info_out.src = i_pre + "info" + i_out;

join_over = new Image(); join_over.src = i_pre + "join" + i_over;
join_out = new Image(); join_out.src = i_pre + "join" + i_out;

find_over = new Image(); find_over.src = i_pre + "find" + i_over;
find_out = new Image(); find_out.src = i_pre + "find" + i_out;

news_over = new Image(); news_over.src = i_pre + "news" + i_over;
news_out = new Image(); news_out.src = i_pre + "news" + i_out;

troopers_over = new Image(); troopers_over.src = i_pre + "troopers" + i_over;
troopers_out = new Image(); troopers_out.src = i_pre + "troopers" + i_out;
*/


function fnHeaderRollOutOld()
{
	
	var ua = navigator.userAgent.toLowerCase();  
	if (ua.indexOf('msie') != -1)
	{
		var iTrim = i_pre.length;
		var section = document.location.pathname;
		section = section.substring(iTrim, section.length)
		section = section.substring(0, section.indexOf("/"));
		section = section.toLowerCase();

		document.all.ImageSectionHeader.src = eval(section + ".src");
	}
	
}

var bRovers = true;

function fnHeaderRollOut(section)
{
	if (bRovers)
	{	var ua = navigator.userAgent.toLowerCase();  
		if (ua.indexOf('msie') != -1)
		{
			section = section.toLowerCase();
			document.all.ImageSectionHeader.src = eval(section + ".src");
		}
	}
}

function fnHeaderRollOver(section)
{
	if(bRovers)
	{	var ua = navigator.userAgent.toLowerCase();  
		if (ua.indexOf('msie') != -1)
		{
			section = section.toLowerCase();
			document.all.ImageSectionHeader.src = eval(section + "_over.src");
		}
	}
}

function CreateMenuNoRollover(iFromTop, iFromLeft)
{
	bRovers = false;
	CreateMenu(iFromTop, iFromLeft);
}

function CreateMenu(iFromTop, iFromLeft)
{
	//Menu object creation
	oCMenu=new makeCM("oCMenu") //Making the menu object. Argument: menuname

	oCMenu.frames = 0

	//Menu properties   
	oCMenu.pxBetween=0
	oCMenu.fromLeft=0
	oCMenu.fromTop=0
	oCMenu.rows=1
	oCMenu.menuPlacement="left"

	oCMenu.offlineRoot=""
	oCMenu.onlineRoot="" 
	oCMenu.resizeCheck=1 
	oCMenu.wait=1000 
	oCMenu.fillImg="cm_fill.gif"
	oCMenu.zIndex=2001

	//Background bar properties
	oCMenu.useBar=0
	oCMenu.barWidth="100%"
	oCMenu.barHeight="menu" 
	oCMenu.barClass="clBar"
	oCMenu.barX=10
	oCMenu.barY=5
	oCMenu.barBorderX=0
	oCMenu.barBorderY=0
	oCMenu.barBorderClass=""

	//Level properties - ALL properties have to be specified in level 0
	oCMenu.level[0]=new cm_makeLevel() //Add this for each new level
	oCMenu.level[0].width=118
	oCMenu.level[0].height=25 
	oCMenu.level[0].regClass="clLevel0"
	oCMenu.level[0].overClass="clLevel0over"
	oCMenu.level[0].borderX=0
	oCMenu.level[0].borderY=0
	oCMenu.level[0].borderClass="clLevel0border"
	oCMenu.level[0].offsetX=0
	oCMenu.level[0].offsetY=0
	oCMenu.level[0].rows=0
	oCMenu.level[0].arrow=0
	oCMenu.level[0].arrowWidth=0
	oCMenu.level[0].arrowHeight=0
	oCMenu.level[0].align="bottom"
	

	//EXAMPLE SUB LEVEL[1] PROPERTIES - You have to specify the properties you want different from LEVEL[0] - If you want all items to look the same just remove this
	oCMenu.level[1]=new cm_makeLevel() //Add this for each new level (adding one to the number)
	oCMenu.level[1].width=125
	oCMenu.level[1].height=25
	oCMenu.level[1].regClass="clLevel1"
	oCMenu.level[1].overClass="clLevel1over"
	oCMenu.level[1].borderX=1
	oCMenu.level[1].borderY=1
	oCMenu.level[1].align="right" 
	oCMenu.level[1].offsetX=0
	oCMenu.level[1].offsetY=0
	oCMenu.level[1].borderClass="clLevel1border"
	oCMenu.level[1].arrow="includes/images/menu_arrow_yellow.gif"
	oCMenu.level[1].arrowWidth=10
	oCMenu.level[1].arrowHeight=10


	//EXAMPLE SUB LEVEL[2] PROPERTIES - You have to spesify the properties you want different from LEVEL[1] OR LEVEL[0] - If you want all items to look the same just remove this
	oCMenu.level[2]=new cm_makeLevel() //Add this for each new level (adding one to the number)
	oCMenu.level[2].width=150
	oCMenu.level[2].height=20
	oCMenu.level[2].offsetX=0
	oCMenu.level[2].offsetY=0
	oCMenu.level[2].regClass="clLevel2"
	oCMenu.level[2].overClass="clLevel2over"
	oCMenu.level[2].borderClass="clLevel2border"


	/******************************************
	Menu item creation:
	myCoolMenu.makeMenu(name, parent_name, text, link, target, width, height, regImage, overImage, regClass, overClass , align, rows, nolink, onclick, onmouseover, onmouseout) 
	*************************************/
		
	oCMenu.makeMenu('top0','','&nbsp;Meet Us','','','95','','','','','','','','','','fnHeaderRollOver("section1")','fnHeaderRollOut("section1")')
		oCMenu.makeMenu('sub0','top0','About BCH','aboutus.htm')
		oCMenu.makeMenu('sub1','top0','Hospital Tours','hospitaltours.htm')
		oCMenu.makeMenu('sub2','top0','Board Members','boardmembers.htm')
		oCMenu.makeMenu('sub3','top0','Phone Directory','phonedirectory.htm')
		oCMenu.makeMenu('sub4','top0','Directions to BCH','directions.htm')
		oCMenu.makeMenu('sub5','top0','Hospital Brochures','hospitalbrochures.htm')
		oCMenu.makeMenu('sub6','top0','Contact Us','javascript:MM_openBrWindow("ContactForm.aspx","windowhandle","toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=750,height=550")','')
		
	oCMenu.makeMenu('top1','','&nbsp;Patients/Visitors/Health','','','140','','','','','','','','','','fnHeaderRollOver("section4")','fnHeaderRollOut("section1")')
		oCMenu.makeMenu('sub11','top1','Registration','registration.htm')	 	
		//	oCMenu.makeMenu('sub311','sub31','Station Locations by Map','join/ContactMap.aspx?mode=statloc')
		//	oCMenu.makeMenu('sub312','sub31','Meeting Locations by Map','join/ContactMap.aspx?mode=meetloc')
		oCMenu.makeMenu('sub12','top1','Visitor Info','visitorinfo.htm')	 	
		//	oCMenu.makeMenu('sub321','sub32','Station Locations Show All','find/StationLocations.aspx')
		//	oCMenu.makeMenu('sub322','sub32','Meeting Locations Show All','find/MeetingLocations.aspx')
		oCMenu.makeMenu('sub13','top1','Pay Bill Online','billpay.htm')
		oCMenu.makeMenu('sub14','top1','Testimonials','javascript:MM_openBrWindow("ContactFormTestimonial.aspx","windowhandle","toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=760,height=600")','')
		oCMenu.makeMenu('sub15','top1','Health Links','healthlinks.htm')
		oCMenu.makeMenu('sub16','top1','Privacy Policy','privacypolicy.htm')
	
	oCMenu.makeMenu('top2','','&nbsp;Services','','','100','','','','','','','','','','fnHeaderRollOver("section3")','fnHeaderRollOut("section1")')
	 	oCMenu.makeMenu('sub21','top2','BCH Services','bchservices.htm','','150')
		oCMenu.makeMenu('sub22','top2','Hospitalist Program','hospitalist.htm','','150')
		oCMenu.makeMenu('sub23','top2','Stoner Creek Behavioral Health Centre','stonercreek.htm','_blank','150','35')
		oCMenu.makeMenu('sub24','top2','Meet BCH Directors','bchdirectors.htm','','150')
		
	oCMenu.makeMenu('top3','','&nbsp;BCH Physicians','','','','','','','','','','','','','fnHeaderRollOver("section2")','fnHeaderRollOut("section1")')
		oCMenu.makeMenu('sub31','top3','Find a Physician','findaphysician.htm')
		oCMenu.makeMenu('sub32','top3','Featured Doctors','featureddoctors.htm')
		oCMenu.makeMenu('sub33','top3','PDF 2006 Directory','physician_directory_2006.pdf','_blank')
		
	oCMenu.makeMenu('top4','','&nbsp;Community','','','','','','','','','','','','','fnHeaderRollOver("section5")','fnHeaderRollOut("section1")')
	 	oCMenu.makeMenu('sub41','top4','Calendar of Events','calendarofevents.htm')
		oCMenu.makeMenu('sub42','top4','News/Press','newspress.htm')		
		oCMenu.makeMenu('sub43','top4','Contact Us','javascript:MM_openBrWindow("ContactForm.aspx","windowhandle","toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=750,height=550")','')
		oCMenu.makeMenu('sub44','top4','Brochures','hospitalbrochures.htm')
		
	oCMenu.makeMenu('top5','','&nbsp;Virtual Recruitment','','','150','','','','','','','','','','fnHeaderRollOver("section6")','fnHeaderRollOut("section1")')
		oCMenu.makeMenu('sub51','top5','BCH Job Board','jobboard.htm')
		oCMenu.makeMenu('sub52','top5','Physician Openings','physicianopenings.htm')
		oCMenu.makeMenu('sub53','top5','Volunteer at BCH','volunteer.htm')
	//oCMenu.makeMenu('top6','','&nbsp;Useful Health Links','links.html','','','','','','','','','','','','fnHeaderRollOver("section7")','fnHeaderRollOut("section1")')
		//oCMenu.makeMenu('sub61','top6','You have Met Us at The Perfect Time. &nbsp;Here is Why','')
	//oCMenu.makeMenu('top7','','&nbsp;Upcoming Events','home/events.htm','','','','','','','','','','','','fnHeaderRollOver("section8")','fnHeaderRollOut("section1")')
		//oCMenu.makeMenu('sub71','top7','Statesville, Iredell County, and North Carolina','')
	//oCMenu.makeMenu('top8','','&nbsp;Physician Recruitment','home/recruitment.html','','','','','','','','','','','','fnHeaderRollOver("section9")','fnHeaderRollOut("section1")')
		//oCMenu.makeMenu('sub81','top8','Meet Our Recruitment Liaisons','')
	//oCMenu.makeMenu('top9','','&nbsp;Careers','home/opportunity.html','','','','','','','','','','','','','')
	

	//Leave this line - it constructs the menu
	oCMenu.construct()	
}


