function comparisonHandle(root_path, id) {

	var ajaxRequest = '';

	
	/*
	if (!XMLHttpRequest) {
		alert('ere')
		window.XMLHttpRequest = function() {
			ajaxRequest = new ActiveXObject('Microsoft.XMLHTTP');
		}
	} else {
		ajaxRequest = new XMLHttpRequest();
	}*/
	
	var ie = false;
	jQuery.each( jQuery.browser , function(i, val) {
		if (i == 'msie' && (jQuery.browser.version.substr(0, 3) == "6.0" || jQuery.browser.version.substr(0, 3) == "7.0")) {
			ie = true;
		}
	});
	
	if( ie ){
		ajaxRequest = new ActiveXObject('Microsoft.XMLHTTP')
	} else {
		ajaxRequest = new XMLHttpRequest();
	}
		
	
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function() {
		if (ajaxRequest.readyState == 4) {
			if (ajaxRequest.responseText == 'Sorry, you already have 3 products in your comparison.') {
				var ajaxDisplay = document
						.getElementById('comparison-messages');

				ajaxDisplay.innerHTML = ajaxRequest.responseText;
				$("#comparison-messages").fadeIn();
				$("#compare" + id).attr('checked', false);
				$("#comparison-messages").attr("id", "comparison-notification");
				$("#comparison-messages").attr("class", "error-msg");
			}
		}
	}
	var queryString = "id=" + id;
	ajaxRequest.open("GET", root_path + "products/ajax_comparisonHandle?"
			+ queryString, true);
	ajaxRequest.send(null);

}

function comparisonRemoveAll(root_path) {

	$.ajax( {

		type : "GET",
		url : root_path + "products/ajax_comparisonRemoveAll",
		dataType : "xml"

	});

	return false;
}
