function getFormValuesUtils(fobj)
{
       var str = "";
       var valueArr = null;
       var val = "";
       var cmd = "";
       for(var i = 0;i < fobj.elements.length;i++)
       {
           switch(fobj.elements[i].type)
           {
               case "text":
               case "hidden":
               case "password":
               case "textarea":
               case "radio":
                    str += fobj.elements[i].name + "=" + escape(fobj.elements[i].value) + "&";
               case "checkbox":
                    if (fobj.elements[i].checked) str += fobj.elements[i].name + "=" + escape(fobj.elements[i].value) + "&";
                     break;
               	case "select-one":
                    str += fobj.elements[i].name + "=" + fobj.elements[i].options[fobj.elements[i].selectedIndex].value + "&";
                break;
           }
       }
	str = str.substr(0,(str.length - 1)); // remove the last &
	
	return str;
}

// generic AJAX method that can be reused, creates an XMLHTTP request object
function createAJAXRequestUtils(theRequest)
{
	theRequest = null;
				
	if(window.XMLHttpRequest)
	{
		try{
			theRequest = new XMLHttpRequest(); // Mozilla
		}catch(e) {
			theRequest = null;
		}
	}
	else if(window.ActiveXObject)
	{
		try{
			theRequest = new ActiveXObject("Msxml2.XMLHTTP"); // Internet Explorer
		}catch(e){
			try{
				theRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch(e){
				theRequest = null;
			}
		}
	}
	return(theRequest); 
}

// Utility to check if the XML value is empty
function convertXMLCheckForNull(sXMLValue)
{
	var sReturnValue = "";
	try
	{
		sReturnValue = sXMLValue.nodeValue;
	}
	catch(e)
	{}
	return(sReturnValue);
}


