code: 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;
  	}
  }
docs: /*
  function fetchCasts(id) {
  var root = getElement(id);
  var node = root.firstChild;
  var cont = true;
  var candidate;
  var digests = "";
  
  if (node == null)
  cont = false;
  
  while (cont) {
  if (node.nodeType == Node.ELEMENT_NODE) {
  if (node.hasAttribute(castAttributeName)) {
  digests += "(" + getOrGenerateId(node) + "|" + node.getAttribute(castAttributeName) + ")|";
  node.removeAttribute( castAttributeName );
  }
  
  if (node.hasAttribute(castsAttributeName)) {
  digests += "(" + getOrGenerateId(node) + "|(" + node.getAttribute(castsAttributeName) + "))|";
  node.removeAttribute( castsAttributeName );
  }
  }
  
  if ((candidate = node.firstChild) == null) {
  while (cont
  && ((candidate = node.nextSibling) == null)) {
  node = node.parentNode;
  
  if (node.isEqualNode(root))
  cont = false;
  }
  }
  
  node = candidate;
  }
  
  return digests;
  }