////////////////////////////////////////////////// // DMB DHTML ENGINE 2.05.007 // // (c)xFX JumpStart // // // // PSN: 2E83-150470-XFX-2950 // // // // GENERATED: 4/4/2008 - 1:42:12 PM // // -------------------------------------------- // // Config: Remote // // AddIn: // // JS Name: menu // ////////////////////////////////////////////////// var nTCode = new Array; var AnimStep = 0; var AnimHnd = 0; var NSDelay = 0; var MenusReady = false; var smHnd = 0; var mhdHnd = 0; var lsc = null; var imgObj = null; var IsContext = false; var IsFrames = false; var dxFilter=null; var AnimSpeed = 20; var TimerHideDelay = 200; var smDelay = 200; var rmDelay = 15; var scDelay = 0; var cntxMenu = ''; var DoFormsTweak = true; var mibc = 0; var mibm; var mibs = 50; var nsOWH; var mFrame; var cFrame = self; var om = new Array; var nOM = 0; var mX; var mY; var BV=parseFloat(navigator.appVersion.indexOf("MSIE")>0?navigator.appVersion.split(";")[1].substr(6):navigator.appVersion); var BN=navigator.appName; var nua = navigator.userAgent; var IsWin=(nua.indexOf('Win')!=-1); var IsMac=(nua.indexOf('Mac')!=-1); var KQ=(BN.indexOf('Konqueror')!=-1&&(BV>=5))||(nua.indexOf('Safari')!=-1); var OP=(nua.indexOf('Opera')!=-1&&BV>=4); var NS=(BN.indexOf('Netscape')!=-1&&(BV>=4&&BV<5)&&!OP); var SM=(BN.indexOf('Netscape')!=-1&&(BV>=5)||OP); var IE=(BN.indexOf('Explorer')!=-1&&(BV>=4)||SM||KQ); var IX=(IE&&IsWin&&!SM&&!OP&&(BV>=5.5)&&(dxFilter!=null)&&(nua.indexOf('CE')==-1)); if(!eval(frames['self'])) { frames.self = window; frames.top = top; } var tbO = new Array; var tbS = new Array; var tbBorder = new Array; var tbSpacing = new Array; var tbStyle = new Array; var tbAlignment = new Array; var tbMargins = new Array; var tbAttachTo = new Array; var tbSpanning = new Array; var tbFollowHScroll = new Array; var tbFollowVScroll = new Array; var tbFPos = new Array; var lmcHS = null; var tbWidth = new Array; var tbHeight = new Array; var tbVisC = new Array; var sbHnd; var smfHnd; var tpl; var tbt; tbBorder[1] = 0; tbSpacing[1] = 0; tbStyle[1] = 0; tbAlignment[1] = 10; tbSpanning[1] = 0; tbFollowHScroll[1] = false; tbFollowVScroll[1] = false; tbMargins[1] = [0, -6]; tbFollowVScroll[1] = false; tbFPos[1] = [75,16]; tbVisC[1] = new Function('return true;'); tbAttachTo[1] = 'logo|8'; tbWidth[1] = 410; tbHeight[1] = 51; var tbNum = 1; var fx = 1; nTCode[1]="cFrame.execURL('/overview/index.jsp', '_self');"; nTCode[2]="cFrame.execURL('/benchmark/index.jsp', '_self');"; nTCode[3]="cFrame.execURL('/press/index.jsp', '_self');"; nTCode[4]="cFrame.execURL('/contact/index.jsp', '_self');"; nTCode[5]="cFrame.execURL('/clientBanks/hedgefunds.jsp', '_self');"; nTCode[6]="cFrame.execURL('/clientBanks/assetmanagers.jsp', '_self');"; nTCode[7]="cFrame.execURL('/clientBanks/clientbanks.jsp', '_self');"; nTCode[8]="cFrame.execURL('/clientBanks/pfis.jsp', '_self');"; nTCode[10]="cFrame.execURL('/technology/technology_overview.jsp', '_self');"; nTCode[11]="cFrame.execURL('/technology/technology_interface.jsp', '_self');"; nTCode[13]="cFrame.execURL('/technology/technology_network.jsp', '_self');"; nTCode[15]="cFrame.execURL('/servlet/HsfxServlet?cmd=tken', '_self');"; nTCode[16]="cFrame.execURL('/products/currency.jsp', '_self');"; nTCode[17]="cFrame.execURL('/products/currency.jsp', '_self');"; nTCode[18]="cFrame.execURL('/marketData/overview.jsp', '_self');"; nTCode[19]="cFrame.execURL('/marketdata.jsp', 'frames[hd]');"; nTCode[20]="cFrame.execURL('/relationships/overview.jsp', '_self');"; nTCode[21]="cFrame.execURL('/relationships/trading_partners.jsp', '_self');"; nTCode[22]="cFrame.execURL('/marketData/partners.jsp', '_self');"; nTCode[23]="cFrame.execURL('/relationships/integration_partners.jsp', '_self');"; nTCode[24]="cFrame.execURL('/technology/technology_apifix.jsp', '_self');"; nTCode[25]="cFrame.execURL('/technology/technology_fix.jsp', '_self');"; nTCode[26]="cFrame.execURL('/pdfs/Hotspot%20FXi%20FX%20ECN%20User%20Guide%202007.pdf', 'frames[fxecn]');"; nTCode[27]="cFrame.execURL('/pdfs/Hotspot%20FXi%20TradeView%20FX%20User%20Guide%202007.pdf', 'frames[tv]');"; nTCode[28]="cFrame.execURL('/guide/Hotspot%20FXi%20FX%20ECN%20User%20Guide%202010.pdf', 'frames[refrate]');"; nTCode[29]="cFrame.execURL('/pdfs/operation.pdf', 'frames[oper]');"; nTCode[30]="cFrame.execURL('/pdfs/privacystatement.pdf', 'frames[privacy]');"; nTCode[31]="cFrame.execURL('/pdfs/useragreement.pdf', 'frames[user]');"; nTCode[33]="cFrame.execURL('/technology/technology_security.jsp', '_self');"; function SetupToolbar(fr) { //IE,NS,SM,OP,KQ //This function handles the initialization and positioning of the toolbars. //------------------------------ //Version 3.7 // if(!MenusReady) { window.setTimeout("SetupToolbar()", 10); return false; } var mimg = false; var SMb; var lt = GetLeftTop(cFrame); var wh = GetWidthHeight(cFrame); var er = (wh[0]==0); ClearTimer("sbHnd"); for(var t=1; t<=tbNum; t++) { SMb = (SM?tbBorder[t]:0); if(fr!=true) { if(!tbO[t]) { olt = lt; tbO[t] = GetObj("dmbTBBack"+t); if(!tbO[t]) mimg = true; else { if(NS) { tbO[t].st = GetObj("dmbTB"+t, tbO[t]); tbS[t] = tbO[t]; tbS[t].width = tbS[t].clip.width; tbS[t].height = tbS[t].clip.height; } else { tbO[t].st = GetObj("dmbTB"+t).style; tbS[t] = tbO[t].style; if(SM&&!OP) { tbS[t].width = unic(tbS[t].width, wh[0]) - 2*SMb + "px"; tbS[t].height = unic(tbS[t].height, wh[1]) - 2*SMb + "px"; } FixCommands("dmbTB"+t, t); } } } } if(tbO[t] && !er) { tbl = 0; tbt = 0; switch(tbAlignment[t]) { case 0: break; case 1: tbl = tbStyle[t]==0?(wh[0]-tbWidth[t])/2:(wh[0]-parseInt(tbS[t].width))/2 - SMb; break; case 2: tbl = tbStyle[t]==0?wh[0]-tbWidth[t]:(wh[0]-parseInt(tbS[t].width)) - SMb; break; case 3: tbt = tbStyle[t]==0?(wh[1]-tbHeight[t])/2:(wh[1]-parseInt(tbS[t].height))/2 - SMb; break; case 4: tbl = tbStyle[t]==0?(wh[0]-tbWidth[t])/2:(wh[0]-parseInt(tbS[t].width))/2 - SMb; tbt = tbStyle[t]==0?(wh[1]-tbHeight[t])/2:(wh[1]-parseInt(tbS[t].height))/2 - SMb; break; case 5: tbl = tbStyle[t]==0?wh[0]-tbWidth[t]:(wh[0]-parseInt(tbS[t].width)) - 2*SMb; tbt = tbStyle[t]==0?(wh[1]-tbHeight[t])/2:(wh[1]-parseInt(tbS[t].height))/2 - SMb; break; case 6: tbt = (tbStyle[t]==0?wh[1]-parseInt(tbS[t].height):wh[1]-parseInt(tbS[t].height)) - 2*SMb; break; case 7: tbl = tbStyle[t]==0?(wh[0]-tbWidth[t])/2:(wh[0]-parseInt(tbS[t].width))/2 - SMb; tbt = (tbStyle[t]==0?wh[1]-parseInt(tbS[t].height):wh[1]-parseInt(tbS[t].height)) - 2*SMb; break; case 8: tbl = tbStyle[t]==0?wh[0]-tbWidth[t]:(wh[0]-parseInt(tbS[t].width)) - 2*SMb; tbt = (tbStyle[t]==0?wh[1]-parseInt(tbS[t].height):wh[1]-parseInt(tbS[t].height)) - 2*SMb; break; case 9: tbl = tbFPos[t][0]; tbt = tbFPos[t][1]; break; case 10: var imgObj = NS?FindImage(cFrame.document, tbAttachTo[t].split("|")[0]):cFrame.document.images[tbAttachTo[t].split("|")[0]]; if(!imgObj) { imgObj = GetObj(tbAttachTo[t].split("|")[0]); if(imgObj&&!NS) if(imgObj.style.left) imgObj = imgObj.style; } if(imgObj) { tbl = AutoPos(tbO[t], imgObj, parseInt(tbAttachTo[t].split("|")[1]))[0] + MacOffset(cFrame)[0]; tbt = AutoPos(tbO[t], imgObj, parseInt(tbAttachTo[t].split("|")[1]))[1] + MacOffset(cFrame)[1]; } else mimg = true; break; } tbS[t].left = tbl + (tbFollowHScroll[t]?olt[0]:0) + tbMargins[t][0] + (NS?"":"px"); tbS[t].top = tbt + (tbFollowVScroll[t]?olt[1]:0) + tbMargins[t][1] + (NS?"":"px"); if(tbSpanning[t]==1) { if(tbStyle[t]==0) { tbO[t].st.left = tbS[t].left; tbS[t].left = "0px"; tbS[t].width = wh[0] + (tbFollowHScroll[t]?0:lt[0]) - 2*SMb + (NS?"":"px"); } if(tbStyle[t]==1) { tbO[t].st.top = tbS[t].top; tbS[t].top = "0px"; tbS[t].height = wh[1] + (tbFollowVScroll[t]?0:lt[1]) - 2*SMb + (NS?"":"px"); } } tbS[t].visibility = (tbVisC[t]()?"visible":"hidden"); if(tbFollowHScroll[t] || tbFollowVScroll[t]) if(ScrollTB(lt, wh, tbO[t])) mimg = false; } } if(NS||SM||mimg||er) sbHnd = window.setTimeout("SetupToolbar()", 100); return true; } function getTBPos(t) { //IE,NS,SM,OP,KQ //This function returns the position of the toolbar. //------------------------------ //Version 2.0 // var xy = [parseInt(tbO[t].st.left) + (NS?tbO[t].x:tbO[t].offsetLeft) + tbBorder[t], parseInt(tbO[t].st.top) + (NS?tbO[t].y:tbO[t].offsetTop) + tbBorder[t]]; if(IE) { var p = tbO[t]; while(true) { p = p.parentNode; if(!p) break; if(!p.style) break; if(p.style.position) { xy[0] += p.offsetLeft; xy[1] += p.offsetTop; } } } return xy; } function unic(u, wh) { //SM //This function converts % values into numeric values. //------------------------------ //Version 1.0 // var k = parseInt(u); return (NS?k:u.indexOf("%")==-1?k:wh*k/100); } function ScrollTB(lt, wh, tb) { //IE,NS,SM,OP,KQ //This function handles the scrolling of toolbars. //------------------------------ //Version 1.8 // var s = [true, true]; var v = parseInt(tb.top) + parseInt(tb.height); var h = parseInt(tb.left) + parseInt(tb.width); if(olt[0]!=lt[0] || olt[1]!=lt[1]) { var d = [olt[0]-lt[0], olt[1]-lt[1]]; if(d[0]<=0) if(h>=(lt[0]+wh[0])) s[0] = false; if(d[1]<=0) if(v>=(lt[1]+wh[1])) s[1] = false; var k = [parseInt(Math.abs(d[0]/20)+1)*(d[0]>0?-1:1),parseInt(Math.abs(d[1]/20)+1)*(d[1]>0?-1:1)]; for(var i=0; i<2; i++) if(s[i]) { olt[i] += k[i]; if(Math.abs(olt[i]-lt[i])<2) olt[i]=lt[i]; } ClearTimer("sbHnd"); sbHnd = window.setTimeout("SetupToolbar(true)", 10); return true; } return false; } function GetHSPos(n, al, mW, mH, t) { //IE,NS,SM,OP,KQ //This function returns the position of a given toolbar item. //------------------------------ //Version 1.3 // var tbs0 = tbStyle[t]==0; var tp = getTBPos(t); var wh; if(NS) { lmcHS.style = lmcHS; wh = [lmcHS.clip.width, lmcHS.clip.height]; } else wh = [lmcHS.offsetWidth, lmcHS.offsetHeight]; var acc = parseInt(tbs0?lmcHS.style.left:lmcHS.style.top); var x = (!tbs0&&IsFrames?-wh[0]:tp[0]); var y = (tbs0&&IsFrames?-wh[1]:tp[1]); if(tbs0) x += acc; else y += acc; switch(al) { case 0: y += wh[1]; break; case 1: x -= (mW - wh[0]); y += wh[1]; break; case 2: y -= mH; break; case 3: x -= (mW - wh[0]); y -= mH; break; case 4: x -= mW; break; case 5: x -= mW; y += (wh[1] - mH); break; case 6: x += wh[0]; break; case 7: x += wh[0]; y += (wh[1] - mH); break; case 8: x -= mW; y += (wh[1]-mH)/2; break; case 9: x += wh[0]; y += (wh[1]-mH)/2; break; case 10: x += (wh[0]-mW)/2; y -= mH; break; case 11: x += (wh[0]-mW)/2; y += wh[1]; break; } if(IsFrames) { x += GetLeftTop()[0]; y += GetLeftTop()[1]; } return [x,y]; } function hsNSHoverSel(mode, mc, bcolor) { //NS //This is the function called every time the mouse pointer is moved over or away from a toolbar item. //------------------------------ //Version 1.0 // var mcN; if(mode==0) { if(lmcHS) hsNSHoverSel(1); mcN = mc.parentLayer.layers[mc.name.substr(0, mc.name.indexOf("EH")) + "N"]; mcN.mcO = mc.parentLayer.layers[mc.name.substr(0, mc.name.indexOf("EH")) + "O"]; if(mcN!=lmcHS) HideAll(); if(nOM>1) if(mcN==om[nOM-1].sc) return false; mcN.mcO.visibility = "show"; mcN.visibility = "hide"; lmcHS = mcN; } else { mcN = lmcHS; mcN.visibility = "show"; mcN.mcO.visibility = "hide"; lmcHS = null; } return true; } function hsHoverSel(mode, e) { //IE,SM,OP,KQ //This is the function called every time the mouse pointer is moved over or away from a toolbar item. //------------------------------ //Version 1.9 // var mc; var fh = false; ClearTimer("smHnd"); ClearTimer("smfHnd"); if(mode==0) { mc = GetCurCmd(e); if(!mc) return false; if(lmcHS==mc) return false; if(lmcHS) hsHoverSel(1,0,1); if(mc!=lmcHS) { if(!mc.onmouseover) fh = true; else if(mc.onmouseover.toString().indexOf("ShowMenu")==-1) fh = true; if(fh) smHnd = window.setTimeout("HideAll(1)",mDelay()); } FixCursor(mc); lmcHS = mc; } else { mc = lmcHS; lmcHS = null; } SwapMC(mode, mc); return true; } function InitTB() { //IE,NS,SM,OP,KQ //This function initializes the event handling required for the toolbars to function properly. //------------------------------ //Version 1.7 // var dsn = true; var e = ""; var i, n; for(var t=1; t<=tbNum; t++) if(tbAlignment[t]==10) { dsn = false; if(window.onload) { e = window.onload.toString(); n = e.indexOf("{"); e = e.substr(n + 1, e.lastIndexOf("}") - n - 1); } e += ";SetupToolbar();"; window.onload = new Function(e); break; } if(!NS) { window.onresize = SetupToolbar; window.onscroll = SetupToolbar; } if(dsn) SetupToolbar(); } InitTB(); function GetCurCmd(e) { //IE,SM,OP,KQ //This function will return the current command under the mouse pointer. //It will return null if the mouse is not over any command. //------------------------------ //Version 1.6 // var cc = e; while(cc.id=="") { cc = cc.parentElement; if(cc==null) break; } return cc; } function HoverSel(mode, e) { //IE,SM,OP,KQ //This is the function called every time the mouse pointer is moved over a command. //------------------------------ //mode: 0 if the mouse is moving over the command and 1 if is moving away. //e: Source event. //------------------------------ //Version 16.6 // var mc; var lc; if(nOM==0) return false; ClearTimer("smHnd"); if((om[1].pHS != lmcHS) && om[1].pHS) { if(lmcHS) hsHoverSel(1,0,1); lmcHS = om[1].pHS; SwapMC(mode, om[1].pHS); } if(mode==0) { if(om[nOM].sc!=null) HoverSel(1); if(nOM>1) if(om[nOM-1].sc!=null) { om[nOM-1].ssc = om[nOM-1].sc; SwapMC(1, om[nOM-1].sc); } mc = GetCurCmd(e); if(scDelay) { if(!mc.onmouseout) mc.onmouseout = new Function("if(nOM)om[nOM].hsm = window.setTimeout(\"HideSubMenus('"+mc.id+"')\", scDelay)"); for(var i=1; i<=nOM; i++) ClearTimer("om["+i+"].hsm"); } else HideSubMenus(mc.id); om[nOM].sc = mc; if(nOM>1) if(om[nOM-1].id != gpid(mc)) SwapMC(0, om[nOM-1].ssc); FixCursor(mc); } else { mc = (mode==1)?om[nOM].sc:om[nOM].op; om[nOM].sc = null; } SwapMC(mode, mc); return true; } function HideSubMenus(id) { //IE,SM,OP,KQ //This function handles the submenus visibility //------------------------------ //Version 1.0 // var mc = GetObj(id); if(nOM>1) { if(mc==om[nOM-1].sc) return false; while(true) { if(!nOM) return false; if(gpid(mc)==om[nOM].id) break; Hide(); } if(nOM && scDelay) mc.onmouseover(); } } function SwapMC(mode, mc) { //IE,SM,OP,KQ //This is the function swaps the normal/over items to create the rollover effect. //------------------------------ //mode: 0 if the mouse is moving over the command and 1 if is moving away. //mc: reference to the item that must be swapped. //------------------------------ //Version 1.0 // var id = mc.id.substr(1); var n1 = GetObj((mode!=0?"O":"N") + id); n1.style.visibility = "hidden"; var n2 = GetObj((mode==0?"O":"N") + id); n2.style.visibility = "inherit"; if(mode==0 && !n1.c) { n1.c = true; n1 = (BV<5?n1.all.tags("DIV"):n1.getElementsByTagName("DIV"))[0]; if(n1) (BV<5?n2.all.tags("DIV"):n2.getElementsByTagName("DIV"))[0].innerHTML = n1.innerHTML; } } function NSHoverSel(mode, mc) { //NS //This is the function called every time the mouse pointer is moved over or away from a command. //------------------------------ //mode: 0 if the mouse is moving over the command and 1 if is moving away. //------------------------------ //Version 13.1 // var mcN; var mn; ClearTimer("smHnd"); if(!nOM) return false; if(mode==0 && om[nOM].sc!=null) NSHoverSel(1); if(mode==0) { mn = mc.name.substr(0, mc.name.indexOf("EH")); mcN = mc.parentLayer.layers[mn + "N"]; mcN.mcO = mc.parentLayer.layers[mn + "O"]; if(nOM>1) if(mc==om[nOM-1].sc) return false; while(!InMenu()&&nOM>1) Hide(); om[nOM].sc = mcN; mcN.mcO.visibility = "show"; mcN.visibility = "hide"; } else { mcN = (mode==1)?om[nOM].sc:om[nOM].op; mcN.visibility = "show"; mcN.mcO.visibility = "hide"; om[nOM].sc = null; } return true; } function Hide(chk) { //IE,NS,SM,OP,KQ //This function hides the last opened group and it keeps hiding all the groups until //no more groups are opened or the mouse is over one of them. //Also takes care of reseting any highlighted commands. //------------------------------ //Version 4.7 // var m; var cl = false; ClearTimer("mhdHnd"); ClearTimer("AnimHnd"); if(chk) if(InMenu()) return false; if(nOM) { m = om[nOM]; if(m.sc!=null) { if(IE) HoverSel(1); if(NS) NSHoverSel(1); } if(m.op!=null) { if(IE) HoverSel(3); if(NS) NSHoverSel(3); } ToggleMenu(m, "hidden"); ClearTimer("om[nOM].hsm"); nOM--; cl = (nOM==0); if(cl) imgObj = null; } if(cl||chk) { ClearTimer("smHnd"); if(tbNum && lmcHS) if(!lmcHS.disable) { if(IE) hsHoverSel(1); if(NS) hsNSHoverSel(1); } window.setTimeout("if(!lmcHS)window.status=''", TimerHideDelay); } if((nOM>0||lmcHS)&&!InSelMenu()) mhdHnd = window.setTimeout("Hide(1)", TimerHideDelay/20); return true; } function ToggleMenu(m, s) { //IE,NS,SM,OP,KQ //This function controls how the menus are displayed //and hidden from the screen. //------------------------------ //Version 1.2 // if(IX) if(document.readyState=="complete" && m.getAttribute("filters")!=null) { if(!m.fs) { m.fsn = m.filters.length; m.style.filter = dxFilter + m.style.filter; m.fs = true; } for(var i=0; i0) if(om[1].id == mName) return false; ClearTimer("mhdHnd"); if(algn<0 && !lmcHS) return false; f[1] = "HideAll(1);"; f[2] = mDelay(); } smHnd = window.setTimeout(f[1]+f[0], f[2]); return true; } function ShowMenu2(mName, x, y, isc, hsimg, algn) { //IE,NS,SM,OP,KQ //This is the main function to show the menus when a hotspot is triggered or a cascading command is activated. //------------------------------ //mName: Name of the
or to be shown. //x: Left position of the menu. //y: Top position of the menu. //isc: True if the menu has been triggered from a command. //hsimg: Image to which the menu is attached to. //algn: Alignment setting for the menu. //------------------------------ //Version 21.1 // var xy; x = parseInt(x);y = parseInt(y); var Menu = GetObj(mName); if(!Menu) return false; if(Menu==om[nOM]) return false; if(NS) Menu.style = Menu; if(AnimHnd && nOM>0) { AnimStep=100; Animate(); } Menu.op = nOM>0?om[nOM].sc:null; Menu.sc = null; imgObj = null; if(isc) { if(!NS) HideSubMenus(om[nOM].sc.id); xy = GetSubMenuPos(Menu, algn); var gs = om[nOM].gs; if(gs) xy[1] += parseInt(gs.top); } else { if(algn<0 && !lmcHS) return false; Menu.pHS = lmcHS; xy = (algn<0?GetHSPos(x, y, NS?Menu.w:Menu.offsetWidth, NS?Menu.h:Menu.offsetHeight, -algn):[x,y]); if(hsimg) { var hss = hsimg.split("|"); imgObj = NS?FindImage(cFrame.document, hss[0]):cFrame.document.images[hss[0]]; if(imgObj) { if(hss[1]&2) xy[0] = AutoPos(Menu, imgObj, algn)[0] + (IsFrames?GetLeftTop()[0]:0) + MacOffset()[0]; if(hss[1]&1) xy[1] = AutoPos(Menu, imgObj, algn)[1] + (IsFrames?GetLeftTop()[1]:0) + MacOffset()[1]; } } } if(xy) {x = xy[0];y = xy[1];} var pWH = [GetWidthHeight()[0] + GetLeftTop()[0], GetWidthHeight()[1] + GetLeftTop()[1]]; if(IE) with(Menu.style) { if(SM) display = "none"; left = FixPos(x,parseInt(width),pWH[0],0) + "px"; top = FixPos(y,parseInt(height),pWH[1],1) + "px"; if(!IX&&!SM&&IsWin) clip = "rect(0 0 0 0)"; } if(NS) { Menu.clip.width = 0; Menu.clip.height = 0; Menu.moveToAbsolute(FixPos(x,Menu.w,pWH[0],0),FixPos(y,Menu.h,pWH[1],1)); } Menu.style.zIndex = 1000+tbNum+nOM; om[++nOM] = Menu; if(!NS) FixCommands(mName); if(SM) Menu.style.display = "inline"; if(!IX) { if((IE&&IsWin&&!SM)||(NS&&Menu.style.clip.width==0)) AnimHnd = window.setTimeout("Animate()", 10); } ToggleMenu(Menu, "visible"); IsContext = false; smHnd = 0; return true; } function mDelay() { //IE,NS,SM,OP,KQ //This function calculates the amount of delay to be applied to root level menus //------------------------------ //Version 1.0 // return rmDelay/(nOM==0&&scDelay>0?4:1); } function MacOffset(f) { //IE //This function calculates the margins for the body under IE/Mac. //------------------------------ //Version 1.0 // var mo = [0,0]; if(!f) f = mFrame; if(IsMac&&IE&&!SM&&!KQ&&(BV>=5)) mo = [parseInt(f.document.body.leftMargin),parseInt(f.document.body.topMargin)]; return mo; } function GetSubMenuPos(mg, a) { //IE,NS,SM,OP,KQ //This function calculates the position of a submenu based on its alignment. //------------------------------ //Version 1.1 // var x; var y; var pg = om[nOM]; var sc = (NS?pg.sc:GetObj("O" + pg.sc.id.substr(1))); if(NS) { pg.offsetLeft = pg.left; pg.offsetTop = pg.top; pg.offsetWidth = pg.w; pg.offsetHeight = pg.h; mg.offsetWidth = mg.w; mg.offsetHeight = mg.h; sc.offsetLeft = sc.left; sc.offsetTop = sc.top; sc.offsetWidth = sc.clip.width; sc.offsetHeight = sc.clip.height; } var lp = pg.offsetLeft + sc.offsetLeft; var tp = pg.offsetTop + sc.offsetTop; switch(a) { case 0: x = lp; y = tp + sc.offsetHeight; break; case 1: x = lp + sc.offsetWidth - mg.offsetWidth; y = tp + sc.offsetHeight; break; case 2: x = lp; y = tp - mg.offsetHeight; break; case 3: x = lp + sc.offsetWidth - mg.offsetWidth; y = tp - mg.offsetHeight; break; case 4: x = lp - mg.offsetWidth; y = tp; break; case 5: x = lp - mg.offsetWidth; y = tp + sc.offsetHeight - mg.offsetHeight; break; case 6: x = lp + sc.offsetWidth; y = tp; break; case 7: x = lp + sc.offsetWidth; y = tp + sc.offsetHeight - mg.offsetHeight; break; case 8: x = lp - mg.offsetWidth; y = tp + (sc.offsetHeight - mg.offsetHeight)/2; break; case 9: x = lp + sc.offsetWidth; y = tp + (sc.offsetHeight - mg.offsetHeight)/2; break; case 10: x = lp + (sc.offsetWidth - mg.offsetWidth)/2; y = tp - mg.offsetHeight; break; case 11: x = lp + (sc.offsetWidth - mg.offsetWidth)/2; y = tp + sc.offsetHeight; break; } return [x,y]; } function FixCommands(mName, t) { //IE, SM //This function is used to fix the way the Gecko engine calculates //the borders and the way they affect the size of block elements. //It also fixes the way IE renderes pages while running CSS1Compat mode. //------------------------------ //Version 2.6 // var en = true; var m = GetObj(mName); if(!m.fixed) { m.fixed = true; if(!t) t = 0; if(IE&&(!SM||OP)) en = (document.compatMode=="CSS1Compat"); if(en && t>0 && (!SM || OP)) { b = GetBorderSize(tbS[t]); tbS[t].width = Math.abs(parseInt(tbS[t].width) - b[0]) + "px"; tbS[t].height = Math.abs(parseInt(tbS[t].height) - b[1]) + "px"; } var sd = (BV<5?m.all.tags("DIV"):m.getElementsByTagName("DIV")); for(var i=0;i<(sd.length);(t>0?i+=2:i++)) { sd[i].noWrap = true; if(en) with(sd[i].style) { b = GetBorderSize(sd[i].style); if(parseInt(width) && parseInt(height)) { width = parseInt(width) - b[0] + "px"; height = parseInt(height) - b[1] + "px"; } } } } } function Animate() { //IE,NS,SM,OP,KQ //This function is called by ShowMenu every time a new group must be displayed and produces the predefined unfolding effect. //Currently is disabled for Navigator, because of some weird bugs we found with the clip property of the layers. //------------------------------ //Version 1.9 // var r = ''; var nw = nh = 0; if(AnimStep+AnimSpeed>100) AnimStep = 100; switch(fx) { case 1: if(IE) r = "0 " + AnimStep + "% " + AnimStep + "% 0"; if(NS) nw = AnimStep; nh = AnimStep; break; case 2: if(IE) r = "0 100% " + AnimStep + "% 0"; if(NS) nw = 100; nh = AnimStep; break; case 3: if(IE) r = "0 " + AnimStep + "% 100% 0"; if(NS) nw = AnimStep; nh = 100; break; case 0: if(IE) r = "0 100% 100% 0"; if(NS) nw = 100; nh = 100; break; } if(om[nOM]) { with(om[nOM].style) { if(IE) clip = "rect(" + r + ")"; if(NS) { clip.width = w*(nw/100); clip.height = h*(nh/100); } } AnimStep += AnimSpeed; if(AnimStep<=100) AnimHnd = window.setTimeout("Animate()",25); else { ClearTimer("AnimHnd"); AnimStep = 0; AnimHnd = 0; } } } function InTBHotSpot() { //IE,NS,SM,OP,KQ //This function returns true if the mouse pointer is over a toolbar item. //------------------------------ //Version 2.2 // var m = (imgObj?imgObj:lmcHS); var tp = [0, 0]; var tbb; if(!m) return false; if(imgObj) if(imgObj.name.indexOf("dmbHSdyna")!=-1) { imgObj = null; return false; } var x = mX; var y = mY; if(!imgObj) { if(IE) { if(BV<5&&!IsMac) m.parentNode = m.parentElement; } else m.parentNode = m.parentLayer; tp = getTBPos(m.parentNode.id.substr(5)); if(IE) m = m.style; } else { m.left = GetImgXY(imgObj)[0]; m.top = GetImgXY(imgObj)[1]; if(NS) m.clip = m; } var l = parseInt(m.left) + tp[0]; var r = l+(IE?parseInt(m.width):m.clip.width); var t = parseInt(m.top) + tp[1]; var b = t+(IE?parseInt(m.height):m.clip.height); if(IsFrames&&!NS) { x -= GetLeftTop()[0]; y -= GetLeftTop()[1]; } return ((x>=l && x<=r) && (y>=t && y<=b)); } function InMenu() { //IE,NS,SM,OP,KQ //This function returns true if the mouse pointer is over the last opened menu. //------------------------------ //Version 2.5 // var m = om[nOM]; if(!m) return false; else if(IE) m = m.style; var l = parseInt(m.left); var r = l+(IE?parseInt(m.width):m.clip.width); var t = parseInt(m.top); var b = t+(IE?parseInt(m.height):m.clip.height); return ((mX>=l && mX<=r) && (mY>=t && mY<=b)); } function SetPointerPos(e) { //IE,NS,SM,OP,KQ //This function sets the mX and mY variables with the current position of the mouse pointer. //------------------------------ //e: Only used under Navigator, corresponds to the Event object. //------------------------------ //Version 1.9 // if(IE) { if(!SM) { if(mFrame!=cFrame||event==null) { var cfe = cFrame.window.event; var mfe = mFrame.window.event; if(IE&&IsMac) cfe = (cfe.type=="mousemove"?cfe:null); if(IE&&IsMac) mfe = (mfe.type=="mousemove"?mfe:null); if(mfe==null && cfe==null) return; e = (cfe?cfe:mfe); } else e = event; } mX = e.clientX + lt[0]; mY = e.clientY + lt[1]; if(!KQ) { ClearTimer("cFrame.iefwh"); cFrame.iefwh = window.setTimeout("lt=GetLeftTop()", 100); } } if(NS) { mX = e.pageX; mY = e.pageY; } } function InSelMenu() { //IE,NS,SM,OP,KQ //This function checks if the mouse pointer is on over the selected menu. //------------------------------ //Version 1.1 // var nOMb = nOM--; for(; nOM>0; nOM--) if(om[nOM].sc!=null) break; var im = InMenu(); nOM = nOMb; return im || InMenu(); } function IsOverMenus() { //IE,NS,SM,OP,KQ //This function checks if the mouse pointer is on over any part of the menus. //------------------------------ //Version 1.0 // return (lmcHS||imgObj?InTBHotSpot():(nOM==1?!(om[nOM].sc!=null):false))||(nOM>0?InSelMenu():false); } function HideMenus(e) { //IE,NS,SM,OP,KQ //This function checks if the mouse pointer is on a valid position and if the current menu should be kept visible. //The function is called every time the mouse pointer is moved over the document area. //------------------------------ //e: Only used under Navigator, corresponds to the Event object. //------------------------------ //Version 26.0 // SetPointerPos(e); if(!IsOverMenus() && mhdHnd==0) mhdHnd = window.setTimeout("mhdHnd=0;if(!IsOverMenus())Hide()", TimerHideDelay); } function FormsTweak(state) { //IE,SM,OP //This is an undocumented function, which can be used to hide every listbox (or combo) element on a page. //This can be useful if the menus will be displayed over an area where is a combo box, which is an element that cannot be placed behind the menus and it will always appear over the menus resulting in a very undesirable effect. //------------------------------ //Version 3.2 // var fe; if(IE&&(!SM||OP)&&DoFormsTweak) { var m = om[nOM]; if((BV>=5.5)&&!OP&&m&&!KQ) cIF(state=="visible"?"hidden":"visible"); else if(nOM==1) for(var f=0; f0; n--) if(om[n].sc) { mibm = om[n].sc; break; } if(mibm) { mibm.n = mibc; BlinkItem(); } } else HideAll(); execURL2(escape(_purl(url)), tframe); } function BlinkItem() { //IE,NS,SM,OP,KQ //This function is used to blink a menu item when cliked. //------------------------------ //Version 1.2 // mibm.bs = !Math.abs(mibm.bs); SwapMC(mibm.bs, mibm); mibc--; if(mibc>=0) window.setTimeout("BlinkItem()", mibs); else { mibc = mibm.n; mibm = null; HideAll(); } } function execURL2(url, tframe) { //IE,NS,SM,OP,KQ //This function is called every time a command is triggered to jump to another page or execute some javascript code. //------------------------------ //url: Encrypted URL that must be opened or executed. //tframe: If the url is a document location, tframe is the target frame where this document will be opened. //------------------------------ //Version 3.0 // var w = eval("windo" + "w.ope" + "n"); url = rStr(unescape(url)); if(url.indexOf("javascript:")!=url.indexOf("vbscript:")) eval(url); else { switch(tframe) { case "_self": if(IE&&!SM&&!KQ&&(BV>4)) { var a = mFrame.document.createElement("A"); a.href = url; mFrame.document.body.appendChild(a); a.click(); } else mFrame.location.href = url; break; case "_blank": w(url, tframe); break; default: var f = rStr(tframe); var fObj = (tframe=='_parent'?mFrame.parent:eval(f)); if(typeof(fObj) == "undefined") w(url, f.substr(8, f.length-10)); else fObj.location.href = url; break; } } } function rStr(s) { //IE,NS,SM,OP,KQ //This function is used to decrypt the URL parameter from the triggered command. //------------------------------ //Version 1.2 // s = xrep(s,"%1E", "'"); s = xrep(s,"\x1E", "'"); if(OP&&s.indexOf("frames[")!=-1) s = xrep(s,String.fromCharCode(s.charCodeAt(7)), "'"); return xrep(s,"\x1D", "\x22"); } function hNSCClick(e) { //NS //This function executes the selected command's trigger code. //------------------------------ //Version 1.0 // eval(this.TCode); } function HideAll(dr) { //IE,NS,SM,OP,KQ //This function will hide all the currently opened menus. //------------------------------ //Version 1.1 // var o = lmcHS; if(dr) lmcHS = null; Hide(); while(nOM>0) Hide(); lmcHS = o; } function tHideAll() { //IE,NS,SM,OP,KQ //This function is called when the mouse is moved away from a hotspot to close any opened menu. //------------------------------ //Version 1.5 // ClearTimer("mhdHnd"); mhdHnd = window.setTimeout("mhdHnd=0;if(!InSelMenu())HideAll();", TimerHideDelay); } function GetLeftTop(f) { //IE,NS,SM,OP,KQ //This function returns the scroll bars position on the menus frame. //------------------------------ //Version 2.7 // if(!f) f = mFrame; if(IE) if(SM) return [OP?f.pageXOffset:f.scrollX,OP?f.pageYOffset:f.scrollY]; else { var b = GetBodyObj(f); return (b?[b.scrollLeft,b.scrollTop]:[0,0]); } if(NS) return [f.pageXOffset,f.pageYOffset]; } function GetWidthHeight(f) { //IE,NS,SM,OP,KQ //This function returns the width and height of the menus frame. //------------------------------ //Version 2.5 // var k = 0; if(!f) f = mFrame; if(NS||SM) { return [f.innerWidth,f.innerHeight]; } else { var b = GetBodyObj(f); return (b?[b.clientWidth,b.clientHeight]:[0,0]); } } function GetBodyObj(f) { //IE // //------------------------------ //Version 1.3 // if(!f.bo) f.bo = (f.document.compatMode=="BackCompat"||BV<6||IsMac)?f.document.body:f.document.documentElement; return f.bo; } function GetBorderSize(s) { //IE,SM //This functions returns the widths of a border //------------------------------ //Version 2.2 // return [(s.borderLeftStyle==""||s.borderLeftStyle=="none"?0:parseInt(s.borderLeftWidth)) + (s.borderRightStyle==""||s.borderRightStyle=="none"?0:parseInt(s.borderRightWidth)), (s.borderTopStyle==""||s.borderTopStyle=="none"?0:parseInt(s.borderTopWidth)) + (s.borderBottomStyle==""||s.borderBottomStyle=="none"?0:parseInt(s.borderBottomWidth))]; } function AutoPos(m, img, arl) { //IE,NS,SM,OP,KQ //This function finds the image-based hotspot and returns the position at which //the menu should be displayed based on the alignment setting. //------------------------------ //Version 1.5 // var x = GetImgXY(img)[0]; var y = GetImgXY(img)[1]; var iWH = GetImgWH(img); var mW = (NS?m.w:m.offsetWidth); var mH = (NS?m.h:m.offsetHeight); switch(arl) { case 0: y += iWH[1]; break; case 1: x += iWH[0] - mW; y += iWH[1]; break; case 2: y -= mH; break; case 3: x += iWH[0] - mW; y -= mH; break; case 4: x -= mW; break; case 5: x -= mW; y -= mH - iWH[1]; break; case 6: x += iWH[0]; break; case 7: x += iWH[0]; y -= mH - iWH[1]; break; case 8: x -= mW; y += (iWH[1] - mH)/2; break; case 9: x += iWH[0]; y += (iWH[1] - mH)/2; break; case 10: x += (iWH[0] - mW)/2; y -= mH; break; case 11: x += (iWH[0] - mW)/2; y += iWH[1]; break; } return [x, y]; } function GetImgXY(img) { //IE,NS,SM,OP,KQ //This function returns the x,y coordinates of an image. //------------------------------ //Version 1.4 // var x; var y; if(NS) { y = GetImgOffset(cFrame, img.name, 0, 0); x = img.x + y[0]; y = img.y + y[1]; } else { y = getOffset(img); x = y[0]; y = y[1]; } return [x, y]; } function GetImgWH(img) { //IE,NS,SM,OP,KQ //This function returns the width and height of an image. //------------------------------ //Version 1.2 // return [parseInt(img.width), parseInt(img.height)]; } function getOffset(img) { //IE,NS,SM,OP,KQ //This function returns the horizontal and vertical offset of an object. //------------------------------ //Version 1.2 // var xy = [img.offsetLeft, img.offsetTop]; var ce = img.offsetParent; while(ce!=null) { xy[0] += ce.offsetLeft; xy[1] += ce.offsetTop; ce = ce.offsetParent; } return xy; } function FindImage(d, img) { //NS //This function finds an image regardless of its location in the document structure. //------------------------------ //Version 1.0 // var tmp; if(d.images[img]) return d.images[img]; for(var i=0; ir)?r-s:v; else n = (v+s>r)?parseInt(om[nOM].style.left)-s:v; return (n<0)?0:n; } function FixPointSize(s) { //NS //This function increases the point-size value for Navigator 4. //------------------------------ //Version 2.0 // if(IsWin||!NS) return s; for(var i=54; i>1; i--) if(s.indexOf("point-size=" + i)!=-1) s = xrep(s, "point-size=" + i, "point-size=" + (i+3)); return s; } function ClearTimer(t, f) { //IE,NS,SM,OP,KQ //This is a helper function used to overcome a bug in very //old versions of Navigator 4 //------------------------------ //Version 2.0 // if(!f) cFrame.f = cFrame; if(eval(t)) eval("cFrame.f.clearTimeout("+t+");"+t+"=0"); } function xrep(s, f, n) { //IE,NS,SM,OP,KQ //This function looks for any occurrence of the f string and replaces it with the n string. //------------------------------ //Version 1.2 // if(s) s = s.split(f).join(n); return s; } function rHnd() { //NS //This function is used to reload the page when Navigator window is resized. //Original Code from DHTML Lab //------------------------------ //Version 1.0 // var nsCWH = GetWidthHeight(); if((nsCWH[0]!=nsOWH[0]) || (nsCWH[1]!=nsOWH[1])) frames["top"].location.reload(); } function FixCursor(mc) { //IE //This function fixes a bug that affects IE6 and custom cursors. //------------------------------ //Version 1.1 // if(!OP) { var os = GetObj("O" + mc.id.substr(1)).style; var s = os.cursor; if(s=="") os.cursor = (BV<6?"hand":s.split("cursor: url(")[1].split(")")[0]); } } function GetObj(oName, f, sf, r) { //IE,NS,SM,OP,KQ //This function returns the object whose name is oName and its located in the f frame. //------------------------------ //Version 1.3 // var obj = null; if(!f) if(IsFrames) { if(!sf) sf = window.parent; for(var i=0; i0) { if(NS) f.hsNSHoverSel = hsNSHoverSel; else f.hsHoverSel = hsHoverSel; } f.execURL = execURL; } } else f = mFrame; if(NS) obj = f.document.layers[oName]; else { obj = (BV>=5?f.document.getElementById(oName):f.document.all[oName]); if(obj) if(obj.id!=oName) obj = null; } return r?[obj, f]:obj; } function gpid(o) { //IE,SM,OP,KQ //This function returns the ID of the parent group of a command. //------------------------------ //Version 1.0 // return (BV>=5?o.parentNode.parentNode.id:o.parentElement.parentElement.id); } function PrepareEvents() { //NS //This function is called right after the menus are rendered. //It has been designed to attach the event handlers to the tag and //fix the font size problems with Navigator under the Mac and Linux. //------------------------------ //Version 4.1 // for(var l=0; l0) { slo.document.onmouseup = hNSCClick; slo.document.TCode = nTCode[slo.name.split("EH")[1]]; } } for(var t=1; t<=tbNum; t++) { tb = cFrame.document.layers['dmbTBBack'+t]; for(var sl=0; sl0) { slo.document.onmouseup = hNSCClick; slo.document.TCode = nTCode[slo.name.split('EH')[1]]; } } } } } } if(IE) with(document) { open(); write("
"); close(); } if(NS) with(document) { open(); write(FixPointSize("")); close(); } function _purl(u){return u;}function _fip(img){return img.src;} if(IE) with(document) { open(); write("
Overview
The Benchmark FX ECN
News
Contact
Hedge Funds, CTAs and Trading Firms
Institutional Asset and Treasury Managers
Client Banks
Participating Financial Institutions
Client Documents
Overview
Trading Interface
Hotspot protocols
Network
Download User Guides
Demo Registration
Security
Currency Pairs
Precious Metals
Market Data
Historical Data
Trading and Order Management Systems
Market Data
Integration
API
FIX Gateway
FX ECN User Guide
TradeView FX User Guide
Reference Rate User Guide
Knight Direct FX User Guide
Operating Procedure
Privacy Statement
User Agreement
"); close(); } if(NS) with(document) { open(); write(FixPointSize("
Overview
Overview
The Benchmark FX ECN
The Benchmark FX ECN
News
News
Contact
Contact
Hedge Funds, CTAs and Trading Firms
Hedge Funds, CTAs and Trading Firms
Institutional Asset and Treasury Managers
Institutional Asset and Treasury Managers
Client Banks
Client Banks
Participating Financial Institutions
Participating Financial Institutions
Client Documents
Client Documents
Overview
Overview
Trading Interface
Trading Interface
LiveLink Connectivity
LiveLink Connectivity
Network
Network
Download User Guides
Download User Guides
Download Demo
Download Demo
Currency Pairs
Currency Pairs
Precious Metals
Precious Metals
Market Data
Market Data
Historical Data
Historical Data
Overview
Overview
Trading and Order Management Systems
Trading and Order Management Systems
Market Data
Market Data
Integration
Integration
API
API
FIX Gateway
FIX Gateway
FX ECN User Guide
FX ECN User Guide
TradeView FX User Guide
TradeView FX User Guide
Reference Rate User Guide
Reference Rate User Guide
Operating Procedure
Operating Procedure
Privacy Statement
Privacy Statement
User Agreement
User Agreement
")); close(); } SetUpEvents();