function checkNoteNumber()
{
  var search_note = document.note_display._NNUM.value;
  var letter;
  
// Remove *blanks at the beginning and at the end

// input empty ?
  if (search_note.length == 0)
  {
    alert('Please specify a SAP Note number')
    return false;
  }
  else
  {
// input just numeric ?  
    for (var i = 0; i < search_note.length; i++) {
      letter = search_note.charAt(i)
      if (letter < '0' || letter > '9') {
         alert('Please specify a SAP Note number')
         return false;
      }
    }
    return true;
  }
}

function displayNote()
{
  var noteNumber = document.note_display._NNUM.value;
  var param = "menubar,location=yes,scrollbars,status,toolbar,resizable=yes";
  var url = "http://service.sap.com/~form/handler?_APP=01100107900000000342&_EVENT=DISPL_TXT&_NNUM="
  if (checkNoteNumber() == true)
  {
    newWindow =  window.open(url + noteNumber,"_blank",param);
    newWindow.focus();
  }
}


function fnErrorMessageGo() {
                  var error_url;
                  for (var i=0; i < document.ErrorMessage.error_url.length; i++) {
                    if (document.ErrorMessage.error_url[i].checked)
                      error_url = document.ErrorMessage.error_url[i].value + document.ErrorMessage.search.value;
                  }
                   top.m.location.href = error_url;
}

function fnDocSearchGo() {
                  var doc_url;
                  for (var i=0; i < document.DocSearch.doc_url.length; i++) {
                    if (document.DocSearch.doc_url[i].checked)
                      doc_url = document.DocSearch.doc_url[i].value + document.DocSearch.word.value;
                  }
                  top.m.location.href = doc_url;
}
