/// <reference path="jquery-1.3.2-vsdoc2.js" />

$(document).ready(function() {

    //Set AJAX Defaults [overridable]
    $.ajaxSetup({
        type: "POST",
        contentType: "application/json; charset=utf-8",
        data: "{}",
        dataFilter: function(data) {
            var _msg;
            if (typeof (JSON) !== 'undefined' && typeof (JSON.parse) === 'function') { _msg = JSON.parse(data); }
            else { _msg = eval('(' + data + ')'); }
            
            if (_msg.hasOwnProperty('d')) { return _msg.d; }
            else { return _msg; }

        }
    });
});


function __registerGooglePage(_url) {
    _gaq.push(['_trackPageview', _url]); 
};

function _openDownload(oPath) {
    if (window.open) {
        window.open('/_common/downloads/download.ashx?path=' + oPath, 'downloadWin', 'toolbar=0,location=no,directories=0,status=0,scrollbars=yes,resizable=1,width=200,height=1,top=0,left=0');
    }
}

function _openDownloadById(oId) {
    if (window.open) {
        window.open('/_common/downloads/download.ashx?did=' + oId, 'downloadWin', 'toolbar=0,location=no,directories=0,status=0,scrollbars=yes,resizable=1,width=200,height=1,top=0,left=0');
    }
}
