	
	
	//ajax
	function buy_now(id) {
		document.getElementById('run_working_gif_' + id).innerHTML = '<img src="images/icons/wait.gif">';
		document.getElementById('run_working_gif_id').value = id;
		run = setTimeout("run_waiting_image()",800);
		
		var url ="xml_products_multi_basket.php?mode=1&ajax=get&action=update_product&products_id=" + id + "&quantity=" + document.getElementById('buy_now_' + id).value
		xmlHttp=GetXmlHttpObject()
		xmlHttp.onreadystatechange=stateChanged_add_products_category_to_db

		xmlHttp.open("GET", url, true) 
		xmlHttp.send(null) 
	}
	function stateChanged_add_products_category_to_db() {
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")	{
			xmlDoc=xmlHttp.responseXML;
		
			shopping_card();
		}
	}
	
	
	function shopping_card() {
		
		var url ="xml_products_multi_basket.php?mode=2";
		xmlHttp=GetXmlHttpObject()
		xmlHttp.onreadystatechange=stateChanged_shopping_card

		xmlHttp.open("GET", url, true) 
		xmlHttp.send(null) 
	}
	function stateChanged_shopping_card() {
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")	{
			xmlDoc=xmlHttp.responseText;
			
			document.getElementById('shopping_cart_column_right').innerHTML = xmlDoc;
		}
	}
	
	
	
	//java
	function run_waiting_image() {
		document.getElementById('run_working_gif_' + document.getElementById('run_working_gif_id').value).innerHTML = "";
		clearTimeout(run);
	}
	
	function buy_now_focus(id) {
		document.getElementById('buy_now_' + id).focus();	
		document.getElementById('buy_now_' + id).select();
	}


