var sh_ShowImg = "/images/AT_arrow_closed.gif";
var sh_HideImg = "/images/AT_arrow_open.gif";
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 = themeRootDirectory+sh_HideImg;
    }
    else if (arguments[2]==0)
    {
      var currRow = document.getElementById(groupname);
  		currRow.style.display="none";
  		document.getElementById(groupname+"img").src = themeRootDirectory+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 = themeRootDirectory+sh_HideImg;
	} else {
		currRow.style.display="none";
		document.getElementById(sh_RowID+"img").src = themeRootDirectory+sh_ShowImg;
	}	
}

function femsa_HideDetails() {

    for (j=1; j<3; j++) {
        var detailList = document.getElementById('board_list'+j);
        for(i=0; i<detailList.childNodes.length; i++) {
            var node = detailList.childNodes[i];
            if (node.nodeName == "DD") node.style.display = 'none';
        }
    }
}


// Browser Detection

isMac = (navigator.appVersion.indexOf("Mac")!=-1) ? true : false;
NS4 = (document.layers) ? true : false;
IEmac = ((document.all)&&(isMac)) ? true : false;
IE4plus = (document.all) ? true : false;
IE4 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 4.")!=-1)) ? true : false;
IE5 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 5.")!=-1)) ? true : false;
ver4 = (NS4 || IE4plus) ? true : false;
NS6 = (!document.layers) && (navigator.userAgent.indexOf('Netscape')!=-1)?true:false;



// Body onload utility (supports multiple onload functions)
var gFemsaSafeOnload = new Array();
function femsaSafeAddOnload(f)
{
	if (IEmac && IE4)  // IE 4.5 blows out on testing window.onload
	{
		window.onload = FemsaSafeOnload;
		gFemsaSafeOnload[gFemsaSafeOnload.length] = f;
	}
	else
	{
		if (window.onload != FemsaSafeOnload)
		{
			// if there is an onload event for the window, save it for later execution
			if (window.onload) {
				var arr = window.onload.toString().match(/function\s*(\w+)/);
				gFemsaSafeOnload[0] = arr[1] + "()";
			}
			window.onload = FemsaSafeOnload;
		}		
		gFemsaSafeOnload[gFemsaSafeOnload.length] = f;
	}
}

function femsaSafePrependOnload(f) {
	if (!gFemsaSafeOnload.length) femsaSafeAddOnload(f);
	else gFemsaSafeOnload.unshift(f);
}

function FemsaSafeOnload()
{
	for (var i=0;i<gFemsaSafeOnload.length;i++) {
		if (gFemsaSafeOnload[i] != null) {
			eval(gFemsaSafeOnload[i]);
		}
	}
}


femsaSafeAddOnload("femsa_HideDetails();");
window.onreload = femsa_HideDetails; 




