var profFollowId = 0;
function profFollow(profId) {
	profFollowId = profId;
	new Ajax.Request("/data/prof_follow.php?pid=" + profId, {onSuccess: profFollowDraw});
}
function profFollowDraw(t) {
	tmpResponse = t.responseText;
	if (tmpResponse == "//followed//") {
		alertBubbleAdd("You are now following this professional.");
	} else {
		alertBubbleAdd("You are no longer following this professional.");
	}
}
function profEditPop (profUrl) {
	window.open(profUrl, 'mu', 'height=600,width=700');
}

function loadRatingStars (storyId) {
	new Ajax.Updater("storyRating", "/data/story_stars.php?sid=" + storyId);
}
function writeRatingStars (storyId, starRating) {
	new Ajax.Updater("storyRating", "/data/story_stars.php?sid=" + storyId + "&rs=" + starRating + "&ax=do");
}
function showRatingStars (stars) {
	var totalStars = 5;
	var i = 1;
	while (i <= totalStars) {
		if (i <= stars) {
			$("dynRateStar"+i).src = "/images/icon_star_over.png";
		} else {
			$("dynRateStar"+i).src = "/images/icon_star_off.png";
		}
		i++;
	}
}
