/*
----------- FundSys.net(TM) Copyright SySys(R) Corp 2002 ------------
====================================================================
  Created By: WT
  Last Edited By: 
  Inception Date: 7/11/02
  Last Edited Date: 7/17/02
  Description:  Function to pop up all sub windows
  File Dependencies: None
===================================================================''*/

/*'''---------------------------------
   openWindow 
--------------------------------------
   Created By: SySys:bh
   Last Edited: WT 7/19/02
   Description: Custom definition of all child windows with a simplified way to call them by a name identifier
   Compatibility: IE6   
   Parameters
     windowName: distinct name that identifiys the window that you wish to open (no spaces allowed)
     uniqueID: distinct ID that is appended to the 'windowName' parameter to create a unique window Name when using the same window.open function.  
               Pass a blank value ('') to calls if you want to insure that a window can't be opened twice 
     queryString: Optional parameter for queryString parameters
----------------------------------'''*/ 
function openWindow(windowName,uniqueID,queryString){
  var default_site          = 'width=560,height=420,location=no,toolbar=no,screenX=20,screenY=20,left=20,top=20,menubar=no,resizable=yes,scrollbars=yes';
  var FinanCenter           = 'width=560,height=420,location=no,toolbar=no,screenX=20,screenY=20,left=20,top=20,menubar=no,resizable=yes,scrollbars=yes';
  var SandP                 = 'width=680,height=520,location=no,toolbar=no,screenX=20,screenY=20,left=20,top=20,menubar=no,resizable=yes,scrollbars=yes';
  var Glossary              = 'width=800,height=600,location=no,toolbar=no,screenX=0,screenY=0,left=0,top=0,menubar=no,resizable=yes,scrollbars=yes';
  var SectorsChart          = 'width=520,height=380,location=no,toolbar=no,screenX=20,screenY=20,left=20,top=20,menubar=no,resizable=yes,scrollbars=yes';
  var Growthof10kChart      = 'width=595,height=525,location=no,toolbar=no,screenX=20,screenY=20,left=20,top=20,menubar=no,resizable=yes,scrollbars=yes';
  var EducationAndPlanning  = 'width=625,height=430,location=no,toolbar=no,screenX=20,screenY=20,left=20,top=20,menubar=no,resizable=yes,scrollbars=yes';
  var PressRoom_Photographs	= 'width=340,height=500,location=no,toolbar=no,screenX=50,screenY=50,left=20,top=20,menubar=no,resizable=no,scrollbars=yes';
  var SiteTour              = 'width=700,height=600,location=no,toolbar=no,screenX=20,screenY=20,left=20,top=20,menubar=no,statusbar=no,resizable=yes,scrollbars=yes';
  var ManagerCaseStudies    = 'width=746,height=586,location=no,toolbar=no,left=20,top=20,scrollbars=no,resizable=no';
  var FutureQuest           = 'width=780,height=600,location=no,toolbar=no,left=20,top=20,scrollbars=yes,resizable=yes';
  
  
  //append '?' to querystring if the window isn't opening FinanCenter tool
  if(arguments[0] != 'fc_calculators' && arguments[0] != 'fc_educators'){
    if(arguments[2] != null){
      if(queryString.indexOf('?') == -1){
        queryString = '?' + queryString;
      }
    }else{
      queryString = '';
    }  
  }
  windowName += uniqueID; //attach unique ID to windowName

  switch(windowName){
    //---------------------------------------
    //  Funds
    //---------------------------------------
    case 'Funds_Holdings':
      window.open('/Funds/Snapshot/HoldingsFull.asp' + queryString,windowName,EducationAndPlanning);
      break;
    case 'Sectors_Chart':
      window.open('/Funds/DataViews/SectorWeightingsChart.asp' + queryString,windowName,SectorsChart);
      break;
    case 'Security_Chart':
      window.open('/Funds/DataViews/SecurityCompChart.asp' + queryString,windowName,SectorsChart);
      break;
    case 'Growthof10k_Chart':
      window.open('/Funds/DataViews/Growthof10kChart.asp' + queryString,windowName,Growthof10kChart);
      break;
    case 'InvestmentQuality_Chart':
      window.open('/Funds/DataViews/InvestmentQualityChart.asp' + queryString,windowName,SectorsChart);
      break;
    case 'FutureQuest_Questionnaire':
      window.open('http://64.94.196.246/fqq/index.asp' + queryString,windowName,FutureQuest);
      break;
    case 'FutureQuest_Generator':
      window.open('http://64.94.196.246/ncc6/index.asp' + queryString,windowName,FutureQuest);
      break;

    //---------------------------------------
    //  Financenter - Educators & Calculators
    //---------------------------------------
    case 'fc_educators':
      window.open('http://partners.financenter.com/armadafunds/learn/guides/' + queryString,windowName,FinanCenter);
      break;
    case 'fc_calculators':
      window.open('http://partners.financenter.com/armadafunds/calculate/us-eng/' + queryString,windowName,FinanCenter);
      break;
    
    //-----------------------------
    //  Miscellaneous
    //-----------------------------
    case 'SEI_MngrCaseStudies':
      window.open('/_/resources/flash/sei/ManagerCaseStudies.asp',windowName,ManagerCaseStudies);
      break;
    case 'DST':
      window.open('https://www3.financialtrans.com/tf/FANWeb?tx=Disclaim&cz=6001712000300',windowName,'');
      break;
    case 'DST_default':
      window.open('https://w3.financialtrans.com',windowName,'');
      break;

    //-----------------------------
    //  S&P - Hosted Tools
    //-----------------------------
    case 'TickerLookup':
      window.open('/_/include/asp/sandpredirect.asp?action=gotoTickerLookUpNoPopup',windowName,default_site);
      break;
    case 'MarketSnapshot':
      window.open('/_/include/asp/sandpredirect.asp?action=gotoMarketSnapshotPage',windowName,default_site);
      break;
    case 'Glossary':
      window.open('/_/include/asp/sandpredirect.asp?action=gotoNamedPage&pageName=research/learningCenter/glossary/Glossary',"Research",Glossary);
      break;
    case 'Research_PopUp':
      window.open('/ResearchCenter/ResearchTools/PopUp/ResearchFrame.asp' + queryString,windowName,Glossary);
      break;


    case 'Research_PopUp_1':
      window.open('/_/include/asp/sandpredirect.asp?action=gotoCompanyNews' + queryString,"Research",Glossary);
      break;
    case 'Research_PopUp_2':
      window.open('/_/include/asp/sandpredirect.asp?action=gotoMutualFundChart' + queryString,"Research",Glossary);
      break;
    case 'Research_PopUp_3':
      window.open('/_/include/asp/sandpredirect.asp?action=gotoMutualFundProfile' + queryString,"Research",Glossary);
      break;
    case 'Research_PopUp_4':
      window.open('/_/include/asp/sandpredirect.asp?action=gotoNamedPage' + queryString,"Research",Glossary);
      break;
    case 'Research_PopUp_5':
      window.open('/_/include/asp/sandpredirect.asp?action=gotoPortfolio' + queryString,"Research",Glossary);
      break;   
    
    //----------------------------------------------------------
    //  Management Selection Process - Specialist Money Managers
    //----------------------------------------------------------
    case 'MoneyManagers':
      window.open('/Funds/Products/PopUpWindows/SpecialistMoneyManagers.asp'+queryString,windowName,EducationAndPlanning);
      break;

    //-----------------------------
    //  Retirement Section
    //-----------------------------    
    case 'IRA_PopUp_1':
      window.open('/Retirement/PopUpWindows/IRAsAtAGlance_1.asp' + queryString,windowName,'width=450,height=255,location=no,toolbar=no,screenX=20,screenY=20,left=20,top=20,menubar=no,resizable=yes,scrollbars=yes');
      break;
    case 'IRA_PopUp_2':
      window.open('/Retirement/PopUpWindows/IRAsAtAGlance_2.asp' + queryString,windowName,'width=400,height=350,location=no,toolbar=no,screenX=20,screenY=20,left=20,top=20,menubar=no,resizable=yes,scrollbars=yes');
      break;
    case 'IRA_PopUp_3':
      window.open('/Retirement/PopUpWindows/IRAsAtAGlance_3.asp' + queryString,windowName,'width=350,height=320,location=no,toolbar=no,screenX=20,screenY=20,left=20,top=20,menubar=no,resizable=yes,scrollbars=yes');
      break;
    case 'IRA_PopUp_4':
      window.open('/Retirement/PopUpWindows/IRAsAtAGlance_4.asp' + queryString,windowName,'width=460,height=265,location=no,toolbar=no,screenX=20,screenY=20,left=20,top=20,menubar=no,resizable=yes,scrollbars=yes');
      break;
    case 'IRA_PopUp_5':
      window.open('/Retirement/PopUpWindows/IRAsAtAGlance_5.asp' + queryString,windowName,'width=470,height=275,location=no,toolbar=no,screenX=20,screenY=20,left=20,top=20,menubar=no,resizable=yes,scrollbars=yes');
      break;
      
    //-----------------------------
    //  Invest Now Section
    //-----------------------------       
    case 'TypesOfAccounts_1':
      window.open('/InvestNow/PopUpWindows/TypesOfAccounts_1.asp' + queryString,'InvsetNow','width=500,height=400,location=no,toolbar=no,screenX=20,screenY=20,left=20,top=20,menubar=no,resizable=yes,scrollbars=yes');
      break; 
    case 'TypesOfAccounts_2':
      window.open('/InvestNow/PopUpWindows/TypesOfAccounts_2.asp' + queryString,'InvsetNow','width=500,height=400,location=no,toolbar=no,screenX=20,screenY=20,left=20,top=20,menubar=no,resizable=yes,scrollbars=yes');
      break; 
    case 'TypesOfAccounts_3':
      window.open('/InvestNow/PopUpWindows/TypesOfAccounts_3.asp' + queryString,'InvsetNow','width=500,height=400,location=no,toolbar=no,screenX=20,screenY=20,left=20,top=20,menubar=no,resizable=yes,scrollbars=yes');
      break; 
    case 'TypesOfAccounts_4':
      window.open('/InvestNow/PopUpWindows/TypesOfAccounts_4.asp' + queryString,'InvsetNow','width=500,height=400,location=no,toolbar=no,screenX=20,screenY=20,left=20,top=20,menubar=no,resizable=yes,scrollbars=yes');
      break; 
    case 'TypesOfAccounts_5':
      window.open('/InvestNow/PopUpWindows/TypesOfAccounts_5.asp' + queryString,'InvsetNow','width=500,height=400,location=no,toolbar=no,screenX=20,screenY=20,left=20,top=20,menubar=no,resizable=yes,scrollbars=yes');
      break; 
    case 'TypesOfAccounts_6':
      window.open('/InvestNow/PopUpWindows/TypesOfAccounts_6.asp' + queryString,'InvsetNow','width=500,height=400,location=no,toolbar=no,screenX=20,screenY=20,left=20,top=20,menubar=no,resizable=yes,scrollbars=yes');
      break; 
    case 'TypesOfAccounts_7':
      window.open('/InvestNow/PopUpWindows/TypesOfAccounts_7.asp' + queryString,'InvsetNow','width=500,height=400,location=no,toolbar=no,screenX=20,screenY=20,left=20,top=20,menubar=no,resizable=yes,scrollbars=yes');
      break; 
    case 'TypesOfAccounts_8':
      window.open('/InvestNow/PopUpWindows/TypesOfAccounts_8.asp' + queryString,'InvsetNow','width=500,height=400,location=no,toolbar=no,screenX=20,screenY=20,left=20,top=20,menubar=no,resizable=yes,scrollbars=yes');
      break; 
    case 'TypesOfAccounts_9':
      window.open('/InvestNow/PopUpWindows/TypesOfAccounts_9.asp' + queryString,'InvsetNow','width=500,height=400,location=no,toolbar=no,screenX=20,screenY=20,left=20,top=20,menubar=no,resizable=yes,scrollbars=yes');
      break; 
    case 'TypesOfAccounts_10':
      window.open('/InvestNow/PopUpWindows/TypesOfAccounts_10.asp' + queryString,'InvsetNow','width=500,height=400,location=no,toolbar=no,screenX=20,screenY=20,left=20,top=20,menubar=no,resizable=yes,scrollbars=yes');
      break; 
    case 'TypesOfAccounts_11':
      window.open('/InvestNow/PopUpWindows/TypesOfAccounts_11.asp' + queryString,'InvsetNow','width=500,height=400,location=no,toolbar=no,screenX=20,screenY=20,left=20,top=20,menubar=no,resizable=yes,scrollbars=yes');
      break;                                                                   
        
    
    //---------------------------------------------------
    //  Education and Planning  - How To Read A Statement
    //---------------------------------------------------
    case 'GeneralAccountInformationAndTotalPortfolioValue':
      window.open('/EducationAndPlanning/Education/PopUpWindows/GeneralAccountInformationAndTotalPortfolioValue.asp' + queryString,windowName,EducationAndPlanning);
      break;
    case 'AccountActivityDetails':
      window.open('/EducationAndPlanning/Education/PopUpWindows/AccountActivityDetails.asp' + queryString,windowName,EducationAndPlanning);
      break;
    case 'ServiceDirectoryAndAdditionalInvestmentForm':
      window.open('/EducationAndPlanning/Education/PopUpWindows/ServiceDirectoryAndAdditionalInvestmentForm.asp' + queryString,windowName,EducationAndPlanning);
      break;
    case 'FundInformationAndAccountChangeForms':
      window.open('/EducationAndPlanning/Education/PopUpWindows/FundInformationAndAccountChangeForms.asp' + queryString,windowName,EducationAndPlanning);
      break;
    case 'MutualFundInvestmentObjectives':
      window.open('/EducationAndPlanning/Education/PopUpWindows/MutualFundInvestmentObjectives.asp' + queryString,windowName,SandP);
      break;

    //----------------------------
    //  Website  - Survey Results
    //----------------------------
    case 'SurveyResults':
      window.open('/Website/SurveyResults.asp' + queryString,windowName,SandP);
      break;

    //------------------------------------------------
    //  Pressromm  - Manager Photos
    //------------------------------------------------
    case 'ManagerPhotos':
      window.open('/PressRoom/PhotoDownload.asp' + queryString,windowName,PressRoom_Photographs);
      break;
      
    //------------------------------------------------
    //  Site Tour 
    //------------------------------------------------
    case 'SiteTour':
      window.open('/Tour/Tour.asp?PicNum=Tour_1',windowName,SiteTour);
      break;      
        
    //-----------------------------
    //  Unknown call
    //-----------------------------
    default:
      alert('Unknown window call (' + windowName + ').  Please update the \'popup_windows.js\' file.');
      break;
  }
}
