   var http_request = false;
   
   function makeRequest(url, parameters, divId) {
     // alert(url + "|" + parameters+"|"+divId);
      http_request = false;
      if (window.XMLHttpRequest) { // Mozilla, Safari,...
         http_request = new XMLHttpRequest();
         if (http_request.overrideMimeType) {
         	// set type accordingly to anticipated content type
            //http_request.overrideMimeType('text/xml');
              http_request.overrideMimeType('text/html');
         }
      } else if (window.ActiveXObject) { // IE
         try {
          //  alert("ie1");
            http_request = new ActiveXObject("Msxml2.XMLHTTP");
            
           // alert("ie1 after");
         } catch (e) {
            try {
               //alert("ie2");
                http_request = new ActiveXObject("Msxml2.XMLHTTP.4.0");
            } catch (e) {
              try {
              //alert("ie3");
              http_request = new ActiveXObject("Microsoft.XMLHTTP");
              } catch (e) {}
            }
         }
      }
     // alert("after IE");
      if (!http_request) {
         alert('Cannot create XMLHTTP instance');
         return false;
      }
      
     // alert("before send " + url + parameters);
      http_request.onreadystatechange = function() { alertContents(divId); };
      http_request.open('GET', url + parameters, true);
      http_request.setRequestHeader('Accept-Charset', 'UTF-8');
      http_request.send(null);
     // alert("after send");
   return true;   
   }

   function alertContents (divId){
      //alert("in alertConents,\nhttp_request.readyState=" +http_request.readyState + "\nhttp_request.status =" + http_request.status);
      if (http_request.readyState == 4) {
         if (http_request.status == 200) {
            //alert(http_request.responseText);
            result = http_request.responseText;
            document.getElementById(divId).innerHTML = result;            
         } else {
           // alert('There was a problem with the request.');
         }
      }
   }
   
   function submitForm(obj, url, divId) {
    var theForm = document.getElementById(obj);
    //alert(theForm.elements[0].value);
    var getstr = "?";
      
      for (i = 0; i < theForm.elements.length; i++) {
      //alert(theForm.elements[i].value);
         if (theForm.elements[i].tagName == "INPUT") {
            if (theForm.elements[i].type == "text") {
               getstr += theForm.elements[i].name + "=" + theForm.elements[i].value + "&";
            }
						if (theForm.elements[i].type == "hidden") {
               getstr += theForm.elements[i].name + "=" + theForm.elements[i].value + "&";
            }
            if (theForm.elements[i].type == "checkbox") {
               if (theForm.elements[i].checked) {
                  getstr += theForm.elements[i].name + "=" + theForm.elements[i].value + "&";
               } else {
                  getstr += theForm.elements[i].name + "=&";
               }
            }
            if (theForm.elements[i].type == "radio") {
               if (theForm.elements[i].checked) {
                  getstr += theForm.elements[i].name + "=" + theForm.elements[i].value + "&";
               }
            }
         }   
         if (theForm.elements[i].tagName == "SELECT") {
            //alert(theForm.elements[i].value);
            var sel = theForm.elements[i];
            getstr += sel.name + "=" + sel.options[sel.selectedIndex].value + "&";
         }
         
      }
      //alert(getstr);
      makeRequest(url, getstr, divId);
   }

	 

