function createRequestObject()
	{
	var request_o; 							//declare the variable to hold the object.
	var browser = navigator.appName; 		//find the browser name
	if(browser == "Microsoft Internet Explorer"){
		request_o = new ActiveXObject("Microsoft.XMLHTTP");
	}else{
		request_o = new XMLHttpRequest();
	}
	return request_o; 						//return the object
	}

var http = createRequestObject(); 
	
function comment1()
	{
	http.open('get', 'show.php?action=update'	
	+ '&name='+ document.forms[0].namex.value
	+ '&comment='+ document.forms[0].commentx.value);
		
	http.onreadystatechange = disp_comment1; 
	http.send(null);
	}		

function show()
	{

	http.open('get','show.php?action=show');	
	http.onreadystatechange = disp_comment1; 
	http.send(null);
	}		
	
function disp_comment1()
	{
	if(http.readyState == 4)
		{ 
		var response = http.responseText;
		document.getElementById('comment1').innerHTML = response;
		}
	}