// **************************************************
// * Autor : Peter M Jordan - uranking@uranking.com *
// * página: www.uranking.com                       *
// **************************************************

// construindo o calendário
function popdate(obj,div,tam,ddd)
{
    if (ddd)
    {
        day = ""
        mmonth = ""
        ano = ""
        c = 1
        char = ""
        for (s=0;s<parseInt(ddd.length);s++)
        {
            char = ddd.substr(s,1)
            if (char == "/")
            {
                c++;
                s++;
                char = ddd.substr(s,1);
            }
            if (c==1) day    += char
            if (c==2) mmonth += char
            if (c==3) ano    += char
        }
        ddd = mmonth + "/" + day + "/" + ano
    }

    if(!ddd) {today = new Date()} else {today = new Date(ddd)}
    date_Form = eval (obj)
    if (date_Form.value == "") { date_Form = new Date()} else {date_Form = new Date(date_Form.value)}

    ano = today.getFullYear();
    mmonth = today.getMonth ();
    day = today.toString ().substr (8,2)

    umonth = new Array ("Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro")
    days_Feb = (!(ano % 4) ? 29 : 28)
    days = new Array (31, days_Feb, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31)

    if ((mmonth < 0) || (mmonth > 11))  alert(mmonth)
    if ((mmonth - 1) == -1) {month_prior = 11; year_prior = ano - 1} else {month_prior = mmonth - 1; year_prior = ano}
    if ((mmonth + 1) == 12) {month_next  = 0;  year_next  = ano + 1} else {month_next  = mmonth + 1; year_next  = ano}
    txt  = "<table bgcolor='#efefff' style='border:solid #330099; border-width:2' cellspacing='0' cellpadding='3' border='0' width='"+tam+"' height='"+tam*1.1 +"'>"
    txt += "<tr bgcolor='#FFFFFF'><td colspan='7' align='center'><table border='0' cellpadding='0' width='100%' bgcolor='#FFFFFF'><tr>"
    txt += "<td width=20% align=center><a href=javascript:popdate('"+obj+"','"+div+"','"+tam+"','"+((mmonth+1).toString() +"/01/"+(ano-1).toString())+"') class='Cabecalho_Calendario' title='Ano Anterior'><<</a></td>"
    txt += "<td width=20% align=center><a href=javascript:popdate('"+obj+"','"+div+"','"+tam+"','"+( "01/" + (month_prior+1).toString() + "/" + year_prior.toString())+"') class='Cabecalho_Calendario' title='Mês Anterior'><</a></td>"
    txt += "<td width=20% align=center><a href=javascript:popdate('"+obj+"','"+div+"','"+tam+"','"+( "01/" + (month_next+1).toString()  + "/" + year_next.toString())+"') class='Cabecalho_Calendario' title='Próximo Mês'>></a></td>"
    txt += "<td width=20% align=center><a href=javascript:popdate('"+obj+"','"+div+"','"+tam+"','"+((mmonth+1).toString() +"/01/"+(ano+1).toString())+"') class='Cabecalho_Calendario' title='Próximo Ano'>>></a></td>"
    txt += "<td width=20% align=right><a href=javascript:force_close('"+div+"') class='Cabecalho_Calendario' title='Fechar Calendário'><b>X</b></a></td></tr></table></td></tr>"
    txt += "<tr><td colspan='7' align='right' bgcolor='#ccccff' class='mes'><a href=javascript:pop_year('"+obj+"','"+div+"','"+tam+"','" + (mmonth+1) + "') class='mes'>" + ano.toString() + "</a>"
    txt += " <a href=javascript:pop_month('"+obj+"','"+div+"','"+tam+"','" + ano + "') class='mes'>" + umonth[mmonth] + "</a> <div id='popd' style='position:absolute'></div></td></tr>"
    txt += "<tr bgcolor='#330099'><td width='14%' class='dia' align=center><b>Dom</b></td><td width='14%' class='dia' align=center><b>Seg</b></td><td width='14%' class='dia' align=center><b>Ter</b></td><td width='14%' class='dia' align=center><b>Qua</b></td><td width='14%' class='dia' align=center><b>Qui</b></td><td width='14%' class='dia' align=center><b>Sex<b></td><td width='14%' class='dia' align=center><b>Sab</b></td></tr>"
    today1 = new Date((mmonth+1).toString() +"/01/"+ano.toString());
    diainicio = today1.getDay () + 1;
    week = d = 1
    start = false;

    for (n=1;n<= 42;n++)
    {
        if (week == 1)  txt += "<tr bgcolor='#efefff' align=center>"
        if (week==diainicio) {start = true}
        if (d > days[mmonth]) {start=false}
        if (start)
        {
            dat = new Date((mmonth+1).toString() + "/" + d + "/" + ano.toString())
            day_dat   = dat.toString().substr(0,10)
            day_today  = date_Form.toString().substr(0,10)
            year_dat  = dat.getFullYear ()
            year_today = date_Form.getFullYear ()
            colorcell = ((day_dat == day_today) && (year_dat == year_today) ? " bgcolor='#FFCC00' " : "" )
            txt += "<td"+colorcell+" align=center><a href=javascript:block('"+  d + "/" + (mmonth+1).toString() + "/" + ano.toString() +"','"+ obj +"','" + div +"') class='data'>"+ d.toString() + "</a></td>"
            d ++
        }
        else
        {
            txt += "<td class='data' align=center> </td>"
        }
        week ++
        if (week == 8)
        {
            week = 1; txt += "</tr>"}
        }
        txt += "</table>"
        div2 = eval (div)
        div2.innerHTML = txt
}

// função para exibir a janela com os meses
function pop_month(obj, div, tam, ano)
{
  txt  = "<table bgcolor='#CCCCFF' border='0' width=80>"
  for (n = 0; n < 12; n++) { txt += "<tr><td align=center><a href=javascript:popdate('"+obj+"','"+div+"','"+tam+"','"+("01/" + (n+1).toString() + "/" + ano.toString())+"')>" + umonth[n] +"</a></td></tr>" }
  txt += "</table>"
  popd.innerHTML = txt
}

// função para exibir a janela com os anos
function pop_year(obj, div, tam, umonth)
{
  txt  = "<table bgcolor='#CCCCFF' border='0' width=160>"
  l = 1
  for (n=1991; n<2012; n++)
  {  if (l == 1) txt += "<tr>"
     txt += "<td align=center><a href=javascript:popdate('"+obj+"','"+div+"','"+tam+"','"+(umonth.toString () +"/01/" + n) +"')>" + n + "</a></td>"
     l++
     if (l == 4)
        {txt += "</tr>"; l = 1 }
  }
  txt += "</tr></table>"
  popd.innerHTML = txt
}

// função para fechar o calendário
function force_close(div)
    { div2 = eval (div); div2.innerHTML = ''}

// função para fechar o calendário e setar a data no campo de data associado
function block(data, obj, div)
{
    force_close (div)
    obj2 = eval(obj)
    obj2.value = data
}


/***********************************************
* Cross browser Marquee II- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

var delayb4scroll=2000 //Specify initial delay before marquee starts to scroll on page (2000=2 seconds)
var marqueespeed=1 //Specify marquee scroll speed (larger is faster 1-10)
var pauseit=1 //Pause marquee onMousever (0=no. 1=yes)?

////NO NEED TO EDIT BELOW THIS LINE////////////

var copyspeed=marqueespeed
var pausespeed=(pauseit==0)? copyspeed: 0
var actualheight=''

function scrollmarquee(){
if (parseInt(cross_marquee.style.top)>(actualheight*(-1)+8)) //if scroller hasn't reached the end of its height
cross_marquee.style.top=parseInt(cross_marquee.style.top)-copyspeed+"px" //move scroller upwards
else //else, reset to original position
cross_marquee.style.top=parseInt(marqueeheight)+8+"px"
}

function initializemarquee(){
cross_marquee=document.getElementById("vmarquee");
cross_marquee.style.top=0;
marqueeheight=document.getElementById("marqueecontainer").offsetHeight;
actualheight=cross_marquee.offsetHeight //height of marquee content (much of which is hidden from view)
if (window.opera || navigator.userAgent.indexOf("Netscape/7")!=-1){ //if Opera or Netscape 7x, add scrollbars to scroll and exit
cross_marquee.style.height=marqueeheight+"px";
cross_marquee.style.overflow="scroll";
return
}
setTimeout('lefttime=setInterval("scrollmarquee()",30)', delayb4scroll)
}

function carrega_scroll() {
if (window.addEventListener)
window.addEventListener("load", initializemarquee, false)
else if (window.attachEvent)
window.attachEvent("onload", initializemarquee)
else if (document.getElementById)
window.onload=initializemarquee
}

/****************************************** FINAL SCROLL ********************************************************/

function StartMeUp ()
{
  var ele = document.getElementById("radio");
  Player.URL = ele.options[ele.selectedIndex].value;
  alert("A radio está sendo carregada... Aguarde alguns instantes ... Enquanto efetua o carregamento e verifique o volume ...");
}

function StartMeUpBig (p2)
{


  if (p2==0) {
     var ele = document.getElementById("radio");
  } else {
     var ele = document.getElementById("dradio");
  }


  if (ele.selectedIndex == 0) {
     Player.controls.stop();
     return true;
  }

  var elv = ele.options[ele.selectedIndex].value;
  var ela = new Array();
  ela = elv.split("|");
  if (ela[2] != "SIM") {
     Player.URL = convertebranco(ela[1]);
  }
  carrega_radios(ela[0],ela[2],ela[3]);
}

function convertebranco(p1) {
var branco = escape(" ");
var els = p1;
els = els.replace(" ",branco);
return els;
}

function ShutMeDown ()
{
  Player.controls.stop();
}

function mostracasas(p1) {
var ele = document.getElementById("casasbox");
if (p1 == "") {
   ele.style.display = "none";
   return true;
}
ele.style.display = "";
var tele = document.getElementById("titcasas");
tele.innerHTML = "<h2>"+p1+"</h2>";

carrega_cidades(p1);
}


try{
    xmlhttp = new XMLHttpRequest();
}catch(ee){
    try{
        xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    }catch(e){
        try{
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
        }catch(E){
            xmlhttp = false;
        }
    }
}



function carrega_radios(p1,p2,p3) {

xmlhttp.open("GET", "busaradio.php?radio="+escape(p1)+"&agrupar="+escape(p2)+"&autor="+escape(p3),true);
xmlhttp.onreadystatechange=function() {
        if (xmlhttp.readyState==4){
           var nv = xmlhttp.responseText;
           if (nv == "") {
              return true;
           }
           monta_table_radio(nv,p2);
           return true;
        }
};
xmlhttp.send(null);
}



/* carrega os programas gravados */
function crg(p1,p2) {
xmlhttp.open("GET", "canal.php?canal="+escape(p1)+"&aovivo="+escape(p2),true);
xmlhttp.onreadystatechange=function() {
        if (xmlhttp.readyState==4){
           var nv = xmlhttp.responseText;
           var ele = document.getElementById("canais");
           if (nv == "") {
              ele.innerHTML = "";
              alert("Canal selecionado não possui links até o momento, caso conheça algum, por favor nos indique")
              return true;
           }
           var ind = nv.indexOf("<__>");
           if (ind != -1) {
              var ind = nv.substr(0,ind+4);
              nv = nv.replace(ind,"")
              ind = ind.replace("<__>","");
           }
           ele.innerHTML = " --- "+p1+":<select id='radio' onchange='StartMeUpBig(0)' style='font-size:12px'>"+nv+"</select>"
           if (ind != -1) {
              StartMeUpBig(0);
           }
           return true;
        }
};
xmlhttp.send(null);
}



var Event = {
        add: function(obj,type,fn) {
                if (obj.attachEvent) {
                        obj['e'+type+fn] = fn;
                        obj[type+fn] = function() { obj['e'+type+fn](window.event); }
                        obj.attachEvent('on'+type,obj[type+fn]);
                } else
                obj.addEventListener(type,fn,false);
        },
        remove: function(obj,type,fn) {
                if (obj.detachEvent) {
                        obj.detachEvent('on'+type,obj[type+fn]);
                        obj[type+fn] = null;
                } else
                obj.removeEventListener(type,fn,false);
        }
}


function $() {
        var elements = new Array();
        for (var i=0;i<arguments.length;i++) {
                var element = arguments[i];
                if (typeof element == 'string') element = document.getElementById(element);
                if (arguments.length == 1) return element;
                elements.push(element);
        }
        return elements;
}

String.prototype.trim = function() {
        return this.replace(/^\s+|\s+$/,"");
}

function addClassName(el,className) {
        removeClassName(el,className);
        el.className = (el.className + " " + className).trim();
}

function removeClassName(el,className) {
        el.className = el.className.replace(className,"").trim();
}

var ZebraTable = {
        bgcolor: '',
        classname: '',
        stripe: function(el) {
                if (!$(el)) return;
                var rows = $(el).getElementsByTagName('tr');
                for (var i=1,len=rows.length;i<len;i++) {
                        if (i % 2 == 0) rows[i].className = 'alt';
                        Event.add(rows[i],'mouseover',function() { ZebraTable.mouseover(this); });
                        Event.add(rows[i],'mouseout',function() { ZebraTable.mouseout(this); });
                }
        },
        mouseover: function(row) {
                this.bgcolor = row.style.backgroundColor;
                this.classname = row.className;
                addClassName(row,'over');
        },
        mouseout: function(row) {
                removeClassName(row,'over');
                addClassName(row,this.classname);
                row.style.backgroundColor = this.bgcolor;
        }
}


/* Resource Clock
Counts the Earth's human population and acres of productive land based on information from the United Nations.

Original script written by Kevin McCann, IDRC, March 1996.
Revised and updated by John Stevenson, jhs@well.com.

This script may be used, but please retain proper credit. Also, be aware
that this script depends on data that is non-static - the starting land
and population numbers, as well as their rates of increase/decrease are
recalculated yearly. Check this site semi-regularly for the latest
numbers.

*/
function counter() {

    startpop         =         5946422755;
    startland         =          8596978646;
    poprate         =         2.4452;
    landrate         =         0.13035;

    today = new Date()
    startdatepop = new Date("February 1, 1999")
    startdateland = new Date("January 1, 1999")
    offset = today.getTimezoneOffset() * 60 * 1000

    diffpop = (( today.getTime() + offset ) - startdatepop.getTime() ) / 1000;
    diffland = (( today.getTime() + offset ) - startdateland.getTime() ) / 1000;

    var newpop = Math.ceil(startpop + (diffpop * poprate));
    newpop = "" + newpop;

    var newland = Math.ceil(startland - (diffland * landrate));
    newland = "" + newland;

    a1 = newpop.substring(0,1)
    a2 = newpop.substring(1,4)
    a3 = newpop.substring(4,7)
    a4 = newpop.substring(7,10)

    formpop = a1 + "," + a2 + "," + a3 + "," + a4;

    b1 = newland.substring(0,1)
    b2 = newland.substring(1,4)
    b3 = newland.substring(4,7)
    b4 = newland.substring(7,10)

    formland = b1 + "," + b2 + "," + b3 + "," + b4;

    document.time.pop.value = formpop;
    document.time.land.value = formland;

    setTimeout('counter()',200);
}
// -- stop hiding -->


// =========================================================================
//                 ===== slide show dhtml =====
// script: Gerard Ferrandez - June 2005
// http://www.dhteumeuleu.com
// 3D Terragen pics: Silus - http://silusatrium.no.sapo.pt/galleries01.html
// =========================================================================

var xm = -100;
var ym = 0;
var nx = 0;
var ny = 0;
var nw = 0;
var nh = 0;

id = function(o)
{
        return document.getElementById(o);
}

px = function (x)
{
        return ''.concat(Math.round(x), 'px');
}

function resize()
{
        var o = id("screen");
        nx = o.offsetLeft;
        ny = o.offsetTop;
        nw = o.offsetWidth;
        nh = o.offsetHeight;
        ssi.resize();
}
onresize = resize;

document.onmousemove = function(e)
{
        if (window.event) e = window.event;
        xm = (e.x || e.clientX) - nw * .5 - nx;
        ym = (e.y || e.clientY) - nh * .5 - ny;
}
var ssi = {
        dx : 0,
        x0  : 0,
        y0  : 0,
        iz  : false,
        iL  : 0,
        rL  : 0,
        N   : 0,
        b0  : 0,
        b1  : 0,
        ov  : -1,
        NW  : 0,
        ims : 0,
        nxi : 0,
        nyi : 0,
        nxo : 0,
        nyo : 0,
        nho : 0,
        imgWidth  : 0,
        imgHeight : 0,
        borWidth  : 0,
        loaded    : false,

        iZoom : function ()
        {
                var o = id("rLinkZoom").style;
                if(!ssi.iz)
                {
                        o.width  = px(ssi.nxi);
                        o.height = px(ssi.nyi);
                        ssi.iz = true;
                        ssi.iResize();
                        ssi.scroll();
                }
                else
                {
                        ssi.iz = false;
                        ssi.iResize();
                        o.height = "100%";
                        o.width  = "100%";
                        o.left   = "0px";
                        o.top    = "0px";
                }
        },

        slide : function ()
        {
                if(!ssi.iz && ssi.loaded)
                {
                        ssi.dx -= xm * .014;
                        if(ssi.dx > 0) ssi.dx -= ssi.NW; else if(ssi.dx < -ssi.NW) ssi.dx += ssi.NW;
                }
                ssi.b0.style.left = px(ssi.dx);
                ssi.b1.style.left = px(ssi.dx + ssi.NW);
                setTimeout(ssi.slide, 16);
        },

        scroll : function ()
        {
                if(ssi.iz)
                {
                        ssi.xmo = Math.min(ssi.nwo, Math.max(0, ((-ssi.nxo + xm + nw * .5))));
                        ssi.ymo = Math.min(ssi.nho, Math.max(0, ((-ssi.nyo + ym + nh * .5))));
                        var x   = -ssi.xmo * (ssi.nxi / ssi.nwo) + ssi.xmo;
                        var y   = -ssi.ymo * (ssi.nyi / ssi.nho) + ssi.ymo;
                        ssi.x0 += ((ssi.x0 > x) ? -1 : 1) * Math.abs(ssi.x0 - x) * .1;
                        ssi.y0 += ((ssi.y0 > y) ? -1 : 1) * Math.abs(ssi.y0 - y) * .1;
                        ssi.rL.left = px(ssi.x0);
                        ssi.rL.top  = px(ssi.y0);
                        setTimeout(ssi.scroll, 16);
                }
        },

        iResize : function ()
        {
                if(ssi.iz)
                {
                        ssi.nwo = Math.min(ssi.nxi, Math.round(98 * nw / 100));
                        ssi.nxo = Math.round((nw - ssi.nwo) / 2);
                }
                else
                {
                        ssi.nho = id("rLinkScreen").offsetHeight;
                        ssi.nyo = id("rLinkScreen").offsetTop;
                        ssi.nwo = Math.round((ssi.nxi / ssi.nyi) * ssi.nho);
                        ssi.nxo = Math.round((nw - ssi.nwo) / 2);
                }
                if(ssi.nwo)
                {
                        var o = id("rLinkScreen").style;
                        o.width = px(ssi.nwo);
                        o.left  = px(ssi.nxo);
                }
        },

        iBorder : function (o, i)
        {
                var o = o.getElementsByTagName("img");
                o[ssi.iL].className = "thumbOut";
                o[i].className  = "thumbOver";
        },

        disp : function (i, title, caption)
        {
                ssi.iBorder(ssi.b0, i);
                ssi.iBorder(ssi.b1, i);
                ssi.iL = i;
                if(ssi.iz) ssi.iZoom();
                id("rLinkTitle").innerHTML = title;
                id("rLinkCaption").innerHTML = caption;
                id("rLinkZoom").src = ssi.ims[i].src;
                ssi.nxi = ssi.ims[i].width;
                ssi.nyi = ssi.ims[i].height;
                ssi.iResize();
        },

        init : function (obj)
        {
                obj.innerHTML = id("source").innerHTML;
                var img = obj.getElementsByTagName("img");
                for(var i = 0; i < ssi.N; i++)
                {
                        var o = img[i];
                        o.className = "thumbOut";
                        o.onmousedown = function () { return false; }
                        o.onclick = function () { ssi.iZoom(); }
                        o.i = i;
                        o.onmouseover = function()
                        {
                                ssi.ov = this.i;
                                ssi.disp(ssi.ov, ssi.ims[ssi.ov].title, ssi.ims[ssi.ov].alt);
                        }
                        o.alt   = "";
                        o.title = "";
                }
        },

        oResize : function (obj)
        {
                var img = obj.getElementsByTagName("img");
                ssi.NW = 0;
                for(var i = 0; i < ssi.N; i++)
                {
                        var o = img[i];
                        if(o.complete)
                        {
                                o = o.style;
                                var w = (ssi.ims[i].width / ssi.ims[i].height) * ssi.imgHeight;
                                o.left = px(ssi.NW);
                                ssi.NW += w +( 2 * ssi.borWidth);
                                o.top    = px(0);
                                o.width  = px(w);
                                o.height = px(ssi.imgHeight);
                                o.borderWidth   = px(ssi.borWidth);
                        }
                }
        },

        resize : function ()
        {
                ssi.borWidth = Math.round(1.4 * nh / 100);
                ssi.imgHeight = id("banner").offsetHeight - (2 * ssi.borWidth);
                ssi.oResize(ssi.b0);
                ssi.oResize(ssi.b1);
                ssi.iResize();
                ssi.NW = Math.round(ssi.NW);
                if(!ssi.loaded) ssi.NW = nw;
                id("rLinkTitle").style.fontSize   = px(4 * nh / 100);
                id("rLinkCaption").style.fontSize = px(2 * nh / 100);
        },

        run : function ()
        {
                var o = id("banner").getElementsByTagName("span");
                ssi.b0 = o[0];
                ssi.b1 = o[1];
                ssi.init(ssi.b0);
                ssi.init(ssi.b1);
                resize();
                ssi.slide();
                ssi.images_load();
        },
        load : function ()
        {
                ssi.ims = id("source").getElementsByTagName("img");
                ssi.rL  = id("rLinkZoom").style;
                ssi.N   = ssi.ims.length;
                ssi.run();
        },
        images_load : function ()
        {
                var M = 0;
                for (var i = 0; i < ssi.N; i++)
                {
                        if (ssi.ims[i].complete)
                        {
                                M++;
                                resize();
                                if (i == 0 && ssi.ov == -1) ssi.b0.getElementsByTagName("img")[0].onmouseover();
                        }
                }
                if (M < ssi.N)
                        setTimeout(ssi.images_load, 64);
                else
                {
                        ssi.loaded = true;
                        resize();
                }
        }
}

google_ad_client = "pub-3330177005960623";
google_ad_width = 110;
google_ad_height = 32;
google_ad_format = "110x32_as_rimg";
google_cpa_choice = "CAAQ1a78zwEaCJHwJ3HRWaerKM-jwXU";
google_ad_channel = "";


function diasemana(p1,p2) {
window.event.cancelBubble = true;
window.event.returnValue = false;
nomrel = "";
if (p1 != 9) {
   nomrel = p2;
}
var fspan = document.getElementsByTagName('li');
var ii = 0;
var ti = 0;
for(var i=0; i < fspan.length; i++) {
   if (fspan[i].getAttribute("diasem") !=null ) {
      if (p1==9 || fspan[i].getAttribute("diasem") == p1) {
         var bg = (ii==0) ? "#ffffff" : "#7fa2e6";
         var ii = (ii==0) ? 1 : 0 ;
         fspan[i].style.display = "";
         fspan[i].style.background = bg;
         ti++;
      } else {
        fspan[i].style.display = "none";
      }
   }
}
document.getElementById("totpal").innerHTML = ti;
}

function diacidade() {
window.event.cancelBubble = true;
window.event.returnValue = false;

var ele = document.getElementById("cidapal");
var p1 = ele.options[ele.selectedIndex].value;
nomrel = p1;

var fspan = document.getElementsByTagName('li');
var ii = 0;
var ti = 0;
for(var i=0; i < fspan.length; i++) {
   if (fspan[i].getAttribute("cida") !=null ) {
      if (fspan[i].getAttribute("cida") == p1.toUpperCase()) {
         var bg = (ii==0) ? "#ffffff" : "#7fa2e6";
         var ii = (ii==0) ? 1 : 0 ;
         fspan[i].style.display = "";
         fspan[i].style.background = bg;
         ti++;
      } else {
        fspan[i].style.display = "none";
      }
   }
}
document.getElementById("totpal").innerHTML = ti;
}

function acessouse() {
     var ele = document.getElementById("usewww");
     window.open(ele.options[ele.selectedIndex].value,'');
     return true;
}


function pare() {
var ele = document.getElementById('merda');
ele.scrollDelay = "10000";

return true;
}
function continuar() {
var ele = document.getElementById('merda');
ele.scrollDelay = "130";
return true;
}

function openTarget (form, features, windowName) {
  if (!windowName)
    windowName = 'formTarget' + (new Date().getTime());
  form.target = windowName;
  open ('', windowName, features);
}


function login() {
/*
alert("Em desenvolvimento, aguarde");
return false;
*/

window.open("admin/acesso_site.php",'big','top=0,left=0,width=10px,height=10px,personalbar=no,menubar=no,status=no,toolbar=no,resizable=yes');
return false;
}

function noemail() {
var ele = document.getElementById("user1");
ele.focus();
}
function juntanome() {
var ele = document.getElementById("user1");
if (ele.value == "") {
   alert("Por favor, digite o login para acessar sua caixa postal") ;
   ele.focus();
   return false;
}
var el1 = document.getElementById("pass");
if (el1.value == "") {
   alert("Por favor, digite a senha para acessar sua caixa postal") ;
   ele.focus();
   return false;
}
var el1 = document.getElementById("user");
el1.value = ele.value + "@usesjrp.org";
return true;
}

function acessaradio() {
winHandle = window.open('','paineluse',"top=100,left=100,width=570px,height=320px,personalbar=no,menubar=no,status=no,toolbar=no,resizable=no");
if (winHandle.location.href=="about:blank") {
   opn = window.open("radio.php","paineluse","top=100,left=100,width=570px,height=320px,personalbar=no,menubar=no,status=no,toolbar=no,resizable=no");
   opn.focus();
}
}
function mo(p1) {
}

function Form_Validator_dlp(theForm)
{
if (theForm.Entrada.value == '')
{
   alert("Introduza uma palavra na caixa de edição!");
   theForm.Entrada.focus();
   return (false);
}
return (true);
}


/*
Gap_schedule("dengue", "CarregaTudo()");
function Gap_schedule(objectID, functionCall) {
        if (document.getElementById(objectID)) {
           eval(functionCall);
        }else{
           setTimeout("Gap_schedule('" + objectID + "', '" + functionCall + "')", 1);
        }
        return true;
}
*/

