function retFalse() { return false; }
function retTrue() { return true; }
function setOpacity(p_oElm, p_n) {
 var sOpacity;
 
 if (document.all) {
  sOpacity    = (p_n > 0)? ((p_n < 100)? p_n.toString() : '100') : '0';
  p_oElm.style.filter  = 'alpha(opacity=' + sOpacity + ')';
 } else {
  sOpacity    = (p_n > 0)? ((p_n < 100)? '.' + ((p_n < 10)? '0' + p_n.toString() : p_n.toString()) : '1') : '0';
  p_oElm.style.MozOpacity = sOpacity;
 }
}
function emptyElement(p_oElm, p_oSkipElmWithIdArray) {
 if (p_oElm) {
  if (!p_oSkipElmWithIdArray) p_oSkipElmWithIdArray = {};
  var oSkippedChildren = {};
  while (p_oElm.firstChild) {
   // if we are supposed to skip this item, add it to "skipped" array
   if (p_oElm.firstChild.id && p_oSkipElmWithIdArray[p_oElm.firstChild.id]) {
    oSkippedChildren[p_oElm.firstChild.id] = p_oElm.firstChild;
   }
   // remove child element
   p_oElm.removeChild(p_oElm.firstChild);
  }
  
  // add back all "skipped" elements (if any)
  for (var sId in oSkippedChildren) {
   p_oElm.appendChild(oSkippedChildren[sId]);
  }
  
  //alert('empty')
 }
}
function getElmAbsPosition(p_oElm) {
 var oPos = { x:0, y:0 };
 while (p_oElm && p_oElm != document.body) {
  oPos.x += p_oElm.offsetLeft;
  oPos.y += p_oElm.offsetTop;
  
  p_oElm = p_oElm.offsetParent;
 }
 return oPos;
}
function getEventAbsPosition(e) {
 //return { x:(e.screenX - window.screenLeft), y:(e.screenY - window.screenTop) };
 return { x:e.clientX, y:e.clientY };
}
// 1: srcOfEvent, 2: insatanceelm
function isChildOf(p_oElm, p_oInElm) {
 var bIsChildOf = false;
 var oParentElm = p_oElm;
 if (oParentElm == p_oInElm) bIsChildOf = true;
 else {
  while (oParentElm && oParentElm != p_oInElm) {
   oParentElm = oParentElm.parentNode;
   if (oParentElm == p_oInElm) bIsChildOf = true;
   if (oParentElm == document.body) break;
  };
 }
 return bIsChildOf;
}
/*function hitTest(e, p_oElm) {
 if (!e) e=window.event;
 return Boolean(e
  && e.clientX >= p_oElm.offsetLeft
  && e.clientX <= (p_oElm.offsetLeft + p_oElm.offsetWidth)
  && e.clientY >= p_oElm.offsetTop
  && e.clientY <= (p_oElm.offsetTop + p_oElm.offsetHeight)
 );
}*/
function _event_stoppropagation(p_e) {
 var e = p_e || window.event;
 if (e) {
  if (typeof(e.stopPropagation) == 'function') e.stopPropagation();
  if (typeof(e.cancelBubble) == 'boolean') e.cancelBubble = true;
 }
}
function _event_preventdefault(p_e) {
 var e = p_e || window.event;
 if (e) {
  if (typeof(e.preventDefault) == 'function') e.preventDefault();
  if (typeof(e.returnValue) == 'boolean') e.returnValue = false;
 }
}
function LoadMenu(obj, prefix) {
//REDDOT: loop through the first six menu areas: patients, medical professionals, partners, investors, careers, media
//REDDOT: for each menu area, loop over child top-level navigation elements (same list as appears on the left navigation bar
//REDDOT: when viewing one of the pages in this section) Emit a line like the one immediately below for each such link
//REDDOT: Note that links within www.amgen.com must be prefaced with prefix+ while external links such as job search that 
//REDDOT: begin with http:// should NOT get the "prefix+" prefix.
 obj.addSubItem('NavMainItem1', 'products', '/patients/products.html');
//REDDOT: ignore rest of function, which explicitly performs the loop described above. In real life, the output from the loop
//REDDOT: should match the structure enumerated here.
//obj.addSubItem('NavMainItem1', 'pipeline', '/patients/pat_pipe.jsp');
 obj.addSubItem('NavMainItem1', 'disease info', '/patients/disease_info.html');
 obj.addSubItem('NavMainItem1', 'clinical trials', 'http://www.amgentrials.com');
 obj.addSubItem('NavMainItem1', 'resources', '/patients/resources.html');
 //obj.addSubItem('NavMainItem1', 'patient stories', '/patients/106.htm');
 obj.addSubItem('NavMainItem1', 'patient assistance', '/patients/assistance.html');
 
 // medical professionals
 obj.addSubItem('NavMainItem2', 'products', '/medpro/products.html');
 //obj.addSubItem('NavMainItem2', 'pipeline', '/medpro/pipe.jsp');
 obj.addSubItem('NavMainItem2', 'disease info', '/medpro/disease_condition.html');
 obj.addSubItem('NavMainItem2', 'clinical trials', 'http://www.amgentrials.com/medpro.cfm');
 obj.addSubItem('NavMainItem2', 'resources', '/medpro/resources.html');
 obj.addSubItem('NavMainItem2', 'r&amp;d vision', '/medpro/research_vision.html');
 obj.addSubItem('NavMainItem2', 'reimbursement &amp; assistance', '/reimbursement_connection/reimbursement_connection.html');
 obj.addSubItem('NavMainItem2', 'medical information', '/medpro/amgenmedinfo/medical_information.html');

 // partners
 obj.addSubItem('NavMainItem3', 'licensing', '/partners/licensing.html');
 //obj.addSubItem('NavMainItem3', 'contract manufacturing', '');
 obj.addSubItem('NavMainItem3', 'extramural research', '/partners/research.html');
 obj.addSubItem('NavMainItem3', 'amgen ventures', '/partners/amgen_ventures.html');
 obj.addSubItem('NavMainItem3', 'suppliers', '/partners/suppliers.html');

 // investors
 obj.addSubItem('NavMainItem4', 'stock info', '/investors/inv_stock.jsp');
 obj.addSubItem('NavMainItem4', 'fact sheet', '/investors/fact_sheets.html');
 obj.addSubItem('NavMainItem4', 'events calendar', '/investors/inv_events.jsp');
 obj.addSubItem('NavMainItem4', 'presentations', 'http://phx.corporate-ir.net/phoenix.zhtml?c=61656&p=irol-presentations');
 obj.addSubItem('NavMainItem4', 'investor ekit', 'http://phx.corporate-ir.net/phoenix.zhtml?c=61656&p=irol-investor-eKit');
 obj.addSubItem('NavMainItem4', 'annual &amp; financial reports', '/investors/reports.html');
 obj.addSubItem('NavMainItem4', 'pipeline', '/investors/pipe.jsp');  
 obj.addSubItem('NavMainItem4', 'frequently asked questions', '/investors/inv_faq.jsp');
 obj.addSubItem('NavMainItem4', 'leadership team', '/investors/leadership_team.html');
 obj.addSubItem('NavMainItem4', 'corporate governance', '/investors/corporate_governance.html');
 obj.addSubItem('NavMainItem4', 'investor contacts', '/investors/investors_contacts.html');
 
 // careers
 obj.addSubItem('NavMainItem5', 'job search', 'http://sh.webhire.com/public/616/indexnew.htm');
 obj.addSubItem('NavMainItem5', 'life at amgen', '/careers/life_at_amgen.html');
 obj.addSubItem('NavMainItem5', 'benefits', '/careers/benefits.html');
 obj.addSubItem('NavMainItem5', 'values', '/careers/values.html');
 obj.addSubItem('NavMainItem5', 'diversity', '/careers/diversity.html');
 obj.addSubItem('NavMainItem5', 'college programs', '/careers/college_programs.html');
 obj.addSubItem('NavMainItem5', 'locations', '/careers/locations.html');
 obj.addSubItem('NavMainItem5', 'events', '/careers/events_calendar.jsp');
 
 // media
 obj.addSubItem('NavMainItem6', 'fact sheets', '/media/fact_sheets.html');
 obj.addSubItem('NavMainItem6', 'featured content', '/media/featured_content.html');
 obj.addSubItem('NavMainItem6', 'press releases', '/media/pr.jsp');
 //obj.addSubItem('NavMainItem6', 'positions on industry news', prefix+'media/media_positions.jsp');
 //obj.addSubItem('NavMainItem6', 'press kits', '/media/264.htm');
 obj.addSubItem('NavMainItem6', 'awards &amp; recognition', '/media/awards_recognition.html');
 obj.addSubItem('NavMainItem6', 'media contacts', '/media/contacts.html');
}


function LoadMenuProductMenu(proObj, prefix) {
// -----------------------------
// PRODUCTS
// Products
proObj.addItem(ProductFinder.TypeEnum.ByProduct, 'p1', 'Aranesp®', '/patients/products_aranesp.html');
proObj.addItem(ProductFinder.TypeEnum.ByProduct, 'p2', 'Enbrel®', '/patients/products_enbrel.html');
proObj.addItem(ProductFinder.TypeEnum.ByProduct, 'p3', 'EPOGEN®', '/patients/products_epogen.html');
proObj.addItem(ProductFinder.TypeEnum.ByProduct, 'p4', 'Kepivance®', '/patients/products_kepivance.html');
proObj.addItem(ProductFinder.TypeEnum.ByProduct, 'p5', 'Kineret®', '/patients/products_kineret.html');
proObj.addItem(ProductFinder.TypeEnum.ByProduct, 'p6', 'Neulasta®', '/patients/products_neulasta.html');
proObj.addItem(ProductFinder.TypeEnum.ByProduct, 'p6', 'Neupogen®', '/patients/products_neupogen.html');
proObj.addItem(ProductFinder.TypeEnum.ByProduct, 'p7', 'Sensipar®', '/patients/products_sensipar.html');

// Diseases
proObj.addItem(ProductFinder.TypeEnum.ByDisease, 'd1', 'Anemia', '/patients/disease_info_anemia.html');
proObj.addItem(ProductFinder.TypeEnum.ByDisease, 'd2', 'Ankylosing Spondylitis', '/patients/disease_info_ankylosing_spondylitis.html');
//proObj.addItem(ProductFinder.TypeEnum.ByDisease, 'd3', 'Arthritis', '');
proObj.addItem(ProductFinder.TypeEnum.ByDisease, 'd4', 'Blood Disorders', '/patients/disease_info_blood_disorders.html');
proObj.addItem(ProductFinder.TypeEnum.ByDisease, 'd5', 'Cancer', '/patients/disease_info_cancer.html');
//proObj.addItem(ProductFinder.TypeEnum.ByDisease, 'd6', 'Cardiovascular Events', '');
//proObj.addItem(ProductFinder.TypeEnum.ByDisease, 'd7', 'Diabetes', '');
proObj.addItem(ProductFinder.TypeEnum.ByDisease, 'd8', 'Inflamation', '/patients/disease_info_inflammation.html');
proObj.addItem(ProductFinder.TypeEnum.ByDisease, 'd9', 'Joint Disorders', '/patients/disease_info_joint_disorders.html');
//proObj.addItem(ProductFinder.TypeEnum.ByDisease, 'd10', 'Kidney Disease', '');
//proObj.addItem(ProductFinder.TypeEnum.ByDisease, 'd11', 'NHL', '');
//proObj.addItem(ProductFinder.TypeEnum.ByDisease, 'd12', 'Parkinson\'s Disease', prefix+'#');
//proObj.addItem(ProductFinder.TypeEnum.ByDisease, 'd13', 'Inflammation', prefix+'#');
proObj.addItem(ProductFinder.TypeEnum.ByDisease, 'd14', 'Oral Mucositis', '/patients/disease_info_oral_mucositis.html');
proObj.addItem(ProductFinder.TypeEnum.ByDisease, 'd15', 'Psoriasis', '/patients/disease_info_psoriasis.html');
proObj.addItem(ProductFinder.TypeEnum.ByDisease, 'd16', 'Rheumatoid Arthritis', '/patients/disease_info_rheumatoid_arthritis.html');
}



var sHtmlOut = '';
sStyleOut = "<!--[if IE]>"; /*built in STyle sniffer for IE pc*/
sStyleOut += "<style>";
sStyleOut += ".ButtomNavMainItemExpansion {";
sStyleOut += "position:absolute;";
sStyleOut += "top:185px;";
sStyleOut += "left:30px;";
sStyleOut += "z-index:4;";
sStyleOut += "width:750px;/*660px;*/";
sStyleOut += "height:209px;/*205px;*/";
sStyleOut += "overflow:hidden;";
sStyleOut += "background-color:#052542;";
sStyleOut += "font:normal 12px arial,sans-serif;";
sStyleOut += "padding:0;";
sStyleOut += "}";
sStyleOut += "</style>";
sStyleOut += "<![endif]-->";
document.write (sStyleOut);