
startList = function() {
	if(!FlashDetect.installed){   
	    document.getElementById('home_img').style.display="block";
        document.getElementById('bump1').style.display="block";
        document.getElementById('home_swf').style.height="569px";
        
        //document.getElementById('main_area_wide').style.display="block";
	}   
	if (document.all && document.getElementById) {
		navRoot = document.getElementById("nav");
		
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
				
			}
		}
		for(var x=1;x<=5;x++){
		    sublist('sub'+x);
		}
		
		
		
	}
}
function sublist(thisID) {
	
	if (document.all && document.getElementById) {
		navRoot = document.getElementById(thisID);
		
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
				
			}
		}
	}
}
//window.onload=startList;
addLoadEvent(startList);

// addLoadEvent() gets passed a function that you want to fire off on page load
function addLoadEvent(objFunc) {
	var objOldOnload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = objFunc;
	} else {
		window.onload = function() {
			if (objOldOnload) {
				objOldOnload();
			}
			objFunc();
		}
	}
}

// clickButton() function
// This function is used to make sure the "Enter" key submits the correct form button
function clickButton(event, buttonid) {
	var keyCode = event.keyCode ? event.keyCode : (event.which ? event.which : event.charCode);
	var bt = document.getElementById(buttonid);
	if(keyCode == 13){
		bt.click();
		return false;
	}
	return true;
}

// So we don't have flicker on rollover background image swaps
(function(){

    /*Use Object Detection to detect IE6*/
    var  m = document.uniqueID /*IE*/
    && document.compatMode  /*>=IE6*/
    && !window.XMLHttpRequest /*<=IE6*/
    && document.execCommand;
    
    try{
        if(!!m){
            m("BackgroundImageCache", false, true) /* = IE6 only */
        }
        
    }catch(oh){};
})();


// External sites
function leaveSite(url) {
	msg = 'Thanks for visiting www.ZOMIG.com!\n\nPlease note: This link will take you to a site maintained by a third party who is solely responsible for its contents. \n\nWe encourage you to read the privacy policy of every Web site you visit. \n\nClick Cancel to return or OK to continue.'
  if (confirm(msg)) {
		window.open(url);
	};
}

function popUpWindow(strURL, intWidth, intHeight) {

	window.open( strURL, "_blank", "status=1, height=" + intHeight + ", width=" + intWidth + ", resizable=1, scrollbars=1, toolbar=1, location=1" )

}

function popUpWindowNoScroll(strURL, intWidth, intHeight) {

	window.open( strURL, "_blank", "status=1, height=" + intHeight + ", width=" + intWidth + ", resizable=0, scrollbars=0, toolbar=0, location=0" )

}

// This function will be used to link to external sites    
function offRamp(url, bShowOfframp, intLanguage) {
    //initialized to default values
    if(bShowOfframp == undefined) {
        bShowOfframp = true;
    }
    if(intLanguage == undefined) {
        intLanguage = 0;
    }
    
    if(bShowOfframp) {
        var strMessage = "";
        
        switch (intLanguage)
	    {
		case 1:
		    strMessage = "This link will take you to a site maintained by a third party who is solely responsible for its contents.\n\n";
            strMessage += "Abraxis Oncology provide this link as a service to Web site visitors. Abraxis Oncology 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.\n\n";
            strMessage += "Click \"Cancel\" to return or \"OK\" to continue.";
            break;
        case 2:
            strMessage = "This link will take you to a product Web site where you will find information about a chemotherapy option for metastatic breast cancer.\n\n";
            strMessage += "This site is maintained by Abraxis BioScience. Abraxis and AstraZeneca are not responsible for the privacy policies of any third-party Web site, should you choose to exit an Abraxis Web site. We encourage you to read the privacy policy of every Web site you visit. Click \"Cancel\" to return or \"OK\" to continue.";
            break;
        case 3:
            strMessage = "This link will take you to a product-specific website, maintained by Abraxis BioScience, LLC, about a chemotherapy option for metastatic breast cancer.   Would you like to continue?\n\n";
            strMessage += "Click \"Cancel\" to return or \"OK\" to continue.";
            break;    
        }
        
        var choice = confirm(strMessage)
    
        if (choice) {
            newwindow = window.open(url);
            if (window.focus) { newwindow.focus() }
            return false;
        }
    } 
    else {
        newwindow = window.open(url);
        if (window.focus) { newwindow.focus() }
        return false;
    }
    return false;
}


//var challengeResponse = "";
//var challengeStep = "";

function showResponse(response){

      var responseDiv=document.getElementById(response);

      responseDiv.style.display="block";
      
//      challengeResponse = response;

}

//do rollovers
function switchMe(id,strState){
    
    var thisObj=document.getElementById(id);
    var i;
    var node;
    
    for (i=0; i<thisObj.childNodes.length; i++) {
			node = thisObj.childNodes[i];
			if (node.nodeName=="A") {
				if(strState=='on')node.className="top_off";
				else node.className="";
			}
			if(node.nodeName=="SPAN"){
			    if(strState=='on' && node.className.indexOf('lft')!=-1)node.className="lft_border_on";
			    else if(strState=='off' && node.className.indexOf('lft')!=-1)node.className="lft_border";
			    else if(strState=='on' && node.className.indexOf('rgt')!=-1)node.className="rgt_border_on";
			    else if(strState=='off' && node.className.indexOf('rgt')!=-1)node.className="rgt_border";
			    
			}
		}

}
