var hidecid, timer = "";

function show( cid ) {
  if( timer )
     clearTimeout( timer );
  if( typeof ccollect != "undefined" )
    hideAll( cid );
  document.getElementById( cid ).style.visibility = "visible";
}

function hide( cid ) {
  hidecid = cid;
  timer = setTimeout( "hideDiv()", 2500 );
}

function hideDiv() {
  document.getElementById( hidecid ).style.visibility = "hidden";
}

function hideAll( omit ) {
  var inc = 0;
  while( ccollect[inc] ) {
    if( ccollect[inc].id != omit ) 
      ccollect[inc].style.visibility = "hidden";
    inc++;
  }
}

function set() {
  if( timer )
    clearTimeout( timer );
}

function getElementbyClass( classname ) {
  ccollect = new Array();
  var inc = 0;
  var alltags = document.all? document.all : document.getElementsByTagName("*");
  for( i = 0; i < alltags.length; i++ ) {
    if( alltags[i].className == classname )
      ccollect[inc++] = alltags[i];
  }
}

function do_onload() {
  getElementbyClass( "secondary" );
}


if( window.addEventListener )
  window.addEventListener( "load", do_onload, false );
else if( window.attachEvent )
  window.attachEvent( "onload", do_onload );
else if( document.getElementById )
  window.onload = do_onload;
 
