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', '');
//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', '');
obj.addSubItem('NavMainItem1', '&Uuml;bersicht', '/german/patients/overview.html');
//obj.addSubItem('NavMainItem1', 'forschungsbereiche', '');
 obj.addSubItem('NavMainItem1', 'forschungsbereiche', '/german/patients/forschungsbereiche.html');
 obj.addSubItem('NavMainItem1', 'klinische pr&uuml;fungen', '/german/patients/klinische_prufungen.html');
 obj.addSubItem('NavMainItem1', 'patientenorganisationen', '/Patientenorganisationen.html');
obj.addSubItem('NavMainItem1', '','');
 
 // medical professionals
obj.addSubItem('NavMainItem2', '&Uuml;bersicht', '/german/medpro/overview.html');
 obj.addSubItem('NavMainItem2', 'medikamente', '/german/medpro/products.html');
 //obj.addSubItem('NavMainItem2', '', '');
  obj.addSubItem('NavMainItem2', 'klinische pr&uuml;fungen', '');
 //obj.addSubItem('NavMainItem2', 'informationsmaterial', '');
 obj.addSubItem('NavMainItem2', 'f&amp;e vision', '/german/medpro/research_vision.html');
 //obj.addSubItem('NavMainItem2', '', '');
obj.addSubItem('NavMainItem2', '', '');
 
 // partners
 obj.addSubItem('NavMainItem3', 'licensing', '');
 //obj.addSubItem('NavMainItem3', 'contract manufacturing', '');
 obj.addSubItem('NavMainItem3', 'extramural research', '');
 obj.addSubItem('NavMainItem3', 'amgen ventures', '');
 obj.addSubItem('NavMainItem3', 'suppliers', '');

 // investors

 obj.addSubItem('NavMainItem4', '', '');
 obj.addSubItem('NavMainItem4', '', '');
 obj.addSubItem('NavMainItem4', '', '');
 obj.addSubItem('NavMainItem4', '', '');
 obj.addSubItem('NavMainItem4', '', '');  
 obj.addSubItem('NavMainItem4', '', '');
 obj.addSubItem('NavMainItem4', '', '');
 obj.addSubItem('NavMainItem4', '', '');
 obj.addSubItem('NavMainItem4', '', '');
 
 // careers
obj.addSubItem('NavMainItem5', '&Uuml;bersicht', '/german/careers/overview.html');
 obj.addSubItem('NavMainItem5', 'jobsuche', '/german/careers/jobs.html');
 //obj.addSubItem('NavMainItem5', 'het leven bij amgen', '');
 obj.addSubItem('NavMainItem5', 'leistungen', '/german/careers/benefits.html');
 
 //obj.addSubItem('NavMainItem5', '', '');
 //obj.addSubItem('NavMainItem5', 'college programs', '');
 
 //obj.addSubItem('NavMainItem5', '', '');
 obj.addSubItem('NavMainItem5', 'jobsuche - datenschutz', '/german/careers/privacy.html');
 obj.addSubItem('NavMainItem5', 'jobsuche - nutzungsbedingungen', '/german/careers/terms.html');
 
 // media
 //obj.addSubItem('NavMainItem6', 'fact sheets', '');
 obj.addSubItem('NavMainItem6', 'pressekontakt', '/german/media/overview.html');
 obj.addSubItem('NavMainItem6', 'internationale pressemitteilungen',  '/german/leave_amgen.jsp?site=http://wwwext.amgen.com/media/pr.jsp');
 //obj.addSubItem('NavMainItem6', 'positions on industry news', prefix+'media/media_positions.jsp');
 //obj.addSubItem('NavMainItem6', 'press kits', '');
 obj.addSubItem('NavMainItem6', 'schweizer pressemitteilungen', '/german/media/schweizer_pressemitteilungen.html');
 //obj.addSubItem('NavMainItem6', 'pressekontakte', '');
}


function LoadMenuProductMenu(proObj, prefix) {
// -----------------------------
// PRODUCTS
// Products
proObj.addItem(ProductFinder.TypeEnum.ByProduct, 'p1', 'Aranesp®', '');
proObj.addItem(ProductFinder.TypeEnum.ByProduct, 'p2', 'Enbrel®', '');
proObj.addItem(ProductFinder.TypeEnum.ByProduct, 'p3', 'EPOGEN®', '');
proObj.addItem(ProductFinder.TypeEnum.ByProduct, 'p4', '', '');
proObj.addItem(ProductFinder.TypeEnum.ByProduct, 'p5', '', '');
proObj.addItem(ProductFinder.TypeEnum.ByProduct, 'p6', 'Neulasta®', '');
proObj.addItem(ProductFinder.TypeEnum.ByProduct, 'p6', 'Neupogen®', '');
proObj.addItem(ProductFinder.TypeEnum.ByProduct, 'p7', 'Sensipar®', '');

// Diseases
proObj.addItem(ProductFinder.TypeEnum.ByDisease, 'd1', 'Anemia', '');
proObj.addItem(ProductFinder.TypeEnum.ByDisease, 'd2', 'Ankylosing Spondylitis', '');
//proObj.addItem(ProductFinder.TypeEnum.ByDisease, 'd3', 'Arthritis', '');
proObj.addItem(ProductFinder.TypeEnum.ByDisease, 'd4', 'Blood Disorders', '');
proObj.addItem(ProductFinder.TypeEnum.ByDisease, 'd5', 'Cancer', '');
//proObj.addItem(ProductFinder.TypeEnum.ByDisease, 'd6', 'Cardiovascular Events', '');
//proObj.addItem(ProductFinder.TypeEnum.ByDisease, 'd7', 'Diabetes', '');
proObj.addItem(ProductFinder.TypeEnum.ByDisease, 'd8', 'Inflamation', '');
proObj.addItem(ProductFinder.TypeEnum.ByDisease, 'd9', 'Joint Disorders', '');
//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', '');
proObj.addItem(ProductFinder.TypeEnum.ByDisease, 'd15', 'Psoriasis', '');
proObj.addItem(ProductFinder.TypeEnum.ByDisease, 'd16', 'Rheumatoid Arthritis', '');
}



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:171px;/*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);

function openProliaVideo(){
    window.open('/german/Prolia_ICO_MOA.html','videoscreen','width=500,height=300,scrollbars=no,toolbar=no,location=no');
}
