var abxs = window.location.hostname;
if (abxs == "localhost")
{
	var xtb_pathToFile_add="http://"+abxs+"/eco_cart/add_domain_ajax.php";
	var xtb_pathToImage="http://"+abxs+"/eco_cart/js/check_domain.gif";
} else {
	var xtb_pathToFile_add="http://"+abxs+"/add_domain_ajax.php";
	var xtb_pathToImage="http://"+abxs+"/js/check_domain.gif";
}
function createObjectkxpo() {
var request_typekxpo;
var browserkxpo = navigator.appName;
if(browserkxpo == "Microsoft Internet Explorer"){
request_typekxpo = new ActiveXObject("Microsoft.XMLHTTP");
}else{	
request_typekxpo = new XMLHttpRequest();
}
return request_typekxpo;
}
var http = createObjectkxpo();
var nocachekxpo = 0;
function add_multicart_domain(domain, ext, sample) {	
	// Optional: Show a waiting message in the layer with ID login_response
	document.getElementById('multidomain_msg').innerHTML = "<img src='"+xtb_pathToImage+"' border='0'>";	

	nocachekxpo = Math.random();
	// Pass the login variables like URL variable
	http.open('get', xtb_pathToFile_add+'?option_aa='+domain+'&option_bb='+ext+'&option_cc='+sample+'&nocachekxpo='+nocachekxpo);
	http.onreadystatechange = insertReplykxpo;
	http.send(null);
}
function insertReplykxpo() {
	if(http.readyState == 4){
		var responsekxpo = http.responseText;
		// else if login is ok show a message: "Site added+ site URL".
		//document.getElementById('display_domainx').innerHTML = ''+responsekxpo;
		document.getElementById('multidomain_msg').innerHTML = ''+responsekxpo;
	}	
}
