// http://miso.blog.matfyz.sk/p731-cross-domain-ajax

// have to take care of caching, if it effects.
// should probably give it a id, and remove it if already exists.
// make err_str, result, track_id optional.
function ss_event_log(tag, uniq_id, result, err_str)
{
    var now = new Date();
    var month = now.getUTCMonth() + 1;
    var happened_at = now.getUTCFullYear() + "-" + month + "-" + now.getUTCDate()
        + " " + now.getUTCHours() + ":" + now.getUTCMinutes() + ":" + now.getUTCSeconds();
    
    request_script = document.createElement("script");
    request_script.src = "http://eventlog.slideshare.com/" + tag + "/?"
        + "happened_at=" + happened_at + "&"
        + "track_id=" + uniq_id + "&"
        + "result=" + result + "&"
        + "err_str=" + err_str;
    document.getElementsByTagName("head")[0].appendChild(request_script);
}



