function startFight(did, arena)
{
    if (!arena)
        arena = 0;
	sendRequest('ajax/doArenaFight.php?did='+did+'&a='+ new Date().getTime() + '&b=' + arena);
}

function startFightWithName(arena)
{
    if (!arena)
        arena = 0;
	var name = document.getElementById('ujn').value;
	sendRequest('ajax/doArenaFight.php?dname='+encodeURIComponent(name)+'&a='+ new Date().getTime() + '&b=' + arena);
}

function startGroupFight(did, arena)
{
    if (!arena)
        arena = 0;
	sendRequest('ajax/doGroupFight.php?did='+did+'&a='+ new Date().getTime() + '&b=' + arena);
}

function startGroupFightWithName(arena)
{
    if (!arena)
        arena = 0;
	var name = document.getElementById('ujn').value;
	sendRequest('ajax/doGroupFight.php?dname='+encodeURIComponent(name)+'&a='+ new Date().getTime() + '&b=' + arena);
}

function startFightConfirmed(did, arena)
{
    if (!arena)
        arena = 0;
	defenderId = 0;
	sendRequest('ajax/doArenaFight.php?did='+did+'&c=1&a='+ new Date().getTime() + '&b=' + arena);
}

function startFightGoldProtection(did)
{
	sendRequest('ajax/doArenaFight.php?did='+did+'&c=1&cgp=1&a='+ new Date().getTime());
}