function buttonOver(img)
{
    var url  = img.src;
    if (url.indexOf('_over') != -1) return;
    var path = url.substr(0, url.lastIndexOf('/'));
    if (path) path += '/';
    var file = url.slice(path.length);
    img.src = path + file.replace(/\./, '_over\.');
    return 1;
}

function buttonOut(img)
{
    var url  = img.src;
    if (url.indexOf('_over') == -1) return;
    var path = url.substr(0, url.lastIndexOf('/'));
    if (path) path += '/';
    var file = url.slice(path.length);
    img.src = path + file.replace(/_over/, '');
    return 1;
}

function gotoUrl(url)
{
    location.href = url;
}

function changeNetwork(sel)
{
    if (sel.value == 'none') return;
    var url='/phones/networks/' + sel.value + '-mobile-phones.htm';
    gotoUrl(url);
    return true;
}

function changeDiscontinuedNetwork(sel)
{
    if (sel.value == 'none') return;
    /*var url='/phones/discontinued/networks/' + sel.value + '-phone-handsets.htm';*/
    var url='/phones/discontinued/networks/' + sel.value + '-mobile-phones.htm';
    gotoUrl(url);
    return true;
}

function changeMake(sel)
{
    if (sel.value == 'none') return;
    var url='/phones/makes/' + sel.value + '-phone-handsets.htm';
    gotoUrl(url);
    return true;
}

function changeItem(sel)
{
    if (sel.value == 'none') return;
    var url='/phones/items/' + sel.value + '-phone-handsets.htm';
    gotoUrl(url);
    return true;
}

function changeDiscontinuedMake(sel)
{
    if (sel.value == 'none') return;
    var url='/phones/discontinued/makes/' + sel.value + '-phone-handsets.htm';
    gotoUrl(url);
    return true;
}
