function call(id,docroot,type,bottom) {
var temp	= 'prod'+id;
var qty 	= document.getElementById(temp).value;
if(document.getElementById(temp).value > 0 )
	{
		var url = docroot+"/product/ajax_call/add_product/";
		$.post(url, { p_id: id, qty: qty, type: type},
			function(data){
              
              if(data == 1){
                if(type == 'booking')
                  {
								if(bottom != "")
								{
									load_all_flash(id,type,bottom);
								}
								else
								{
									load_all_flash(id,type);
								}
                  }
                else
                  {
                    window.location = docroot+"cairns-tours-enquiries";
                  }
              }
			if(type == 'booking')
			{
				update_header_cart(docroot);
			}
		});
	}
	else
	{
		alert("Please enter appropriate quantity.");
	}
}
function product_enquire(id,docroot){
	if(id > 0){
		var url = docroot+"/product/ajax_call/add_productenquire/";
		$.post(url, {pid: id},
			function(data){
				window.location = docroot+"contact-us";
		});
	}
}
function update_header_cart(docroot)
{
		var url = docroot+"/product/ajax_call/update_header_cart/";
		$.ajax({
		url:url, 
	   dataType:'json', 	  
      success:   function (data)
	  {
			$("#item_count").html(data.prd_cnt+" tour(s) selected");
			$("#item_cost").html("A$"+data.total);
	  }

});
}
function updateCart()
{
   document.getElementById("shop_cart").innerHTML=obj.msg;
}
