function delComments(id)
{
	var ajaxRequest; // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
		} 
	catch (e){
	// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
			} 
		catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
				} 
			catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
					}
			}
	}
	link = "http://joci.ro/jocuri/comentarii/sterge/"+id;
	ajaxRequest.open("POST", link, true);
	ajaxRequest.send(null);
	ajaxRequest.onreadystatechange = function()
	{
		if (ajaxRequest.readyState == 4)
		{
			location.reload(true);
		}
	}
}
function addComments()
{
	var ajaxRequest; // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
		} 
	catch (e){
	// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
			} 
		catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
				} 
			catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
					}
			}
	}
	iduser = document.getElementById('iduser').value;
	idgame = document.getElementById('idgame').value;
	text   = document.getElementById('comment').value;

	link = "http://joci.ro/jocuri/comentarii/adauga/"+iduser+"/"+idgame+"/"+text;
	ajaxRequest.open("POST", link, true);
	ajaxRequest.send(null);
	ajaxRequest.onreadystatechange = function()
	{
		if (ajaxRequest.readyState == 4)
		{
			location.reload(true);
		}
	}
}