<image> Uncle Zhang wants to enclose a rectangular flower bed$$.$$ One side of the flower bed uses a sufficiently long wall, while the other three sides are enclosed using a total length of $$32$$ meters of fencing$$.$$ The enclosed flower bed forms a rectangle $$ABCD$$ as shown in the figure$$.$$ Let the length of side $$AB$$ be $$x$$ meters$$.$$ The area of rectangle $$ABCD$$ is $$S$$ square meters$$.$$

$$(1)$$ Find the functional relationship between $$S$$ and $$x$$, and state the range of the variable $$x$$;
$$(2)$$ For what value of $$x$$ does $$S$$ achieve its maximum value? Also, find the maximum value?