function restoreUrl(profileName)
{
    url = new String( window.location.href );

    url = url.replace("index.html", "start.php");

    url = url.replace("restore/restore.php", "start.php");

    url += "?profile=" + profileName;

    url += "&cnt=ctr&redirected=1";

    window.location.href = url;
}

function checkDomainAndRedirect()
{
    var euroticketDomain = "sale.euroticket.pl";
    
    var agentsLinksUrl = "http://sale.euroticket.pl/bilet_autokarowy.html";

    var domain = new String(window.location.hostname);

    if ( domain.indexOf( euroticketDomain ) != -1 )
    {
        window.location.href = agentsLinksUrl + "?redirected=1";
    }
    else
    {
        url = new String(window.location.protocol);

        url += "//";

        url += domain;

        url += "?redirected=1";
        
        window.location.assign(url);
    }
}

