/*
    #############################################################################
    # Nome: index.js                                                            #
    # Sistema: Sinodo Paranapanema                                              #
    # Criado por: Breno Henrique Vivarelli                                      #
    # Empresa: Netnigro                                                         #
    # E-mail: breno@netnigro.com.br                                             #
    # Descrição: Funções para a página inicial do site                          #
    # Histórico:                                                                #
    #    . 21/10/2008 - Breno Henrique Vivarelli                                #
    #            Criação da Página                                              #
    #############################################################################    
*/
    function CarregaSenhasDiarias()
    {
        hoje = new Date();
        dia = hoje.getDate();
        mes = hoje.getMonth();
        ano = hoje.getFullYear();
        dia1 = null;
        if (dia < 10)
        {
            dia1 = "0" + dia;
        }
        else
        {
            dia1 = dia;
        }
        mes1 = null;
        mes1 = mes + 1;

        if (mes1 < 10)
        {
            mes1 = "0" + mes1;
        }
 
        if (ano < 2000)
        {
            ano = "19" + ano;
        }                                                           

        pasta_senhas_diarias = "arquivos/senhas_diarias/";        
        filetoday = pasta_senhas_diarias + ano + "/" + mes1 + "/" + dia1 + ".htm";  
        //filetoday = pasta_senhas_diarias + 2008 + "/" + 12 + "/" + dia1 + ".htm";    

        //em width e height--> controlar o tamanho da janela para senha
        frame = '<iframe id="senhas_diarias" src="' + filetoday + '" width="328px" height="70px" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe>';
            
        return frame;
    }
       
    // Carrega no onload 
    $(function()
        {
            $(".link_noticia").click(
                function()
                {                   
                    window.open(this.href,"Notícia","height=500,width=600,scrollbars=yes");
                    return false;
                }
            ); 
            
            //$("#senhas_diarias").html(CarregaSenhasDiarias());          
            //$("#mensagens_diarias").load(CarregaSenhasDiarias());                                    
        }   
    );