function sh_ShowHide()
{
  groupname=arguments[0];
  rows=arguments[1];
  if(arguments.length > 2)
  {
    if (arguments[2]==1)
    {
      var currRow = document.getElementById(groupname);
  		currRow.style.display="";
  		document.getElementById(groupname+"img").src = sh_HideImg;
    }
    else if (arguments[2]==0)
    {
      var currRow = document.getElementById(groupname);
  		currRow.style.display="none";
  		document.getElementById(groupname+"img").src = sh_ShowImg;
    }
  }
  else
  {
    if (rows == 0) 
    { /* for a single item */
      sh_RowShowHide(groupname);
  	}
    else
    { /* for multiple rows of a table */
      for(i=1; i <= rows; i++)
      {
        var tempRow = groupname + "" + i;
        sh_RowShowHide(tempRow);
      }
    }
  }
}

function sh_RowShowHide(sh_RowID) {
	var currRow = document.getElementById(sh_RowID);
	if (currRow.style.display=="none") {
		currRow.style.display="";
		document.getElementById(sh_RowID+"img").src = sh_HideImg;
	} else {
		currRow.style.display="none";
		document.getElementById(sh_RowID+"img").src = sh_ShowImg;
	}	
}

function sh_showHideTransactions(groupname)
{
  i = 0;
  while(currRow = document.getElementById(groupname + '_' + i)) 
  {
    var imgDisplay="plus";
    if (currRow.style.display=="none") 
    {
      currRow.style.display="";
      document.getElementById(groupname+"img").src = sh_HideImg;
    } 
    else 
    {
      currRow.style.display="none"
      document.getElementById(groupname+"img").src = sh_ShowImg;
    }
    i+=1;
  }
}

var sh_ShowImg = "../images/phoenix/company/directory_plus.gif";
var sh_HideImg = "../images/phoenix/company/directory_minus.gif";


function equalHeight(group) {

try

{

                tallest = 0;

                group.each(function() {
				
                                thisHeight = $(this).height();

                                if(thisHeight > tallest) {

                                 tallest = thisHeight;

                                }

                });

                group.height(tallest);
				//group.css('height','auto');

}

catch(e){}

}

$(function() {
 
if($("#body_content_left").css("display") =='none')
	equalHeight($("#cse-results, #body_content_right "));
else
	$("#body_content_left").css('height','auto');

if($.trim($("#body_content_right").html()) == '')
 {
 $("#body_content_right").hide();
 $("#body_content_left").css('margin-right',0);
 }
 else 
 {
 equalHeight($("#body_content_right,#body_content_left"));
 }
});
