
window.track = function(application, applicationConfiguration, itemType, item, user){
    var expires;
    var track
    var tracks;
    var temp;

    expires = new Date();
    expires.setSeconds(expires.getSeconds() + 18000);

    tracks = new Array();
    tracks[tracks.length] = '839e81b7-8118-4f9b-9545-1e61d01bbde3';

    temp = /Track\=([^\;]*)/.exec(document.cookie);
    track = (temp && temp.length == 2) ? temp[1] : null;
    if(track) tracks[tracks.length] = track;

    temp = /Track\=([^\;]*)/.exec(window.name);
    track = (temp && temp.length == 2) ? temp[1] : null;
    if(track) tracks[tracks.length] = track;
    window.name = window.name.replace('Track=' + track + ';', '')
    
    document.cookie = 'Track=839e81b7-8118-4f9b-9545-1e61d01bbde3;expires=' + expires.toGMTString() + ';path=/';
    window.name += 'Track=839e81b7-8118-4f9b-9545-1e61d01bbde3;';

    document.write('<' + 'script src="http://webservice.midhold.nl/midhold_tracker/DoTrack.ashx?application=' + escape(application) + '&applicationConfiguration=' + escape(applicationConfiguration) + '&user=' + escape(user) + '&tracks=' + escape(tracks.join()) + '&itemType=' + escape(itemType) + '&item=' + escape(item) + '&r=' + new Date().valueOf() + '" type="text/javascript"' + '>' + '</' + 'script' + '>');
    };

