

function ATC_Succeeded(result, obj2, obj3)
{
	var atcID = obj2 + "_atc";
	
    if (result[0] == "true")
    {   
        eval(result[1]);
        
        if (result[2] == "true")
        {
			var addToCart = $get(atcID);
			
			if (addToCart != null)
			{
				var infoId = (addToCart.informationPopup == null || addToCart.informationPopup == "undefined") ? "" : addToCart.informationPopup;
				var infoPopup = $find(infoId + "_tag");
				
				if (infoPopup != null)
				{
					infoPopup.setText(result[3]);
					infoPopup.set_targetControlID(atcID);
					infoPopup.show();
				}
			}

        }
        
        if (result[4] == "true")
        {
            var productPromotionPopup = $find(atcID + "_productPromotionPopup");

            if (productPromotionPopup != null) {
                productPromotionPopup.setText(atcID + "_productPromotionPopup");
            }
        }   
    }

    loader_hide($('#' + atcID), css, pause);
}

function ATC_Failed(obj1, obj2, obj3)
{
	//alert('Failed: ' + obj1);
	loader_hide(btn, css);
}




