
// Forum Functions
// incForumFunctions.js

function chgOrder(Show){

   	strShow = escape(Show.options[Show.selectedIndex].value);

   	if (Show != '') self.location.href = 'forum_posts.asp?TID=2&PD=' + strShow + '';
	return true;
}


function ShowTopics(Show){
   	strShow = escape(Show.options[Show.selectedIndex].value);
   	if (Show != '') self.location.href = 'forum_topics.asp?FID=<% = intForumID %>&TS=' + strShow + '<% = strQsSID2 %>';
	return true;
}


//Function to check form is filled in correctly before submitting
function CheckForm () {

	var errorMsg = "";
	var formArea = document.getElementById('frmMessageForm');

	//Check for a member name
	if ((formArea.member.value=="") && (formArea.selectMember.value=="")){
		errorMsg += "\n\tNo Name Specified!";
	}

	//Check for a subject
	if (formArea.subject.value==""){
		errorMsg += "\n\tNo Subject!";
	}

	//Check for message
	if (formArea.message.value==""){
		errorMsg += "\n\tNo Message!";
	}

	//If there is aproblem with the form then display an error
	if (errorMsg != ""){
		errorMsg += alert(msg + errorMsg + "\n\n");
		return false;
	}

	return true;
}
