//
// FBF.js
//
// Author: Rob Campbell
// Created: 04/09/2006
// Version: 1.1
//
// PURPOSE
// -------
// 	Holds all of the JavaScript functions that are specific to the Points 
//	of View portal function pages.
//
// 
// HISTORY
// -------
// 04/09/2006 1.0 RHC	File Created.
// 04/12/2006	1.1	SB	Added in the goToReportComments function.
//

ns6 = (document.getElementById)? true:false
ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false

// GLOBALS
// *******


// ****************************************************************************
// NAVIGATION PAGE FUNCTIONS
// ****************************************************************************

// ***************
// goToAddComments
// ***************
// INPUTS
//  NONE
//
// OUTPUTS
//	NONE
//
// PURPOSE
//  Submits a form which takes the user to the AddComments page.
//	
//  
function goToAddComments()
{
	var formObject = document.forms['addCommentsForm'];

	formObject.submit();	
}

// ***********
// goToArticle
// ***********
// INPUTS
//  NONE
//
// OUTPUTS
//	NONE
//
// PURPOSE
//  Submits a form which takes the user back to the Article they came from.
//	
//  
function goToArticle()
{
	var formObject = document.forms['backToArticleForm'];

	formObject.submit();	
}


// ******************
// goToReportComments
// ******************
// INPUTS
//  formID			the ID of the form that will be submitted
//	commentID		the full Athens path to the comment being reported
//
// OUTPUTS
//	NONE
//
// PURPOSE
//  Submits a form which reports a comment to a defined list of moderators.
//	
//  
function goToReportComments(formID,commentID)
{
	var formObject = document.forms[formID];

	//alert('commentID [' + commentID + ']');
	// Set the commentPath form field to have the value that we pass in
	//
	formObject.commentPath.value = commentID;
	//alert('formObject.commentPath.value [' + formObject.commentPath.value + ']');
	formObject.submit();	
}
