function helloWorld() {
    alert('hello world');
}

function checar_form(){
    document.form.submit();
}

function novaNoticia() {
    document.form.act.value = 'I';
    document.form.submit();
}

function editarNoticia(id) {
    document.form.act.value = 'E';
    document.form.idPRD.value = id
    document.form.submit();
}

function excluirNoticia(id) {
    document.form.act.value = 'SD';
    document.form.idPRD.value = id
    document.form.submit();
}

function excluirImagemNoticia(id,caminho) {
    document.form.act.value = 'SDI';
    document.form.idPRD.value = id;
    document.form.imgsrc.value = caminho;
    document.form.submit();
}
function editArea(area) {
    if (document.getElementById('selArea').value == '') {
        alert('Escolha uma �rea antes de prosseguir');
    } else {
        document.getElementById('selectArea').action = area + '.php';
        document.getElementById('selectArea').submit();
    }
}

function showArticleType(mode) {
    document.getElementById('publicadas').style.display = 'none';
    document.getElementById('publicadasBT').style.color = '#AAAAAA';
    document.getElementById('publicadasBT').style.backgroundColor = '#f7f7f7';
    
    document.getElementById('rascunhos').style.display = 'none';
    document.getElementById('rascunhosBT').style.color = '#AAAAAA';
    document.getElementById('rascunhosBT').style.backgroundColor = '#f7f7f7';
    
    document.getElementById(mode).style.display = 'block';
    document.getElementById(mode+'BT').style.color = '#000000';
    document.getElementById(mode+'BT').style.backgroundColor = '#FFFFFF';
}

function externalContent(mode) {
    if(mode) {
        document.getElementById('internalContent').style.display = 'none';
        document.getElementById('txtConteudo').value = '';
        document.getElementById('externalContent1').style.display = '';
        document.getElementById('externalContent2').style.display = '';
        document.getElementById('externalContent3').style.display = '';
    } else {
        document.getElementById('internalContent').style.display = '';
        document.getElementById('externalContent1').style.display = 'none';
        document.getElementById('externalContent2').style.display = 'none';
        document.getElementById('externalContent3').style.display = 'none';
        document.getElementById('url_externa').value = '';
        document.getElementById('txtChamada').value = '';
        document.getElementById('chkAdrenaline').checked = false;
    }
}

function showPage(pageNum, pageTotal) {
    for (i=0; i<pageTotal; i++) {
        document.getElementById('paginacao'+i).style.display = 'none';
        document.getElementById('pagLink'+i).style.fontWeight = '';
    }
    document.getElementById('paginacao'+pageNum).style.display = 'block';
    document.getElementById('pagLink'+pageNum).style.fontWeight = 'bold';
}