﻿// JScript File

// This function will be used to link to external sites    
function offRamp(url, bShowOfframp) {

	try
	{
		if(bShowOfframp == undefined) 
		{
			bShowOfframp = true;
		}
		
		var flag = false;
	   if (bShowOfframp=='2'){
		
		flag = confirm("What is this message supposed to be?");
		
		} 
		else if(bShowOfframp) {
		flag = confirm("You are about to leave ERBITUX.com, a Bristol-Myers Squibb Web site. You are being directed to a Bristol-Myers Squibb Corporate Web site.");
		}

		
		if(bShowOfframp == false || flag == true)
		{
			newwindow = window.open(url);
			if (window.focus) { newwindow.focus() }
			return false; 
		}
	}
	catch(e)
	{
	}
    
    return false;
}

function offRamp2(url, bShowOfframp) {

	try
	{
		if(bShowOfframp == undefined) 
		{
			bShowOfframp = true;
		}
		
		var flag = false;
	   if (bShowOfframp=='2'){
		
		flag = confirm("What is this message supposed to be?");
		
		} 
		else if(bShowOfframp) {
			flag = confirm("You are about to leave the Bristol-Myers Squibb, Inc. ERBITUX Website. You are being directed to a site maintained by Merk KGaA");
		}

		
		if(bShowOfframp == false || flag == true)
		{
			newwindow = window.open(url);
			if (window.focus) { newwindow.focus() }
			return false; 
		}
	}
	catch(e)
	{
	}
    
    return false;
}

function offRamp3(url, bShowOfframp) {

	try
	{
		if(bShowOfframp == undefined) 
		{
			bShowOfframp = true;
		}
		
		var flag = false;
	   if (bShowOfframp=='2'){
		
		flag = confirm("What is this message supposed to be?");
		
		} 
		else if(bShowOfframp) {
			flag = confirm("You are about to leave the Bristol-Myers Squibb, Inc. ERBITUX Website. You are being directed to a site maintained by ImClone LLC");
		}

		
		if(bShowOfframp == false || flag == true)
		{
			newwindow = window.open(url);
			if (window.focus) { newwindow.focus() }
			return false; 
		}
	}
	catch(e)
	{
	}
    
    return false;
}

function leavesite(url) {
    //var st = document.write('<h2>This is the quoted script</h2>');
    if (url == "NoReprintPage") {
        confirm('You are now leaving the ERBITUX.com Web site.\r\n\r\nThe link you clicked on will take you to a site maintained by a third party, which is solely responsible for its content. Bristol-Myers Squibb Company and Eli Lilly and Company do not control, influence, or endorse this site, and the opinions, claims or comments expressed on this site should not be attributed to Bristol-Myers Squibb Company and   Eli Lilly and Company are not responsible for the privacy policy of any third-party Web sites. We encourage you to read the privacy policy of every Web site you visit.');
    }
    else {
        var external_link = confirm('You are now leaving the ERBITUX.com Web site.\r\n\r\nThe link you clicked on will take you to a site maintained by a third party, which is solely responsible for its content. Bristol-Myers Squibb Company and Eli Lilly and Company do not control, influence, or endorse this site, and the opinions, claims or comments expressed on this site should not be attributed to Bristol-Myers Squibb Company and Eli Lilly and Company. Bristol-Myers Squibb Company and Eli Lilly and Company are not responsible for the privacy policy of any third-party Web sites. We encourage you to read the privacy policy of every Web site you visit.');
        if (external_link == true) {
            window.open(url);
        }
        return false; 
    }    
    
}

function leavesiteHN(url) {
    //var st = document.write('<h2>This is the quoted script</h2>');
    if (url == "NoReprintPage") {
        confirm('You are now leaving the ERBITUX.com Web site.\r\n\r\nThe link you clicked on will take you to a site maintained by a third party, which is solely responsible for its content. Bristol-Myers Squibb Company does not control, influence, or endorse this site, and the opinions, claims or comments expressed on this site should not be attributed to Bristol-Myers Squibb Company. Bristol-Myers Squibb Company is not responsible for the privacy policy of any third-party Web sites. We encourage you to read the privacy policy of every Web site you visit.');
    }
    else {
        var external_link = confirm('You are now leaving the ERBITUX.com Web site.\r\n\r\nThe link you clicked on will take you to a site maintained by a third party, which is solely responsible for its content. Bristol-Myers Squibb Company and Eli Lilly and Company do not control, influence, or endorse this site, and the opinions, claims or comments expressed on this site should not be attributed to Bristol-Myers Squibb Company and Eli Lilly and Company. Bristol-Myers Squibb Company and Eli Lilly and Company are not responsible for the privacy policy of any third-party Web sites. We encourage you to read the privacy policy of every Web site you visit.');
        if (external_link == true) {
            window.open(url, '_self');

        }
        return false;
    } 

}

function hcpNotice(url)
{
    var external_link = confirm('This section of the site is intended for U.S. Healthcare Professionals only. Click OK if you are a U.S. Healthcare Professional.');

    if (external_link == true)
    {
        window.open(url);
    }
}

function d(fieldName){
    var x;
    return (x = document.getElementById(fieldName)) ? x : alert(fieldName + " not found");
}

function validateShareForm()
{
    var eMsg = document.getElementById('error_messages');
    eMsg.style.display = 'none';
    
    var bRegistration = myValidator.validateShare()
    
    if(bRegistration)
    {
        window.location = "share-confirm.html";
    } 
    else
    {    
        eMsg.style.display = 'block';
    }      
}

   
        function bookmark_us(url, title)
        {
            var browser=navigator.appName;

            if( browser == "Microsoft Internet Explorer" ) // IE Favorite	
            { 	
                window.external.AddFavorite( url, title); 
            }
            else if ( browser == "Netscape" || window.sidebar ) // Netscape, Firefox
            { 
                window.sidebar.addPanel(title, url, "");
            }
            else 
            {
                alert("sorry, your browser doesn't support this function.");
            }
        }


  function leaveSiteWithPion(url, detail)
    {
        ntptEventTag( 'ev=ExitLink&evdetail='+ detail +'&href='+encodeURIComponent(url) );
        var external_link = confirm('You are now leaving the ERBITUX.com Web site.\n\nThe link you clicked on will take you to a site maintained by a third party, which is solely responsible for its content. Bristol-Myers Squibb Company and Eli Lilly and Company do not control, influence, or endorse this site, and the opinions, claims or comments expressed on this site should not be attributed to Bristol-Myers Squibb Company and Eli Lilly and Company. Bristol-Myers Squibb Company and Eli Lilly and Company are not responsible for the privacy policy of any third-party Web sites. We encourage you to read the privacy policy of every Web site you visit.');
        if (external_link == true)
        {
//            PION.selfTag('exitlink',{response:'confirm', href:url})
            window.open(url);
        }
        else 
        { 
//            PION.selfTag('exitlink',{response:'cancel', href:url})
        }
    } 
    
    function leaveSiteToCorporate(url, detail)
    {
        ntptEventTag( 'ev=ExitLink&evdetail='+ detail +'&href='+encodeURIComponent(url) );
        var external_link = confirm('You are about to leave ERBITUX.com, a Bristol-Myers Squibb Web site. You are being directed to a Bristol-Myers Squibb Corporate Web site.');
        if (external_link == true)
        {
//            PION.selfTag('exitlink',{response:'confirm', href:url})
            window.open(url);
        }
        else 
        { 
//            PION.selfTag('exitlink',{response:'cancel', href:url})
        }
    } 
