// JavaScript Document
function getHTTPObject()
{
  var xmlHttp;
  try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
  catch (e)
  {
    // Internet Explorer
    try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");		
    }
    catch (e)
    {
      try
      {
        xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
      catch (e)
      {
        alert("Your browser does not support AJAX!");
        return false;
      }
    }
  }
  return xmlHttp;
}

function draw_query_string(form)
{

	var args = new Array();  
	var ele = form.elements;	  
    for (var i=0; i<ele.length; i++) 
    {		
      if (!ele[i].name) 
      continue;      
	  if (ele[i].tagname = 'input' && (ele[i].type == 'checkbox' || ele[i].type == 'radio') && !ele[i].checked) 
	  continue;
                            
          if (ele[i].tagname = 'select' && ele[i].multiple) 
          {
              for (j=0; j<ele[i].options.length; j++) 
              {
                  if (ele[i].options[j].selected)
                  args.push(ele[i].name + "=" + encodeURIComponent(ele[i].options[j].value));
              }
          } 
          else 
          {
              args.push(ele[i].name + "=" + encodeURIComponent(ele[i].value));
          }
      }			        
    postVars = args.join("&");
   //alert(postVars);
   return postVars;    
}