﻿// JScript File


var titleMsg="What we do - Mecklai Fianacial";
var dtCh= "/";
var PHName="ctl00_cphMain_";

 function trim(str)
 {
        if(!str || typeof str != 'string')
            return null;
        return str.replace(/^[\s]+/,'').replace(/[\s]+$/,'').replace(/[\s]{2,}/,' ');
 }

function fnWeeklyReports(str)
{ window.open(str);    
}

function fn_OpenImgMRM()
 {

// 
// var div_mrm = window.top.document.getElementById('divMRMImg');
// document.getElementsByTagName('')
   WinMRM= window.open('../mecklai_risk_manager/MRM_Demo.aspx','WinMRM','status=0, width=980, height=500, top=100, left=20,resizable=no');
 
// window.top.document.getElementById('divMRMImg').style.display ='';
 
   //document.getElementById(PHName+'divMRMImg').style.display ='';
 }



 function fn_Show(obj)
    {   
   
      if(obj=='Main' || obj=='')
    {     
      document.getElementById('ifmService').src="Service/Services.aspx";
       document.title = 'Mecklai Services - Mecklai Financial';
      
       
     } 

    if(obj=='A1')
    {     
      document.getElementById('ifmService').src="Service/FxAdvisory.aspx";
      document.title = 'FX Risk Management Advisory - Mecklai Financial';
//           document.getElementById('lnkService').href="mailto:risk.advisory@mecklai.com";
//    document.getElementById('lnkService').innerText="risk.advisory@mecklai.com";
        if(document.getElementById('__a').style.display =='none')
       {
            if(oboutSMpro_5.parentClick)
                oboutSMpro_5.parentClick('a');
            else
                document.getElementById('a').click();
       }
     
    }
    
     if(obj=='A2')
    {     
      document.getElementById('ifmService').src="Service/LiabilityMngt.aspx";
      document.title = ' Liability Management - Mecklai Financial';
//           document.getElementById('lnkService').href="mailto:risk.advisory@mecklai.com";
//    document.getElementById('lnkService').innerText="risk.advisory@mecklai.com";
        if(document.getElementById('__a').style.display =='none')
       {
            if(oboutSMpro_5.parentClick)
                oboutSMpro_5.parentClick('a');
            else
                document.getElementById('a').click();
       }
    }
    
     if(obj=='A3')
    {     
      document.getElementById('ifmService').src="Service/AssetLiabilityMngt.aspx";
      document.title = 'Asset Liability Management - Mecklai Financial';
//           document.getElementById('lnkService').href="mailto:risk.advisory@mecklai.com";
//    document.getElementById('lnkService').innerText="risk.advisory@mecklai.com";
        if(document.getElementById('__a').style.display =='none')
       {
            if(oboutSMpro_5.parentClick)
                oboutSMpro_5.parentClick('a');
            else
                document.getElementById('a').click();
       }
    }
     
     
    if(obj=='B1')
    {     
      document.getElementById('ifmService').src="Service/Mecklai-fx-infopac.aspx";
       document.title = 'Mecklai FX Infopac - Mecklai Financial';
//           document.getElementById('lnkService').href="mailto:research@mecklai.com";
//    document.getElementById('lnkService').innerText="research@mecklai.com";
          if(document.getElementById('__b').style.display =='none')
       {
            if(oboutSMpro_5.parentClick)
                oboutSMpro_5.parentClick('b');
            else
            document.getElementById('b').click();
       }
      
     }
     
     
        if(obj=='B2')
    {     
      document.getElementById('ifmService').src="JoyToTheWorld/RiskManagementApproach.aspx";
      document.title = 'Mecklai FX Hedge Program  - Mecklai Financial'; 
//       if(document.getElementById('__d').style.display != 'block')
//       {
//       document.getElementById('d').click();
//       } 
     }
     
        if(obj=='B3')
    {     
      document.getElementById('ifmService').src="JoyToTheWorld/whitepaper.aspx";
      document.title = 'Research Reports  - Mecklai Financial'; 
//       if(document.getElementById('__d').style.display != 'block')
//       {
//       document.getElementById('d').click();
//       } 
     }
      if(obj=='C1')
    {     
      document.getElementById('ifmService').src="Service/TreasuryAudit.aspx";
       document.title = 'Review of Treasury Operations - Mecklai Financial';
//                  document.getElementById('lnkService').href="mailto:treasury@mecklai.com";
//    document.getElementById('lnkService').innerText="treasury@mecklai.com";
         if(document.getElementById('__c').style.display =='none')
       {
       if(oboutSMpro_5.parentClick)
                oboutSMpro_5.parentClick('c');
            else
       document.getElementById('c').click();
       }
     }
      if(obj=='C2')
    {     
      document.getElementById('ifmService').src="Service/TreasuryPolicyDevp.aspx";
       document.title = 'Risk Management Policy - Mecklai Financial';
//         document.getElementById('lnkService').href="mailto:treasury@mecklai.com";
//    document.getElementById('lnkService').innerText="treasury@mecklai.com";
          if(document.getElementById('__c').style.display =='none')
       {
       if(oboutSMpro_5.parentClick)
                oboutSMpro_5.parentClick('c');
            else
       document.getElementById('c').click();
       }
     }
     
          if(obj=='C3')
    {     
      document.getElementById('ifmService').src="Service/OperatingGuideLineAndMIS.aspx";
       document.title = 'Operating Guideline And MIS - Mecklai Financial';
//         document.getElementById('lnkService').href="mailto:treasury@mecklai.com";
//    document.getElementById('lnkService').innerText="treasury@mecklai.com";
          if(document.getElementById('__c').style.display =='none')
       {
       if(oboutSMpro_5.parentClick)
                oboutSMpro_5.parentClick('c');
            else
       document.getElementById('c').click();
       }
     }
     
        if(obj=='C4')
    {     
      document.getElementById('ifmService').src="Service/TreasuryOutsourcing.aspx";
       document.title = 'Treasury Outsourcing - Mecklai Financial';
//         document.getElementById('lnkService').href="mailto:treasury@mecklai.com";
//    document.getElementById('lnkService').innerText="treasury@mecklai.com";
          if(document.getElementById('__c').style.display =='none')
       {
       if(oboutSMpro_5.parentClick)
                oboutSMpro_5.parentClick('c');
            else
       document.getElementById('c').click();
       }
     }
     
     
      if(obj=='D1')
    {     
      document.getElementById('ifmService').src="Service/CorpServiceDerivative.aspx";
       document.title = 'Derivative Valuation & Accounting Services - Mecklai Financial';
       if(document.getElementById('__d').style.display =='none')
       {
       if(oboutSMpro_5.parentClick)
                oboutSMpro_5.parentClick('d');
            else
       document.getElementById('d').click();
       }
       
       
     }
      if(obj=='D2')
    {     
      document.getElementById('ifmService').src="Service/CorpServiceStructProduct.aspx";
       document.title = 'Structured Product Design - Mecklai Financial';
//         document.getElementById('lnkService').href="mailto:corporate.services@mecklai.com";
//    document.getElementById('lnkService').innerText="corporate.services@mecklai.com";
         if(document.getElementById('__d').style.display =='none')
       {
       if(oboutSMpro_5.parentClick)
                oboutSMpro_5.parentClick('d');
            else
       document.getElementById('d').click();
       }
     }
      if(obj=='D3')
    {     
      document.getElementById('ifmService').src="Service/TradeFinance.aspx";
       document.title = 'Trade Finance - Mecklai Financial';
         document.getElementById('lnkService').href="mailto:tradefinance@mecklai.com";
    document.getElementById('lnkService').innerText="tradefinance@mecklai.com";
         if(document.getElementById('__d').style.display =='none')
       {
       if(oboutSMpro_5.parentClick)
                oboutSMpro_5.parentClick('d');
            else
       document.getElementById('d').click();
       }
     }
     else
     {
           document.getElementById('lnkService').href="mailto:info@mecklai.com";
    document.getElementById('lnkService').innerText="info@mecklai.com";
     }
      if(obj=='D4')
    {     
      document.getElementById('ifmService').src="Service/CreditInsurance.aspx";
       document.title = 'Credit Insurance - Mecklai Financial';
//         document.getElementById('lnkService').href="mailto:corporate.services@mecklai.com";
//    document.getElementById('lnkService').innerText="corporate.services@mecklai.com";
         if(document.getElementById('__d').style.display =='none')
       {
       if(oboutSMpro_5.parentClick)
                oboutSMpro_5.parentClick('d');
            else
       document.getElementById('d').click();
       }
     }
     
      if(obj=='D5')
    {     
      document.getElementById('ifmService').src="Service/MecklaiProfEducation.aspx";
       document.title = 'Professional Education - Mecklai Financial';
//         document.getElementById('lnkService').href="mailto:corporate.services@mecklai.com";
//    document.getElementById('lnkService').innerText="corporate.services@mecklai.com";
          if(document.getElementById('__d').style.display =='none')
       {
       if(oboutSMpro_5.parentClick)
                oboutSMpro_5.parentClick('d');
            else
       document.getElementById('d').click();
       }
     }
     
         if(obj=='D6')
    {     
      document.getElementById('ifmService').src="Service/DebtStructuring.aspx";
       document.title = 'Debt Structuring  & Resource Mobilization - Mecklai Financial';
//         document.getElementById('lnkService').href="mailto:corporate.services@mecklai.com";
//    document.getElementById('lnkService').innerText="corporate.services@mecklai.com";
          if(document.getElementById('__d').style.display =='none')
       {
       if(oboutSMpro_5.parentClick)
                oboutSMpro_5.parentClick('d');
            else
       document.getElementById('d').click();
       }
     }
     
    
    if(obj=='E1')
    {     
        document.getElementById('ifmService').src="Service/MecklaiRiskManager.aspx";
        document.title = 'Mecklai Risk Manager - Mecklai Financial';
//        document.getElementById('lnkService').href="mailto:software@mecklai.com";
//    document.getElementById('lnkService').innerText="software@mecklai.com";
         if(document.getElementById('__e').style.display =='none')
       {
       if(oboutSMpro_5.parentClick)
                oboutSMpro_5.parentClick('e');
            else
       document.getElementById('e').click();
       }
    }
       if(obj=='F1' )
    {     
      document.getElementById('ifmService').src="Service/FuturesBroking.aspx";
      document.title = 'Currency Futures - Mecklai Financial';  
//       document.getElementById('lnkService').href="mailto:furures.broking@mecklai.com";
//    document.getElementById('lnkService').innerText="furures.broking@mecklai.com";
        if(document.getElementById('__f').style.display =='none')
       {
       if(oboutSMpro_5.parentClick)
                oboutSMpro_5.parentClick('f');
            else
       document.getElementById('f').click();
       }
     }
     
 

   return false;
   
           
    }
    
    
function fn_onLoad()
{


     res = screen.width+"x"+screen.height;
          
      try
     {
    document.getElementById('3').childNodes[0].style.fontWeight= 'bold';
      
     }
     catch(ex)
     {
     }
      
      //document.getElementById('3').childNodes[0].style.textDecoration	= 'underline';
     var resWidth=screen.width;
     var resHeight=screen.height;
  
     document.getElementById('ifmService').style.height = screen.height - 500 +'px';

//     iWidth = (screen.width - 950)/2
//          document.getElementById('divService').style.left= iWidth + 90 +'px';
//           document.getElementById('divService').style.top = '77px';
//      
      
       fn_Show(document.getElementById('ctl00_cphMain_hdnType').value);
       
       window.setTimeout(showMenu, 1000)
       
     if((resWidth < "1024") && (resHeight < "768"))
     {
        alert("Please change your screen resolution to 1024x768.");
     }
     
     if(document.getElementById('pro_5'))
        document.getElementById('pro_5').style.width='185px';

    
}

function fnMailResearch()
{

    window.open('mailto:research@mecklai.com');    

}

function showMenu()
{
//alert('hi');
var val = document.getElementById('ctl00_cphMain_hdnType').value;

if(val != "")
{
    oboutSMpro_5.parentClick(val.substring(0,1).toLowerCase());
}
}

function fnReportSample()
{
    window.open('../Service/Reports/Mecklai Research & Market Intelligence.pdf');    
}
 function pageLoad()
 {
    
    fn_onLoad();
  
   
 }

 



