
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=no,scrolling=no,location=0,statusbar=0,menubar=0,title=0,resizable=0,width=560,height=580, screenX=0,screenY=0,top=20,left=20');");
}

	function popUp2(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=yes,scrolling=yes,location=0,statusbar=0,menubar=0,title=0,resizable=0,width=780,height=500, screenX=0,screenY=0,top=20,left=20');");
}

	function popUp3(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=yes,scrolling=yes,location=0,statusbar=0,menubar=0,title=0,resizable=0,width=560,height=500, screenX=0,screenY=0,top=20,left=20');");
}

function leaving()
	{
	alert ("You are now leaving www.orencia.com. This site may provide links or references to other Websites not affiliated with Bristol-Meyers Squibb. Bristol-Meyers Squibb is not responsible for the content of such other sites and shall not be liable for any damages or injury arising from users' access to such sites. Links to other sites are provided only as a convenience to users of our site.")
	}

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/full/home_health_over.gif");
		preloadFlag = true;
	}
}

function linkURL(pageName, channelName) {
        channelName = escape(channelName);
        if (cookie != 9) {
                var BV_SessionID = document.frmProgram.BV_SessionID.value;
                var BV_EngineID = document.frmProgram.BV_EngineID.value;
                window.location.href = pageName+"?BV_EngineID=" + BV_EngineID + "&BV_SessionID=" + BV_SessionID + "&channelName=" + channelName; 
     
         }
        else {
                window.location.href = pageName+"?BV_UseBVCookie=Yes"+"&channelName=" + channelName;
                }
        }

function linkURLA(pageName, programName, channelName,anc) {
        //channelName = escape(channelName);
        //programName=  escape(programName);
        if (cookie != 9) {
                var BV_SessionID = document.frmProgram.BV_SessionID.value;
                var BV_EngineID = document.frmProgram.BV_EngineID.value;
        window.location.href = pageName+"?BV_EngineID=" + BV_EngineID + "&BV_SessionID=" + BV_SessionID + "&programName=" +programName+"&channelName=" + channelName+"#"+anc;
}else {
 window.location.href = pageName+"?BV_UseBVCookie=Yes"+"&programName=" +programName+"&channelName=" + channelName+"#"+anc;
}
}

// function to call a direct link page
function pageLinkURL(pageName) {
        //channelName = escape(channelName);
        //programName=  escape(programName);
        if (cookie != 9) {
                var BV_SessionID = document.frmProgram.BV_SessionID.value;
                var BV_EngineID = document.frmProgram.BV_EngineID.value;
                window.location.href = pageName+"?BV_EngineID=" + BV_EngineID + "&BV_SessionID=" + BV_SessionID;
         }
         else {
                window.location.href = pageName+"?BV_UseBVCookie=Yes";
                }       
}

function channelLinkURL(pageName, channelName) {
        channelName = escape(channelName);
        if (cookie != 9) {
                var BV_SessionID = document.frmProgram.BV_SessionID.value;
                var BV_EngineID = document.frmProgram.BV_EngineID.value;
                window.location.href = pageName+"?BV_EngineID=" + BV_EngineID + "&BV_SessionID=" + BV_SessionID + "&channelName=" + channelName; 
     
         }
        else {
                window.location.href = pageName+"?BV_UseBVCookie=Yes"+"&channelName=" + channelName;
                }
        }
		
		
function ObsLinkURL(pageName, channelName, urlId, pageId) {
        channelName = escape(channelName);
        if (cookie != 9) {
                var BV_SessionID = document.frmProgram.BV_SessionID.value;
                var BV_EngineID = document.frmProgram.BV_EngineID.value;
                window.location.href = pageName+"?BV_EngineID=" + BV_EngineID + "&BV_SessionID=" + BV_SessionID + "&channelName=" + channelName +"&urlId=" + urlId + "&pageId=" + pageId; 
     
         }
        else {
                window.location.href = pageName+"?BV_UseBVCookie=Yes"+"&channelName=" + channelName +"&urlId=" + urlId + "&pageId=" + pageId;
                }
        }
   
function extraLinkURL(pageName, programName, channelName,extension) {
        if (cookie != 9) {
                var BV_SessionID = document.frmProgram.BV_SessionID.value;
                var BV_EngineID = document.frmProgram.BV_EngineID.value;
        pageName=       escape(pageName);
                channelName = escape(channelName);
                programName=  escape(programName);
        window.location.href = pageName+"?BV_EngineID=" + BV_EngineID + "&BV_SessionID=" + BV_SessionID + "&programName=" +programName+"&channelName=" + channelName+extension; }
else {
window.location.href = pageName+"?BV_UseBVCookie=Yes"+"&programName="+programName+"&channelName=" + channelName+extension;
}
}

function leaveSite(site) {
var message = 'You are now leaving www.orencia.com. This site may provide links or references to other Web sites not affiliated with Bristol-Myers Squibb. Bristol-Myers Squibb is not responsible for the content of such other sites and shall not be liable for any damages or injury arising from users\' access to such sites. Links to other sites are provided only as a convenience to users of our site. \n\nWould you like to leave this site?';
   if (confirm(message) == 1) {

      window.open(site, 'leaveSite','')
      //window.open(site)
   }
}

function pageLinkURLWindow(pageName) {
        //channelName = escape(channelName);
        //programName=  escape(programName);
        var url = "";
        if (cookie != 9) {
                var BV_SessionID = document.frmProgram.BV_SessionID.value;
                var BV_EngineID = document.frmProgram.BV_EngineID.value;
                url = pageName+"?BV_EngineID=" + BV_EngineID + "&BV_SessionID=" + BV_SessionID;
         }
         else {
                url = pageName+"?BV_UseBVCookie=Yes";
                }       

         window.open(url, '','')

}

function extraPageLinkURLWindow(pageName,extension) {
        //channelName = escape(channelName);
        //programName=  escape(programName);
        var url = "";
        if (cookie != 9) {
                var BV_SessionID = document.frmProgram.BV_SessionID.value;
                var BV_EngineID = document.frmProgram.BV_EngineID.value;
                url = pageName+"?BV_EngineID=" + BV_EngineID + "&BV_SessionID=" + BV_SessionID + extension;
         }
         else {
                url = pageName+"?BV_UseBVCookie=Yes" + extension;
                }       

         window.open(url, '','')

}

