
function sVEAML( VEAMactLang )
{
  if (window.top.mainFrame)
  {
    if (VEAMactLang == '')
    {
      VEAMactLang = '0';
    }
    //alert('sVEAML( '+VEAMactLang+' )');
    
    window.top.mainFrame.mcTx('a_lid', VEAMactLang );
    
  } else {
    alert ("lost mainFrame.\nno VisualEditAdminMode-Interface-support.               ");
  }
}

function tellVEAI( mtiid, coid, isGlossary, specialStr)
{
  //alert ("chk-ai-url:"+location.href);
  //alert ("chk-ai: "+window.top.mainFrame.DoCheckClose);
  //window.top.mainFrame.DoCheckClose = false;

  if (window.top.mainFrame)
  {
    window.top.mainFrame.tellVEAArgs( mtiid, coid, isGlossary, specialStr );
  } else {
    alert ("lost mainFrame.\nno VisualEditAdminMode-Interface-support.               ");
  }
}

function tellVEAMAbyStr( VEAMAction, VEAMAstr, VEAMA_prepObj)
{
  //alert ("chk-str: "+window.top.mainFrame.DoCheckClose);
  //window.top.mainFrame.DoCheckClose = false;

  confirmed = false;
  switch(VEAMAction)
  {
    case 'delset':
      if (confirm("Hiermit entfernen Sie den selektierten Absatz,                  \nwollen Sie das wirklich?\n\n"))
      {
        confirmed = true;
      }
    break;
    case 'delobj':
      if (confirm("Hiermit entfernen Sie das selektierte Objekt,                   \nwollen Sie das wirklich?\n\n"))
      {
        confirmed = true;
      }
    break;
    case 'chglayout':
        confirmed = true;
    break;
    case 'scratchpad':
        confirmed = true;
    break;
    case 'chgsi':
        confirmed = false;
        window.top.mainFrame.chgSortIndex( VEAMAstr );
    break;
    default:
      if (confirm("Durch OK quittieren Sie den Auftrag,                            \neinen neuen Punkt anzulegen.\n\n"))
      {
        confirmed = true;
      }
    break;
  }
  
  if (confirmed)
  {
    if (window.top.mainFrame)
    {
      /*window.top.mainFrame.VEAMAbyStr( VEAMAction, VEAMAstr ); */
      window.top.mainFrame.mcTx('VEAMA', VEAMAction );
      window.top.mainFrame.mcTx('VEAMAstr', VEAMAstr );
      window.top.mainFrame.mcTx('VEAMApO', VEAMA_prepObj+' ' );
      window.top.mainFrame.txForm.submit();

      //window.top.mainFrame.openModule("getobject", VEAMAction, VEAMAstr);
    } else {
      alert ("lost mainFrame.\nno VisualEditAdminMode-Interface-support.               ");
    }
  }

}

function chgVEAMboundary (id, doActivate)
{
  theBoundary = MM_findObj('VEAMboundary'+id);
  if (theBoundary)
  {
    if (doActivate)
    {
      theBoundary.style.border='1px dashed #022951';
      theBoundary.className = 'VEAMActiveBoundary';
    }
    else
    {
      theBoundary.style.border='0px dashed #022951';
      theBoundary.className = 'VEAMBoundary';
    }
  }
}

