<!--
/* new in v5 - toggles the etrading login expandable section */
function toggleLogin(id) {
	var layer = document.getElementById(id);
	layer.style.display = (layer.style.display=='block') ? 'none' : 'block';
}


/* new in v5 - for quick menu droplist */
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}


function MM_jumpMenuGo(objId,targ,restore){ //v9.0
  var selObj = null;  with (document) { 
  if (getElementById) selObj = getElementById(objId);
  if (selObj) eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0; }
}


function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}


function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}


function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}


function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
var newWind;
var lOpened=false;
function openwindow(cPicture,nWidth,nHeight,cMessage,nBorder){
		var output;
		if (lOpened){
		   //newWind.close();
		}

		lOpened=true;
		 newWind=window.open("","winnam","HEIGHT="+nHeight+",WIDTH="+nWidth+",scrollbars=no,resizable=no,top=0,left=0");
		 output="<HTML><BODY BGCOLOR='#000000' leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'><CENTER>"
		 if (nBorder==0) {
		 	output+="<TABLE BORDER='0'><TR><TD>"
		 }
		 output+="<IMG SRC='"+cPicture+"'>"
		 if (nBorder==0){
		 	output+="</TD></TR></TABLE>"
		 }
		 output+="</CENTER></BODY></HTML>"
		 newWind.document.write(output);
		 newWind.document.close();
		 newWind.focus();
}


<!----------- TRADING APPLICATION SCRIPT BEGINS HERE --------------->
var win = null;
function openPATSWindow() {
    if(!win||!win.open||win.closed) {
        win=window.open('','ptsClient',
            'menubar=0,toolbar=0,location=0,directories=0,status=0,resizable=0,'+
            'scrollbars=0,width=620,height=85,screenX=0,screenY=0,left=0,top=0');


        win.document.writeln('<HTML><HEAD></HEAD>');
        win.document.writeln('<BODY marginheight="0" marginwidth="0" topmargin="0" leftmargin="0" onLoad="startTimer()">');
        win.document.writeln('<DIV ID="app"');
        win.document.writeln('STYLE="position:absolute; top:0; left:0; width:620; height:100; z-index:1;">');
        win.document.writeln('<OBJECT ID="jtrader"');
        win.document.writeln('classid = "clsid:CAFEEFAC-0014-0002-0003-ABCDEFFEDCBA"');
        win.document.writeln('codebase = "http://www.patsystems.com/Downloads/j2re-1_4_2_03-windows-i586-p.exe#Version=1,4,2,3"');
        win.document.writeln('WIDTH = 0 HEIGHT = 0 NAME = "JavaClient" ALIGN = top VSPACE = 0 HSPACE = 0 >');
        win.document.writeln('<PARAM NAME = "archive"                    VALUE = "Pats.jar">');
        win.document.writeln('<PARAM NAME = "cache_archive"              VALUE = "Pats.jar">');
        win.document.writeln('<PARAM NAME = CODE                         VALUE = "patsystems.ui.PATSClient" >');
        win.document.writeln('<PARAM NAME = CODEBASE                     VALUE = "./" >');
        win.document.writeln('<PARAM NAME = NAME                         VALUE = "JavaClient" >');
        win.document.writeln('<PARAM NAME = "type"                       VALUE = "application/x-java-applet;jpi-version=1.4.2_03">');
        win.document.writeln('<PARAM NAME = "scriptable"                 VALUE = "false">');
        win.document.writeln('<PARAM NAME = "DEMO"                       VALUE = "false">');
        win.document.writeln('<PARAM NAME = "TEST"                       VALUE = "false">');
        win.document.writeln('<PARAM NAME = "HOST_ADDRESS"               VALUE = "203.81.46.35">');
        win.document.writeln('<PARAM NAME = "HOST_PORT"                  VALUE = "9990">');
        win.document.writeln('<PARAM NAME = "HOST_LOCK"                  VALUE = "false">');
        win.document.writeln('<PARAM NAME = "PRICE_FEED_ADDRESS"         VALUE = "203.81.46.36">');
        win.document.writeln('<PARAM NAME = "PRICE_FEED_PORT"            VALUE = "2000">');
        win.document.writeln('<PARAM NAME = "PRICE_FEED_ADDRESS1"        VALUE = "203.81.46.40">');
        win.document.writeln('<PARAM NAME = "PRICE_FEED_PORT1"           VALUE = "2000">');
        win.document.writeln('<PARAM NAME = "PRICE_FEED_LOCK"            VALUE = "false">');
        win.document.writeln('<PARAM NAME = "ENCRYPTION_CODE"            VALUE = "A">');
        win.document.writeln('<PARAM NAME = "BACKGROUND_IMAGE"           VALUE = "background.gif">');
        win.document.writeln('<PARAM NAME = "LOGO_IMAGE"                 VALUE = "logoman.gif">');
        win.document.writeln('<PARAM NAME = "ICON_IMAGE"                 VALUE = "logo16.gif">');
        win.document.writeln('<PARAM NAME = "TEXT_COLOUR"                VALUE = "#660099">');
        win.document.writeln('<PARAM NAME = "COMPANY_NAME"               VALUE = "MFSG">');
        win.document.writeln('<PARAM NAME = "PRODUCT_NAME"               VALUE = "Man-Futures ver 2.8.3 SP 5.2.7">');
        win.document.writeln('<PARAM NAME = "INSTALL_PATH"               VALUE = "Man-Futures">');
        win.document.writeln('<PARAM NAME = "ENABLE_RESET"               VALUE = "false">');
        win.document.writeln('<PARAM NAME = "USER"                       VALUE = "">');
        win.document.writeln('<PARAM NAME = "PWD"                        VALUE = "">');
        win.document.writeln('<PARAM NAME = "NULL_USER"                  VALUE = "false">');
        win.document.writeln('<PARAM NAME = "LOGIN"                      VALUE = "false">');
        win.document.writeln('<PARAM NAME = "SUPERTAS"                   VALUE = "true">');
        win.document.writeln('<PARAM NAME = "SSL"                        VALUE = "false">');
        win.document.writeln('<PARAM NAME = "HOST_HANDSHAKE_INTERVAL"    VALUE = "30">');
        win.document.writeln('<PARAM NAME = "HOST_HANDSHAKE_TIMEOUT"     VALUE = "90">');
        win.document.writeln('<PARAM NAME = "PRICE_HANDSHAKE_INTERVAL"   VALUE = "30">');
        win.document.writeln('<PARAM NAME = "PRICE_HANDSHAKE_TIMEOUT"    VALUE = "90">');
        win.document.writeln('<PARAM NAME = "DISABLE_PATS_LINK"          VALUE = "false">');
        win.document.writeln('<PARAM NAME = "ENABLE_REPORTS"            VALUE = "true">');
        win.document.writeln('<PARAM NAME = "BID_OFFER_REVERSED"         VALUE = "false">');
        //This option will override the default option decimal for liffe ftse100 options, with a value of 0.
        //format: OPTDEC_externalexchangename_externalcontractcode These values can be obtained by using sara.
        win.document.writeln('<PARAM NAME = "OPTDEC_LIFFE_O-ESX"         VALUE = "0">');
        win.document.writeln('</OBJECT>');
        win.document.writeln('</<DIV>');
        win.document.writeln(' ');
        win.document.writeln('<DIV ID="wait"');
        win.document.writeln('STYLE="position:absolute; background-color:003599 ; top:0; left:0; width:620; height:105; z-index:1">');
        win.document.writeln('<p align="center"><font color="#FFFFFF" face="Arial"><b>Please wait.</p>');
        win.document.writeln('<p align="center">Sun JVM being initialised / downloaded...</b></font></p>');
        win.document.writeln('</DIV>');
        win.document.writeln(' ');
        win.document.writeln('<'+'script  language=JavaScript>');
        win.document.writeln('  var intervalID = "";');
        win.document.writeln(' ');
        win.document.writeln('  function startTimer() {');
        win.document.writeln('    window.moveTo(0,0);');
        win.document.writeln('    intervalID = window.setInterval("waitForTitle()",1000);');
        win.document.writeln('  }');
        win.document.writeln(' ');
        win.document.writeln('  function waitForTitle() {');
        win.document.writeln('    try {');
        win.document.writeln('      title = document.JavaClient.getWindowTitle();');
        win.document.writeln('      if (title && title != "") {');
        win.document.writeln('        jtrader.style.width=1000;');
        win.document.writeln('        jtrader.style.height=105;');
        win.document.writeln('        w = document.JavaClient.getPadding();');
        win.document.writeln('        h = document.JavaClient.getHeightAdd();');
        win.document.writeln('        resizeTo(630+w,133+h);');
        win.document.writeln('        document.JavaClient.setWidth(620+w);');
        win.document.writeln('        document.JavaClient.setHeight(105);');
        win.document.writeln('        document.title = title;');
        win.document.writeln('        wait.style.visibility="hidden";');
        win.document.writeln('        window.clearInterval(intervalID);');
        win.document.writeln('      }');
        win.document.writeln('    } catch (e) { }');
        win.document.writeln('  }');
        win.document.writeln('<'+'/script>');
        win.document.writeln(' ');
        win.document.writeln('</BODY></HTML>');
        win.startTimer();
    }
    else
        win.focus();
}


function openMConnect()
{
	window.open('https://online.mconnectlive.com/webtrade/login.aspx');		
}


function openMConnectweb()
{
	window.open('http://www.mconnectlive.com');		
}


function openMFXSpotOn()
{
	//window.open('https://fxtrades.currenex.net/');		
	winName = (new Date()).getTime( );
	winOpts = 'width=1032,height=732,top=0,left=0,resizable=yes,toolbar=no,scrollbars=no,title=no';
	window.open('https://fxtrades.mfxspot-on.com/login.shtml',winName,winOpts);
}


function openMFXNews()
{
	window.open('http://www.mfx-news.com');		
}


function openMFXOMS()
{
	window.open('https://online.mfx-oms.com');		
}


function openMFXStreamweb()
{
	window.open('http://www.mfx-stream.com');		
}

function openCFDweb()
{
	window.open('http://www.mfglobalcfd.com.sg');		
}
//-->