function showCurrentPoint(id) { 
	var req = new XmlHTTP();
		req.onreadystatechange = function()
		{
			var showPoint= document.getElementById('currentPoint');
			var showButton = document.getElementById('sectionGet');
			if(req.readyState == 4)	{
				var str = req.responseText;
				var saperate = str.split("|") ;
				showPoint.innerHTML = saperate[0];
				if (saperate[1] == 'notGetPoint') {
					showButton.style.display = 'none';
				}
			}
		}
			req.open("GET", "http://www.pantip.com/cafe/php/cafebonus/showPoint.php?id="+id+"&ran="+Math.random(), true);
			req.send(null); 			
}

function getPoint(id) { 
	var req = new XmlHTTP();
		req.onreadystatechange = function()
		{
			var showPoint= document.getElementById('currentPoint');
			//var showButton = document.getElementById('sectionGet');
			if(req.readyState == 4)	{
				var str = req.responseText;
				showPoint.innerHTML = str;
				//showButton.style.display = 'none';
			} else {
				showPoint.innerHTML = '<div align=center><br><br><img src="http://www.pantip.com/cafe/php/cafebonus/images/loading.gif" border = "0"></div>';
			}
		}
			req.open("GET", "/cafe/php/cafebonus/getPoint.php?id="+id, true);
			req.send(null); 			
}
