function clearFieldAndFocus(field){
    if (field != null)
        field.value ='';
        field.focus();
    return;
}

function openUrl(url, newWindow) {
    if (newWindow == 'true')
        window.open(url, 'externalWindow');

    else {
        document.location.href = url;
    }
    return;
}

function submitFormByName(name, direction){
    var f = document.getElementById(name);
    var d = document.getElementById('direction');
    d.value = direction;
    f.submit();
}

function onMouseOverMenu(id){
        var obj = document.getElementById(id);
        if (obj != null){
            obj.src='images/menu-active.jpg';
        }
    return;
}

function onMouseOutMenu(id){
        var obj = document.getElementById(id);
        if (obj != null){
            obj.src='images/menu-default.jpg';
        }
    return;
}