function clearSearch(thisObj){
	if(thisObj.value=="Enter text")thisObj.value="";
}

function changeImages() {

   if (document.images) {
      for (var i=0; i<changeImages.arguments.length; i+=2) {
         document[changeImages.arguments[i]].src = eval(changeImages.arguments[i+1] + ".src");
         
         //mySrc = eval(changeImages.arguments[i+1] + ".src");
		 //alert("changeImages.arguments[i]="+mySrc)
      }
   }
}

//  Interstitial links' disclaimers 
function leaveSite(url,whichMsg) {
	if(whichMsg == "abraxis") //going to an abraxis site
	{
		msg = 'This link will take you to a product Web site where you will find information about a chemotherapy option for metastatic breast cancer.'
	+'\n\nThis site is maintained by Abraxis BioScience. Abraxis and AstraZeneca are not responsible for the Privacy Policy of any third party Web sites, should you choose to exit an Abraxis or AstraZeneca Web site. We encourage you to read the privacy policy of every Web site you visit.  Click \"Cancel\" to return or \"OK\" to continue.'
	}	
	else if(whichMsg == "AZ") //az global
	{
		msg = 'This link will take you to a global section of this site maintained by ' 
	+'AstraZeneca. It may contain information that does not fall within the '
	+'indications and guidelines of United States regulatory agencies. Click \"Cancel\" to return or \"OK\" to continue.'
	}
	else //third party site
	{
		msg = 'This link will take you to a site maintained by a third party who is solely responsible for its contents. '
		+'AstraZeneca provides this link as a service to web site visitors. AstraZeneca 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.  Click \"Cancel\" to return or \"OK\" to continue.'
	}

    if (confirm(msg)) {
		window.open(url);
	}
}

function showLargePic(id){
	document.getElementById(id).style.display = "block";
}
function closeLargePic(id){
	document.getElementById(id).style.display = "none";
}

function showResources(strSection){
	var thisElement = document.getElementById('group'+strSection).style;
	var plus = document.getElementById('symbol'+'1'+strSection).style;
	var minus = document.getElementById('symbol'+'2'+strSection).style;
	
	if(thisElement.display=='block'){
		thisElement.display='none';
		minus.display='none';
		plus.display='inline';
	}
	else{
		thisElement.display='block';
		minus.display='inline';
		plus.display='none';
	}
}


/* CLINICAL DATA PAGING MENU */
/* ================================================================ 
This copyright notice must be untouched at all times.

The original version of this script and the associated (x)html
is available at http://www.stunicholls.com/menu/paged_menu.html
Copyright (c) 2005-2007 Stu Nicholls. All rights reserved.
This script and the associated (x)html may be modified in any 
way to fit your requirements.
=================================================================== */
clickMenu = function(menu) {
	var getEls = document.getElementById(menu).getElementsByTagName("LI");
	var getAgn = getEls;

	for (var i=0; i<getEls.length; i++) {
			getEls[i].onclick=function() {
				for (var x=0; x<getAgn.length; x++) {
				getAgn[x].className=getAgn[x].className.replace("click", "");
				}
				this.className+=" click";
				}
			}
		}
		
		
function clickButton(e, buttonid)
{
    var bt = document.getElementById(buttonid);    
    if (typeof bt == 'object')
    {
        if(navigator.appName.indexOf("Netscape")>(-1))
        {
            if (e.keyCode == 13)
            {
                bt.click();
                return false;
            }
        }
        if (navigator.appName.indexOf("Microsoft Internet Explorer")>(-1))
        {
            if (event.keyCode == 13)
            {
                bt.click();
                return false;
            }
        }
    } 
}

//The following code is to deactivate the Search button click evnent on press of enter key.The event gets fired only if the focus is in the Search TextBox
var bFocus = false;
if(navigator.appName=="Microsoft Internet Explorer")
{
    document.attachEvent("onkeypress",detectKey);
}
else if (navigator.appName=="Netscape")
{
    document.addEventListener("keypress",detectKey,false);
}
         
function detectKey(e)
{
    if(navigator.appName=="Microsoft Internet Explorer")
    {
        if(event.keyCode==13)
        {
            event.returnValue=false;
            event.cancelBubble = true;
            enterKeyPressed();
        }
    }
    else if (navigator.appName=="Netscape")
    {
        if(e.which==13)
            {
                e.preventDefault();
                enterKeyPressed();
            }
    }
}
           

function enterKeyPressed()
{
    var id = '_ctl0_objHeader_btnSearch';
    if(bFocus)
    {
        document.getElementById(id).click();
        return false;
    }
    else
    {
        var btn;
        var input = document.getElementsByTagName('input');
		//Check no of Submit buttons in the page (To check if we are in registration pages).
		for (var i in input) {
			var typ = input[i].type;
			if (typ == 'submit' || typ == 'button') { btn = input[i]}
        }
        if(btn!= null)
        {
            btn.click();
        }
        
    }
}
