function cancelEnter(){
    keypressed = event.keyCode;
    if(keypressed == 13) {
        event.returnValue = false;
    }
}

function setForward(valor,nomeForm) {
    var form = document.forms[nomeForm];
    form.elements['forward'].value=valor;
    form.submit();

}


function show(){
    var Digital = new Date()
    var hours   = Digital.getHours()
    var minutes = Digital.getMinutes()
    var seconds = Digital.getSeconds()
    var day     = Digital.getDay();
    var date    = Digital.getDate();
    var month   = Digital.getMonth() + 1;
    var year    = Digital.getYear();
    var weekday;
    var horas;

    if (hours == 0)
        hours = 12;
    if (minutes <= 9)
        minutes = "0" + minutes;
    if (seconds <= 9)
        seconds = "0" + seconds;
    if (month <= 9)
        month = "0" + month;

    if (day == 0)
        weekday = "Domingo";
    else if (day == 1)
        weekday = "Segunda-feira";
    else if (day == 2)
        weekday = "Terça-feira";
    else if (day == 3)
        weekday = "Quarta-feira";
    else if (day == 4)
        weekday = "Quinta-feira";
    else if (day == 5)
        weekday = "Sexta-feira";
    else
        weekday = "Sábado";

    horas = weekday + " " + date + "/" + month + "/" + year;
    document.write(horas);
}

function mclk(src) {
    if(event.srcElement.tagName == 'TD')
        src.children.tags('A')[0].click();
}

//cores de fundo
function mOut(src, cor) {
    if (!src.contains(event.toElement)) {
        src.style.cursor = 'default';
        src.bgColor = cor;
    }
}

function mOvr(src, cor) {
    if (!src.contains(event.fromElement)) {
        src.style.cursor = 'hand';
        src.bgColor = cor;
    }
}