<!--
// COPYRIGHT (c) 2004 BY SWISSQUOTE GROUP LTD, GLAND, SWITZERLAND - Ver 4.0
var dns_mig_tmp = 'http://www.swissquote.ch';
var popWin='';var bars='status=no,toolbar=no,menubar=no,scrollable=no,resizable=no,scrollbars=no,directories=no';
function launch_popup(pg,tr,w,h){
popWin=window.open(pg,tr,'width='+w+',height='+h+',toolbar=no,directories=no,status=no,scrollbars=yes,resize=yes,menubar=no');popMove(10,10);
}
function launch_glossary(lg){
if (lg==''){lg='e';};popWin=window.open('http://group.swissquote.com/glossary/glossary_'+lg+'.html','Glossary','width=580,height=600,status=no,toolbar=no,menubar=no,scrollable=no,resizable=yes,scrollbars=yes,directories=no');popMove(10,10)
}
function launch_runner(h){
var ctn='<html><head><title>Loading Runner, please wait...</title>';
ctn+='<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"></head>';
ctn+='<body onLoad="setTimeout(\'document.runner_launch.submit()\',1000)">';
ctn+='<form name="runner_launch" method="post" action="'+dns_mig_tmp+'/cgi-bin/runner/runner_pop_ch.pl">';
ctn+='<input type="hidden" name="pass" value="F">';
ctn+='<input type="hidden" name="pplg" value="'+pp_lg+'">';
ctn+='<input type="hidden" name="pppw" value="'+pp_pw+'">';
ctn+='<p>Loading Runner, please wait...</p>';
ctn+='</form></body></html>';
popWin=window.open('','Runner_Tool_Applet','width=468,height=140,'+bars+'');
popWin.document.write(ctn);popWin.document.close();popWin.focus();popMove(10,10);
if(h){help('/website-help/tools/runner/runner_help_d.html')}
}
function launch_warrant(h){
var barw='status=no,toolbar=no,menubar=no,scrollable=no,resizable=yes,scrollbars=no,directories=no';
popWin=window.open(dns_mig_tmp+'/sq_mi/applets/warrantChooser/index.jsp','Warrant_Chooser','width=900,height=600,resizable=yes');popMove(10,10);
if(!h){help('/website-help/tools/warrant_chooser/wch_help_d.html')}
}
function launch_analysis(h){
popWin=window.open(dns_mig_tmp+'/static/launch_tools/analysis_tools_load_e.html','Analysis','width=790,height=590,'+bars);popMove(10,10);
if(h){help('/website-help/tools/charts/charts_intro_d.html')}
}
function launch_intraday(h){
popWin=window.open(dns_mig_tmp+'/static/launch_tools/intraday_live_load.html','Live_Intraday','width=702,height=567,'+bars);popMove(10,10);
if(h){help('/website-help/tools/intraday/intraday_d.html')}
}
function launch_orderbook(qt){
// Only on Premium
}
function launch_funds_optimizer(h){
popWin=window.open(dns_mig_tmp+'/cgi-bin/SQ_funds_optimizer/launch_funds_optimizer.pl','Funds_Optimizer','width=450,height=530,'+bars);popMove(10,10);
if(h){help('/website-help/tools/funds_optimizer/pf_optimizer_help'+parent.Cla+'.html')}
}
function help(p){
if(p){if (fset){top.frames[Targ2].frames[Targ].location=p;
}else{top.frames[Targ].location=p;};}
}
function popMove(x,y){
popWin.moveTo(x,y);popWin.focus();
}
function PopWin(pg,nm,wi,he,sc,rz) {
window.open(''+pg+'',''+nm+'','width='+wi+',height='+he+',scrollbars='+sc+',resizable='+rz+'');
}

var wndAtools = null;
var lastSymbol = null;
var lastIntraday = null;
 
onerror=function()
  {
  if (lastSymbol)
    launch_atools(lastSymbol, lastIntraday, true);
  return true;
  }
 
function launch_atools(symbol, intraday, noapplet)
{
lastSymbol = symbol;
lastIntraday = intraday;
if (!noapplet && top.wndAtools && top.wndAtools.showStock)
  {        
  if (intraday)
     top.wndAtools.showStock(symbol, "live", "4");
  else
     top.wndAtools.showStock(symbol, "daily", "1");
                 
  lastSymbol = null;
  lastIntraday = null;
  }
else
  {
  lastSymbol = null;
  lastIntraday = null;
  if (intraday)
    window.open('http://premium.swissquote.ch/sq_mi/public/applets/atools/index.jsp?stock=' + symbol +
'&frequence=live&type=4&indicators=&compare=&mode=intraday','Analysis_Tools_2','width=790,height=640,status=no,toolbar=no,menubar=no,scrollable=no,resizable=yes,scrollbars=no,directories=no');
  else
    window.open('http://premium.swissquote.ch/sq_mi/public/applets/atools/index.jsp?stock=' + symbol +
'&frequence=daily&type=1&indicators=&compare=&period=year&mode=historical','Analysis_Tools_2','width=790,height=640,status=no,toolbar=no,menubar=no,scrollable=no,resizable=yes,scrollbars=no,directories=no');
  }
}
// -->
