fixMozillaZIndex=false; //Fixes Z-Index problem  with Mozilla browsers but causes odd scrolling problem, toggle to see if it helps
_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=2;
_subOffsetLeft=-2;

ub="http://www.watson.com/";
irb="http://ir.watson.com/";
//irb="http://ir.corporate-ir.net/staging/";

//jsb="http://careers.watsonpharm.com/EN/ASP/TG/cim_home.asp?PartnerId=11342&SiteId=258&codes=";
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"



with(HeadersStyle=new mm_style()){
align ="right";
fontfamily="Verdana, Helvetica, Tahoma, Arial";
fontsize="12px";
fontstyle="normal";
fontweight="bold";
itemwidth=95;
offcolor="#ffffff";
oncolor="#0078ad";
onbold="bold";
padding=4;
margin=0;
valign="top";
separatorsize=6;
separatorcolor="#adab69";
//pagebgcolor="#0078ad";
pagecolor="#0078ad";
}

with(menuStyle=new mm_style()){
align ="left";
fontfamily="Verdana, Helvetica, Tahoma, Arial";
fontsize="10px";
fontstyle="normal";
fontweight="bold";
itemwidth=139;
offbgcolor="#adab69";
offcolor="#0078ad";
//onbgcolor="#adab69";
onbgcolor="#0078ad";
oncolor="#d9d499";
onbold="bold";
padding=2;
margin=0;
overbgimage=ub+"images/hover.gif";
itemheight=20;
valign="middle";
pagebgcolor="#0078ad";
pagecolor="#d9d499";
}

with(subStyle=new mm_style()){
align ="left";
fontfamily="Verdana, Helvetica, Tahoma, Arial";
fontsize="10px";
fontstyle="normal";
fontweight="bold";
itemwidth=145;
offbgcolor="#0078ad";
offcolor="#d9d499";
oncolor="#fff";
onbold="bold";
padding=2;
margin=0;
separatorimage=ub+"images/seperator.gif";
separatorheight=1;
separatorpadding=2;
}

with(milonic=new menuname("Main Menu")){
alwaysvisible=1;
left=16;
overflow="scroll";
style=HeadersStyle;
top=114;
aI("showmenu=Home;text=Home;url=" + ub + "index.asp;");
aI("showmenu=About Us;text=About Us;url=" + ub + "about.asp;");
aI("showmenu=Business Segments;text=Business Segments;url=" + ub + "business_segments.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.asp;");
aI("showmenu=Career;text=Careers;url=" + ub + "career.asp;");
aI("showmenu=Contact Us;text=Contact Us;url=" + ub + "contactus.asp;");
}

with(milonic=new menuname("About Us")){
style=menuStyle;
left=120;
top="offset=-3";
aI("text=CEO Message;url=" + ub + "about/ceo.asp;");
aI("text=Vision Mission Values;url=" + ub + "about/mission.asp;");
aI("text=Focus;url=" + ub + "about/focus.asp;");
aI("text=Milestones;url=" + ub + "about/milestones.asp;");
aI("text=Recognition;url=" + ub + "about/recognition.asp;");
aI("text=Community;url=" + ub + "about/community.asp;");
aI("text=Executive Team;url=" + irb + "phoenix.zhtml?c=65778&p=irol-governance&sec=about");
aI("text=Locations;url=" + ub + "about/location.asp;pagematch=location;");
}

with(milonic=new menuname("Business Segments")){
style=menuStyle;
left=120;
aI("text=US Generics;url=" + ub + "business_segments/us_generics.asp;");
aI("text=Brand;url=" + ub + "business_segments/brand.asp;");
aI("showmenu=Distribution;text=Distribution;url=" + ub + "business_segments/distribution.asp;");
}

/*lev3*/
with(milonic=new menuname("Distribution")){
style=subStyle;
left=259;
margin=3;
top="offset=-2";
aI("text=Anda;url=" + ub + "business_segments/distribution_anda.asp;");
aI("text=VIP;url=" + ub + "business_segments/distribution_vip.asp;");
}

with(milonic=new menuname("Products")){
style=menuStyle;
left=120;
top="offset=-3";
aI("text=Product Database;url=" + ub + "products/pdatabase.asp;pagematch=search_results_products;");
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/Standard%20Terms%20and%20Conditions%20of%20Sale.pdf;target=_blank;");
aI("text=Return Goods Policy;url="+ub+"assets/partners/Return%20Goods%20Policy.pdf;target=_blank;");
}

with(milonic=new menuname("Investors")){
style=menuStyle;
left=120;
top = "offset=-3";
//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");
aI("text=Press Releases;url=" + irb + "phoenix.zhtml?c=65778&p=irol-news&nyo=0;pagematch=phoenix.zhtml?c=65778&p=irol-newsArticle");
aI("showmenu=Financial Information;text=Financial Information;url=" + irb + "phoenix.zhtml?c=65778&p=irol-sec");
aI("showmenu=Corporate Governance;text=Corporate Governance;url=" + irb + "phoenix.zhtml?c=65778&p=irol-governance");
aI("showmenu=Events and Presentations;text=Events and Presentations;url="+irb+"phoenix.zhtml?c=65778&p=irol-presentations");
aI("showmenu=Stockholder Information;text=Stockholder Information;url="+irb+"phoenix.zhtml?c=65778&p=irol-stockquotechart");
}

/*lev3*/
with(milonic=new menuname("Corporate Information")){
style=subStyle;
left=259;
margin=3;
top="offset=-2";
aI("text=Corporate Profile;url="+irb+"phoenix.zhtml?c=65778&p=irol-homeprofile&adsm=0;");
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=subStyle;
left=259;
margin=3;
top="offset=-2";
aI("text=Executive Officers and Directors;url="+irb+"phoenix.zhtml?c=65778&p=irol-governance&adsm=0;");	
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&adsm=0;");
aI("text=California Compliance Program;url="+ub+"investor/california_compliance_program.asp;");
}

/*lev3*/
with(milonic=new menuname("Financial Information")){
style=subStyle;
left=259;
margin=3;
top="offset=-2";
aI("text=SEC Filings;url="+irb+"phoenix.zhtml?c=65778&p=irol-sec&adsm2=0;");
aI("text=Annual Reports;url="+irb+"phoenix.zhtml?c=65778&p=irol-reportsannual;");
aI("text=Quarterly Results;url=" + irb + "phoenix.zhtml?c=65778&p=irol-reportsother;");
}

/*lev3*/
with(milonic=new menuname("Events and Presentations")){
style=subStyle;
left=259;
margin=3;
top="offset=-2";
aI("text=Archives;url="+irb+"phoenix.zhtml?c=65778&p=irol-audioarchives;");
}

/*lev3*/
with(milonic=new menuname("Stockholder Information")){
style=subStyle;
left=259;
margin=3;
top="offset=-2";
aI("text=Stock Information;url="+irb+"phoenix.zhtml?c=65778&p=irol-stockquotechart&adsm=0;");
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=menuStyle;
left=120;
aI("text=Business Development;url="+ub+"partners/biz_development.asp;");
aI("showmenu=Supplier Relations;text=Supplier Relations;url="+ub+"partners/supplier_relations.asp;");
}

/*lev3*/
with(milonic=new menuname("Supplier Relations")){
style=subStyle;
left=259;
margin=3;
top="offset=-2";
aI("text=Supplier Relationship Guide;url="+ub+"partners/about_supplier_relationship_guide.asp;");
}

with(milonic=new menuname("Career")){
style=menuStyle;
left=120;
top="offset=-3";
aI("text=Culture;url="+ub+"career/culture.asp;");
aI("text=Benefits;url="+ub+"career/benefits.asp;");
aI("text=Job Search;url="+ub+"career/job_search.asp;pagematch=1033;");
}



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
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);

forceChildSubOpen = true;

switch(page) {
	case "phoenix":
		var p =	 getQueryVariable("p");
		if (p) {
			if ("irol-irhome" != p) {
				forceChildSubOpen = false;
			}
		}
		break;
	case "contactus":
		forceChildSubOpen = false;
		break;
	case "distribution":
		forceChildSubOpen = false;
		break;
	case "index":
		forceChildSubOpen = false;
		break;
	case "supplier_relations":
		forceChildSubOpen = false;
		break;
	case "pdatabase":
		forceChildSubOpen = false;
		break;
}

//alert(forceChildSubOpen);

drawMenus();
