Here is a compact solution to the problem:
function Title_Case(phrase)
{
var revised = phrase.charAt(0).toUpperCase();
for ( var i = 1; i < phrase.length; i++ ) {
if (phrase.charAt(i - 1) == " ") {
revised += phrase.charAt(i).toUpperCase(); }
else {
revised += phrase.charAt(i).toLowerCase(); }
}
return revised;
}