//var state = 'none';

function showhide(layer_ref) {

if (state == 'block') {
state = 'none';
}
else {
state = 'block';
}
if (document.all) { //IS IE 4 or 5 (or 6 beta)
eval( "document.all." + layer_ref + ".style.display = state");
}
if (document.layers) { //IS NETSCAPE 4 or below
document.layers[layer_ref].display = state;
}
if (document.getElementById &&!document.all) {
hza = document.getElementById(layer_ref);
hza.style.display = state;
}
}

	
function findTog()
{
 var tog,i;
// Loop through all images, check if they contain the class roll
 tog=document.getElementsByTagName('a');
 for(i=0;i<tog.length;i++)
 {
  if(/estimations/.test(tog[i].className))
  {
// add the function roll to the parent Element of the image
//  tog[i].parentNode.onmouseover=function(){togtog(this);};
//  tog[i].parentNode.onmouseout=function(){togtog(this);};
//  tog[i].parentNode.onfocus=function(){togtog(this);};
//  tog[i].parentNode.onblur=function(){togtog(this);};
  tog[i].parentNode.onclick=function(){togtoga(this);};
  }
  if(/buttonCB/.test(tog[i].className))
  {
// add the function roll to the parent Element of the image
//  tog[i].parentNode.onmouseover=function(){togtog(this);};
//  tog[i].parentNode.onmouseout=function(){togtog(this);};
//  tog[i].parentNode.onfocus=function(){togtog(this);};
//  tog[i].parentNode.onblur=function(){togtog(this);};
  tog[i].parentNode.onclick=function(){togtogb(this);};
  }
  if(/buttonMP/.test(tog[i].className))
  {
// add the function roll to the parent Element of the image
//  tog[i].parentNode.onmouseover=function(){togtog(this);};
//  tog[i].parentNode.onmouseout=function(){togtog(this);};
//  tog[i].parentNode.onfocus=function(){togtog(this);};
//  tog[i].parentNode.onblur=function(){togtog(this);};
  tog[i].parentNode.onclick=function(){togtogc(this);};
  }
  if(/wide_buttonVB/.test(tog[i].className))
  {
// add the function roll to the parent Element of the image
//  tog[i].parentNode.onmouseover=function(){togtog(this);};
//  tog[i].parentNode.onmouseout=function(){togtog(this);};
//  tog[i].parentNode.onfocus=function(){togtog(this);};
//  tog[i].parentNode.onblur=function(){togtog(this);};
  tog[i].parentNode.onclick=function(){togtogd(this);};
  }
 }
}
function togtoga(o)
{
 onclick=Show('estimations'); 
 }
function togtoga(o)
{
 onclick=Show('CB'); 
 }
function togtoga(o)
{
 onclick=Show('MP'); 
 }
function togtogd(o)
{
 onclick=Show('VB'); 
 }


window.onload=function(){
 findTog();
}
