function GetXmlHttpObject()
{
  var xmlHttp=null;
  try
    {
    // Firefox, Opera 8.0+, Safari
    xmlHttp=new XMLHttpRequest();
    }
  catch (e)
    {
    // Internet Explorer
    try
      {
      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
      }
    catch (e)
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    }
  return xmlHttp;
}




function stateChanged() 
{ 
	if (xmlHttp.readyState==4)
	{ 
	document.getElementById("showajax").innerHTML=xmlHttp.responseText;
	}
}
function showform()
{
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
	  alert ("Your browser does not support AJAX!");
	  return;
	} 
	
	/*var name		=	document.getElementById("name").value;
	var addrerss	=	document.getElementById("address");*///we take text area value like that in ajax
	
	var name=document.getElementById("name").value;
	var email=document.getElementById("email").value;
	var message=document.getElementById("message").value;
	var code=document.getElementById("code").value;
	var validator=document.getElementById("validator").value;
	var action=document.getElementById("action").value;
	
	var arg="?name="+name+"&email="+email+"&message="+message+"&action="+action+"&code="+code+"&validator="+validator;
	//var val	=	"?name="+name+"&address="+address.value;
	//alert("Hello"+arg);
	xmlHttp.onreadystatechange=stateChanged;
	xmlHttp.open("GET","ajax_kontact.php"+arg,true);
	xmlHttp.send(null);
}

// JavaScript Document