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"){
		/* Create the object using MSIE's method */
		request_o = new ActiveXObject("Microsoft.XMLHTTP");
	}else{
		/* Create the object using other browser's method */
		request_o = new XMLHttpRequest();
	}
	return request_o; //return the object
} /// end function

var http = createRequestObject(); 

function Save(param){
	        // alert(document.all.base.value);
			var tempparam = document.all.base.value+'?' + param;
			//alert(tempparam);
	        document.getElementById('status').innerHTML="  <img src='images/loading.gif'>";
			
             http.open('post',  'save.php'); 
        	http.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
		  var myparam='param='+tempparam;
        	http.send(myparam);
	        http.onreadystatechange = handleSave ;
			
			//alert(result);
	       // http.send(null);
		    //window.location.reload();
}

function handleSave(){


	  if(http.readyState == 1){ 
	                   document.getElementById('status').innerHTML="Loading data"
        }

	if(http.readyState == 4){ //Finished loading the response
		var response = http.responseText;
		document.getElementById('status').innerHTML = response;
	}
}
