// inicializacni funkce (zjisteni adresy)
function parseUrl() {
    var url = null;
    var newParts = new Array();
    var actual = location.href;
    var protocol = null;
    var address = null;
    var parts = new Array();
    var ids = null;

    if (actual.substr(0, 4) == 'http') {
        protocol = 'http://';
        url = actual.substr(7);
    } else {
        protocol = 'https://';
        url = actual.substr(8);
    }

    address = url.substr(0, url.indexOf('/'));
    url = url.substr(url.indexOf('/') + 1);
    ids = url.substr(url.lastIndexOf('-') + 1);
    ids = ids.substr(0, ids.length - 5);
    url = url.substr(0, url.lastIndexOf('-'));

    //parts = ids.split('.');
    //for (i = 0; i < parts.length; i++) newParts.push(ids.substr(0,(i+1)*2-1));
    //url = url+'?id='+newParts.join('/');
    if (ids != '') url = url + '?id=' + ids;

    //alert(address);
    //alert(url);

    url = protocol + address + '/flash/index.html#/' + url;

    //alert(url);
    
    return url;
}
