
var disableGetMouseXY=false;

function ccbnReenableGetMouseXY(){disableGetMouseXY=false;}

function ccbnGetMouseXY(e) {
    if(disableGetMouseXY) return;
    if (ccbn_appName != "Netscape") {
        if ((!document.compatMode || document.compatMode == "BackCompat") &&
            document.body && typeof document.body.scrollLeft != "undefined") {
            ccbn_scrollLeft = document.body.scrollLeft;
            ccbn_scrollTop = document.body.scrollTop;
        } else {
            ccbn_scrollLeft = document.documentElement.scrollLeft;
            ccbn_scrollTop = document.documentElement.scrollTop;
        }
        ccbn_tempX = event.clientX + ccbn_scrollLeft;
        ccbn_tempY = event.clientY + ccbn_scrollTop;
    } else {
        ccbn_tempX = e.pageX;
        ccbn_tempY = e.pageY;
    }
    if (ccbn_tempX < 0) {
        ccbn_tempX = 0;
    }
    if (ccbn_tempY < 0) {
        ccbn_tempY = 0;
    }
    ccbn_mozMouseX = ccbn_tempX;
    ccbn_mozMouseY = ccbn_tempY;
    return true;
}

function ccbnHandleHover(theAnchor, theType, theEvent) {
    if(disableGetMouseXY){ccbnReenableGetMouseXY();return;}
    var ccbnTheHref = theAnchor.href.toLowerCase();
    var anchorArgs = ccbnGetArgs(ccbnTheHref);
    var theID;
    if (!ccbnHoverReady) {
        ccbnSetupHovers();
        return;
    }
    switch (theType) {
      case CCBN_BIOHOVER:
        if (theEvent == CCBN_OVER) {
            if (!anchorArgs.id) {
                break;
            }
            theID = "bio" + anchorArgs.id;
            ccbnOpenObj(theID);
        } else {
            ccbnStartTimer();
        }
        break;
      case CCBN_NEWSHOVER:
        if (theEvent == CCBN_OVER) {
            if (!anchorArgs.id) {
                break;
            }
            theID = "release" + anchorArgs.id;
            ccbnOpenObj(theID);
        } else {
            ccbnStartTimer();
        }
        break;
      case CCBN_EVENTHOVER:
        if (theEvent == CCBN_OVER) {
            if (anchorArgs.item_id) {
                theID = "eventHeader" + anchorArgs.item_id;
            } else if (anchorArgs.eventid) {
                theID = "eventHeader" + anchorArgs.eventid;
            } else {
                break;
            }
            ccbnOpenObj(theID);
        } else {
            ccbnStartTimer();
        }
        break;
      case CCBN_DEFINITIONHOVER:
        if (theEvent == CCBN_OVER) {
            anchorArgs = ccbnGetArgs(theAnchor.href);
            var defID = anchorArgs.def_id;
            var refModuleType = anchorArgs.mt;
            var defSource = refModuleType;
            defID = defID.replace(/%*/g, "");
            if (refModuleType == "TFSnapshot") {
                defSource = "Multex";
                switch (defID) {
                  case "APR2REV":
                  case "APRCFPS":
                  case "APRICE2BK":
                  case "ATOTD2EQ":
                  case "DIVTRENDGR":
                  case "REVTRENDGR":
                  case "NITRENDGR":
                  case "ACURRATIO":
                    defSource = "Worldscope";
                  default:;
                }
            }
            if (refModuleType == "TFTradingStatistics") {
                defSource = "Multex Market Guide";
                switch (defID) {
                  case "6":
                  case "7":
                  case "17":
                    defSource = "MarketWatch";
                  default:;
                }
            }
            if (refModuleType == "TFRatios") {
                switch (defID) {
                  case "AROIPCT":
                  case "APMGN":
                  case "APMGNPCT":
                  case "316":
                  case "ACURRATIO":
                  case "AINVTURN":
                  case "ARECTURN":
                  case "AASTTURN":
                  case "AROAPCT":
                  case "AROEPCT":
                  case "391":
                  case "APR2REV":
                  case "APRCFPS":
                  case "ATOTD2EQ":
                  case "APRICE2BK":
                  case "APRICE2BK":
                    defSource = "Worldscope";
                    break;
                  case "308":
                    defSource = "Multex";
                    break;
                  default:;
                }
            }
            if (refModuleType == "WS") {
                defSource = "Worldscope";
            }
            if (refModuleType == "SEC") {
                defSource = "SECFeed";
            }
            if (refModuleType == "HL") {
                defSource = "Highline";
            }
            theID = "definition" + defID + defSource.substring(0, 5);
            ccbnOpenObj(theID);
        } else {
            ccbnStartTimer();
        }
        break;
      default:;
    }
}


