/*	
	======================================================================
	
	javascript/community/forum/topic.js

	======================================================================
	Copyright 2006, 2005, 2004 FQXi
	======================================================================
*/


	/////////////////////////////////////////////////////////
	//
	//  FUNCTION:  Check_AntiSpam_Menu
	//
	/////////////////////////////////////////////////////////
	
 		function Check_AntiSpam_Menu (antiSpamMenuID, correctIndex) {
 		
 			if (Select_Menu_Value (antiSpamMenuID) == correctIndex) {
 			
 				return true;
 			}
 			
 			else {
 			
 				alert ("Please follow the instructions above the submit button.");
 				
 				return false;
 			}
 		}
 

	/////////////////////////////////////////////////////////
	//
	//  FUNCTION:  Confirm_Essay_Vote
	//
	/////////////////////////////////////////////////////////
	
 		function Confirm_Essay_Vote () {

			f = document.ratingForm;
			
			currentRating = f.rating.value;
			
			confirmText = "Are you sure that you want to give this essay a rating of " + currentRating + "?";

			if (confirm (confirmText)) {
				
				f.submit ();
			}
 		}
 		
 
	/////////////////////////////////////////////////////////
	//
	//  FUNCTION:  Add_Reply
	//
	/////////////////////////////////////////////////////////
	
 		function Add_Reply (processingScript, replyDivID) {
 		
 			var ajaxRequestString = processingScript + "?replyDivID=" + replyDivID;
 			
 			AJAX_Make_Request (ajaxRequestString);
 		}


	/////////////////////////////////////////////////////////
	//
	//  FUNCTION:  Show_Rating_Div
	//
	/////////////////////////////////////////////////////////
	
 		function Show_Rating_Div () {
 		
 			ShowDiv ('ratingDiv');

 			HideDiv ('showRatingDiv');
 		}


	/////////////////////////////////////////////////////////
	//
	//  FUNCTION:  Hide_Rating_Div
	//
	/////////////////////////////////////////////////////////
	
 		function Hide_Rating_Div () {
 		
 			HideDiv ('ratingDiv');

 			ShowDiv ('showRatingDiv');
 		}

 		
 	/////////////////////////////////////////////////////////
	//
	//  FUNCTION:  Enstub_Post
	//
	/////////////////////////////////////////////////////////

 		function Enstub_Post (postNum) {
 		
 			var wholePostID = 'post_whole_' + postNum;
 		
 			var stubbyPostID = 'post_stubby_' + postNum;
 		
 			HideDiv (wholePostID);

 			ShowDiv (stubbyPostID);
 		}

 		
 	/////////////////////////////////////////////////////////
	//
	//  FUNCTION:  Destub_Post
	//
	/////////////////////////////////////////////////////////
	
 		function Destub_Post (postNum) {
 		
 			var wholePostID = 'post_whole_' + postNum;
 			
 			var stubbyPostID = 'post_stubby_' + postNum;
 		
 			ShowDiv (wholePostID);

 			HideDiv (stubbyPostID);
 		}



 
