

 function ShowImages(id)
{

    
   if(id == 1)
   { 
      $("#investmentManagementImage").show( 'slide', {direction: 'down'} );
       document.getElementById('spanLeftCrvFirst').style.visibility = "visible";
       document.getElementById('spanRightCrvFirst').style.visibility = "visible";
      // document.getElementById('spanLeftCrvFirst').style.position = "relative";
      // document.getElementById('spanRightCrvFirst').style.position = "relative";
       document.getElementById('divInvstOuter').className = "clsRollOver";
   } 
   if(id == 2)
   {
      $("#lendingSolutionImage").show( 'slide', {direction: 'down'} ); 
       document.getElementById('spanLeftCrvSecond').style.visibility = "visible";
       document.getElementById('spanRightCrvSecond').style.visibility = "visible";
     //  document.getElementById('spanLeftCrvSecond').style.position = "relative";
     //  document.getElementById('spanRightCrvSecond').style.position = "relative";
       document.getElementById('divLendingOuter').className = "clsRollOver";
 
   }
   if(id == 3)
   {
      $("#fundAccountingImage").show( 'slide', {direction: 'down'} ); 
       document.getElementById('spanLeftCrvThird').style.visibility = "visible";
       document.getElementById('spanRightCrvThird').style.visibility = "visible";
      // document.getElementById('spanLeftCrvThird').style.position = "relative";
       //document.getElementById('spanRightCrvThird').style.position = "relative";
       document.getElementById('divFundAccountingOuter').className = "clsRollOver"; 

   }
   
}

function functionSetDefaultImg()
{
    
    var tp = document.getElementById('hdnImgId').value;
  
    if (tp == 3)
    {
      
       
        $("#fundAccountingImage").show();
    }
    if (tp == 1)
    {
       
        $("#investmentManagementImage").show();
    }
    if (tp == 2)
    {
       
        $("#lendingSolutionImage").show();
    }
       //window.setTimeout(settimer, 500);
       tp=4;
       
}
 
function HideImages()
{ 
      if(ImgN0 == 1)
      {   
         
         $("#investmentManagementImage").hide( 'slide', {direction: 'down'} ); 
         document.getElementById('spanLeftCrvFirst').style.visibility = "hidden";
         document.getElementById('spanRightCrvFirst').style.visibility = "hidden";
         //document.getElementById('spanLeftCrvFirst').style.position = "absolute";
        // document.getElementById('spanRightCrvFirst').style.position = "absolute";
         document.getElementById('divInvstOuter').className = "";
         ImgN0 = 0;        
      }
      if(ImgN0 == 2)
      {
         $("#lendingSolutionImage").hide( 'slide', {direction: 'down'} ); 
         document.getElementById('spanLeftCrvSecond').style.visibility = "hidden";
       document.getElementById('spanRightCrvSecond').style.visibility = "hidden";
       //document.getElementById('spanLeftCrvSecond').style.position = "absolute";
       //document.getElementById('spanRightCrvSecond').style.position = "absolute";
       document.getElementById('divLendingOuter').className = "";
         ImgN0 = 0; 
      }
      if(ImgN0 == 3)
      {
         $("#fundAccountingImage").hide( 'slide', {direction: 'down'} ); 
         document.getElementById('spanLeftCrvThird').style.visibility = "hidden";
         document.getElementById('spanRightCrvThird').style.visibility = "hidden";
         //document.getElementById('spanLeftCrvThird').style.position = "absolute";
         //document.getElementById('spanRightCrvThird').style.position = "absolute";
         document.getElementById('divFundAccountingOuter').className = "";   
         ImgN0 = 0; 
       }
      return false;
}


function ClickLink(id)
{
     if(id == 1)
   { 
     
     $('#investmentManagementImage').stop().animate();
   
   } 
   
   if(id == 2)
   {
     document.getElementById('lendingSolutionImage').style.display = "block"; 
   }
   if(id == 3)
   {
     document.getElementById('fundAccountingImage').style.display = "block"; 
   }  
}

///*--------------------------*/
var IMGtimeout   = 500;
var IMGclosetimer  = 0;
var IMGddmenuitem  = 0; 
var Onlink=0

var ImgN0 = 0;
    // open hidden layer
    function IMGopen(id)
    { 
        // cancel close timer
        Onlink=1
        IMGcancelclosetime();
        IMGddmenuitem = document.getElementById(id);
        if(IMGddmenuitem)
        { 
             ShowImages(id);
             ImgN0 = id;
             return false;
        } 
        IMGddmenuitem = document.getElementById(id);
    }

    function IMGclose()
    {
          if((IMGddmenuitem)&&(Onlink==0))
          {
             
             HideImages(); 
             //$("#investmentManagementImage").hide( 'slide', {direction: 'down'} ); 
             //$("#lendingSolutionImage").hide( 'slide', {direction: 'down'} ); 
             //$("#fundAccountingImage").hide( 'slide', {direction: 'down'} ); 
          } 
    }

    // go close timer
    function IMGclosetime()
    {   
          Onlink=0
          IMGclosetimer = window.setTimeout(IMGclose, IMGtimeout);
     }

    // cancel close timer
    function IMGcancelclosetime()
    {
         // alert(IMGclosetimer);
         if(IMGclosetimer)
         {
                window.clearTimeout(IMGclosetimer);
                IMGclosetimer = null;
        }
    }
