// JavaScript Document

/* AJAX Stuff */
function createRequestObject()
{
	var request;
	var browser=navigator.appName;
	if(browser=="Microsoft Internet Explorer")
		request=new ActiveXObject("Microsoft.XMLHTTP");
	else
		request=new XMLHttpRequest();
	return request;
}
var http=createRequestObject();

function ajaxConfirmare(control, tip, valoare)
{
    http.open('GET', 'http://www.fotbalamator.ro/ajax_validation.php?val='+escape(valoare)+'&tip='+escape(tip));
    
	http.setRequestHeader("Cache-Control", "no-cache");
	http.onreadystatechange=function() {
		destDiv=document.getElementById(control);
		if(http.readyState==4)
		{
			var response=http.responseText;
			destDiv.innerHTML=response;
		}
	};
	http.send(null);
	return;
}
function ajaxConfirmareParola(control, tip, valoare, valoare2)
{
	http.open('GET', 'http://www.fotbalamator.ro/ajax_validation.php?val='+escape(valoare)+'&tip='+escape(tip)+'&val2='+escape(valoare2));
        http.setRequestHeader("Cache-Control", "no-cache");
        http.onreadystatechange=function() {
            destDiv=document.getElementById(control);
            if(http.readyState==4)
            {
                var response=http.responseText;
                destDiv.innerHTML=response;
            }
        };
        http.send(null);
        return;
}
function clearContinut(control, valoare)
{
	theDiv=document.getElementById(control);
	if(valoare=="")
		theDiv.innerHTML="";
}


