// Copyright 2008 Google Inc.
// All Rights Reserved.
/**
  * @fileoverview Utility functions
  */
function validateShortcut(shortcut) {
  prohibited = [ "http://", "https://", "/", "?", "=" ];
    if (shortcut != "" && shortcut.length < 3 ) {
      alert("Shortcuts must be at least " + 3 + " characters");
        return false;
    }
    for (var i=0; i < prohibited.length; i++) {
      bad = prohibited[i];
      if (shortcut.indexOf(bad) != -1) {
        alert("Shortcuts cannot contain \"" + bad + "\"");
        return false;
      }
    }
  return true;
}
