//
// Global
//
// website
window.name = "main";
var EX_LINK_TEXT = "The link you have selected will take you away from this site to one that is not owned or " +
"controlled by Genentech, Inc. Genentech, Inc. makes no representation as to the accuracy of " +
"the information contained on sites we do not own or control.\n\n Genentech does not recommend " +
"and does not endorse the content on any third-party websites. Your use of third-party websites " +
"is at your own risk and subject to the terms and conditions of use for such sites.";
var PRO_CHANNEL_TEXT = "The information contained in this section of the site is intended for U.S. healthcare " +
"professionals only. Click 'ok' if you are a healthcare professional.";
ns4 = (document.layers);
ns6 = (!document.all && document.getElementById);
ie4 = (document.all && !document.getElementById && !window.opera);
ie5 = (document.all && !document.fireEvent && !window.opera);
op7 = (window.opera && document.createComment) ;
w3dom = (document.getElementById || op7);
//
// Navigation
//
var MENU_COLLAPSED_IMAGE = "images/navPlus.gif";
var MANU_EXPANDED_IMAGE = "images/navMinus.gif";
var MENU_COLLAPSED_BGCOLOR = "#FFFFFF";
var MENU_EXPANDED_BGCOLOR = "#F0F0F0"; // ECECEC
var NAV_PERSIST_DELIM = "|";
function toggleSubMenu(id) {
if (!ns4)
{
var row = document.getElementById(id);
if (row == null) return;
var image = row.getElementsByTagName("img")[0];
var submenu = row.getElementsByTagName("div")[0];
if (submenu.style.display == "block") {
submenu.style.display = "none";
image.src = MENU_COLLAPSED_IMAGE;
row.style.backgroundColor = MENU_COLLAPSED_BGCOLOR;
} else {
submenu.style.display = "block";
image.src = MANU_EXPANDED_IMAGE;
row.style.backgroundColor = MENU_EXPANDED_BGCOLOR;
}
}
}
function enableSubMenu(id) {
if (!ns4)
{
var row = document.getElementById(id);
if (row == null) return;
var image = row.getElementsByTagName("img")[0];
var submenu = row.getElementsByTagName("div")[0];
if (submenu.style.display != "block") {
submenu.style.display = "block";
image.src = MANU_EXPANDED_IMAGE;
row.style.backgroundColor = MENU_EXPANDED_BGCOLOR;
}
}
}
function toggleAll(bool) {
if (!ns4)
{
var nav = document.getElementById("nav");
if (nav == null) return;
var rows = nav.getElementsByTagName("tr");
for (i = 0; i < rows.length; i++) {
if (rows[i].className == "nav") {
var image = rows[i].getElementsByTagName("img")[0];
var submenu = rows[i].getElementsByTagName("div")[0];
image.src = bool ? MANU_EXPANDED_IMAGE : MENU_COLLAPSED_IMAGE;
submenu.style.display = bool ? "block" : "none";
rows[i].style.backgroundColor = bool ? MENU_EXPANDED_BGCOLOR : MENU_COLLAPSED_BGCOLOR;
}
}
}
}
function toggleSome(nums)
{
for (i = 0; i < nums.length; i++)
{
toggleSubMenu("nav" + nums[i]);
}
}
// Cookie functions
function createCookie(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else expires = "";
document.cookie = name+"="+value+expires+"; path=/";
}
function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
}
function window_onAfterPrint() {
window.close();
}
//
// Standard DW Functions
//
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i' + value + '');
contentLayer.document.close();
}
else if (ie4)
document.all[layerName].innerHTML = value;
else if (w3dom)
document.getElementById(layerName).innerHTML = value;
return false;
}
var activeSS;
function setActiveSS(title) {
var i, a, main;
for (i=0; (a = document.getElementsByTagName("link")[i]); i++) {
if (a.getAttribute("rel") && a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
a.disabled = true;
if(a.getAttribute("title") == title)
a.disabled = false;
}
}
activeSS = title;
}
// maps stylesheet names to corresponding text size buttons
var ss2btn = {
"" : "btnTextSizeSmall",
"global2" : "btnTextSizeMed",
"global3" : "btnTextSizeLarge"
};
function isActiveTextSizeButton(btnName)
{
return (document.images[btnName].src.indexOf("On.gif") != -1);
}
function setActiveTextSizeButton()
{
var args = setActiveTextSizeButton.arguments;
var btnSrc = document.images[args[0]].src;
document.images[args[0]].src = btnSrc.replace("Off.gif", "On.gif");
for (var i = 1; i < args.length; i++)
{
btnSrc = document.images[args[i]].src;
document.images[args[i]].src = btnSrc.replace("On.gif", "Off.gif");
}
}
function setActiveHighlightButton()
{
var args = setActiveHighlightButton.arguments;
var btnSrc = document.images[args[0]].src;
document.images[args[0]].src = btnSrc.replace("Off.gif", "On.gif");
for (var i = 1; i < args.length; i++)
{
btnSrc = document.images[args[i]].src;
document.images[args[i]].src = btnSrc.replace("On.gif", "Off.gif");
}
}
function enablePiHighlights()
{
setStyleByClass('SPAN','piHighlight','backgroundColor','#d8f1f4');
setStyleByClass('TD','piTableHighlight','backgroundColor','#D8F1F4');
setActiveHighlightButton('btnPIHighlightYes', 'btnPIHighlightNo');
return false;
}
function disablePiHighlights()
{
setStyleByClass('SPAN','piHighlight','backgroundColor','white');
setStyleByClass('TD','piTableHighlight','backgroundColor','#C4DADD');
setActiveHighlightButton('btnPIHighlightNo', 'btnPIHighlightYes');
return false;
}
function jumpTo(select)
{
var val = select.options[select.selectedIndex].value;
if (val)
{
location = val;
select.selectedIndex = 0;
}
}
//
// Constructor
//
function init()
{
// init nav
if (!ns4)
{
toggleAll(false);
var navToggle = document.getElementById("navToggle");
if (navToggle) navToggle.style.display = "block";
if (navPersist = readCookie("navPersist"))
{
toggleSome(navPersist.split("|"));
}
var fontSizeToggle = document.getElementById("fontSizeToggle");
if (fontSizeToggle) fontSizeToggle.style.display = "block";
var piHighlightToggle = document.getElementById("piHighlightToggle");
if (piHighlightToggle) piHighlightToggle.style.display = "block";
if (activeSS = readCookie("activeSS"))
{
setActiveSS(activeSS);
}
var btn = ss2btn[activeSS] || ss2btn[""];
setActiveTextSizeButton(btn);
}
}
var navPersist = new Array();
//
// Destructor
//
function destroy()
{
if (!ns4)
{
// save active SS
createCookie("activeSS", activeSS);
createCookie("navPersist", navPersist.join(NAV_PERSIST_DELIM));
}
}
function saveNavState()
{
if (!ns4)
{
navPersist = new Array();
var nav = document.getElementById("nav");
if (nav == null) return;
var rows = nav.getElementsByTagName("tr");
for (i = 0; i < rows.length; i++) {
if (rows[i].className == "nav") {
var submenu = rows[i].getElementsByTagName("div")[0];
if (submenu.style.display == "block") {
navPersist[navPersist.length] = rows[i].id.substring(3, 4);
}
}
}
}
}
window.onunload = destroy;
/*
* FlashObject embed
*/
var FlashObject = function(swf, id, w, h, ver, c) {
this.swf = swf;
this.id = id;
this.width = w;
this.height = h;
this.version = ver;
this.align = "middle";
this.params = new Object();
this.variables = new Object();
this.redirect = "";
this.sq = document.location.search.split("?")[1] || "";
this.bypassTxt = "