function trackflash(str) { var s_account="genedev" if (window.location.hostname.indexOf('herceptin-qa.gene.com') > -1) { s_account= "geneqa"; } else { if (window.location.hostname.indexOf('herceptin-ua.gene.com') > -1) { s_account="geneua"; } else { if (window.location.hostname.indexOf('www.herceptin.com') > -1) { s_account="geneherceptin,geneexternal"; } } } var s=s_gi(s_account);s.prop1=str;s.linkTrackVars='prop1';void(s.tl(true,'o',str)); } function confirm_hcp(hcpURL,channel,page) { //do tracking if channel and page vars are passed to function if ((channel != undefined) && (page != undefined)) { trackChannelLink(channel,page); } var loc = hcpURL; input_box=confirm('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.'); if (input_box==true) { // Output when OK is clicked document.location=loc; } else { // Output when Cancel is clicked } } function trackChannelLink(channel,current) { s.prop1 = 'new_channel:' + channel; s.prop2 = 'from:' + current; s.linkTrackVars = 'prop1,prop2'; s.tl(true,'o','Link to channel: ' + channel + ' from: ' + current); return false; } function expandDiv(id) { var divElement = document.getElementById(id); if( divElement.style.display ) { divElement.style.display = "block"; } } function contractDiv(id) { var divElement = document.getElementById(id); if( divElement.style.display ) { divElement.style.display = "none"; } } /* Happens when a user removes a file on edit or create. * Places the file type input element and a hidden fileDelete marker * for the servlet. */ function removePhotoUser(id) { var divElement = document.getElementById(id); if ( divElement.hasChildNodes() ) { while ( divElement.childNodes.length >= 1 ) { divElement.removeChild( divElement.firstChild ); } } var myElement = document.createElement('input'); myElement.setAttribute('type','hidden'); myElement.setAttribute('name','photoDelete'); myElement.setAttribute('value','blahblahblah'); divElement.appendChild(myElement); var myDiv = document.createElement('div'); myDiv.appendChild( document.createTextNode("delete photo pending submit") ); divElement.appendChild(myDiv); var myElement = document.createElement('input'); myElement.setAttribute('type','file'); myElement.setAttribute('name','photo'); divElement.appendChild(myElement); } /* Happens when a user removes a ambassador file on edit or create. * Places the file type input element and a hidden fileDelete marker * for the servlet. */ function removeAmbassadorPhotoUser(id) { var divElement = document.getElementById(id); if ( divElement.hasChildNodes() ) { while ( divElement.childNodes.length >= 1 ) { divElement.removeChild( divElement.firstChild ); } } var myElement = document.createElement('input'); myElement.setAttribute('type','hidden'); myElement.setAttribute('name','ambassadorPhotoDelete'); myElement.setAttribute('value','blahblahblah'); divElement.appendChild(myElement); var myDiv = document.createElement('div'); myDiv.appendChild( document.createTextNode("delete ambassador photo pending submit") ); divElement.appendChild(myDiv); var myElement = document.createElement('input'); myElement.setAttribute('type','file'); myElement.setAttribute('name','ambassadorPhoto'); divElement.appendChild(myElement); } /* Happens when a ecard removes a large image file on edit or create. * Places the file type input element and a hidden fileDelete marker * for the servlet. */ function removeLargeImage(id) { var divElement = document.getElementById(id); if ( divElement.hasChildNodes() ) { while ( divElement.childNodes.length >= 1 ) { divElement.removeChild( divElement.firstChild ); } } var myElement = document.createElement('input'); myElement.setAttribute('type','hidden'); myElement.setAttribute('name','largeImageDelete'); myElement.setAttribute('value','blahblahblah'); divElement.appendChild(myElement); var myDiv = document.createElement('div'); myDiv.appendChild( document.createTextNode("delete large image pending submit") ); divElement.appendChild(myDiv); var myElement = document.createElement('input'); myElement.setAttribute('type','file'); myElement.setAttribute('name','largeImage'); divElement.appendChild(myElement); } /* Happens when a ecard removes a large image file on edit or create. * Places the file type input element and a hidden fileDelete marker * for the servlet. */ function removeSmallImage(id) { var divElement = document.getElementById(id); if ( divElement.hasChildNodes() ) { while ( divElement.childNodes.length >= 1 ) { divElement.removeChild( divElement.firstChild ); } } var myElement = document.createElement('input'); myElement.setAttribute('type','hidden'); myElement.setAttribute('name','smallImageDelete'); myElement.setAttribute('value','blahblahblah'); divElement.appendChild(myElement); var myDiv = document.createElement('div'); myDiv.appendChild( document.createTextNode("delete small image pending submit") ); divElement.appendChild(myDiv); var myElement = document.createElement('input'); myElement.setAttribute('type','file'); myElement.setAttribute('name','smallImage'); divElement.appendChild(myElement); } function clearSearch() { document.getElementById("search-field").value=''; } function clearPopups() { document.getElementById("explanation").style.display='none'; document.getElementById("share-page").style.display='none'; } function set_left(message,leftval) { document.getElementById(message).style.left = leftval; document.getElementById(message).style.position = 'absolute'; } sfHover = function() { if( document.getElementById("navigation-primary") ) { var np = document.getElementById("navigation-primary"); if( np.getElementsByTagName("LI") ) { var sfEls = np.getElementsByTagName("LI"); for (var i=0; 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