﻿// JScript File
function setActive()
{
var data = 0,Resultant = '';
 var count = 0;

 var DivItemCollection = document.forms['aspnetForm'].getElementsByTagName('div') ;
 count = DivItemCollection.length;
         for(i=0;i<count;i++)
         {
             var currentitem = DivItemCollection[i];
                 if(currentitem.id == 'tabs')
                 {
                 var AnchorCollection =  currentitem.getElementsByTagName('a');
                  for(j=0;j<AnchorCollection.length;j++)
                   {
                     if(document.location.href.indexOf(AnchorCollection[j].href)>=0) 
                     {
                      AnchorCollection[j].className='active';
                      data = 1;
                     }
                   }
                  
                  }
         }
 
  if(data == 0)
  {
   SetActiveBySubmenu();
    
  }
  
}

function SetSubMenu(Resultant)
{
var count = 0;
 var DivItemCollection = document.forms['aspnetForm'].getElementsByTagName('div') ;
 count = DivItemCollection.length;
         for(i=0;i<count;i++)
         {
             var currentitem = DivItemCollection[i];
                 if(currentitem.id == 'tabs')
                 {
                 var AnchorCollection =  currentitem.getElementsByTagName('a');
                  for(j=0;j<AnchorCollection.length;j++)
                   {
                     if(AnchorCollection[j].href.indexOf(Resultant) >=0) 
                     {
                      AnchorCollection[j].className='active';
                      
                     }
                   }
                  
                  }
         }

}


function SetActiveBySubmenu()
{
var Resultant = '';
    if(document.location.href.indexOf('whyLintechGlobal')>=0 || document.location.href.indexOf('missionAndValues')>=0 || document.location.href.indexOf('developmentMethodology')>=0 || document.location.href.indexOf('news')>=0 || document.location.href.indexOf('joinOurTeam')>=0 )
    {
    Resultant = 'company';
    SetSubMenu(Resultant);
    }
    else if(document.location.href.indexOf('applicationDevelopment')>=0 || document.location.href.indexOf('systemIntegrationSolution')>=0 || document.location.href.indexOf('enterpriseSystemsManagement')>=0 || document.location.href.indexOf('webservices')>=0 || document.location.href.indexOf('staffAugmentation')>=0  || document.location.href.indexOf('packageSoftware')>=0 )
    {
    Resultant = 'capabilities';
    SetSubMenu(Resultant);
    }
    else if(document.location.href.indexOf('generalInformation')>=0 || document.location.href.indexOf('RFI_RFP')>=0 || document.location.href.indexOf('partner')>=0  )
    {
    Resultant = 'contactus';
    SetSubMenu(Resultant);
    }
return Resultant ;

}