
// If submittingForm is set, we set it's action to the new location and submit it, instead of setting window.location
function submitit(submittingForm) {
    if(document.getElementById('searchweb').checked) {
        window.location = 'http://search.babylon.com/?q=' + document.getElementById('term').value + '&babsrc=dictionarybc';
        return false;
    }
    else
    {
        pageTracker._trackEvent('_', 'dictionary');

        targetPage = '/' + document.getElementById('term').value;
        if(!submittingForm) // If we don't know the submitting form
        {
            window.location = targetPage;
            return false;
        }
        else
        {
            submittingForm.action = targetPage;
        }
    }
}

function clearDefault(el) {
    if (el.defaultValue==el.value)
        el.value = "";
}
