﻿function yelp(txt, phoneNum) {
    var pageUrl = '/dynamic/yelpAPI.aspx';

    jQuery.noConflict();


    jQuery.ajax({
        type: "POST",
        url: pageUrl + '/yelpPhoneAPI',
        data: '{phoneNum: ' + phoneNum + '}',
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        success: function (response) {
            jQuery('#' + txt).append(response.d);

        },
        failure: function (response) {
            alert(response.d);
        }
    });


}

function yelp2(txt, phoneNum, placeID) {
    var pageUrl = '/dynamic/yelpAPI2.aspx';

    jQuery.noConflict();


    jQuery.ajax({
        type: "POST",
        url: pageUrl + '/yelpPhoneAPI',
        data: '{"phoneNum": "' + phoneNum + '", "placeID": "' + placeID + '"}',
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        success: function (response) {
            jQuery('#' + txt).append(response.d);

        },
        failure: function (response) {
            alert(response.d);
        }
    });


}
