function LoadForum(nForumId) {
	window.location=serverwebpath+pagepath + "&ForumId=" + nForumId;
}

function LoadThread(nForumId, nThreadId) {
	window.location=serverwebpath+pagepath + "&ForumId=" + nForumId + "&ThreadId=" + nThreadId;
}

function LoadThread_Highlight(nForumId, nThreadId, cHighlight) {
	window.location=serverwebpath+pagepath + "&ForumId=" + nForumId + "&ThreadId=" + nThreadId + "&Highlight=" + cHighlight;
}

function LoadForumsMain() {
	window.location=serverwebpath+pagepath;
}

function AddThread(nForumId) {
	window.location=serverwebpath+pagepath + "&ForumId=" + nForumId + "&AddThread=True";
}

function EditThread(nForumId, nThreadId) {
	window.location=serverwebpath+pagepath + "&ForumId=" + nForumId + "&ThreadId=" + nThreadId + "&EditThread=True";
}

function AddForum(nForumId) {
	window.location=serverwebpath+pagepath + "&ForumId=" + nForumId + "&AddForum=True";
}

function EditForum(nForumId) {
	window.location=serverwebpath+pagepath + "&ForumId=" + nForumId + "&EditForum=True";
}

function AddMessage(nForumId, nThreadId) {
	window.location=serverwebpath+pagepath + "&ForumId=" + nForumId + "&ThreadId=" + nThreadId + "&AddMessage=True";
}

function ForumPage(nForumId, nPageNo) {
	window.location=serverwebpath+pagepath + "&ForumId=" + nForumId + "&PageNo=" + nPageNo;
}

function ThreadPage(nForumId, nThreadId, nPageNo) {
	window.location=serverwebpath+pagepath + "&ForumId=" + nForumId + "&ThreadId=" + nThreadId + "&PageNo=" + nPageNo;
}

function QuoteMessage(nForumId, nThreadId, nPostId) {
	window.location=serverwebpath+pagepath + "&ForumId=" + nForumId + "&ThreadId=" + nThreadId + "&PostId=" + nPostId + "&AddMessage=True";
}

function ReadQuotedMessage(nForumId, nThreadId, nPostId, nMsgPerPage) {
	//
	var nPage = 0; 
	nPage = Math.ceil(nPostId / nMsgPerPage);
	//alert(nPage);
	window.location=serverwebpath+pagepath + "&ForumId=" + nForumId + "&ThreadId=" + nThreadId + "&PageNo=" + nPage + "#Post_" + nPostId;
}

function AddSmiley(oTxtBox, cTagString) {
	oTxtBox.value = oTxtBox.value + cTagString;
}

function Format_Bold(oTxtBox) {
	oTxtBox.value = oTxtBox.value + '[b][/b]';
}

function Format_Italic(oTxtBox) {
	oTxtBox.value = oTxtBox.value + '[em][/em]';
}

function Format_Underline(oTxtBox) {
	oTxtBox.value = oTxtBox.value + '[u][/u]';
}

function Format_Link(oTxtBox,oLink) {
	oTxtBox.value = oTxtBox.value + '[link=' + oLink.value + '\\][/link]';
}

function Format_Image(oTxtBox,oImage) {
	oTxtBox.value = oTxtBox.value + '[img=' + oImage.value + '\\]';
}

function AddAvatar(nId) {
	window.location=serverwebpath+pagepath + "&SetAvatar=" + nId;
}

function Smiley() {

}

function EditMessage(nForumId, nThreadId, nMessageId) {
	window.location=serverwebpath+pagepath + "&ForumId=" + nForumId + "&ThreadId=" + nThreadId + "&MessageId=" + nMessageId + "&EditMessage=True";
}

function ReadPMs() {
	window.location = serverwebpath+pagepath + "&ReadPMs=True";
}

function ReadPM(nPMId) {
	window.location = location.search + "&ReadPMId=" + nPMId;
}

function Settings() {
	window.location = serverwebpath+pagepath + "&ConfigureForumSettings=True";
}

function SentPMs() {
	window.location = serverwebpath+pagepath + "&SentPMs=True";
}

function SendNewPM() {
	window.location = serverwebpath+pagepath + "&SendPM=True";
}

function SendPM(nToUser, nPageId) {
	window.location = serverwebpath+ "Default.aspx?PageId=" + nPageId + "&SendPM=True&ToUser=" + nToUser;
}

function ReplyPM(nToUser,cSubj,nPMId) {
	window.location = serverwebpath+pagepath + "&SendPM=True&ToUser=" + nToUser + "&IsReply=" + nPMId + "&Subj=" + cSubj;
}

function LogIn(nPageId) { 
	window.location = serverwebpath + "Default.aspx?PageId=" + nPageId;
}

function LogOut() {
	window.location = serverwebpath+pagepath + "&Logout=True";
}

function PMMain() {
	window.location=serverwebpath+pagepath;
}

function setForum(nId) {
	if (nId != 0) {
		document.getElementById('chkForum' + nId).checked = true;
	} else {
		document.Form1.chkRoot.checked = true;
	}
}

function GoTo(nPageId) { 
	window.location = serverwebpath + "Default.aspx?PageId=" + nPageId;
}

function Search() {
	
}
