function youtubeplayer(id) {
  tamanho_w = 640;
  tamanho_h = 510;
  posicao_x = (screen.width) ? (screen.width-tamanho_w)/2 : 0;
  posicao_y = (screen.height) ? (screen.height-tamanho_h)/2 : 0;
  window.open("youtube,player.php?id="+id,"_blank","resizable=no,toolbar=no,status=yes,menubar=no,scrollbars=no,top="+posicao_y+",left="+posicao_x+",width="+tamanho_w+",height="+tamanho_h);
}

function verimagem(id,tamanho_w,tamanho_h) {
  tamanho_w = (tamanho_w + 40);
  tamanho_h = (tamanho_h + 100);
  //if (tamanho_w < 640) { tamanho_w = 640; }
  posicao_x = (screen.width) ? (screen.width-tamanho_w)/2 : 0;
  posicao_y = (screen.height) ? (screen.height-tamanho_h)/2 : 0;
  //window.open("verimagem.php?id="+id,"_blank","resizable=yes,toolbar=no,status=yes,menubar=no,scrollbars=yes,top="+posicao_y+",left="+posicao_x+",width="+tamanho_w+",height="+tamanho_h);
  window.open("verimagem.php?id="+id,"_blank","resizable=yes,toolbar=no,status=yes,menubar=no,scrollbars=yes,top="+posicao_y+",left="+posicao_x+",width="+tamanho_w+",height="+tamanho_h);
}

function favorito(title,url) {
	if (window.sidebar) // firefox
		window.sidebar.addPanel(title, url, "");
	  else if(window.opera && window.print){ // opera
		var elem = document.createElement('a');
		elem.setAttribute('href',url);
		elem.setAttribute('title',title);
		elem.setAttribute('rel','sidebar');
		elem.click();
	
	} 
	else if(document.all) // ie
	  window.external.AddFavorite(url, title);
}

function difusora() {
  tamanho_w = 260;
  tamanho_h = 170;
  posicao_x = (screen.width) ? (screen.width-tamanho_w)/2 : 0;
  posicao_y = (screen.height) ? (screen.height-tamanho_h)/2 : 0;
  window.open("difusora.php","difusora","resizable=yes,toolbar=no,status=no,menubar=no,scrollbars=no,top="+posicao_y+",left="+posicao_x+",width="+tamanho_w+",height="+tamanho_h);
}
