  var updateInProgress = false;
  var rootDivs         = null;
  var divIndex         = -1;
  var aPlaceHolder     = null;  
  var ajaxReq          = null;
  var ajaxDoc          = null;
  var aForumForm       = null;
  var aForumMessageUrl = null;
  var aCreateUrl       = null;
  var forumSubmitParams = null;
	var IE;
         
  function newRequest() {
    if (IE == true)  {
      return new ActiveXObject("Microsoft.XMLHTTP");    
    } else {
      return new XMLHttpRequest();
    }
  } // newRequest()
  
  function processForumAjax() {
    if ((ajaxReq.readyState == 4) && (ajaxReq.status == 200)) {
      ajaxDoc           = ajaxReq.responseText;
      aForumMessageUrl  = ajaxDoc;
      processForumSubmit();
      
    }
  } // processForumAjax()  
  
  function processAjaxForumSubmit() {
    if ((ajaxReq.readyState == 4) && ((ajaxReq.status == 200) || (ajaxReq.status == 404))) {
      ajaxDoc           = ajaxReq.responseText;
      aPlaceHolder.innerHTML  = '<textarea name="Result" DISABLED type="text" rows="15" cols="35" style="width:450px;" tabindex="3" class=forum ">Your message will be reviewed before being published</textarea>';
    //  window.location.reload();
    }
  } // processAjaxPollResult()

  function processForumSubmit() {
    try {
      ajaxReq = newRequest();
      ajaxReq.onreadystatechange = processAjaxForumSubmit;
      ajaxReq.open("POST", aForumMessageUrl, true);
      ajaxReq.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
      ajaxReq.setRequestHeader("Content-length", forumSubmitParams.length);
      ajaxReq.setRequestHeader("Connection", "close");      
      ajaxReq.send(forumSubmitParams);
    } catch(e) {
      alert(e);  
    }  
  }  // processPollMiniResult()

  function checkForm() {	
  	formErrors      = true;
  	aForm           = document.getElementById(aForumForm);
    var getstr = '';
    for (i=0; i<aForm.childNodes.length; i++) {
       if (aForm.childNodes[i].tagName == "INPUT"){
          if (aForm.childNodes[i].type == "text") {
             getstr += aForm.childNodes[i].name + "=" + escape(aForm.childNodes[i].value) + "&";
          }
          if (aForm.childNodes[i].type == "checkbox") {
             if (aForm.childNodes[i].checked) {
                getstr += aForm.childNodes[i].name + "=" + aForm.childNodes[i].value + "&";
             } else {
                getstr += aForm.childNodes[i].name + "=&";
             }
          }
          if (aForm.childNodes[i].type == "radio") {
             if (aForm.childNodes[i].checked) {
                getstr += aForm.childNodes[i].name + "=" + aForm.childNodes[i].value + "&";
             }
          }
       } 
       if (aForm.childNodes[i].tagName == "TEXTAREA"){
         getstr += aForm.childNodes[i].name + "=" + escape(aForm.childNodes[i].value) + "&";       
      }
       if (aForm.childNodes[i].tagName == "SELECT") {
          var sel = aForm.childNodes[i];
          getstr += sel.name + "=" + sel.options[sel.selectedIndex].value + "&";
       }
       if (aForm.childNodes[i].type == "hidden") {
         getstr += aForm.childNodes[i].name + "=" + aForm.childNodes[i].value + "&";       
       }
    }
    forumSubmitParams = getstr;
    ajaxReq = null;
    aPlaceHolder.innerHTML  = '<center> <img style="width:50px" class="imgcenter" src="/images/ajax-loader.gif" border="0" alt="Processing, please wait..." /><br>Please wait...</center>';
    //processForumSubmit();
  }  

 
  function processForum(aDivTagtoShowProgress) {
    try {
        aPlaceHolder               = aDivTagtoShowProgress;
        checkForm();
        ajaxReq                    = newRequest();
        ajaxReq.onreadystatechange = processForumAjax;
        ajaxReq.open("GET", aCreateUrl, true);
        ajaxReq.send(null);
    } catch(e) {
      alert(e);  
    }  
  } // processPollMini()


  