﻿// JScript File
function toggleGroup(id)
{
  var IE=false;
  if(navigator.appName && navigator.appName == 'Microsoft Internet Explorer') IE=true;
  
  var results=null;
  if(document.getElementById) {
    results=document.getElementById(id);
  } else if (document.all) {
    results=document.all[id];
  }

  var results_topstats=null;
  if(document.getElementById) {
    results_topstats=document.getElementById(id + '_topstats');
  } else if (document.all) {
    results_topstats=document.all[id];
  }

  var results_bottomstats=null;
  if(document.getElementById) {
    results_bottomstats=document.getElementById(id + '_bottomstats');
  } else if (document.all) {
    results_bottomstats=document.all[id];
  }

  var results_toggleimg=null;
  if(document.getElementById) {
    results_toggleimg=document.getElementById(id + '_img');
  } else if (document.all) {
    results_toggleimg=document.all[id];
  }

  var results_toggleimgstats=null;
  if(document.getElementById) {
    results_toggleimgstats=document.getElementById(id + '_imgstats');
  } else if (document.all) {
    results_toggleimgstats=document.all[id];
  }
  
  if (results != null) {

    if (results.style.display == 'none')
    {
    
      //results.style.visibility='visible';
      results.style.display='block';
      //if(IE) results.style.display='block';
      //else results.style.display='table-row-group';
      
      /*
      if (results_topstats != null)
      {
        //results_topstats.style.visibility='visible';
        if(IE) results_topstats.style.display='block';        
        else results_topstats.style.display='table-row-group';        
      }
      if (results_bottomstats != null)
      {
        //results_bottomstats.style.visibility='visible';
        if(IE) results_bottomstats.style.display='block';        
        else results_bottomstats.style.display='table-row-group';        
      }
      */
      if (results_toggleimg != null)
      {
        results_toggleimg.src='images/minus.gif';
      }
    }
    else
    {
      //results.style.visibility='hidden';
      results.style.display='none';
      if (results_topstats != null)
      {
        //results_topstats.style.visibility='hidden';
        results_topstats.style.display='none';        
      }
      if (results_bottomstats != null)
      {
        //results_bottomstats.style.visibility='hidden';
        results_bottomstats.style.display='none';        
      }
      if (results_toggleimg != null)
      {
        results_toggleimg.src='images/plus.gif';
      }
      if (results_toggleimgstats != null)
      {
        results_toggleimgstats.src='images/button_stats.gif';
      }
    }
  }
}


function toggleStats(id)
{
  var IE=false;
  if(navigator.appName && navigator.appName == 'Microsoft Internet Explorer') IE=true;
  
  var results_topstats=null;
  if(document.getElementById) {
    results_topstats=document.getElementById(id + '_topstats');
  } else if (document.all) {
    results_topstats=document.all[id];
  }

  var results_bottomstats=null;
  if(document.getElementById) {
    results_bottomstats=document.getElementById(id + '_bottomstats');
  } else if (document.all) {
    results_bottomstats=document.all[id];
  }

  var results_toggleimg=null;
  if(document.getElementById) {
    results_toggleimg=document.getElementById(id + '_imgstats');
  } else if (document.all) {
    results_toggleimg=document.all[id];
  }

  var show=false;
  if(results_topstats != null)
  {
    if(results_topstats.style.display == 'none') show=true;
  }
  if(results_bottomstats != null)
  {
    if(results_bottomstats.style.display == 'none') show=true;
  }
    
  if (show)
  {
    if (results_topstats != null)
    {
      if(IE) results_topstats.style.display='block';        
      else results_topstats.style.display='table-row-group';        
    }
    if (results_bottomstats != null)
    {
      if(IE) results_bottomstats.style.display='block';        
      else results_bottomstats.style.display='table-row-group';        
    }
    if (results_toggleimg != null)
    {
      results_toggleimg.src='images/button_stats_down.gif';
    }
  }
  else
  {

    if (results_topstats != null)
    {
      results_topstats.style.display='none';        
    }
    if (results_bottomstats != null)
    {
      results_bottomstats.style.display='none';        
    }
    if (results_toggleimg != null)
    {
      results_toggleimg.src='images/button_stats.gif';
    }
  }
}

