_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=2;
_subOffsetLeft=-2;


//REMEMBER TO CHANGE THE SITE MAP ALSO

ub="http://www.watson.com/";
//ub = "http://69.93.238.55/";
//ub = "http://69.93.238.59/";

irb="http://ir.watson.com/";
//irb = "http://ir.corporate-ir.net/staging/";
//irb = "http://phx.corporate-ir.net/preview/";

jsb="http://careers.watson.com/EN/ASP/TG/cim_home.asp?PartnerId=11342&SiteId=258&codes=";
//jsb = "https://sstagingjobs.brassring.com/1033/asp/tg/cim_home.asp?partnerid=11342&siteid=258"
//jsb = "http://stagingjobs.brassring.com/1033/ASP/TG/cim_home.asp?partnerid=11342&siteid=258";



with(MenuLevel1Style=new mm_style()){
	offclass = "jsMenuLevel1ItemOff";
	onclass = "jsMenuLevel1ItemHover";
	pageclass = "jsMenuLevel1ItemOn";
	itemwidth = 98;
}

with (MenuLevel2Style = new mm_style()) {
	offclass = "jsMenuLevel2ItemOff";
	onclass = "jsMenuLevel2ItemHover";
	pageclass = "jsMenuLevel2ItemOn";
	itemwidth = 162;
}

with(MenuLevel3Style=new mm_style()){
	offclass = "jsMenuLevel3ItemOff";
	onclass = "jsMenuLevel3ItemHover";
	pageclass = "jsMenuLevel3ItemOn";
	itemwidth = 125;
	//rawcss = "border-width: 1px 1px 1px 0; border-style: solid; border-color: #007fb1";
	//bordercolor = "#007fb1";
	bordercolor = "#526271";
	borderstyle = "solid";
	borderwidth = 1; //border-width: 1px 1px 1px 0;
}

with (milonic = new menuname("Main Menu")) {
	alwaysvisible = 1;
	overflow="scroll";
	style = MenuLevel1Style;
	
	///*for absolutely positioning 
	screenposition = "center";
	top = "offset=117";
	left = "offset=-442"; //c2 441
	
	aI("showmenu=Home;text=Home;url=" + ub + "index.asp;");
	aI("showmenu=About Us;text=About Us;url=" + ub + "about.asp;");
	aI("showmenu=Our Businesses;text=Our Businesses;url=" + ub + "our-businesses.asp;");
	aI("showmenu=Products;text=Products;url=" + ub + "products.asp;");
	aI("showmenu=Investors;text=Investors;url="+irb+"phoenix.zhtml?c=65778&p=irol-irhome");
	aI("showmenu=Partners;text=Partners and Suppliers;url=" + ub + "partners-suppliers/business-development.asp;");
	aI("showmenu=Career;text=Careers;url=" + ub + "careers.asp;");
	aI("showmenu=Contact Us;text=Contact Us;url=" + ub + "contact-us.asp;");
}

with(milonic=new menuname("About Us")){
	style = MenuLevel2Style; top="offset=-2"; left = "offset=2";
	aI("text=CEO Message;url=" + ub + "about/ceo.asp;");
	aI("text=Vision Mission Values;url=" + ub + "about/vision-mission-values.asp;");
	aI("text=Focus;url=" + ub + "about/focus.asp;");
	aI("text=Milestones;url=" + ub + "about/milestones.asp;");
	aI("text=Executive Team;url=" + irb + "phoenix.zhtml?c=65778&p=irol-governance&sec=about");
	aI("text=Locations;url=" + ub + "about/locations.asp;pagematch=location;");
}

with(milonic=new menuname("Our Businesses")){
	style = MenuLevel2Style; top = "offset=-2"; left = "offset=2"; 
	aI("text=Global Generics;url=" + ub + "our-businesses/global-generics.asp;");
	aI("text=Global Brands;url=" + ub + "our-businesses/global-brands.asp;");
	aI("showmenu=Distribution;text=Distribution;url=" + ub + "our-businesses/distribution.asp;");
}

with(milonic=new menuname("Distribution")){
	style = MenuLevel3Style; top = "offset=-3"; left = "offset=2";
	aI("text=Anda;url=" + ub + "our-businesses/distribution-anda.asp;");
	aI("text=VIP;url=" + ub + "our-businesses/distribution-vip.asp;");
}

with(milonic=new menuname("Products")){
	style = MenuLevel2Style; top = "offset=-2"; left = "offset=2";
	aI("text=Product Database;url=" + ub + "products/product-database.asp;pagematch=products/product-database-detail;");
	aI("text=Brand to Generic Reference Guide;url=" + ub + "products/brand-generic-reference-guide.asp");
	aI("text=Pipeline;url=" + ub + "products/pipeline.asp;");
	aI("text=Research & Development;url=" + ub + "products/research-and-development.asp;");
	aI("text=Terms & Conditions;url="+ub+"assets/partners-suppliers/Standard%20Terms%20and%20Conditions%20of%20Sale.pdf;target=_blank;");
	aI("text=Return Goods Policy;url="+ub+"assets/partners-suppliers/Return%20Goods%20Policy.pdf;target=_blank;");
}

with (milonic = new menuname("Investors")) {
	//if bottom cuts off adjsut to top = "offset=-50" (etc.)
	style = MenuLevel2Style; top = "offset=-2"; left = "offset=2";
	//style = MenuLevel2Style; top = "offset=-20"; left = "offset=2"; // for when proxy item is showing
	
	//aI("text=Proxy Materials;url=" + irb + "phoenix.zhtml?c=65778&p=proxy ");
	aI("showmenu=Corporate Information;text=Corporate Information;url=" + irb + "phoenix.zhtml?c=65778&p=irol-homeprofile&menu-control-id=1");
	aI("text=Press Releases;url=" + irb + "phoenix.zhtml?c=65778&p=irol-news&nyo=0;pagematch=phoenix.zhtml?c=65778&p=irol-news");
	aI("showmenu=Financial Information;text=Financial Information;url=" + irb + "phoenix.zhtml?c=65778&p=irol-sec&menu-control-id=1");
	aI("showmenu=Corporate Governance;text=Corporate Governance;url=" + irb + "phoenix.zhtml?c=65778&p=irol-governance&menu-control-id=1");
	aI("showmenu=Events and Presentations;text=Events and Presentations;url=" + irb + "phoenix.zhtml?c=65778&p=irol-presentations&menu-control-id=1;pagematch=phoenix.zhtml?c=65778&p=irol-presentations");
	aI("showmenu=Stockholder Information;text=Stockholder Information;url=" + irb + "phoenix.zhtml?c=65778&p=irol-stockQuote&menu-control-id=1");

}

/*lev3*/
with(milonic=new menuname("Corporate Information")){
	style = MenuLevel3Style; top = "offset=-3"; left = "offset=2";
	//aI("text=Corporate Profile;url="+irb+"phoenix.zhtml?c=65778&p=irol-homeprofile&adsm=0;");
	aI("text=Corporate Profile;url=" + irb + "phoenix.zhtml?c=65778&p=irol-homeprofile;");
	aI("text=Information Requests;url="+irb+"phoenix.zhtml?c=65778&p=irol-infoReq;");
	aI("text=E-mail Alerts;url="+irb+"phoenix.zhtml?c=65778&p=irol-alerts;");
}

/*lev3*/
with(milonic=new menuname("Corporate Governance")){
	style = MenuLevel3Style; top = "offset=-3"; left = "offset=2";
	//aI("text=Executive Officers and Directors;url="+irb+"phoenix.zhtml?c=65778&p=irol-governance&adsm=0;");
	aI("text=Executive Officers and Directors;url=" + irb + "phoenix.zhtml?c=65778&p=irol-governance;");	
	aI("text=Committee Composition;url="+irb+"phoenix.zhtml?c=65778&p=irol-govCommComp;");
	aI("text=Committee Charters;url="+irb+"phoenix.zhtml?c=65778&p=irol-govHighlights;");
	aI("text=Code of Conduct;url="+irb+"phoenix.zhtml?c=65778&p=irol-govConduct;");
	aI("text=Governance Guidelines;url="+irb+"phoenix.zhtml?c=65778&p=irol-govGuidelines;");
	aI("text=Insider Transactions;url=" + irb + "phoenix.zhtml?c=65778&p=irol-sec&watson-needed-menu-control=corporate-governance;"); //this link is also in another menu
	aI("text=California Compliance Program;url="+ub+"investor/california-compliance-program.asp;");
}

/*lev3*/
with(milonic=new menuname("Financial Information")){
	style = MenuLevel3Style; top = "offset=-3"; left = "offset=2";
	//aI("text=SEC Filings;url="+irb+"phoenix.zhtml?c=65778&p=irol-sec&adsm2=0;");
	aI("text=SEC Filings;url=" + irb + "phoenix.zhtml?c=65778&p=irol-sec;");
	aI("text=Annual Reports;url=" + irb + "phoenix.zhtml?c=65778&p=irol-reportsAnnual;pagematch=phoenix.zhtml?c=65778&p=irol-reportsAnnual");
	aI("text=Quarterly Results;url=" + irb + "phoenix.zhtml?c=65778&p=irol-reportsOther;");
	//aI("text=Corporate Fact Sheet;url=" + irb + "External.File?item=UGFyZW50SUQ9NDc2OTh8Q2hpbGRJRD0tMXxUeXBlPTM=&t=1;target=_blank");
	aI("text=Corporate Fact Sheet;url=" + irb + "External.File?item=UGFyZW50SUQ9ODc2NDF8Q2hpbGRJRD0tMXxUeXBlPTM=&t=1;target=_blank"); 
}

/*lev3*/
with(milonic=new menuname("Events and Presentations")){
	style = MenuLevel3Style; top = "offset=-3"; left = "offset=2";
	aI("text=Archives;url="+irb+"phoenix.zhtml?c=65778&p=irol-audioArchives;");
}

/*lev3*/
with(milonic=new menuname("Stockholder Information")){
	style = MenuLevel3Style; top = "offset=-3"; left = "offset=2";
	aI("text=Stock Information;url=" + irb + "phoenix.zhtml?c=65778&p=irol-stockQuote;");
	aI("text=Stock Chart;url=" + irb + "phoenix.zhtml?c=65778&p=irol-stockChart;");
	aI("text=Historical Price Lookup;url="+irb+"phoenix.zhtml?c=65778&p=irol-stocklookup;");
	aI("text=Investment Calculator;url="+irb+"phoenix.zhtml?c=65778&p=irol-stockcalculator;");
	aI("text=FAQs;url="+irb+"phoenix.zhtml?c=65778&p=irol-faq;");
}

with(milonic=new menuname("Partners")){
	style = MenuLevel2Style; top = "offset=-2"; left = "offset=2"; 
	aI("text=Business Development;url="+ub+"partners-suppliers/business-development.asp;");
	aI("showmenu=Supplier Relations;text=Supplier Relations;url="+ub+"partners-suppliers/supplier-relations.asp;");
}

/*lev3*/
with(milonic=new menuname("Supplier Relations")){
	style = MenuLevel3Style; top = "offset=-3"; left = "offset=2";
	aI("text=Supplier Relationship Guide;url="+ub+"partners-suppliers/supplier-relationship-guide.asp;");
}

with(milonic=new menuname("Career")){
	style=MenuLevel2Style;
	//top = "offset=-2";
	top = "offset=-28";
	left = "offset=2";
	aI("text=Culture;url="+ub+"careers/culture.asp;");
	aI("text=Benefits;url="+ub+"careers/benefits.asp;");
	aI("text=Job Search;url=" + ub + "careers/job-search.asp;pagematch=11342;");
	aI("showmenu=College and University;text=College and University;url=" + ub + "careers/college-and-university.asp");
}


/*lev3*/
with (milonic = new menuname("College and University")) {
	style = MenuLevel3Style; top = "offset=-3"; left = "offset=2";
	aI("text=Internships;url=" + ub + "careers/internships.asp;");
	aI("text=Recent Graduates;url=" + ub + "careers/recent-graduates.asp;");
}

function getQueryVariable(variable) {
		var query = window.location.search.substring(1);
		var pairDelimiter = "&";
		var pairSeparator = "=";
		var joomlaComName = "option,com_expose";
		if (query == "") {
			query = window.location.pathname.substring(1);
			var joomlaIsSEO = query.indexOf(joomlaComName);
			if (joomlaIsSEO != -1) {
				pairDelimiter = "/";
				pairSeparator = ",";
			}
		}
		var vars = query.split(pairDelimiter);
		for (var i=0;i<vars.length;i++) {
			var pair = vars[i].split(pairSeparator);
			if (pair[0] == variable) {
				return pair[1];
			}
		}
		return '';
}


////force open child menu except for third level nav
forceChildSubOpen = true;
var page = window.location.pathname + "?";
page = page.substring(0, page.indexOf("?"));
page = page.substring(page.lastIndexOf("/")+1);
page = page.substring(0, page.lastIndexOf("."));
//alert(page);



switch(page) {
	case "phoenix":
		var p = getQueryVariable("p");
		if (p) {
			if (("irol-irhome" != p) && ("irol-stockquotechart" != p)) {
				//alert(p);
				forceChildSubOpen = false;
			}
		}
		break;
		
	case "contact-us":
		forceChildSubOpen = false;
		break;
	case "distribution":
		forceChildSubOpen = false;
		break;
	case "index":
		forceChildSubOpen = false;
		break;
	case "supplier-relations":
		forceChildSubOpen = false;
		break;
	case "college-and-university":
		forceChildSubOpen = false;
		break;
	//case "pdatabase":
	//	forceChildSubOpen = false;
	//	break;
}

//alert(forceChildSubOpen);

drawMenus();

