/*
 * $Id: contact.js,v 1.12 2007/12/17 18:31:00 tcouch Exp $
 *
 * Contact related functions.
 */

/**
 * Invoked by the 'email a friend' link from the listing.
 * @param businessName - the bus name in the listing
 * @param category - the listing category
 * @param listingId - the listing id.
 */
function emailFriend(listingId) {
    trackEmail(listingId);
    var mailUrl = "emailToFriendPrompt.do?listingId="+listingId;
    mailUrl = toAbsoluteUrl(mailUrl);
    var win = window.open(mailUrl,'','left=20,top=20,width=450,height=450,toolbar=1,scrollbars=1,resizable');
}

function emailCustomer(listingId) {
    trackCustomerEmail(listingId);
    var mailUrl = "/emailToAdvertiserPrompt.do?listingId="+listingId;
    mailUrl = toAbsoluteUrl(mailUrl);
    var win = window.open(mailUrl,'','left=20,top=20,width=450,height=400,toolbar=1,scrollbars=1,resizable');
}

function feedback(){
    var feedbackUrl = toAbsoluteUrl("feedbackPrompt.do");
    var win = window.open(feedbackUrl,'','left=20,top=20,width=450,height=400,toolbar=1,scrollbars=1,resizable');
}
