// Based on http://msdn.microsoft.com/msdnmag/issues/07/07/cuttingedge/default.aspx 
var tStart = null;

function ShowNoHiddenFeesPopup()
{
    //--------------------
    //Initialize the time
    tStart = new Date();
    
    //---------------------
    //For PopUp the Control
    var targetControl = GetControl("buttonTemp", 0, "input");
    targetControl.click();
}
function SaveNoHiddenFeesPopupDuration( grsUserID ) {

    if( tStart != null)
    {
        var tNow = new Date();
        //----------------------------------------------------
        //Calculate the total seconds from the popup begining 
        //until the client close it.
        var totalSeconds = Math.floor((tNow.getTime() - tStart.getTime())/ 1000);
            
        GRS.Distribution.GoRedSea.Client.WebApp.WebServices.Tracking.NoHiddenFeesPopupDuration(totalSeconds, grsUserID);
     }   
}