function AbreJanela(url,w,h,sb){
  if (!w||!h) {sb='yes'};
  if (!w) {w=478}; 
  if (!h) {h=420};
  if (!sb) {sb='no'};
  newWindow = window.open(url,'search','width='+w+',height='+h+',top='+(screen.height-h)/2+',left='+(screen.width-w)/2+',toolbar=no,location=0,directories=0,statusbar=no,menuBar=no,scrollBars='+sb+',resizable=no');
  newWindow.location.href = url;
  if (newWindow.opener == null) newWindow.opener = self;
  newWindow.focus();
}

function data_hora_certa(tipo) {
	var agora = new Date();
	var mName = agora.getMonth() + 1;
	var dName = agora.getDay() + 1;
	var dayNr = agora.getDate();
	var yearNr = agora.getYear();
	var hora = agora.getHours();
	var minuto = agora.getMinutes();
	var segundo = agora.getSeconds();
	if (dayNr < 10) dayNr = "0" + dayNr;
	if (mName < 10) mName = "0" + mName;
	if (hora < 10) hora = "0" + hora;
	if (minuto < 10) minuto = "0" + minuto;
	if (segundo < 10) segundo = "0" + segundo;
	if (tipo == 1) {
		datahora = (dayNr + "/" + mName + "/" + yearNr + " - " + hora + ":" + minuto);
	} else if (tipo == 3) {
		datahora = (yearNr + "-" + mName + "-" + dayNr + " " + hora + ":" + minuto);
	} else if (tipo == 2) {
		datahoje = (dayNr + "/" + mName + "/" + yearNr);
		horagora = (hora + ":" + minuto + ":" + segundo);
		datahora = new Array(datahoje,horagora);
//		datahora = new Array();
//		datahora[1] = datahoje;
//		datahora[2] = horagora;
	}
	return datahora;
}