function ajaxFunction(){
	var ajaxRequest;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
	
	var el = document.getElementById("statusText");
if(ajaxRequest.readyState == 0) { 
	 if (el.firstChild == null)
		el.appendChild(document.createTextNode(""));
	el.firstChild.nodeValue = "Please Wait. Processing...";
}
if(ajaxRequest.readyState == 1) { 
 if (el.firstChild == null)
		el.appendChild(document.createTextNode(""));
	el.firstChild.nodeValue = "Please Wait. Processing..."; 
}
if(ajaxRequest.readyState == 2) { 
 if (el.firstChild == null)
		el.appendChild(document.createTextNode(""));
	el.firstChild.nodeValue = "Please Wait. Processing...";
   
}
if(ajaxRequest.readyState == 3) { 
 if (el.firstChild == null)
		el.appendChild(document.createTextNode(""));
	el.firstChild.nodeValue = "Please Wait. Processing..."; 
}
	
	
		if(ajaxRequest.readyState == 4){
			//alert("Response: " + ajaxRequest.responseText);
			//document.frames('frame_cont').location.reload();
			var f = document.getElementById('frame_cont');
      f.src = f.src;
      window.scrollTo(0,0);//jump to the top of the page
      if (el.firstChild == null)
		el.appendChild(document.createTextNode(""));
	el.firstChild.nodeValue = ""; 
		}
	}
	var products_id = document.getElementById('products_id').value;
	
	var queryString = "?products=" + products_id;
	
	var url = "../catalog/buy_now.php" + queryString;
	
	ajaxRequest.open("GET", url, true);
	ajaxRequest.send(null); 
}


function ajaxFunctionBrushes(prod){
	var ajaxRequest;  // The variable that makes Ajax possible!
	
	try{
		// Opera 8.0+, Firefox, Safari
		ajaxRequest = new XMLHttpRequest();
	} catch (e){
		// Internet Explorer Browsers
		try{
			ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try{
				ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e){
				// Something went wrong
				alert("Your browser broke!");
				return false;
			}
		}
	}
	// Create a function that will receive data sent from the server
	ajaxRequest.onreadystatechange = function(){
	
	var el = document.getElementById("statusText");
if(ajaxRequest.readyState == 0) { 
	 if (el.firstChild == null)
		el.appendChild(document.createTextNode(""));
	el.firstChild.nodeValue = "Please Wait. Processing...";
}
if(ajaxRequest.readyState == 1) { 
 if (el.firstChild == null)
		el.appendChild(document.createTextNode(""));
	el.firstChild.nodeValue = "Please Wait. Processing..."; 
}
if(ajaxRequest.readyState == 2) { 
 if (el.firstChild == null)
		el.appendChild(document.createTextNode(""));
	el.firstChild.nodeValue = "Please Wait. Processing...";
   
}
if(ajaxRequest.readyState == 3) { 
 if (el.firstChild == null)
		el.appendChild(document.createTextNode(""));
	el.firstChild.nodeValue = "Please Wait. Processing..."; 
}
	
	
		if(ajaxRequest.readyState == 4){
			//alert("Response: " + ajaxRequest.responseText);
			//document.frames('frame_cont').location.reload();
			var f = document.getElementById('frame_cont');
      f.src = f.src;
      window.scrollTo(0,0);//jump to the top of the page
      if (el.firstChild == null)
		el.appendChild(document.createTextNode(""));
	el.firstChild.nodeValue = ""; 
		}
	}
	//var products_id = document.getElementById('products_id').value;
	var products_id = prod;
	
	var queryString = "?products=" + products_id;
	
	var url = "../catalog/buy_now.php" + queryString;
	
	ajaxRequest.open("GET", url, true);
	ajaxRequest.send(null); 
}
