function createXMLHttpRequest() {
	if (window.ActiveXObject) {
		xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); 
	}
	else if (window.XMLHttpRequest) { 
		xmlHttp = new XMLHttpRequest();
	}
}
//---------------------------------------
function add_email(lang)
{
	document.getElementById("loading").style.display='block';	
	createXMLHttpRequest(); 
	var xml ='';
	var url =document.getElementById("urlMailinglist").value;
	url+="/"+document.getElementById("mailinglistTF").value;
	url+="/reg";	
	//alert(url);
	xmlHttp.open("POST", url, true); 
	xmlHttp.setRequestHeader("accept-charset","utf-8");
	xmlHttp.setRequestHeader("Content-Type","text/html; charset=utf-8");
	xmlHttp.onreadystatechange = add_mail_callback;
	xmlHttp.send(xml);
}
//---------------------------------------
function add_mail_callback()
{
	if (xmlHttp.readyState == 4) 
	{ 
		if (xmlHttp.status == 200)
		{ 	
			document.getElementById("messege").innerHTML=xmlHttp.responseText;
			//document.Mailing.reset();
			document.getElementById("mailinglistTF").value='';
			document.getElementById("loading").style.display='none';
			return false;
		}
	}
}

//---------------------------------------
function productXMLHttpRequest() {
	if (window.ActiveXObject) {
		xmlHttpPro = new ActiveXObject("Microsoft.XMLHTTP"); 
	}
	else if (window.XMLHttpRequest) { 
		xmlHttpPro = new XMLHttpRequest();
	}
}
//---------------------------------------
function get_product_block_callback() {
	if (xmlHttpPro.readyState == 4) 
	{ 
		if (xmlHttpPro.status == 200) 
		{	
			document.getElementById('new-products').innerHTML=xmlHttpPro.responseText;
			
			return false;
		}
	}
}
