﻿/**********************************************************************
** This script file is used by the Customer Feedback System          **
** To update and call appropriate page(s) from the Feedback link     **
** within the SyndC pages                                            **
**********************************************************************/

/// Update the Feedback Link to point to our custom onFeedbackClick function
function updateFeedbackControl()
{
    var feedbackCtrl = document.getElementById('uxp_ftr_link_feedback');
    if (feedbackCtrl)
    {
        var href = feedbackCtrl.href;
        feedbackCtrl.href = 'javascript:onFeedbackClick(\'' + escape(href) + '\')';
    }
}

/// Called when the Feedback link is clicked
/// It pops up our own custom Customer Feedback form
function onFeedbackClick(href)
{
    var feedbackPageUrl = "/CustomerFeedback/Feedback.aspx";
    var feedbackWindow = window.open(feedbackPageUrl + '?FeedbackTarget=' + escape(href) + '&amp;UrlReferrer=' + escape(window.location.href), 'Feedback', 'status=0,toolbar=0,location=0,menubar=0,directories=0,resizable=1,scrollbars=0,titlebar=0,width=450,height=600');
    feedbackWindow.focus();
}
