code: function(ancestor, child)
  	 {
  	 	var parent = child;
  	 	
  	 	while (parent != null)
  	 	{
  	 		if (parent == ancestor)
  	 		{
  	 			return true;
  	 		}
  
  	 		parent = parent.parentNode;
  	 	}
  	 	
  	 	return false;
  	 }
docs: Function: isAncestorNode
  
  Returns true if the given ancestor is an ancestor of the
  given DOM node in the DOM. This also returns true if the
  child is the ancestor.
  
  Parameters:
  
  ancestor - DOM node that represents the ancestor.
  child - DOM node that represents the child.