function postAndLoadContent( source, destination, formName )
{
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;
      }
    }
  }

	 var parameters = "";

	 if( formName != '' )
	 {
	  	for( var i = 0; i < document.getElementById(formName).elements.length; i++ )
	  	{
			if (document.getElementById(formName).elements[i].type == "radio") {
               if (document.getElementById(formName).elements[i].checked) {
					parameters = parameters + document.getElementById(formName).elements[i].name + "=" + encodeURI( document.getElementById(formName).elements[i].value ) + "&";               }
            }
			else
			{
	 	 		parameters = parameters + document.getElementById(formName).elements[i].name + "=" + encodeURI( document.getElementById(formName).elements[i].value ) + "&";
	 	 	}
	  	}
	 }

     xmlHttp.open('POST', source, true);


	  xmlHttp.onreadystatechange=function()
	    {
	    if(xmlHttp.readyState==4)
	      {
	      document.getElementById( destination ).innerHTML=xmlHttp.responseText;
	      }
	    }


     xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
     xmlHttp.setRequestHeader("Content-length", parameters.length);
     xmlHttp.setRequestHeader("Connection", "close");
     xmlHttp.send(parameters);


}


function postAndLoadContentFunction( source, destination, formName, retFunc )
{
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;
      }
    }
  }

	 var parameters = "";

	 if( formName != '' )
	 {
	  	for( var i = 0; i < document.getElementById(formName).elements.length; i++ )
	  	{
			if (document.getElementById(formName).elements[i].type == "radio") {
               if (document.getElementById(formName).elements[i].checked) {
					parameters = parameters + document.getElementById(formName).elements[i].name + "=" + encodeURI( document.getElementById(formName).elements[i].value ) + "&";               }
            }
			else
			{
	 	 		parameters = parameters + document.getElementById(formName).elements[i].name + "=" + encodeURI( document.getElementById(formName).elements[i].value ) + "&";
	 	 	}
	  	}
	 }

     xmlHttp.open('POST', source, true);


	  xmlHttp.onreadystatechange=function()
	    {
	    if(xmlHttp.readyState==4)
	      {
	      	retFunc(xmlHttp.responseText);
	      }
	    }


     xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
     xmlHttp.setRequestHeader("Content-length", parameters.length);
     xmlHttp.setRequestHeader("Connection", "close");
     xmlHttp.send(parameters);

     return  false ;

}


