function goto(url) { document.location = url; }
function favorite() { window.external.AddFavorite(location.href, document.title); }
function agree(message) { if ( !window.confirm(message) ) { return false; } }
function random(min, max) { return Math.floor( (max - min + 1) * Math.random() + min ); }
function swap(category, current, timeout) {
    if ( document.buttons[category][current] == undefined ) current = 0;
    document.getElementById('swap' + category + '_src').src = document.buttons[category][current][0];
    document.getElementById('swap' + category + '_href').href = document.buttons[category][current][1];
    setTimeout('swap(' + category + ', ' + (current + 1) + ', ' + timeout + ')', timeout);
}