docs: function getValue(elementOrId)	// Returns the value of element of id 'id'.
  {
  	var element = getElement(elementOrId);
  	var tagName = element.tagName;
  
  	switch (tagName) {
  		case "INPUT":
  			switch (element.getAttribute("type")) {
  				case "checkbox":
  				case "radio":
  					return element.checked;
  					break;
  				default:
  					return element.value;
  					break;
  			}
  			break;
  		case "TEXTAREA":
  			return element.value;
  			break;
  		case "SELECT":
  			if (element.selectedIndex == -1)
  				return "";
  			else
  				return element.options[element.selectedIndex].value;
  			break;
  		case "OPTION":
  			return element.value;
  			break;
  		default:
  			return element.getAttribute(valueAttributeName);
  			break;
  	}
  }