
function validateAdd(objForm) {
	if (objForm.con_image.value == "") {
		alert("Please select an image to upload.");
		return false;
	} else if (objForm.con_title.value == "") {
		alert("Please enter a caption for your image.");
		return false;
	} else if (objForm.con_agree.checked == false) {
		alert("To submit your photo, you must agree to the statement.");
		return false;
	} else {
		return true;	
	}
}

function scoreBelief(score) {
	document.images['score_image'].useMap = "";
	document.images['score_image'].src = "rate.php?id=" + id + "&score=" + score;
	document.images['score_image'].style.cursor = "default";
	voted = true;
}

function sendToFriend() {
	window.open(stf + "?id=" + id,'',"scrollbars=no,height=500,width=450,resizable=yes,toolbar=no,location=no");
}

s0 = new Image();
s0.src = "images/yellow_stars/0.gif";
s1 = new Image();
s1.src = "images/yellow_stars/1.gif";
s2 = new Image();
s2.src = "images/yellow_stars/2.gif";
s3 = new Image();
s3.src = "images/yellow_stars/3.gif";
s4 = new Image();
s4.src = "images/yellow_stars/4.gif";
s5 = new Image();
s5.src = "images/yellow_stars/5.gif";
voted = false;

function rateOver(n) {
	if (!voted) {
		document.images['score_image'].src = eval('s' + n).src;
	}
}

function rateOut() {
	if (!voted) {
		document.images['score_image'].src = s0.src;
	}
}