// 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("You are leaving Sprycel-Global.com, the international website for Sprycel, and being redirected to the U.S. website for Sprycel, Sprycel.com.");
		
		} 
		else if(bShowOfframp) {
		/*flag = confirm("You are leaving SPRYCEL-Global.com and being redirected to a Bristol-Myers Squibb corporate site.");*/
		flag = confirm("You are leaving SPRYCEL-Global.com and being redirected to a non Bristol Myers Squibb website. 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.");
		}

		
		if(bShowOfframp == false || flag == true)
		{
			newwindow = window.open(url);
			if (window.focus) { newwindow.focus() }
			return false; 
		}
	}
	catch(e)
	{
	}
    
    return false;
}

function searchCheckEnter(e){
    var characterCode;

    if(e && e.which){
        e = e;
        characterCode = e.which;
    }
    else{
        e = event;
        characterCode = e.keyCode;
    }

    if(characterCode == 13){
        document.getElementById("searchFormText").value = document.getElementById("searchSiteInput").value;
        document.getElementById("searchForm").submit();
        return false;
    }
    else{
        return true;
    }
}
//adds the alt tag for the image logo 
function writeAltTags() {
    document.write(
        "<img src='/images/sprycel-dasatinib.jpg' alt='Sprycel Dasatinib' title='Sprycel Dasatinib'>");

}
//adds the alt tag and links to the home page
function writeAltTagsHomeLink() {
    document.write(
        "<a href='/index.aspx'><img src='/images/sprycel-dasatinib.jpg' alt='Sprycel Dasatinib' title='Sprycel Dasatinib'></a>");

}
