/**********************************************************************************/
/*   ************************************************                             */
/*   * SGweb - BIBLIOTECA de funções em JavaScript **                             */
/*   ************************************************                             */
/**********************************************************************************/

function MenuCellClick(menu,opc){
  document.write("Clicked - " + menu +":"+opc);
}

function MenuCellOver(menu,cell){
  cell.style.backgroundColor = "green";
  //cell.style.borderColor = "red";
}

function MenuCellOut(menu,cell){
  cell.style.backgroundColor = "blue";
  //cell.style.fontColor = "white";
  //cell.style.borderColor = "";
}

function CheckMaxLength(textarea, event, onKeyUpFunc){
//Evita que um campo memo<textarea> tenha mais caracteres que o permitido.
//Utilização: onkeyup="return CheckMaxLength(this, event, null)"
  var maxlength = textarea.getAttribute ? parseInt(textarea.getAttribute("maxlength")) : "";
  if (textarea.getAttribute && textarea.value.length > maxlength)
     textarea.value = textarea.value.substring(0, maxlength);
  if (onKeyUpFunc != null) onKeyUpFunc(event);
}

