
/**************************************************************************************************************************
* MODIFICATION HISTORY
* CODE		DATE		GROUP	LAST MODIFIED BY		REMEDY CASE ID	DESCRIPTION
* MOD-001	11/07/2008	ACN		Christian Dale Patacsil	HD04967324		Orencia.com Spanish Patient Information (PPI) 
* MOD-002   12/30/2008  ACN     Michael Small           HD05051418      Orencia Annual Review
* MOD-003	02/13/2009	ACN		Michael Orante			HD05155811		Orencia.com Patient Information PDF Link
* MOD-004	02/23/2009	ACN		Alelie Orcine			HD05174360		Orencia.com News Pages and Job Code/Date Update
* MOD-005	03/06/2009	ACN		Alelie Orcine			HD05161091		Orencia.com Financial Options Page
* MOD-006   3/20/2009   ACN     Alelie Orcine           HD05257619      Orencia.com Changes Needed from BMS.com Transition to Sharepoint
* MOD-007   4/17/2009   ACN     Alelie Orcine           HD05314256      Orencia.com Full Prescribing Information Link - Top Navigation Menu
* MOD-008	8/27/2009 	ACN		Christian Dale Patacsil	HD05546662 		Orencia.com Registration Page Optimization
 ***************************************************************************************************************************/

var cookie;
var strPromiseProgramGATag = "";

function LoadPage(){
	var v_protocol = location.protocol ;
	var v_hostname = location.hostname ; 

	var v_time_for_a_change = v_protocol + "//" + v_hostname + "PublishingImages/Patient/time_for_a_change_on.gif" ;
	var v_how_orencia_is_different = v_protocol + "//" + v_hostname + "PublishingImages/Patient/how_ORENCIA_is_different_on.gif" ;
	var v_financial_options = v_protocol + "//" + v_hostname + "PublishingImages/Patient/financial_options_on.gif" ;
	var v_faq = v_protocol + "//" + v_hostname + "PublishingImages/Patient/faq_on.gif" ;
	
	var v_with_promise = false;
	<!--start MOD-004-->	
	if (null!=document.getElementById('top_menu2'))
	document.getElementById('top_menu2').innerHTML = "<table background='/PublishingImages/Patient/top_menu_bg.gif' width='100%' height='42' border='0' cellpadding='0' cellspacing='0'><tr><td width='57'><img src='/PublishingImages/Patient/spacer.gif' width='1' height='1'></td><td><a href='javascript:redirectURL(\"/home/index.jsp\", false);'><img src='/PublishingImages/Patient/top_menu_home.gif' width='43' height='42' alt='Home'></a></td><td><a href='http://packageinserts.bms.com/ppi/ppi_orencia.pdf' onClick=\"javascript:pageTracker._trackPageview('/orencia/patientinfo_pdf');\"><img src='/PublishingImages/Patient/top_menu_patient_info.gif' width='77' height='42' alt='Patient Information'></a></td><td><a href='http://packageinserts.bms.com/pi/pi_orencia.pdf' onClick=\"javascript:pageTracker._trackPageview('/orencia/news/fullpi_pdf');\" ><img src='/PublishingImages/Patient/top_menu_full_prescribing_info.gif' width='100' height='42' alt='Full Prescribing Information'></a></td><td><a href='/pdfs/OrenciaPPI_SP.pdf' onClick=\"javascript:pageTracker._trackPageview('/orencia/patientinfospanish_pdf');\"><img src='/PublishingImages/Patient/top_menu_recursos.gif' width='127' height='42' alt='Recursos para el Paciente en Espaņol'></a></td><td><a href='javascript:redirectURL(\"/hcp2/home/disclaimer.jsp\", false);'><img src='/PublishingImages/Patient/top_menu_info_for_healthcare.gif' width='154' height='42' alt='Information for Healthcare Professionals'></a></td></tr></table>";
	<!--end MOD-004-->
	if (null!=document.getElementById('top_menu'))
/* Modified for HD04940322
Old Code:
document.getElementById('top_menu').innerHTML = "<table background='/PublishingImages/Patient/top_menu_bg.gif' width='100%' height='42' border='0' cellpadding='0' cellspacing='0'><tr><td width='57'><img src='/PublishingImages/Patient/spacer.gif' width='1' height='1'></td><td><a href='javascript:redirectURL(\"/home/index.jsp\", false);'><img src='/PublishingImages/Patient/top_menu_home.gif' width='43' height='42' alt='Home'></a></td><td><a href='/pdfs/ORENCIA_PPI.pdf' onClick=\"javascript:urchinTracker('/orencia/patientinfo_pdf');\"><img src='/PublishingImages/Patient/top_menu_patient_info.gif' width='77' height='42' alt='Patient Information'></a></td><td><a href='http://www.bms.com/cgi-bin/anybin.pl?sql=select%20PPI%20from%20TB_PRODUCT_PPI%20where%20PPI_SEQ=111&key=PPI' onClick=\"javascript:urchinTracker('/orencia/fullprescribeinginfo_pdf');\"><img src='/PublishingImages/Patient/top_menu_full_prescribing_info.gif' width='100' height='42' alt='Full Prescribing Information'></a></td><td><a href='/pdfs/OrenciaPPI_SP.pdf' onClick=\"javascript:urchinTracker('/orencia/patientinfospanish_pdf');\"><img src='/PublishingImages/Patient/top_menu_recursos.gif' width='127' height='42' alt='Recursos para el Paciente en Espaņol'></a></td><td><a href='javascript:redirectURL(\"/hcp2/home/disclaimer.jsp\", false);'><img src='/PublishingImages/Patient/top_menu_info_for_healthcare.gif' width='154' height='42' alt='Information for Healthcare Professionals'></a></td></tr></table>";
*/
/* START MOD-001 */
/*New Code: 
	document.getElementById('top_menu').innerHTML = "<table background='/PublishingImages/Patient/top_menu_bg.gif' width='100%' height='42' border='0' cellpadding='0' cellspacing='0'><tr><td width='57'><img src='/PublishingImages/Patient/spacer.gif' width='1' height='1'></td><td><a href='javascript:redirectURL(\"/home/index.jsp\", false);'><img src='/PublishingImages/Patient/top_menu_home.gif' width='43' height='42' alt='Home'></a></td><td><a href='/pdfs/ORENCIA_PPI.pdf' onClick=\"javascript:urchinTracker('/orencia/patientinfo_pdf');\"><img src='/PublishingImages/Patient/top_menu_patient_info.gif' width='77' height='42' alt='Patient Information'></a></td><td><a href='http://www.bms.com/cgi-bin/anybin.pl?sql=select%20PPI%20from%20TB_PRODUCT_PPI%20where%20PPI_SEQ=111&key=PPI' onClick=\"javascript:urchinTracker('/orencia/fullprescribeinginfo_pdf');\"><img src='/PublishingImages/Patient/top_menu_full_prescribing_info.gif' width='100' height='42' alt='Full Prescribing Information'></a></td><td><a href=\"javascript:void(0);\" onClick=\"javascript:urchinTracker('/orencia/patientinfospanish_pdf');\"><img src='/PublishingImages/Patient/top_menu_recursos.gif' width='127' height='42' alt='Recursos para el Paciente en Espaņol'></a></td><td><a href='javascript:redirectURL(\"/hcp2/home/disclaimer.jsp\", false);'><img src='/PublishingImages/Patient/top_menu_info_for_healthcare.gif' width='154' height='42' alt='Information for Healthcare Professionals'></a></td></tr></table>";
/* End HD04940322 */
	// START MOD-007
	//document.getElementById('top_menu').innerHTML = "<table background='/PublishingImages/Patient/top_menu_bg.gif' width='100%' height='42' border='0' cellpadding='0' cellspacing='0'><tr><td width='57'><img src='/PublishingImages/Patient/spacer.gif' width='1' height='1'></td><td><a href='javascript:redirectURL(\"/home/index.jsp\", false);'><img src='/PublishingImages/Patient/top_menu_home.gif' width='43' height='42' alt='Home'></a></td><td><a href='http://packageinserts.bms.com/ppi/ppi_orencia.pdf' onClick=\"javascript:urchinTracker('/orencia/patientinfo_pdf');\"><img src='/PublishingImages/Patient/top_menu_patient_info.gif' width='77' height='42' alt='Patient Information'></a></td><td><a href='http://www.bms.com/cgi-bin/anybin.pl?sql=select%20PPI%20from%20TB_PRODUCT_PPI%20where%20PPI_SEQ=111&key=PPI' onClick=\"javascript:urchinTracker('/orencia/fullprescribeinginfo_pdf');\"><img src='/PublishingImages/Patient/top_menu_full_prescribing_info.gif' width='100' height='42' alt='Full Prescribing Information'></a></td><td><a href='/pdfs/OrenciaPPI_SP.pdf' onClick=\"javascript:urchinTracker('/orencia/patientinfospanish_pdf');\"><img src='/PublishingImages/Patient/top_menu_recursos.gif' width='127' height='42' alt='Recursos para el Paciente en Espaņol'></a></td><td><a href='javascript:redirectURL(\"/hcp2/home/disclaimer.jsp\", false);'><img src='/PublishingImages/Patient/top_menu_info_for_healthcare.gif' width='154' height='42' alt='Information for Healthcare Professionals'></a></td></tr></table>";
	



	
	
	document.getElementById('top_menu').innerHTML = "<table background='/PublishingImages/Patient/top_menu_bg.gif' width='100%' height='42' border='0' cellpadding='0' cellspacing='0'><tr><td width='57'><img src='/PublishingImages/Patient/spacer.gif' width='1' height='1'></td><td><a href='javascript:redirectURL(\"/home/index.jsp\", false);'><img src='/PublishingImages/Patient/top_menu_home.gif' width='43' height='42' alt='Home'></a></td><td><a href='http://packageinserts.bms.com/ppi/ppi_orencia.pdf' onClick=\"javascript:urchinTracker('/orencia/patientinfo_pdf');\"><img src='/PublishingImages/Patient/top_menu_patient_info.gif' width='77' height='42' alt='Patient Information'></a></td><td><a href='http://packageinserts.bms.com/pi/pi_orencia.pdf' onClick=\"javascript:urchinTracker('/orencia/fullprescribeinginfo_pdf');\"><img src='/PublishingImages/Patient/top_menu_full_prescribing_info.gif' width='100' height='42' alt='Full Prescribing Information'></a></td><td><a href='/pdfs/OrenciaPPI_SP.pdf' onClick=\"javascript:urchinTracker('/orencia/patientinfospanish_pdf');\"><img src='/PublishingImages/Patient/top_menu_recursos.gif' width='127' height='42' alt='Recursos para el Paciente en Espaņol'></a></td><td><a href='javascript:redirectURL(\"/hcp2/home/disclaimer.jsp\", false);'><img src='/PublishingImages/Patient/top_menu_info_for_healthcare.gif' width='154' height='42' alt='Information for Healthcare Professionals'></a></td></tr></table>";
	// END MOD-007

/* END MOD-001 */
	if (null!=document.getElementById('copyright_txt'))
	{
		//ORIGINAL CODE
		//document.getElementById('copyright_txt').innerHTML = "&#169; 2008 Bristol-Myers Squibb Company. All Rights Reserved.<br>ORENCIA is a registered trademark of Bristol-Myers Squibb Company. All other trademarks are properties of their respective companies.";

		if (document.getElementById("time_for_a_change").src == v_time_for_a_change)
			v_with_promise = true;

		if (document.getElementById("how_ORENCIA_is_different").src == v_how_orencia_is_different)
			v_with_promise = true;

		if (document.getElementById("financial_options").src == v_financial_options)
			v_with_promise = true;
		
		if (document.getElementById("faq").src == v_faq)
			v_with_promise = true;

		if (v_with_promise == true)
		{ //WITH PROMISE PROGRAM
			//START MOD-008
			//document.getElementById('copyright_txt').innerHTML = "&#169; 2009 Bristol-Myers Squibb Company. All Rights Reserved.<br>ORENCIA&reg; is a registered trademark, and Oh, yes I can!, The Circle, The Satisfaction RAter, and The ORENCIA Promise Program are trademarks of Bristol-Myers Squibb Company.<br>All other trademarks are property of their respective companies.";
			document.getElementById('copyright_txt').innerHTML = "&#169; 2009 Bristol-Myers Squibb. All Rights Reserved.<br>ORENCIA&reg; is a registered trademark, and Oh, yes I can!, The Circle, The Satisfaction RAter, and The ORENCIA Promise Program are trademarks of Bristol-Myers Squibb.<br>All other trademarks are property of their respective companies.";
			//END MOD-008
		}
		else
		{ //WITHOUT PROMISE PROGRAM
			//START MOD-008
			//document.getElementById('copyright_txt').innerHTML = "&#169; 2009 Bristol-Myers Squibb Company. All Rights Reserved.<br>ORENCIA&reg; is a registered trademark, and Oh, yes I can!, The Circle and The Satisfaction RAter are trademarks of Bristol-Myers Squibb Company.<br>All other trademarks are property of their respective companies.";
			document.getElementById('copyright_txt').innerHTML = "&#169; 2009 Bristol-Myers Squibb. All Rights Reserved.<br>ORENCIA&reg; is a registered trademark, and Oh, yes I can!, The Circle and The Satisfaction RAter are trademarks of Bristol-Myers Squibb.<br>All other trademarks are property of their respective companies.";
			//END MOD-008
		}
	}
	<!--start MOD-004-->
	if (null!=document.getElementById('footer_links2'))
	document.getElementById('footer_links2').innerHTML = "<a class='footer_link' href='javascript:redirectURL(\"/home/index.jsp\", false);'>Home</a>&nbsp;|&nbsp;<a class='footer_link' href='javascript:redirectURL(\"/channels/content.jsp\", false, \"channelName=Misc/200@Privacy_policy\");'>Privacy Policy</a>  |  <a class='footer_link' href='http://bms.com/legal/Pages/notice.aspx' onClick=\"javascript:pageTracker._trackPageview('/orencia/outgoing/bmslegalnotice');\" >Legal Notice</a>  |  <a class='footer_link' href='javascript:redirectURL(\"/apps/optout.jsp\", false)'>Unsubscribe</a>  |  <a class='footer_link' href='http://bms.com/contact/Pages/home.aspx' onClick=\"javascript:pageTracker._trackPageview('/orencia/outgoing/bmscontactus');\">Contact Us</a>  |  <a class='footer_link' href='javascript:redirectURL(\"/channels/content.jsp\", false, \"channelName=Misc/100@News\")'>News about ORENCIA</a>  |  <a class='footer_link' href='javascript:redirectURL(\"/channels/content.jsp\", false, \"channelName=Misc/300@Glossary\")'>Glossary</a>  |  <a class='footer_link' href='javascript:redirectURL(\"/channels/content.jsp\", false, \"channelName=Misc/400@Sitemap\")'>Sitemap</a>";
	<!--end MOD-004-->


	if (null!=document.getElementById('footer_links'))
// START MOD-006 
//		document.getElementById('footer_links').innerHTML = "<a class='footer_link' href='javascript:redirectURL(\"/home/index.jsp\", false);'>Home</a>&nbsp;|&nbsp;<a class='footer_link' href='javascript:redirectURL(\"/channels/content.jsp\", false, \"channelName=Misc/200@Privacy_policy\");'>Privacy Policy</a>  |  <a class='footer_link' href='http://www.bms.com/legal/data/' onClick=\"javascript:urchinTracker('/orencia/outgoing/bmslegalnotice');\" >Legal Notice</a>  |  <a class='footer_link' href='javascript:redirectURL(\"/apps/optout.jsp\", false)'>Unsubscribe</a>  |  <a class='footer_link' href='http://www.bms.com/feedback/data/' onClick=\"javascript:urchinTracker('/orencia/outgoing/bmscontactus');\">Contact Us</a>  |  <a class='footer_link' href='javascript:redirectURL(\"/channels/content.jsp\", false, \"channelName=Misc/100@News\")'>News about ORENCIA</a>  |  <a class='footer_link' href='javascript:redirectURL(\"/channels/content.jsp\", false, \"channelName=Misc/300@Glossary\")'>Glossary</a>  |  <a class='footer_link' href='javascript:redirectURL(\"/channels/content.jsp\", false, \"channelName=Misc/400@Sitemap\")'>Sitemap</a>";
		
		document.getElementById('footer_links').innerHTML = "<a class='footer_link' href='javascript:redirectURL(\"/home/index.jsp\", false);'>Home</a>&nbsp;|&nbsp;<a class='footer_link' href='javascript:redirectURL(\"/channels/content.jsp\", false, \"channelName=Misc/200@Privacy_policy\");'>Privacy Policy</a>  |  <a class='footer_link' href='http://bms.com/legal/Pages/notice.aspx' onClick=\"javascript:urchinTracker('/orencia/outgoing/bmslegalnotice');\" >Legal Notice</a>  |  <a class='footer_link' href='javascript:redirectURL(\"/apps/optout.jsp\", false)'>Unsubscribe</a>  |  <a class='footer_link' href='http://bms.com/contact/Pages/home.aspx' onClick=\"javascript:urchinTracker('/orencia/outgoing/bmscontactus');\">Contact Us</a>  |  <a class='footer_link' href='javascript:redirectURL(\"/channels/content.jsp\", false, \"channelName=Misc/100@News\")'>News about ORENCIA</a>  |  <a class='footer_link' href='javascript:redirectURL(\"/channels/content.jsp\", false, \"channelName=Misc/300@Glossary\")'>Glossary</a>  |  <a class='footer_link' href='javascript:redirectURL(\"/channels/content.jsp\", false, \"channelName=Misc/400@Sitemap\")'>Sitemap</a>";
		
// END MOD-006
		

/* MOD-002 Changed bottomtext code to 27US07WA38011 DecSlash08 */
	if (null!=document.getElementById('bottomtext'))
		//document.getElementById('bottomtext').innerHTML = "427US07WA38011 Dec/08" ;//"427US07WA38001 OCT/07";//427US07PM308
		//document.getElementById('bottomtext').innerHTML = "427US07WA38027 Dec/08";
		
	//Start MOD-004
		//START MOD-008
		//document.getElementById('bottomtext').innerHTML = "427US07WA38028 Dec/08";
		document.getElementById('bottomtext').innerHTML = "427US07WA38031 Dec/08";
		//END MOD-008

	if (null!=document.getElementById('bottomtext2'))
		//START MOD-008
		//document.getElementById('bottomtext').innerHTML = "427US07WA38028 Dec/08";
		document.getElementById('bottomtext2').innerHTML = "427US07WA38031 Dec/08";
		//END MOD-008
	//End MOD-004
	
	//Start MOD-005
	if (null!=document.getElementById('bottomtext3'))
		//START MOD-008
		//document.getElementById('bottomtext3').innerHTML = "427US07WA38029 Dec/08";
		document.getElementById('bottomtext3').innerHTML = "427US07WA38031 Dec/08";
		//END MOD-008
	//End MOD-005

	//alert("getCookie(age) : "+getCookie("age")+" document.cookie: "+document.cookie);
	if (document.cookie == "" || getCookie("age")==null) {
		var win;
		//win = window.open("/18yo_popup.html","newWindow","width=500,height=274,left=0,top=100");
	}
	
}

// Get the value of the cookie with the specified name. ADD_G2_SEP-23-2007
function getCookie(sName)
{
  // cookies are separated by semicolons
  var aCookie = document.cookie.split("; ");
  for (var i=0; i < aCookie.length; i++)
  {
    // a name/value pair (a crumb) is separated by an equal sign
    var aCrumb = aCookie[i].split("=");
    if (sName == aCrumb[0]) 
      return unescape(aCrumb[1]);
  }

  // a cookie with the requested name does not exist
  return null;
}


function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}
var preloadFlag = true;
function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document.getElementById(changeImages.arguments[i]).src = changeImages.arguments[i+1];
		}
	}
}


function preloadImages() {
	if (document.images) {
		home_health_over = newImage("/PublishingImages/Patient/home_health_over.gif");
		preloadFlag = true;
	}
}

function close_popup(){
	document.cookie = "age=18";
	window.close();
	return(cookie);
}

function close_leaving_popup(){
	window.close();
}

function popup_window(popup_url,popup_width,popup_height){
	var pwin;
	pwin = window.open(popup_url,"newWindow","width="+popup_width+",height="+popup_height+",left=0,top=100");
}

function popup_window2(popup_url,popup_width,popup_height){
	var pwin2;
	window.resizeTo(popup_width,popup_height);
	pwin2 = window.open(popup_url,"newWindow","scrollbars=yes,scrolling=yes,resizable=yes,width="+popup_width+",height="+popup_height+",left=0,top=100");

}
function leaving_popup(popup_url,popup_width,popup_height){
	var pwin3;
	pwin3 = window.open(popup_url,"newWindow","width="+popup_width+",height="+popup_height+",left=0,top=100");
}

// addded on 11.01.2007 for new rollover //
window.onload = pageInit;

function pageInit() {
	
	//alert(' PageInitialised ');
	
	rolloversInit();
}

function rolloversInit() {
	if (!document.getElementById) return;
	
	var arrPreload = new Array();
	var strSrcTmp;
	var arrImages = document.getElementsByTagName('img');
	
	for (var i=0; i<arrImages.length; i++) {
		if (arrImages[i].className == "rollover") {
			var src = arrImages[i].src;
			var imgtype = src.substring(src.lastIndexOf("."), src.length);
			var altsrc = src.replace(imgtype, "_on" + imgtype);

			arrImages[i].setAttribute('altsrc', altsrc);
			arrPreload[i] = new Image();
			arrPreload[i].src = altsrc;
			
			arrImages[i].onmouseover = function() {
				strSrcTmp = this.getAttribute('src');
				this.setAttribute('src', this.getAttribute('altsrc'));
			}

			arrImages[i].onmouseout = function() {
				if (!strSrcTmp) strSrcTmp = this.getAttribute('src').replace("_off" + imgtype, imgtype);
				this.setAttribute('src', strSrcTmp);
			}

		}
	}
}
