// JavaScript Document	
	
function getXhr()
{
	var xhr = null; 
	if(window.XMLHttpRequest) // Firefox et autres
		xhr = new XMLHttpRequest(); 
	else if(window.ActiveXObject)
	{ // Internet Explorer 
 		try 
		{
			xhr = new ActiveXObject("Msxml2.XMLHTTP");
		} 
		catch (e) 
		{
			xhr = new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	else 
	{ // XMLHttpRequest non supporté par le navigateur 
		alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest..."); 
		xhr = false; 
	} 
	return xhr;
}
			
function check_dom(nom_div,dom,tld,c_lig,id_prod,id_prod_trans,tarif_creation,tarif_trans,path)
{
	if(path=='') var addr_post = "ajax.php"; else var addr_post = path+"whois/ajax.php";
	var xhr = getXhr();
	xhr.onreadystatechange = function()
		{
		if(xhr.readyState == 4)
			{
			recup = xhr.responseText;
			document.getElementById(nom_div).innerHTML = recup;
			}
		}
		
	xhr.open("POST", addr_post, true);
	xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
	data = "type_check=dom&dom="+dom+"&tld="+tld+"&c_lig="+c_lig+"&id_prod="+id_prod+"&id_prod_trans="+id_prod_trans+"&tarif_creation="+tarif_creation+"&tarif_trans="+tarif_trans;
	xhr.send(data);
}

function check_case(nom_div,dom,tld,id_prod,path)
{
	if(path=='') var addr_post = "ajax.php"; else var addr_post = path+"whois/ajax.php";
	var xhr = getXhr();
	xhr.onreadystatechange = function()
		{
		if(xhr.readyState == 4)
			{
			recup = xhr.responseText;
			document.getElementById(nom_div).innerHTML = recup;
			}
		}
		
	xhr.open("POST", addr_post, true);
	xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
	data = "type_check=case&dom="+dom+"&tld="+tld+"&id_prod="+id_prod;
	xhr.send(data);
}

