/********************************************************************************/
/*                                  Menu Content                                */
/********************************************************************************/
var patientInfoMenu = new Menu("Patient<br />Information", "", "width1", "doubleline");
patientInfoMenu.MenuItems = [
	new MenuItem("The PVI Advantage", "featuresp.htm"),
	new MenuItem("F.A.Q.", "faq.htm"),
	new MenuItem("How to Schedule an Exam", "schedule.htm"),
	new MenuItem("Exams (For Patients)", "examsgeneral.htm"),
	new MenuItem("Billing Information", "billingp.htm"),
	new MenuItem("Associate Physicians", "assocphysiciansp.htm"),
	new MenuItem("Patient Privacy Policy", "privacyp.htm"),
	new MenuItem("Patient Comments", "patientcommentsp.htm"),
	new MenuItem("MD Comments", "mdcommentsp.htm"),
	new MenuItem("About Vascular Disease", "vasculardisease.htm"),
	new MenuItem("Contact Us", "contactp.htm")
];

var clinicalInfoMenu = new Menu("Clinician<br />Information", "", "width1", "doubleline");
clinicalInfoMenu.MenuItems = [
	new MenuItem("How to Schedule an exam", "schedulec.htm"),
	new MenuItem("Exams (Technical)", "examstechnical.htm"),
	new MenuItem("Billing Information", "billing.htm"),
	new MenuItem("Referral Slip", "referralslip.htm"),
	new MenuItem("Associate Physicians", "assocphysiciansc.htm"),
	new MenuItem("The PVI Advantage", "features.htm"),
	new MenuItem("Patient Comments", "patientcommentsc.htm"),
	new MenuItem("MD Comments", "mdcommentsc.htm"),
	new MenuItem("Publications", "publications.htm"),
	new MenuItem("Contact Us", "contactc.htm")
];

var labLocationsMenu = new Menu("Lab Locations", "", "width1", "");
labLocationsMenu.MenuItems = [
	new MenuItem("Auburn Regional Medical Center", "auburnlab.htm"),
	new MenuItem("Enumclaw", "enumclawlab.htm"),
	new MenuItem("Evergreen Place", "totemlakelab.htm"),
	new MenuItem("Jefferson Healthcare Hospital", "jeffersonhospitallab.htm"),
	new MenuItem("Jefferson Square", "jeffersonsquarelab.htm"),
	new MenuItem("Nordstrom Tower", "nordstromlab.htm"),
	new MenuItem("Northwest Hospital", "nwhospitallab.htm"),
	new MenuItem("St. Francis Hospital", "saintfranceslab.htm"),
	new MenuItem("Stevens Hospital", "stevenslab.htm"),
	new MenuItem("Swedish/Ballard", "ballardlab.htm"),
	new MenuItem("Swedish/Cherry Hill", "providencelab.htm"),
	new MenuItem("Valley Medical Center", "valleylab.htm"),
	new MenuItem("Yakima Valley Central", "yakimacentrallab.htm"),
	new MenuItem("Yakima Valley West", "yakimawestlab.htm")
];

var examsMenu = new Menu("Exams", "", "width2", "");
examsMenu.MenuItems = [
	new MenuItem("For Patients", "examsgeneral.htm"),
	new MenuItem("For Clinicians", "examstechnical.htm")
];

var aboutUsMenu = new Menu("About Us", "", "width3", "");
aboutUsMenu.MenuItems = [
	new MenuItem("President\'s Message", "presidentialmessage.htm"),
	new MenuItem("Mission", "mission.htm"),
	new MenuItem("History", "history.htm"),
	new MenuItem("IDTF/ICAVL Status", "idtf.htm"),
	new MenuItem("Associate Physicians", "assocphysicians.htm"),
	new MenuItem("Patient Comments", "patientcomments.htm"),
	new MenuItem("MD Comments", "mdcomments.htm"),
	new MenuItem("Jobs", "jobs.htm"),
	new MenuItem("Privacy Policy", "privacy.htm"),
	new MenuItem("Contact Us", "contact.htm")
];

var cmeMenu = new Menu("CME", "http://www.pvicme.com", "width4", "");
cmeMenu.MenuItems = null;


/********************************************************************************/
/*                                Menu Helper Functions                         */
/********************************************************************************/
var menuID = 0;

var s = Menu_StartMenu();
s += patientInfoMenu.GetMenu();
s += clinicalInfoMenu.GetMenu();
s += labLocationsMenu.GetMenu();
s += examsMenu.GetMenu();
s += aboutUsMenu.GetMenu();
s += cmeMenu.GetMenu();
s += Menu_EndMenu();
document.write(s);

function Menu_StartMenu()
{
	return "<!-- start menu HTML -->\n<div id=\"menu\">\n";
}

function Menu_EndMenu()
{
	return "</div>\n<div class=\"clearfloat\" />\n<!-- end menu HTML -->\n";
}

function Menu(name, menuHref, menuClass, headerClass)
{
	this.Name = name;
	this.MenuHref = menuHref;
	this.MenuClass = menuClass;
	this.HeaderClass = headerClass;
	this.MenuItems = [];
	this.GetMenu = GetMenu;
}

function MenuItem(name, href)
{
	this.Name = name;
	this.Href = href;
}

function GetMenu()
{
	with (this)
	{
		var mc = MenuClass != "" ? " class=\"" + MenuClass + "\"" : "";
		var hc = HeaderClass != "" ? " class=\"" + HeaderClass + "\"" : "";
		var s = "<ul" + mc + ">\n<li>\n";
		if (MenuItems != null)
		{
			s += "<a href=\"#\"" + hc + " onmouseover=\"ChangeImage('downarrow" + menuID + "', 'arrow_d.gif');\" onmouseout=\"ChangeImage('downarrow" + menuID + "', 'arrow_b%20d.gif');\">\n";
			s += "<img id=\"downarrow" + menuID + "\" alt=\"\" src=\"arrow_b d.gif\" />\n" + Name + "\n</a>\n<ul>\n";
			for (var i = 0; i < MenuItems.length; i++)
			{
				s += "<li><a href=\"" + MenuItems[i].Href + "\">" + MenuItems[i].Name + "</a></li>\n";
			}
			s += "</ul>\n";
		}
		else
		{
			s += "<a href=\"" + MenuHref + "\"" + hc + ">" + Name + "</a>\n";
		}
		s += "</li>\n</ul>\n";
		menuID++;
		return s;
	}
}

function ChangeImage(id, url)
{
	document.getElementById(id).setAttribute("src", url);
}
