function gotoVote() {
	location.href = '/vote';
}

function checkPhotoUpload(fobj) {
	var ok2go	= true,
		err		= false,
		purl	= fobj.photourl.value.length,
		tlen	= fobj.phototitle.value.length,
		clen	= fobj.photocaption.value.length;
	
	if (purl < 1) {
		err = 'You must upload a photo';
	} else if (!checkboxWasChecked(fobj.parentalconsent)) {
		err = 'You must agree to the terms and conditions.';
		fobj.parentalconsent.focus();
	} else if (tlen < 1) {
		err = 'You must include a title';
		fobj.phototitle.focus();
	} else if (clen < 1) {
		err = 'You must include a description';
		fobj.photocaption.focus();
	}
	
	if (err) {
		alert(err);
		ok2go = false;
	}
	return ok2go;
}

function checkLogin(fobj) {
	var ok2go = isValidEmail(fobj.Email);
	if (!ok2go) { alert('Please enter a valid email address.'); }
	return ok2go;
}

function Hello() {
	alert('hi there');
}

function goChangePassword() {
	location.href = '/account?view=change_password';
}

function voteFor(kid,pid,forwinner) {
	location.href = '/vote_thanks?action=vote&KidID=' + kid + '&PhotoID=' + pid + '&forWinner=' + forwinner;
}


function imposeMaxLength(Object, MaxLen) {
  return (Object.value.length <= MaxLen);
}

