function gotoSection(server, target, loginpage) {
  var myController = document.getElementById('controller');
  myController.action = target;
  if( loginpage != null && loginpage != '' ) {
    myController.submit();
  } else {
    window.top.location.href = server;
  }
}

function set(index, name, value){
  document.getElementById('param' + index).name = name;
  document.getElementById('param' + index).value = value;
}

function checkSize() {
 try {
   if( document.body.clientWidth < 800 ) {
     window.parent.makeWide();
   }
 } catch ( error ) {
 }
}

function toggleHelp(id) {
 if( !isHelpDisplayed ) {
   showHint(id,100,175);
 } else {
   hideHint(id);
 }
 isHelpDisplayed = !isHelpDisplayed;
}

function overButton( buttonId ) {
  try{
    document.getElementById(buttonId).className = 'highlightOnFont';
  }catch(error){
  }
}
function offButton( buttonId ) {
  try{
    document.getElementById(buttonId).className = 'highlightFont';
  }catch(error){
  }
}

function showHint( id , xoffset, yoffset ) {
 //put the tooltip 15px lower and 15px to the right of the mouse
 MWJ_changePosition( id+'Div' , xoffset , yoffset , true );
 //make the tooltip visible
 MWJ_changeVisibility( id+'Div' , true );
 document.getElementById(id).style.display = 'block';
}
function hideHint( id ) {
 MWJ_changeVisibility( id+'Div', false );
 document.onmousemove = null;
 if( document.releaseEvents ) { document.releaseEvents( Event.MOUSEMOVE ); }
 document.getElementById(id).style.display = 'none';
}

function initBodyContainer(){
  var myParentLocation = this.parent.location.href;
  if( myParentLocation.indexOf("base.jsp") < 0 && myParentLocation.indexOf("forceBodyContainer") < 0 ) {
    var myBaseIndex = myParentLocation.indexOf("bodyContainer.jsp");
    myParentLocation = myParentLocation.substring(0,myBaseIndex) + "base" + myParentLocation.substring(myBaseIndex + 13);
    this.parent.location = myParentLocation;
  }
}
