﻿//  Testa se a pagina mãe esta aberta e direciona o fotobrowser
function testParent(URL) {
if(window.opener != null && !window.opener.closed)
window.opener.location.href =URL; 
else {
window.open(URL, 'JanelaN');

}
}
//  Mostra ou esconde as noticias da home
function show_news ( id ){
    var numero_de_noticias = 5;
    
    // Fecha todas as noticias abertas
    for (i=1;i<=numero_de_noticias;i++){
        $("#n" + i).css("display","none");
        $("#new" + i).css("display","none");
    }
    
    // Mostra anoticia clicada
    
    if(navigator.appName!='Microsoft Internet Explorer')
        $("#" + id).show();
    else
        $("#" + id).show("slow");
}
function hide_news ( id ){
    if(navigator.appName!='Microsoft Internet Explorer')
        $("#" + id).hide();
    else
        $("#" + id).hide("slow");
}