function showOrHideModule(containerId, moduleId) {
  
  var container = document.getElementById( containerId );
  var modules = container.getElementsByTagName("div");
  
  for( i=0; i < modules.length; i++ ) {
    
    var module = modules[i];
    
    if( module.className == "showModule" ) {
      module.className = "hideModule";
    } else if ( module.id == moduleId && module.className == "hideModule" ) {
      module.className = "showModule";
    }
    
  }
  
}


function popupFlashMap(location) {

  window.open( "/flashmap.jsp?location="+location, "flashmap", "status=0,toolbar=0,location=0,menubar=0,directories=0,resizable=0,scrollbars=0,height=500,width=340" );

  return false;

}

function switchToHelp(location) {

  window.location = "/popup_help.jsp?location="+location;

  return false;

}

function switchToMap(location) {

  window.location = "/flashmap.jsp?location="+location;

  return false;

}


function formsubmit(aform) {

  aform.submit();

  return false;

}


function openWindow( mylink ) {

  window.open( mylink, "_blank" );

  return false;

}

function openPopup( mylink, windowname, width, height, scrollbars ) {

  if ( !window.focus ) return true;

  var left = (screen.availWidth - width ) / 2;
  var top = (screen.availHeight - height ) / 2;
  var href;

  if (typeof(mylink) == 'string')
    href=mylink;
  else
    href=mylink.href;  

  window.open( href, windowname, "height="+height+",width="+width+",resizable=no,scrollbars="+(scrollbars ? "yes" : "no" )+",status=no,toolbar=no,menubar=no,location=no,left="+left+",top="+top );

  return false;

}


