
/**************************************************************************************************************************
* 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/24/2008	ACN		Christian Dale Patacsil HD05051418 		Orencia.com Annual Review Changes (function definitions)
* MOD-003	02/16/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   3/20/2009   ACN     Alelie Orcine           HD05257619      Orencia.com Changes Needed from BMS.com Transition to Sharepoint
* MOD-006   4/17/2009   ACN     Alelie Orcine           HD05314256      Orencia.com Full Prescribing Information Link - Top Navigation Menu
* MOD-007	8/13/2009 	ACN		Christian Dale Patacsil	HD05546662		Orencia.com Registration Page Optimization
* MOD-008	8/27/2009 	ACN		Christian Dale Patacsil	HD05546662 		Orencia.com Registration Page Optimization
* MOD-009	11/06/2009	ACN		Alelie Rose Orcine		HD05706266		Orencia.com News Page
 ***************************************************************************************************************************/

var cookie;

function LoadPage(){
	//START WHEN RECEIVE APPROVAL TO PUSH CHANGES
	var v_index_pathname =  "/orencia/home/index.jsp";
	var v_signup_pathname =  "/orencia/apps/register.jsp";
	var v_typing_pathname =  "/orencia/apps/typing.jsp";
	var v_with_promise = false;
	//END WHEN RECEIVE APPROVAL TO PUSH CHANGES
	
	//document.getElementById('top_menu').innerHTML = "<div id='topnavcontainer'><ul id='topnavlist'><li><img src='images/spacer.gif' border='0' width='57' height='1' alt='' title='' /></li><li><a href='index.html'><img src='images/top_menu_home.gif' border='0' alt='Home' title='Home' /><span class='hide'>Home</span></a></li><li><a href='pdfs/ORENCIA_PPI.pdf' onClick='javascript:urchinTracker(\"/orencia/patientinfo_home_topnav\");'><img src='images/top_menu_patient_info.gif' border='0' alt='Patient Information' title='Patient Information' /><span class='hide'>Patient Information</span></a></li><li><a href='pdfs/fpi.pdf' onClick='javascript:urchinTracker(\"/orencia/fullprescribinginfo_home_topnav\");'><img src='images/top_menu_full_prescribing_info.gif' alt='Full Prescribing Information' border='0' title='Full Prescribing Information' /><span class='hide'>Full Prescribing Information</span></a></li><li><a href='pdfs/orenciaPPI_SP.pdf' onClick='javascript:urchinTracker(\"/orencia/patientinfospanish_home_topnav\");'><img src='images/top_menu_recursos.gif' alt='Recursos para el Paciente en Espaņol' border='0' title='Recursos para el Paciente en Espaņol' /><span class='hide'>Recursos para el Paciente en Espaņol</span></a></li><li><a href='http://www.orencia.com/orencia/channels/hcp_content.jsp' onClick='javascript:urchinTracker(\"/orencia/homelinks/infoforhcps_topnav\");'><img src='images/top_menu_info_for_healthcare.gif' alt='Information for Healthcare Professionals' border='0' title='Information for Healthcare Professionals' /><span class='hide'>Information for Healthcare Professionals</span></a></li></ul></div>";
	//on attached script.js, there's no top menu displayed on page
	// START MOD-006
	//if (null!=document.getElementById('top_menu'))
	//document.getElementById('top_menu').innerHTML = "<table background='/images/top_menu_bg.gif' width='100%' height='42' border='0' cellpadding='0' cellspacing='0'><tr><td width='57'><img src='/images/spacer.gif' width='1' height='1'></td><td><a href='javascript:redirectURL(\"/home/index.jsp\", false);'><img src='/images/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='/images/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='/images/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='/images/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='/images/top_menu_info_for_healthcare.gif' width='154' height='42' alt='Information for Healthcare Professionals'></a></td></tr></table>";
	
	if (null!=document.getElementById('top_menu'))
	document.getElementById('top_menu').innerHTML = "<table background='/images/top_menu_bg.gif' width='100%' height='42' border='0' cellpadding='0' cellspacing='0'><tr><td width='57'><img src='/images/spacer.gif' width='1' height='1'></td><td><a href='javascript:redirectURL(\"/home/index.jsp\", false);'><img src='/images/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='/images/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='/images/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='/images/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='/images/top_menu_info_for_healthcare.gif' width='154' height='42' alt='Information for Healthcare Professionals'></a></td></tr></table>";	
	// END MOD-006
	if (null!=document.getElementById('copyright_txt'))
	{
		if (location.pathname == v_signup_pathname)
			v_with_promise = true;

		if (location.pathname == v_index_pathname)
			v_with_promise = true;
			
		if (location.pathname == v_typing_pathname)
			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
		}
	}

	if (null!=document.getElementById('footer_links'))
// START MOD-005
//	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-005

//START MOD-007
	if (null!=document.getElementById('copyright_txt'))
	document.getElementById('copyright_txt').innerHTML = "&#169; 2009 Bristol-Myers Squibb. All Rights Reserved.<br>ORENCIA is a registered trademark, and Oh, yes I can!, <em>The Circle</em> and The Satisfaction RAter are trademarks of Bristol-Myers Squibb.<br>All other trademarks are property of their respective companies.";
//END MOD-007

	if (null!=document.getElementById('bottomtext'))
		//document.getElementById('bottomtext').innerHTML = "427US07WA38011 Dec/08";
		//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
		//End MOD-004
		document.getElementById('bottomtext').innerHTML = "427US07WA38036 Nov/09";

	//alert(document.cookie);
	if (document.cookie == "") {
		var win;
		win = window.open("18yo_popup.html","newWindow","width=500,height=274,left=0,top=100");
	}
//END MOD-002
}

// 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;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		home_health_over = newImage("/images/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 addToFavorites()
 {
  var urlAddress = window.location;
  var pageName = "Orencia HCP";
  var browser=navigator.appName
  if (browser=="Microsoft Internet Explorer"){ 
   window.external.AddFavorite(urlAddress,pageName);
  }else{
   alert("Please don't forget to bookmark this page.");
  }
 }
 
 function goexternal(){
	var full_url = window.location.href;
	var ext_url = full_url.split("=");
	if (ext_url.length !=0)
	{	
    window.open(ext_url[1],"new");
	}
}

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");
}

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);
			}

		}
	}
}
