 

function toogle_display_cat(elem, cat_to_open)
{
  new Effect.toggle(cat_to_open,'slide');  
  
  if($(elem).className != 'open')
  {
    $(elem).className='open';
  }else
  {
   $(elem).className = 'closed';
  }
  
 
}



function on_load_details()
{

  if(document.entity_image)
  {
  
    var pct_reduction_height = document.entity_image.height/177;
    var pct_reduction_width = document.entity_image.width/233;
    
    var old_height=document.entity_image.height;
    var old_width=document.entity_image.width;
 
  
    if (pct_reduction_height>1 || pct_reduction_width>1)
    {
      
      if (pct_reduction_height>pct_reduction_width)
      {
        
        document.entity_image.height=177;
        document.entity_image.width=old_width/pct_reduction_height;
    
      }
      if (pct_reduction_height<=pct_reduction_width)
      {      
        document.entity_image.width=233;
        document.entity_image.height=old_height/pct_reduction_width;
      } 
    }
  }
  
}

