var actionWanted = "";
var StorePage;


function jsHideElement(jsElementName) {
    if (document.getElementById(jsElementName) != null) {
        document.getElementById(jsElementName).style.display = 'none';
    }
    else {
        if (document.getElementById("txtCurrentError") != null) {
            document.getElementById("txtCurrentError").value = 'Error: jsHideElement(' + jsElementName + ');';
        }
    }
}
function jsShowElement(jsElementName) {
    if (document.getElementById(jsElementName) != null) {
        document.getElementById(jsElementName).style.display = '';
    }
    else {
        if (document.getElementById("txtCurrentError") != null) {
            document.getElementById("txtCurrentError").value = 'Error: jsShowElement(' + jsElementName + ');';
        }
    }
}

function startTinyMCE2(){
    tinyMCE.init({
        mode: "textareas",
        theme: "advanced",
        editor_selector: "content",
        theme_advanced_buttons1: "bold,italic,underline,separator,strikethrough,justifyleft,justifycenter,justifyright, justifyfull,bullist,numlist,undo,redo,link,unlink",
        theme_advanced_buttons2: "",
        theme_advanced_buttons3: "",
        theme_advanced_toolbar_location: "top",
        theme_advanced_toolbar_align: "left",
        theme_advanced_statusbar_location: "bottom",
        theme_advanced_blockformats: "li",
        theme_advanced_resizing: true,
        theme_advanced_resize_horizontal: false,
        content_css: "/defaultie.css",
        paste_auto_cleanup_on_paste: true,
        extended_valid_elements: "hr1[],hr2[],hr3[],em[],strong[],font[],script[],p[],li[],span[style],div[],ul[],table[align]"
    });}


function SaveProfile(){
    if (document.getElementById("chkShowJob").checked ==  true){
        jsJob = "1";}
    else{
        jsJob = "0";}
    if (document.getElementById("chkShowCompany").checked ==  true){
        jsComp = "1";}
    else{
        jsComp = "0";}
    xmlHttp3x = GetXmlHttpObject();
    url = "/forum-save-profile.aspx?job=" + encodeURIComponent(document.getElementById("txtJobTitle").value) + "&company=" + encodeURIComponent(document.getElementById("txtCompanyName").value) + "&showjob=" + jsJob + "&showcompany=" + jsComp + "&sid=" + Math.random();
    xmlHttp3x.onreadystatechange=SaveProfile2;
    xmlHttp3x.open("GET", url, true);
    xmlHttp3x.send(null);}

function LoadProfile(){
    xmlHttp3x = GetXmlHttpObject();
    url = "/forum-getProfile.aspx?sid=" + Math.random();
    xmlHttp3x.onreadystatechange=LoadProfile2;
    xmlHttp3x.open("GET", url, true);
    xmlHttp3x.send(null);}

function LoadProfile2(){
    if (xmlHttp3x.readyState==4 || xmlHttp3x.readyState=="complete"){
        varRequestChunk2 =xmlHttp3x.responseText;
        jsIndex = varRequestChunk2.indexOf('##@', 0);
		jsValue = varRequestChunk2.substring(0,jsIndex);
		varRequestChunk2 = varRequestChunk2.substring(jsIndex + 3);
		document.getElementById("txtJobTitle").value = jsValue;
        jsIndex = varRequestChunk2.indexOf('##@', 0);
		jsValue = varRequestChunk2.substring(0,jsIndex);
		varRequestChunk2 = varRequestChunk2.substring(jsIndex + 3);
        if (jsValue == "0"){
            document.getElementById("chkShowJob").checked = false;}
        else{
            document.getElementById("chkShowJob").checked = true;}
        jsIndex = varRequestChunk2.indexOf('##@', 0);
    	jsValue = varRequestChunk2.substring(0,jsIndex);
    	varRequestChunk2 = varRequestChunk2.substring(jsIndex + 3);
    	document.getElementById("txtCompanyName").value = jsValue;
        jsIndex = varRequestChunk2.indexOf('##@', 0);
    	jsValue = varRequestChunk2.substring(0,jsIndex);
    	varRequestChunk2 = varRequestChunk2.substring(jsIndex + 3);
        if (jsValue == "0"){
            document.getElementById("chkShowCompany").checked = false;}
        else{
            document.getElementById("chkShowCompany").checked = true;}}}

function MessageEditor(){
    xmlHttp3f = GetXmlHttpObject();
    url = "/forum-islogin.aspx?sid=" + Math.random();
    xmlHttp3f.onreadystatechange=MessageEditor2;
    xmlHttp3f.open("GET", url, true);
    xmlHttp3f.send(null);}

function MessageEditor2(){
    if (xmlHttp3f.readyState==4 || xmlHttp3f.readyState=="complete"){
        varRequestChunk =xmlHttp3f.responseText;
        if (varRequestChunk == "yes"){
            jsShowElement("postmessage");
startTinyMCE2();
}
        if (varRequestChunk == "success-need-username"){
            if (document.getElementById('forumusername') != null){
                alert("You're logged in, however for privacy reasons, you'll have to change your username from an email address. Your username will be posted on the forum along with comments. You will be able to log into the website afterwards with either your email address or contactcenterworld.com username.");
                jsShowElement("forumusername");
                document.getElementById('txtUsername').focus();}}
        if (varRequestChunk == "success-need-profile"){
            jsShowElement("personalProfile");
            alert("Please complete your profile, before you continue");
            actionWanted = "open-editor"; 
            LoadProfile();}
        if (varRequestChunk == "no"){
            alert("please login or register");
            actionWanted = "open-editor";
            jsShowElement("forumlogin");
            document.getElementById('usr2').focus();}
        ReloadForum("1", "1");}}








        function SelectVote(){
            jsShowElement("spanSubVoteButton");

        }





        function ForumSubVote() {
            xmlHttp3f = GetXmlHttpObject();
            url = "/forum-islogin.aspx?sid=" + Math.random();
            xmlHttp3f.onreadystatechange = ForumSubVote2;
            xmlHttp3f.open("GET", url, true);
            xmlHttp3f.send(null);
        }
        function ForumSubVote2() {
            if (xmlHttp3f.readyState == 4 || xmlHttp3f.readyState == "complete") {
                jsHideElement("spanSubVoteButton");
                varRequestChunk = xmlHttp3f.responseText;
                if (varRequestChunk == "yes") {
                    jsHideElement("forumlogin");
                    jsVoteItem = "";
                    jsVoteItems = 0;
                    while (jsVoteItems < document.getElementById("txtTotalVoteItems").value) {
                        jsVoteItems = jsVoteItems + 1;
                        if (document.getElementById("rdbVote" + jsVoteItems).checked == true) {
                            jsVoteItem = document.getElementById("rdbVote" + jsVoteItems).value;
                        }
                    }
                    if (jsVoteItem != "") {
                        xmlFVote = GetXmlHttpObject();
                        url = "/forum-vote.aspx?vid=" + jsVoteItem + "&sid=" + Math.random();
                        xmlFVote.onreadystatechange = ForumSubVote3;
                        xmlFVote.open("GET", url, true);
                        xmlFVote.send(null);
                    }

                }
                else {
                    jsVoteItems = 0;
                    while (jsVoteItems < document.getElementById("txtTotalVoteItems").value) {
                        jsVoteItems = jsVoteItems + 1;
                        if (document.getElementById("rdbVote" + jsVoteItems).checked == true) {
                            document.getElementById("rdbVote" + jsVoteItems).checked = false;
                        }
                    }
                
                }
                if (varRequestChunk == "success-need-username") {
                    alert("You're logged in, however for privacy reasons, you'll have to change your username from an email address. Your username will be posted on the forum along with comments. You will be able to log into the website afterwards with either your email address or contactcenterworld.com username.");
                    jsShowElement("forumusername");
                    document.getElementById('txtUsername').focus();
                }
                if (varRequestChunk == "success-need-profile") {
                    jsShowElement("personalProfile");
                    alert("Please complete your profile, before you continue");
                    actionWanted = "open-editor";
                    LoadProfile();
                }
                if (varRequestChunk == "no") {
                    alert("please login or register");
                    //actionWanted = "vote";
                    jsShowElement("forumlogin");
                    jsHideElement("forumusername");
                    document.getElementById('usr2').focus();
                    //ReloadTopics('1', '1');
                }
            }
        }
        function ForumSubVote3() {
            if (xmlFVote.readyState == 4 || xmlFVote.readyState == "complete") {
                varRequestChunk = xmlFVote.responseText;

                if (varRequestChunk == "complete") {
                //zzzzzzzzzzzz
                    //PostMessage();
                    //txtVoteComments
                    if (document.getElementById("txtVoteComments").value != "") {



                        xmlHttp3f = GetXmlHttpObject();
                        url = "/forum-post.aspx";
                        params = "reply=" + document.getElementById('txtReplyID').value + "&message=" + encodeURIComponent(document.getElementById("txtVoteComments").value) + "&forumid=" + document.getElementById('txtForumID').value + "&sid=" + Math.random();
                        xmlHttp3f.onreadystatechange = PostMessage2;
                        xmlHttp3f.open("POST", url, true);
                        xmlHttp3f.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
                        xmlHttp3f.setRequestHeader("Content-length", params.length);
                        if (!document.all) {
                            xmlHttp3f.setRequestHeader("Connection", "close");
                        }
                        xmlHttp3f.send(params);


                        document.getElementById("txtVoteComments").value = "";
                    }

                    alert("Thanks for your vote!");
                    ReloadForum('1', '1');
                }
                if (varRequestChunk == "already voted") {
                    alert("Sorry, your vote has already been submitted");
                    ReloadForum('1', '1');
                }
                if (varRequestChunk == "no vote") {
                    alert("nv-error");
                }
                if (varRequestChunk == "no vid") {
                    alert("vid error");
                }
            }
        }





function TopicEditor(){
    xmlHttp3f = GetXmlHttpObject();
    url = "/forum-islogin.aspx?sid=" + Math.random();
    xmlHttp3f.onreadystatechange=TopicEditor2;
    xmlHttp3f.open("GET", url, true);
    xmlHttp3f.send(null);}

function TopicEditor2(){
    if (xmlHttp3f.readyState == 4 || xmlHttp3f.readyState == "complete") {

        varRequestChunk = xmlHttp3f.responseText;
        if (varRequestChunk == "yes") {
            jsHideElement("forumlogin");
            jsShowElement("posttopic");
            startTinyMCE2();
        }


        if (varRequestChunk == "success-need-username"){
            alert("You're logged in, however for privacy reasons, you'll have to change your username from an email address. Your username will be posted on the forum along with comments. You will be able to log into the website afterwards with either your email address or contactcenterworld.com username.");
            jsShowElement("forumusername");
            document.getElementById('txtUsername').focus();}
        if (varRequestChunk == "success-need-profile"){
            jsShowElement("personalProfile");
            alert("Please complete your profile, before you continue");
            actionWanted = "open-editor"; 
            LoadProfile();}
        if (varRequestChunk == "no"){
            alert("please login or register");
            actionWanted = "open-editor";
            jsShowElement("forumlogin");
            jsHideElement("forumusername");
            document.getElementById('usr2').focus();}
        ReloadTopics('1', '1');}}

function Login(){
    url = "/ajaxLogin.aspx";
    params = "usr2=" + encodeURIComponent(document.getElementById('usr2').value) + "&pwd2=" + encodeURIComponent(document.getElementById('pwd2').value) + "&sid=" + Math.random();
    xmlHttp7=GetXmlHttpObject();
    xmlHttp7.onreadystatechange=Login2;
    xmlHttp7.open("POST",url,true);
    xmlHttp7.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
    xmlHttp7.setRequestHeader("Content-length", params.length);
    if(!document.all) {
        xmlHttp7.setRequestHeader("Connection", "close");}
    xmlHttp7.send(params);
}

function Login2() {
    if (xmlHttp7.readyState == 4 || xmlHttp7.readyState == "complete") {
        varRequestChunk = xmlHttp7.responseText;
        RefreshTemplateLogin();
        if (varRequestChunk == "success-need-username") {
            jsHideElement("forumlogin");
            if (document.getElementById('forumusername') != null) {
                alert("You're logged in, however for privacy reasons, you'll have to change your username from an email address. Your username will be posted on the forum along with comments. You will be able to log into the website afterwards with either your email address or contactcenterworld.com username.");
                jsShowElement("forumusername");
                document.getElementById('txtUsername').focus();
            } 
        }
        if (varRequestChunk == "success") {
            jsHideElement("forumlogin");
            if (actionWanted == "") {
                alert("You're logged in. You can now create topics and post messages on forums.");
            }

            if (actionWanted == "post-topic") {
                alert("You're logged in. You can now edit your message before deciding to post it on this forum.");
            }


            if (actionWanted == "open-editor") {
                alert("You're logged in. You can now create topics and post messages on forums.");

                if (document.getElementById('posttopic') != null) {

                    TopicEditor();
                }

                if (document.getElementById('postmessage') != null) {
                    MessageEditor();
                } 
            } 
        }
        if (varRequestChunk == "fail") {
            alert("Login Failed.");
        }
        if (varRequestChunk == "need-profile") {
            jsHideElement("forumlogin");
            jsShowElement("personalProfile");
            alert("You're logged in. You must now decide what personal information you want accessible on the forum pages before continuing.");
            LoadProfile();
        } 
    } 
}

function DeleteTopic(mid){
    xmlHttp9 = GetXmlHttpObject();
    url = "/forum-delete.aspx?tid=" + mid + "&sid=" + Math.random();
    xmlHttp9.onreadystatechange=DeleteTopic2;
    xmlHttp9.open("GET", url, true);
    xmlHttp9.send(null);}

function DeleteTopic2(){
    if (xmlHttp9.readyState==4 || xmlHttp9.readyState=="complete"){
        ReloadTopics('1', '1');
    	ReloadNavigation('1');}}

function DeleteMessage(mid){
    xmlHttp9 = GetXmlHttpObject();
    url = "/forum-delete.aspx?mid=" + mid + "&sid=" + Math.random();
    xmlHttp9.onreadystatechange=DeleteMessage2;
    xmlHttp9.open("GET", url, true);
    xmlHttp9.send(null);}

function DeleteMessage2(){
    if (xmlHttp9.readyState==4 || xmlHttp9.readyState=="complete"){
    	ReloadForum("1", "1");}}

function GetReply(replyid){
    xmlHttp2 = GetXmlHttpObject();
    url = "/forum-get-reply-text.aspx?id=" + replyid + "&sid=" + Math.random();
    xmlHttp2.onreadystatechange=GetReply2;
    xmlHttp2.open("GET", url, true);
    xmlHttp2.send(null);}        
function GetReply2(){
    if (xmlHttp2.readyState==4 || xmlHttp2.readyState=="complete"){
        varRequestChunk =xmlHttp2.responseText;
        document.getElementById('replymessage').innerHTML = varRequestChunk;}}  

function ReplyMessage(replyid){
    GetReply(replyid);
    document.getElementById('txtReplyID').value = replyid;

    if (replyid != "") {
        jsShowElement("spanPostReply");
    }
    MessageEditor();}

function ReloadForum2(){
    if (xmlHttp4.readyState==4 || xmlHttp4.readyState=="complete"){
        varRequestChunk =xmlHttp4.responseText;
        document.getElementById('forum-posts').innerHTML = varRequestChunk;
        if (document.getElementById('forum-posts2') != null){
            document.getElementById('forum-posts2').innerHTML = "";}}
    else{
        if (document.getElementById('forum-posts2') != null){
            document.getElementById('forum-posts2').innerHTML = '<img src="/images/ajax-loading.gif">';}}}

function PostMessage() {
    XHTMLContent = tinyMCE.activeEditor.getContent();
    if (XHTMLContent != ""){
        xmlHttp3f = GetXmlHttpObject();
        url = "/forum-post.aspx";
        params = "reply=" + document.getElementById('txtReplyID').value + "&message=" + encodeURIComponent(XHTMLContent) + "&forumid=" + document.getElementById('txtForumID').value + "&sid=" + Math.random();
        xmlHttp3f.onreadystatechange=PostMessage2;
        xmlHttp3f.open("POST",url,true);
        xmlHttp3f.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        xmlHttp3f.setRequestHeader("Content-length", params.length);
        if(!document.all) {
            xmlHttp3f.setRequestHeader("Connection", "close");}
        xmlHttp3f.send(params);}
    else{
        alert("please type a message, before you add it2");}}

function PostMessage2(){
    if (xmlHttp3f.readyState==4 || xmlHttp3f.readyState=="complete"){
        varRequestChunk = xmlHttp3f.responseText;
        if (varRequestChunk == "yes"){
            jsHideElement("forumlogin");
            jsHideElement("postmessage");
            document.getElementById('replymessage').innerHTML = '';
            document.getElementById('txtReplyID').value = '';
            jsHideElement("spanPostReply");
            tinyMCE.activeEditor.setContent('');}
        if (varRequestChunk == "login"){
            alert("please login or register");
            actionWanted == "post-message";
            jsShowElement("forumlogin");
            document.getElementById('usr2').focus();}
        if (varRequestChunk == "empty"){
            alert("please type a message, before you add it");}
        ReloadForum("1", "1");}}

function SaveProfile2(){
        if (xmlHttp3x.readyState==4 || xmlHttp3x.readyState=="complete"){
            jsHideElement("personalProfile");
            if (actionWanted == "open-editor"){
		if (document.getElementById('posttopic') != null){
                	TopicEditor();}
		if (document.getElementById('postmessage') != null){
			MessageEditor();}}}}



function UpdateUsername(){
    xmlHttp9 = GetXmlHttpObject();
    url = "/forum-check-username.aspx?username=" + encodeURIComponent(document.getElementById('txtUsername').value) + "&sid=" + Math.random();
    xmlHttp9.onreadystatechange=UpdateUsername2;
    xmlHttp9.open("GET", url, true);
    xmlHttp9.send(null);}

function UpdateUsername2(){
    if (xmlHttp9.readyState==4 || xmlHttp9.readyState=="complete"){
        varRequestChunk =xmlHttp9.responseText;
        if (varRequestChunk == "empty"){
            alert("You must type a new username, before updating.");
            document.getElementById('txtUsername').focus();}
        if (varRequestChunk == "email"){
            alert("Your username is in the format of an email address. Your username must be alpha-numeric and not contain any special characters such as '@'");
            document.getElementById('txtUsername').focus();}
        if (varRequestChunk == "alphanumeric"){
            alert("Your username must be alphanumeric and must not contain any characters outside of a-z and 0-9, except for periods, dashes and underscores");
            document.getElementById('txtUsername').focus();}
        if (varRequestChunk == "success"){
            alert("Your username has been successfully changed.");
            jsHideElement("forumusername");
            if (actionWanted == "open-editor"){
                if (document.getElementById('posttopic') != null){
                	TopicEditor();}
        		if (document.getElementById('postmessage') != null){
        			MessageEditor();}
        		}}
        if (varRequestChunk == "taken"){
            alert("Sorry, the username you chose has already been taken. Please try again");
            document.getElementById('txtUsername').focus();}}}

function ReloadForum3(){
	if (xmlHttpfr.readyState==4 || xmlHttpfr.readyState=="complete"){
		varRequestChunk =xmlHttpfr.responseText;
		if (varRequestChunk == "yes"){
			if (document.getElementById('posttopic') != null){
			ReloadTopics(StorePage , "1");}
			if (document.getElementById('postmessage') != null){
			ReloadForum("1", "1");}
		}
	}
}

function ReloadNavigation(page){
	xmlHttpNav = GetXmlHttpObject();

	if (document.getElementById('postmessage') != null){
	url = "/forum-get-navigation.aspx?page=" + page + "&id=" + document.getElementById('txtForumID').value + "&sid=" + Math.random();}
	if (document.getElementById('posttopic') != null){
	url = "/forum-get-topic-navigation.aspx?page=" + page + "&forumid=" + document.getElementById('txtForumID').value + "&sid=" + Math.random();
	if (typeof jsMaxT != "undefined"){
	if (jsMaxT != null){
		url = url + "&maxt=" + jsMaxT;}
	}}

	xmlHttpNav.onreadystatechange=ReloadNavigation2;
	xmlHttpNav.open("GET", url, true);
	xmlHttpNav.send(null);}

function ReloadNavigation2(){
	if (xmlHttpNav.readyState==4 || xmlHttpNav.readyState=="complete"){
		if (document.getElementById('posttopic') != null){
		document.getElementById('topic-navigation').innerHTML = xmlHttpNav.responseText;
		document.getElementById('topic-navigation-bottom').innerHTML = xmlHttpNav.responseText;}

		if (document.getElementById('postmessage') != null){
		document.getElementById('forum-navigation').innerHTML = xmlHttpNav.responseText;
		document.getElementById('forum-navigation-bottom').innerHTML = xmlHttpNav.responseText;}


}}

function PostTopic(){
    XHTMLTopic = document.getElementById('txtTopic').value;
    XHTMLMessage = tinyMCE.activeEditor.getContent();
    if ((XHTMLTopic != "") && (XHTMLMessage != "")){
        xmlHttp3f = GetXmlHttpObject();
        url = "/forum-topic-post.aspx";
        params = "topic=" + encodeURIComponent(XHTMLTopic) + "&message=" + encodeURIComponent(XHTMLMessage) + "&forumid=" + document.getElementById('txtForumID').value + "&sid=" + Math.random();

        xmlHttp3f.onreadystatechange=PostTopic2;
        xmlHttp3f.open("POST",url,true);
        xmlHttp3f.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        xmlHttp3f.setRequestHeader("Content-length", params.length);
        if(!document.all) {
            xmlHttp3f.setRequestHeader("Connection", "close");}
        xmlHttp3f.send(params);}
    else{
        alert("please include both a Topic Title and a Message, before you complete your posting.");
        document.getElementById('txtTopic').focus();}}
function PostTopic2(){
    if (xmlHttp3f.readyState==4 || xmlHttp3f.readyState=="complete"){
        varRequestChunk =xmlHttp3f.responseText;
	if (varRequestChunk == "double"){
		alert("Sorry. Your post seems to be repetative as may be an accidental double-posting. Please review your posting details.");
	}

        if (varRequestChunk == "yes"){
            jsHideElement("forumlogin");
            jsHideElement("posttopic");
            document.getElementById('txtTopic').value = '';
            tinyMCE.activeEditor.setContent('');}

        if (varRequestChunk == "login"){
            
            actionWanted = "post-topic";
            
            alert("please login or register");
            jsShowElement("forumlogin");
            jsHideElement("forumusername");
            document.getElementById('usr2').focus();}
        if (varRequestChunk == "empty"){
            alert("please include a Topic Title, before you post your message.");
            document.getElementById('txtTopic').focus();
            }
        ReloadTopics('1', '1');
	ReloadNavigation('1');


}}

function ReloadTopics(page, force){
	blnReload = true;
	StorePage = page;

	if (force == 0){
		xmlHttpfr = GetXmlHttpObject();
		url = "/forum-need-refresh.aspx?time=" + document.getElementById('txtGenerated').value + "&sid=" + Math.random();
		xmlHttpfr.onreadystatechange=ReloadForum3;
		xmlHttpfr.open("GET", url, true);
		xmlHttpfr.send(null);
	}
	else {


    xmlHttp4 = GetXmlHttpObject();
    url = "/forum-get-topics.aspx?page=" + page + "&forumid=" + document.getElementById('txtForumID').value;


    //networking center mode
    if (document.getElementById("txtCurrentView") != null) {
        url = url + "&mode=networking-center";
    }


    url = url + "&sid=" + Math.random();
	if (typeof jsMaxT != "undefined"){
	if (jsMaxT != null){
		url = url + "&maxt=" + jsMaxT;
	}
	}

    xmlHttp4.onreadystatechange=ReloadTopics2;
    xmlHttp4.open("GET", url, true);
    xmlHttp4.send(null);}}


function ReloadTopics2(){
    if (xmlHttp4.readyState==4 || xmlHttp4.readyState=="complete"){
        varRequestChunk =xmlHttp4.responseText;
        document.getElementById('topic-posts').innerHTML = varRequestChunk;
        if (document.getElementById('topic-posts2') != null){
            document.getElementById('topic-posts2').innerHTML = "";}}
    else{
        if (document.getElementById('topic-posts2') != null){
            document.getElementById('topic-posts2').innerHTML = '<img src="/images/ajax-loading.gif">';}}}


function ReloadForum(page, force){
	blnReload = true;
	if (force == 0){
		xmlHttpfr = GetXmlHttpObject();
		url = "/forum-need-refresh.aspx?time=" + document.getElementById('txtGenerated').value + "&path=" + window.location.pathname + "&sid=" + Math.random();
		xmlHttpfr.onreadystatechange=ReloadForum3;
		xmlHttpfr.open("GET", url, true);
		xmlHttpfr.send(null);
	}
	else{

	if (blnReload = true){
		xmlHttp4 = GetXmlHttpObject();
		url = "/forum-get-postings.aspx?page=" + page + "&forumid=" + document.getElementById('txtForumID').value + "&hidesticky=" + document.getElementById('txtHideForumSticky').value;


		//networking center mode
		if (document.getElementById("divMessagesView") != null) {
		    url = url + "&mode=networking-center";
		}

		url = url + "&path=" + window.location.pathname + "&sid=" + Math.random();

		xmlHttp4.onreadystatechange=ReloadForum2;
		xmlHttp4.open("GET", url, true);
		xmlHttp4.send(null);}}}

