function body_onKeyDown(e)
{
    if(!e){e = window.event;} //for ie
    try
    {
        if(e.srcElement.id != '')
        {
            var el = document.getElementById(e.srcElement.id);            
            switch(e.keyCode)
            {
                case 8: //backspace
                    //we want these to work, but not bubble up
                    if(el.type == 'text' || el.type == 'file' || el.type == 'password' || el.type == 'textarea')
                        e.cancelBubble = true;
                    else    //we want everything else to just not work
                        e.returnValue = false;
                    break;
            }
        }
        else
        {
            //for non-id'ed elements
            switch(e.keyCode)
            {
                case 8: //backspace
                    e.returnValue = false;
                    break;
            }
        }
    }
    catch(ex)
    {
        e.returnValue = false;
    }
}

function body_onContextMenu()
{
    return false;
}

//automatically trap the keyDown event
document.onkeydown = body_onKeyDown;
document.oncontextmenu = body_onContextMenu;
