
function startclock() {
		var thetime=new Date();
		var nhours=thetime.getHours();
		var nmins=thetime.getMinutes();
		var nsecn=thetime.getSeconds();
		var nday=thetime.getDay();
		var nmonth=thetime.getMonth();
		var ntoday=thetime.getDate();
		var nyear=thetime.getYear();
		var AorP=" ";
		
		if (nhours>=12)
		    AorP="P.M.";
		else
		    AorP="A.M.";
		if (nhours>=13) 
		nhours-=12;
		if (nhours==0)  
		nhours=12;
		if (nsecn<10)   
		nsecn="0"+nsecn;
		if (nmins<10)   
		nmins="0"+nmins;
		if (nday==0)    
		nday="Domingo";
		if (nday==1)    
		nday="Segunda-Feira";
		if (nday==2)    
		nday="Terça-Feira";
		if (nday==3)    
		nday="Quarta-Feira";
		if (nday==4)    
		nday="Quinta-Feira";
		if (nday==5)    
		nday="Sexta-Feira";
		if (nday==6)    
		nday="Sábado";
		nmonth+=1;
		
		if (nyear<=99)
		  nyear= "19"+nyear;
		
		if ((nyear>99) && (nyear<2000))
		 nyear+=1900;
		
		document.clockform.clockspot.value=nhours+":"+nmins+"";
		
		setTimeout('startclock()',1000);

} 

function verScroll(dir, spd, loop) {
loop = true;
direction = "up";
speed = 10;
scrolltimer = null;
if (document.layers) {
var page = eval(document.contentLayer);
}

else {
if (document.getElementById) {
var page= eval("document.getElementById('contentLayer').style");
}

else {
if (document.all) {
var page = eval(document.all.contentLayer.style);
    }
  }
}

direction = dir;
speed = parseInt(spd);
var y_pos = parseInt(page.top);
if (loop == true) {
if (direction == "dn") {
page.top = (y_pos - (speed));
} else {

if (direction == "up" && y_pos < -2) {
page.top = (y_pos + (speed));
} else {

if (direction == "top") {
page.top = 10;
     }
   }
}

// Código melhorado by Guergolet
if(y_pos <= ( page.height.replace('px','') * -1) -35 && direction == "dn") 
{           stopScroll();
            return;
}
 // Fim codigo melhorado
scrolltimer = setTimeout("verScroll(direction,speed)", 1);
   }
}
function stopScroll() {
loop = false;
clearTimeout(scrolltimer);
}
// Fim codigo  =========================================================================================



function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->

function voleur(e)
{ return false; }

function bien()
{ return true; }

document.onselectstart=new Function ("return false");

if (window.sidebar)
{
document.onmousedown=voleur;
document.onclick=bien;
}

function novoAlbum(pg){
  if (pg)
  {
    a = window.open(pg,'album','status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=563,height=520,top=0,left=0');
    a.focus()
  }
}

// ************************************************************************************************************************
// JANELA Pop-up

var popUpWin=0;
function popUpWindow(url, title, left, top, width, height) {
  	if(popUpWin) {
    if(!popUpWin.closed) popUpWin.close();  }
  popUpWin = open(url, title, 'toolbar=no,location=no,directories=no,status=no,menub ar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}
// ************************************************************************************************************************


function sorria(xy){
  if (xy)
  {
    a = window.open(xy,'xyz','status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=630,height=590,top=0,left=0');
    a.focus()
  }
}
function radio(ra){
  if (ra)
  {
    a = window.open(ra,'rad','status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=322,height=180,top=0,left=0');
    a.focus()
  }
}
function youtube(ab){
  if (ab)
  {
    a = window.open(ab,'you','status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=425,height=345,top=0,left=0');
    a.focus()
  }
}

/*
function verScroll(dir, spd, loop) {
loop = true;
direction = "up";
speed = 80;
scrolltimer = null;
if (document.layers) {
var page = eval(document.contentLayer);
}
else {
if (document.getElementById) {
var page= eval("document.getElementById('contentLayer').style");
}
else {
if (document.all) {
var page = eval(document.all.contentLayer.style);
      }
   }
}
direction = dir;
speed = parseInt(spd);
var y_pos = parseInt(page.top);
if (loop == true) {
if (direction == "dn") {
page.top = (y_pos - (speed));
} else {
if (direction == "up" && y_pos < 1) {
page.top = (y_pos + (speed));
} else {
if (direction == "top") {
page.top = 10;
      }
   }
}
scrolltimer = setTimeout("verScroll(direction,speed)", 1);
   }
}
function stopScroll() {
loop = false;
clearTimeout(scrolltimer);
}
//  End -->

*/