//###### AJAX CHECK DOMAIN #############################################
//Ajax check url        domain_name         domain_tilde
function replaceHtml(el, html) {
	var oldEl = typeof el === "string" ? document.getElementById(el) : el;
	/*@cc_on 
		oldEl.innerHTML = html;
		return oldEl;
	@*/
	var newEl = oldEl.cloneNode(false);
	newEl.innerHTML = html;
	oldEl.parentNode.replaceChild(newEl, oldEl);
	return newEl;
};



function get_link_section(letter,product_id) 
{
  var notationS = document.getElementById('download_section');
  if (notationS.style.display == 'none')
    {
    var url = "get_link_section.php?letter=" + escape(letter) + "&id=" + escape(product_id);
	//Create Temporary message
	//replaceHtml(notationS, '<img src="decor/preloader.gif" width="42" height="42" border="0" alt="0" />');
	notationS.innerHTML = '<img src="decor/preloader.gif" width="42" height="42" border="0" alt="0" />';	
	notationS.style.display = 'block';
	http.open("GET", url, true);
	http.onreadystatechange = handleHttpResponse;
	http.send(null);
	}
  else
   {
   notationS.style.display = 'none';
   }
}

function handleHttpResponse() {
	if (http.readyState == 4) {
	    var results = http.responseText;
		var notationS = document.getElementById('download_section');
		replaceHtml(notationS, results) 
		
		//notationS.innerHTML = results;
		notationS.style.display = 'block';
		//notationS.style.background = '#E1DACE';
		//notationS.style.border = '1px solid saddlebrown';
		//notationS.style.padding = '4px';
	}
}

function getHTTPObject() { 
	var xmlhttp;
	/*@cc_on
	@if (@_jscript_version >= 5)
		try {
			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
					xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
				} catch (E) {
					xmlhttp = false;
				}
		}
	@else xmlhttp = false;
	@end @*/
	if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
		try {
			xmlhttp = new XMLHttpRequest();
		} catch (e) {
			xmlhttp = false;
		}
	}
	return xmlhttp;
}
var http = getHTTPObject(); // We create the HTTP Object 
//#############################################################
