﻿

//============================================================================================================
//this Broker update module
var hndWndBroker;
var hndWndCombi;
var hndWndCurMajors;
function openBroker()
{
hndWndCombi = window.open('BrokerMajors.aspx','hndWndCombi','width=660,height=430,top=80,left=100,resizable=false')
hndWndBroker = window.open('blank.aspx','hndWndBroker','width=1,height=1,top=2000,left=1,resizable=false');
hndWndBroker.close();
window.opener=null;
window.close();
}

function openHome(type)
{    
    if (type=='TYPE20' || type=='TYPE17') {
            
        window.open("Downloadfile.aspx");
    } 
    else
    {   window.open("default.aspx"); }
}

function openCurUpdate()
{
hndWndBroker = window.open('BrokerUpdate.aspx','hndWndBroker','width=235,height=440,top=100,left=500,resizable=false');
hndWndCombi = window.open('blank.aspx','hndWndCombi','width=1,height=1,top=2000,left=1,resizable=false');
hndWndCombi.close();
}
function openCurUpdatenew(estring,sstring)
{
//alert(estring);
//hndWndBroker = window.open('http://basixforex.in/BrokerUpdate.aspx?qt=' + estring + '&st=' + sstring ,'hndWndBroker','width=235,height=440,top=100,left=500,resizable=false');
hndWndBroker = window.open('serverredirect.aspx?qt=' + estring + '&st=' + sstring ,'hndWndBroker','width=235,height=440,top=100,left=500,resizable=false');
//hndWndCombi = window.open('blank.aspx','hndWndCombi','width=1,height=1,top=2000,left=1,resizable=false');
//hndWndCombi.close();
}

function openInterUpdate()
{
hndWndCurMajors = window.open('Curinterupdate.aspx','hndWndCurMajors','width=422,height=430,top=100,left=200,resizeable=false');
hndWndCombi = window.open('blank.aspx','hndWndCombi','width=1,height=1,top=2000,left=1,resizable=false');
hndWndCombi.close();
}
//Broke update close
//======================================
//chartc open
var openchart
function opencharts(fName)
{
window.open("hgraph.aspx?graphname=" +fName,"windowm","width=723,height=452,top=50,left=50,resizable=false,sting s")
}
function OpenPup()
{
window.open("arccharts.aspx","windowa","width=413,height=125,top=250,left=190,resizable=false")
}
function OpenMin(fName)
{
window.open("Argraph.aspx?gn=" + fName ,"windowk","width=738,height=472,top=10,left=25,resizable=false")
return;
}

//==========================================================================
//this scripts using report modules

function openReport(path)
{
  var windowHandle = window.open("reports/"+path);
  //alert("reports/"+path);
    windowHandle.moveTo (0, 0);
  if (document.layers) // nc4+
   {
      var deltaX = screen.availWidth - window.outerWidth;
      var deltaY = screen.availHeight - window.outerHeight;
      windowHandle.resizeBy (deltaX, deltaY);
   }
   else if (document.all) // ie4+
   {
      windowHandle.resizeTo (screen.availWidth, screen.availHeight);
   }
}
//this scripts using report Modules


/// THIS SCRIPTS CONTAINS A CALCULATER FUNCTION
//=============================================================================
function openCalc(Name)
{
  switch(Name)
  {
  case "fc":
           window.open("ForexCal3.aspx","forexwin","width=737,height=500,top=40,left=25,resizable=false");
  break;
  case "CurrConv":
           window.open("CurrencyConverterCalc.aspx","curcinvwin","width=573,height=120,top=70,left=50,resizable=false");
  break;
  case "fcpc":
           window.open("tfcpcCalc.aspx","fcpcwin","width=600,height=100,top=160,left=150,resizable=false");
  break;
  case "frc":
           window.open("FibCalc.aspx","fibwin","width=539,height=523,top=1,left=100,resizable=false");
  break;
  case "fcnrcalc":
           window.open("tfcnrCalc.aspx","fcnrwin","width=523,height=102,top=140,left=120,resizable=false");
  break;
  case "emi":
           window.open("EMICalc.aspx","emiwin","width=382,height=252,top=180,left=200,resizable=false");
  break;
  case "irr":
           //window.open("pvirrCalc.aspx","irrwin","width=460,height=495,top=85,left=140,resizable=false");
           window.open("pvirr2.aspx","irrwin","width=530,height=495,top=85,left=140,resizable=false");
  break;
  case "option":
    	   window.open("OptionCalc3.aspx","optionwin","width=761,height=340,top=145,left=12,scrollbars=no,resizable=false");
  break;
  case "ltfx":
    	   window.open("ltfxcalc.aspx","ltfxcalcwin","width=815,height=340,top=145,left=12,scrollbars=no,resizable=false");
  break;
  case "var":
    	   window.open("Varcalcnew.aspx","Varcalcnewwin","width=780,height=520,top=145,left=12,scrollbars=no,resizable=false");
  break;
  case "fra":
    	   window.open("fraCalcNet.aspx","fraCalcNetwin","width=741,height=490,top=145,left=12,scrollbars=no,resizable=false");
  break;
  }
}
//=============================================================================

///This following script used for optionsuite Project
function OptionFile(Name)
{
    switch(Name)
    {
        case "singleoption":
                window.open("singleoption.aspx","singewin","width=765,height=327,top=145,left=7,scrollbars=no,resizable=false");
        break;
        case "barrier":
                window.open("barrier.aspx","barrwin","width=425,height=543,top=30,left=178,scrollbars=yes,resizable=no");
        break;
        case "part":
           window.open("partfwd.aspx","partwin","width=470,height=425,top=130,left=150,scrollbars=yes,resizable=no");
        break;
        case "combo":
            window.open("ComboFive.aspx","baswin","width=980,height=650,top=25,left=10,scrollbars=no,status=yes,resizable=no");
        break;
        case "zero":
            window.open("ZeroCost.aspx","zerwino","width=980,height=685,top=100,left=0,scrollbars=yes,status=yes,resizable=no");
        break;
        case "straddle":
             window.open("straddle.aspx","stradwin","width=745,height=396,top=125,left=15,status=yes,scrollbars=yes,resizable=no");
        break;
        case "strangle":
             window.open("strangle.aspx","stranwin","width=775,height=430,top=90,left=5,status=yes,scrollbars=yes,resizable=no");
        break;
        case "bull":
             window.open("bullspread.aspx","bullwin","width=775,height=430,top=90,left=5,status=yes,scrollbars=yes,resizable=no");
        break;
        case "bear":
             window.open("bearspread.aspx","bearwin","width=775,height=430,top=90,left=5,status=yes,scrollbars=yes,resizable=no");
        break;
        case "risk":
              window.open("risk.aspx","riskwin","width=775,height=430,top=90,left=5,status=yes,scrollbars=yes,resizable=no");
        break;
     
    }
}

//New Script for AJAX Broker,RBCMOuter,Calculated Majors
//**********************************************************************************************************
//working now
//    var hndWndBroker2;
//    var hndWndCombi2;
//    var hndWndCurMajors1;
//  
//      function BrokerRBCMOuter1()
//     {
//         hndWndCombi2 = window.open('CurUpdate.aspx','hndWndCombi2','width=630,height=417,top=80,left=100,resizable=false');
//         hndWndBroker2 = window.open('blank.aspx','hndWndBroker2','width=1,height=1,top=2000,left=1,resizable=false');
//         hndWndBroker2.close();
//         //window.close('AJAX/CurUpdate.aspx');
//      }   
//      function RBCMOuter1()
//      {
//      hndwndBroker2=window.open('RBCMOuter.aspx','hndWndBroker2','width=630,height=417,top=80,left=100,resizable=false');
//      hndWndCombi2=window.open('blank.aspx','hndWndCombi2','width=1,height=1,top=2000,left=1,resizable=false');
//      hndWndCombi2.close();
//      }
 
//**********************************************************************************************************
//New Script End here
var w1;
var b1;
var c1;
 function openIONPOT()
       {
         window.open("IONPOT/IONPOT-Home.aspx","w1","width=1055,height=1010,top=0,left=0,scrollbars=yes,location=yes,resize=yes,statusbar=no");
       }
  

 function openIONPOTCust()
       {
   
          window.open("http://secure1.ionpot.com/IPx/login.aspx","c1","width=750,height=600,top=10,left=30,scrollbars='yes',status bar=yes,location=yes,resizable=yes,menubar=yes,links=yes,toolbar=yes");
//         window.open("Benefit.aspx","b1","width=930,height=600,top=10,left=30,scrollbars='yes',status bar=yes,location=yes,resizable=yes,menubar=yes,links=yes,toolbar=yes");
//         window.close("IONPOT/IONPOT-Home.aspx");
       }








