var lastTQId;
var TQTimer;
var TQCurrencies;
if (TQCurrencies == null) {TQCurrencies = new Array();}
function SendAjaxTQ()
{
  if (lastTQId != null)
  {
    try
    {
      document.getElementsByTagName("head").item(0).removeChild(document.getElementById(lastTQId));
    }
    catch(e)
    {
      document.body.removeChild(document.getElementById(lastTQId));
    }
  }
  var str = new Array();
  for(l=0;l<TQCurrencies.length;l++)
  {
    str.push(TQCurrencies[l][0])
  }
  var dt = new Date();
  lastTQId = "JSONTQ"+Math.floor(dt.getTime()/1000);
  var JSONscript = document.createElement("script");
  JSONscript.setAttribute("type","text/javascript");
  JSONscript.setAttribute("src","http://www.tradingtoolsonline.com/Ajax.aspx?dat="+lastTQId+"&cmd=!TABLEQUOT!&currency="+str.join(',')+"&lang=en");
  JSONscript.setAttribute("id",lastTQId);
  try
  {
    document.getElementsByTagName("head").item(0).appendChild(JSONscript);
  }
  catch(e)
  {
    document.body.appendChild(JSONscript);
  }
}
function RegisterCurrency(currency, toolId)
{
  var done = false;
  for(k = 0; k < TQCurrencies.length;k++)
  {
    if(TQCurrencies[k][0] == currency)
    {
      TQCurrencies[k][1].push(toolId);
      var done = true;
    }
  }
  if(!done)
  {
    var row = new Array();
    row[0] = currency;
    row[1] = new Array();
    row[1].push(toolId);
    TQCurrencies.push(row)
  }
}
function ACMExecuteTQCallback(currency, bid, ask, bidF, askF, trend, high, low, change, changeF, rate, spread, spreadF, date)
{
  for(k = 0; k < TQCurrencies.length;k++)
  {
    if(TQCurrencies[k][0] == currency)
    {
      for(m = 0; m < TQCurrencies.length;m++)
      {
        var bobj = document.getElementById('b'+TQCurrencies[k][0]+TQCurrencies[k][1][m]);
        if(bobj != null) { bobj.innerHTML = bid };
        var aobj = document.getElementById('a'+TQCurrencies[k][0]+TQCurrencies[k][1][m]);
        if(aobj != null) { aobj.innerHTML = ask };
        var bfobj = document.getElementById('bf'+TQCurrencies[k][0]+TQCurrencies[k][1][m]);
        if(bfobj != null) { bfobj.innerHTML = bidF };
        var afobj = document.getElementById('af'+TQCurrencies[k][0]+TQCurrencies[k][1][m]);
        if(afobj != null) { afobj.innerHTML = askF };
        var tobj = document.getElementById('t'+TQCurrencies[k][0]+TQCurrencies[k][1][m]);
        if(tobj != null) { tobj.innerHTML = trend };
        var hobj = document.getElementById('h'+TQCurrencies[k][0]+TQCurrencies[k][1][m]);
        if(hobj != null) { hobj.innerHTML = high };
        var lobj = document.getElementById('l'+TQCurrencies[k][0]+TQCurrencies[k][1][m]);
        if(lobj != null) { lobj.innerHTML = low };
        var chobj = document.getElementById('ch'+TQCurrencies[k][0]+TQCurrencies[k][1][m]);
        if(chobj != null) { chobj.innerHTML = change };
        var chfobj = document.getElementById('chf'+TQCurrencies[k][0]+TQCurrencies[k][1][m]);
        if(chfobj != null) { chfobj.innerHTML = changeF };
        var robj = document.getElementById('r'+TQCurrencies[k][0]+TQCurrencies[k][1][m]);
        if(robj != null) { robj.innerHTML = rate };
        var sobj = document.getElementById('s'+TQCurrencies[k][0]+TQCurrencies[k][1][m]);
        if(sobj != null) { sobj.innerHTML = spread };
        var sfobj = document.getElementById('sf'+TQCurrencies[k][0]+TQCurrencies[k][1][m]);
        if(sfobj != null) { sfobj.innerHTML = spreadF };
        var dobj = document.getElementById('d'+TQCurrencies[k][0]+TQCurrencies[k][1][m]);
        if(dobj != null) { dobj.innerHTML = date };
      }
    }
  }
}
var ACMToolLink = document.getElementById("ACMLink");
if (ACMToolLink != null && ( ACMToolLink.innerHTML == "Forex" || ACMToolLink.innerHTML == "Forex Trading" || ACMToolLink.innerHTML == "Currency Trading" ) && ACMToolLink.href.match(/^http:\/\/((www)|(ar)|(cn)|(de)|(es)|(fa)|(fr)|(gr)|(it)|(jp)|(pt)|(ru)|(tr)).(ac-markets|acmusa).com/) && ACMToolLink.tagName=='A'){
var linksTab = new Array();
for(s=0;s<document.getElementsByTagName("A").length;s++){
  var myLink = document.getElementsByTagName("A")[s];
  if(myLink.id == "ACMLink") {
    myLink.style.display = 'none';
  }
}
function ACMShowCode(toolId)
{
  document.getElementById('ACMToolBodyRow'+toolId).style.display = 'none';
  document.getElementById('ACMToolOptRow'+toolId).style.display = '';
}
function ACMHideCode(toolId)
{
  document.getElementById('ACMToolBodyRow'+toolId).style.display = '';
  document.getElementById('ACMToolOptRow'+toolId).style.display = 'none';
}
function ACMCopyCode(textID)
{
  Copied = document.getElementById(textID).createTextRange();
  Copied.execCommand('Copy');
}
function ACMExecuteJSONinnerHTML(JSONRef, ElementID, innerHTML)
{
  var obj = document.getElementById(ElementID+JSONRef);
  if (obj != null)
  {
    obj.innerHTML = innerHTML;
  }
}
  var wtoolCSS = document.createElement("link");
  wtoolCSS.setAttribute("type","text/css");
  wtoolCSS.setAttribute("href","http://www.tradingtoolsonline.com/themes/blank.css");
  wtoolCSS.setAttribute("rel","stylesheet");
    document.getElementsByTagName("head").item(0).appendChild(wtoolCSS);
document.write("<div class='wtool_blank'>    <table class='webtoolMainTable' cellspacing='0' cellpadding='0' style='width:180px;'>        <tr class='webToolHeadRow'>            <td class='webToolLeftHead'></td>            <td class='webToolMidHead'></td>            <td class='webToolRightHead'></td>        </tr>        <tr class='webToolBodyRow' id='ACMToolBodyRowd0fce44b'>            <td class='webToolLeftBody'></td>            <td class='webToolMidBody'><table cellspacing=0 cellpadding=1 class='webToolTQTable'>  <tr class='webToolHeaderRow'>    <td>Currency</td>    <td>Bid</td>    <td>Ask</td>  </tr>  <tr>    <th id='cAUDJPYd0fce44b'>AUDJPY</th>    <td id='bAUDJPYd0fce44b'>       --- </td>    <td id='aAUDJPYd0fce44b'>       --- </td>  </tr>  <tr class='webtoolToggleRow'>    <th id='cAUDUSDd0fce44b'>AUDUSD</th>    <td id='bAUDUSDd0fce44b'>       --- </td>    <td id='aAUDUSDd0fce44b'>       --- </td>  </tr>  <tr>    <th id='cCADJPYd0fce44b'>CADJPY</th>    <td id='bCADJPYd0fce44b'>       --- </td>    <td id='aCADJPYd0fce44b'>       --- </td>  </tr>  <tr class='webtoolToggleRow'>    <th id='cCHFDKKd0fce44b'>CHFDKK</th>    <td id='bCHFDKKd0fce44b'>       --- </td>    <td id='aCHFDKKd0fce44b'>       --- </td>  </tr>  <tr>    <th id='cCHFNOKd0fce44b'>CHFNOK</th>    <td id='bCHFNOKd0fce44b'>       --- </td>    <td id='aCHFNOKd0fce44b'>       --- </td>  </tr>  <tr class='webtoolToggleRow'>    <th id='cCHFSEKd0fce44b'>CHFSEK</th>    <td id='bCHFSEKd0fce44b'>       --- </td>    <td id='aCHFSEKd0fce44b'>       --- </td>  </tr>  <tr>    <th id='cDKKSEKd0fce44b'>DKKSEK</th>    <td id='bDKKSEKd0fce44b'>       --- </td>    <td id='aDKKSEKd0fce44b'>       --- </td>  </tr>  <tr class='webtoolToggleRow'>    <th id='cEURCADd0fce44b'>EURCAD</th>    <td id='bEURCADd0fce44b'>       --- </td>    <td id='aEURCADd0fce44b'>       --- </td>  </tr>  <tr>    <th id='cEURCHFd0fce44b'>EURCHF</th>    <td id='bEURCHFd0fce44b'>       --- </td>    <td id='aEURCHFd0fce44b'>       --- </td>  </tr>  <tr class='webtoolToggleRow'>    <th id='cEURDKKd0fce44b'>EURDKK</th>    <td id='bEURDKKd0fce44b'>       --- </td>    <td id='aEURDKKd0fce44b'>       --- </td>  </tr>  <tr>    <th id='cEURGBPd0fce44b'>EURGBP</th>    <td id='bEURGBPd0fce44b'>       --- </td>    <td id='aEURGBPd0fce44b'>       --- </td>  </tr>  <tr class='webtoolToggleRow'>    <th id='cEURJPYd0fce44b'>EURJPY</th>    <td id='bEURJPYd0fce44b'>       --- </td>    <td id='aEURJPYd0fce44b'>       --- </td>  </tr>  <tr>    <th id='cEURNOKd0fce44b'>EURNOK</th>    <td id='bEURNOKd0fce44b'>       --- </td>    <td id='aEURNOKd0fce44b'>       --- </td>  </tr>  <tr class='webtoolToggleRow'>    <th id='cEURPLNd0fce44b'>EURPLN</th>    <td id='bEURPLNd0fce44b'>       --- </td>    <td id='aEURPLNd0fce44b'>       --- </td>  </tr>  <tr>    <th id='cEURSEKd0fce44b'>EURSEK</th>    <td id='bEURSEKd0fce44b'>       --- </td>    <td id='aEURSEKd0fce44b'>       --- </td>  </tr>  <tr class='webtoolToggleRow'>    <th id='cEURTRYd0fce44b'>EURTRY</th>    <td id='bEURTRYd0fce44b'>       --- </td>    <td id='aEURTRYd0fce44b'>       --- </td>  </tr>  <tr>    <th id='cEURUSDd0fce44b'>EURUSD</th>    <td id='bEURUSDd0fce44b'>       --- </td>    <td id='aEURUSDd0fce44b'>       --- </td>  </tr>  <tr class='webtoolToggleRow'>    <th id='cGBPCADd0fce44b'>GBPCAD</th>    <td id='bGBPCADd0fce44b'>       --- </td>    <td id='aGBPCADd0fce44b'>       --- </td>  </tr>  <tr>    <th id='cGBPCHFd0fce44b'>GBPCHF</th>    <td id='bGBPCHFd0fce44b'>       --- </td>    <td id='aGBPCHFd0fce44b'>       --- </td>  </tr>  <tr class='webtoolToggleRow'>    <th id='cGBPDKKd0fce44b'>GBPDKK</th>    <td id='bGBPDKKd0fce44b'>       --- </td>    <td id='aGBPDKKd0fce44b'>       --- </td>  </tr>  <tr>    <th id='cGBPJPYd0fce44b'>GBPJPY</th>    <td id='bGBPJPYd0fce44b'>       --- </td>    <td id='aGBPJPYd0fce44b'>       --- </td>  </tr>  <tr class='webtoolToggleRow'>    <th id='cGBPNOKd0fce44b'>GBPNOK</th>    <td id='bGBPNOKd0fce44b'>       --- </td>    <td id='aGBPNOKd0fce44b'>       --- </td>  </tr>  <tr>    <th id='cGBPSEKd0fce44b'>GBPSEK</th>    <td id='bGBPSEKd0fce44b'>       --- </td>    <td id='aGBPSEKd0fce44b'>       --- </td>  </tr>  <tr class='webtoolToggleRow'>    <th id='cGBPUSDd0fce44b'>GBPUSD</th>    <td id='bGBPUSDd0fce44b'>       --- </td>    <td id='aGBPUSDd0fce44b'>       --- </td>  </tr>  <tr>    <th id='cNOKSEKd0fce44b'>NOKSEK</th>    <td id='bNOKSEKd0fce44b'>       --- </td>    <td id='aNOKSEKd0fce44b'>       --- </td>  </tr>  <tr class='webtoolToggleRow'>    <th id='cNZDJPYd0fce44b'>NZDJPY</th>    <td id='bNZDJPYd0fce44b'>       --- </td>    <td id='aNZDJPYd0fce44b'>       --- </td>  </tr>  <tr>    <th id='cNZDUSDd0fce44b'>NZDUSD</th>    <td id='bNZDUSDd0fce44b'>       --- </td>    <td id='aNZDUSDd0fce44b'>       --- </td>  </tr>  <tr class='webtoolToggleRow'>    <th id='cUSDCADd0fce44b'>USDCAD</th>    <td id='bUSDCADd0fce44b'>       --- </td>    <td id='aUSDCADd0fce44b'>       --- </td>  </tr>  <tr>    <th id='cUSDCHFd0fce44b'>USDCHF</th>    <td id='bUSDCHFd0fce44b'>       --- </td>    <td id='aUSDCHFd0fce44b'>       --- </td>  </tr>  <tr class='webtoolToggleRow'>    <th id='cUSDDKKd0fce44b'>USDDKK</th>    <td id='bUSDDKKd0fce44b'>       --- </td>    <td id='aUSDDKKd0fce44b'>       --- </td>  </tr>  <tr>    <th id='cUSDHKDd0fce44b'>USDHKD</th>    <td id='bUSDHKDd0fce44b'>       --- </td>    <td id='aUSDHKDd0fce44b'>       --- </td>  </tr>  <tr class='webtoolToggleRow'>    <th id='cUSDJPYd0fce44b'>USDJPY</th>    <td id='bUSDJPYd0fce44b'>       --- </td>    <td id='aUSDJPYd0fce44b'>       --- </td>  </tr>  <tr>    <th id='cUSDMXNd0fce44b'>USDMXN</th>    <td id='bUSDMXNd0fce44b'>       --- </td>    <td id='aUSDMXNd0fce44b'>       --- </td>  </tr>  <tr class='webtoolToggleRow'>    <th id='cUSDNOKd0fce44b'>USDNOK</th>    <td id='bUSDNOKd0fce44b'>       --- </td>    <td id='aUSDNOKd0fce44b'>       --- </td>  </tr>  <tr>    <th id='cUSDPLNd0fce44b'>USDPLN</th>    <td id='bUSDPLNd0fce44b'>       --- </td>    <td id='aUSDPLNd0fce44b'>       --- </td>  </tr>  <tr class='webtoolToggleRow'>    <th id='cUSDSEKd0fce44b'>USDSEK</th>    <td id='bUSDSEKd0fce44b'>       --- </td>    <td id='aUSDSEKd0fce44b'>       --- </td>  </tr>  <tr>    <th id='cUSDSGDd0fce44b'>USDSGD</th>    <td id='bUSDSGDd0fce44b'>       --- </td>    <td id='aUSDSGDd0fce44b'>       --- </td>  </tr>  <tr class='webtoolToggleRow'>    <th id='cUSDTRYd0fce44b'>USDTRY</th>    <td id='bUSDTRYd0fce44b'>       --- </td>    <td id='aUSDTRYd0fce44b'>       --- </td>  </tr>  <tr>    <th id='cUSDZARd0fce44b'>USDZAR</th>    <td id='bUSDZARd0fce44b'>       --- </td>    <td id='aUSDZARd0fce44b'>       --- </td>  </tr>  <tr class='webtoolToggleRow'>    <th id='cd0fce44b'></th>    <td id='bd0fce44b'>       --- </td>    <td id='ad0fce44b'>       --- </td>  </tr></table></td>            <td class='webToolRightBody'></td>        </tr>        <tr class='webToolOptRow' id='ACMToolOptRowd0fce44b' style='display:none;'>            <td class='webToolLeftOpt'></td>            <td class='webToolMidOpt'><table id='ACMCodeTQ'><tr><td><span class='webToolPutCode'>Put this code on your website:</span></td></tr><tr><td><textarea cols='21' rows='3' id='ACMTextd0fce44b' class='webToolCode' ><!--script parameters: design=true|false : designed or simple component | currency=EURUSD,GBPUSD,USDCHF,USDJPY type the ACM currency pairs you want | width=180 : set the width of your tool (not for designed mode)--> <a href='http://www.ac-markets.com' id='ACMLink'>Forex</a> <script language='javascript' src='http://www.tradingtoolsonline.com/tablequote-script.aspx?design=true&amp;currency=EURUSD,GBPUSD,USDCHF,USDJPY' type='text/javascript'> </script> </textarea></td></tr><tr><td><input type='button' value='Copy to clipboard' onclick='ACMCopyCode(\"ACMTextd0fce44b\")' class='webToolCopy' /> <input type='button' value='Close' onclick='ACMHideCode(\"d0fce44b\")'  class='webToolClose'/></td></tr></table></td>            <td class='webToolRightOpt'></td>        </tr>        <tr class='webToolLinkRow'>            <td class='webToolLeftLink'></td>            <td class='webToolMidLink'><a href='http://www.ac-markets.com' target='_parent'>www.ac-markets.com</a></td>            <td class='webToolRightLink'></td>        </tr>        <tr class='webToolAddRow'>            <td class='webToolLeftAdd'></td>            <td class='webToolMidAdd'><a onclick='ACMShowCode(\"d0fce44b\")'>Add to your site</a></td>            <td class='webToolRightAdd'></td>        </tr>    </table></div>");RegisterCurrency('AUDJPY', 'd0fce44b');
RegisterCurrency('AUDUSD', 'd0fce44b');
RegisterCurrency('CADJPY', 'd0fce44b');
RegisterCurrency('CHFDKK', 'd0fce44b');
RegisterCurrency('CHFNOK', 'd0fce44b');
RegisterCurrency('CHFSEK', 'd0fce44b');
RegisterCurrency('DKKSEK', 'd0fce44b');
RegisterCurrency('EURCAD', 'd0fce44b');
RegisterCurrency('EURCHF', 'd0fce44b');
RegisterCurrency('EURDKK', 'd0fce44b');
RegisterCurrency('EURGBP', 'd0fce44b');
RegisterCurrency('EURJPY', 'd0fce44b');
RegisterCurrency('EURNOK', 'd0fce44b');
RegisterCurrency('EURPLN', 'd0fce44b');
RegisterCurrency('EURSEK', 'd0fce44b');
RegisterCurrency('EURTRY', 'd0fce44b');
RegisterCurrency('EURUSD', 'd0fce44b');
RegisterCurrency('GBPCAD', 'd0fce44b');
RegisterCurrency('GBPCHF', 'd0fce44b');
RegisterCurrency('GBPDKK', 'd0fce44b');
RegisterCurrency('GBPJPY', 'd0fce44b');
RegisterCurrency('GBPNOK', 'd0fce44b');
RegisterCurrency('GBPSEK', 'd0fce44b');
RegisterCurrency('GBPUSD', 'd0fce44b');
RegisterCurrency('NOKSEK', 'd0fce44b');
RegisterCurrency('NZDJPY', 'd0fce44b');
RegisterCurrency('NZDUSD', 'd0fce44b');
RegisterCurrency('USDCAD', 'd0fce44b');
RegisterCurrency('USDCHF', 'd0fce44b');
RegisterCurrency('USDDKK', 'd0fce44b');
RegisterCurrency('USDHKD', 'd0fce44b');
RegisterCurrency('USDJPY', 'd0fce44b');
RegisterCurrency('USDMXN', 'd0fce44b');
RegisterCurrency('USDNOK', 'd0fce44b');
RegisterCurrency('USDPLN', 'd0fce44b');
RegisterCurrency('USDSEK', 'd0fce44b');
RegisterCurrency('USDSGD', 'd0fce44b');
RegisterCurrency('USDTRY', 'd0fce44b');
RegisterCurrency('USDZAR', 'd0fce44b');
RegisterCurrency('', 'd0fce44b');
clearTimeout(TQTimer);
TQTimer = setTimeout('SendAjaxTQ()',100);
}