// JavaScript do calendário
function verDestaque(div,txt){
  if (txt){
	contHTML = '<table width="100%" border="0" cellpadding="0" cellspacing="0">';
	contHTML += '<tr>';
	contHTML += '<td width="7" valign="top"><img src="images/icon_seta.gif"></td>';
	contHTML += '<td valign="top" class="cl-txt-03">'+ txt +'</td>';
	contHTML += '</tr>';
	contHTML += '</table>';
  }else{
	contHTML = '';
  }
  document.getElementById(div).innerHTML = contHTML;
}

//Carregar video mov
function quickTime(movie,w,h,scl,ctrl,auto,bg){
		document.writeln("<object classid=\"clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B\" width="+w+" height="+h+" codebase=\"http://www.apple.com/qtactivex/qtplugin.cab\">");
		document.writeln("<param name=\"src\" value="+ movie +">");
		document.writeln("<param name=\"scale\" value="+ scl +">");
		document.writeln("<param name=\"controller\" value="+ ctrl +">");
		document.writeln("<param name=\"autoplay\" value="+ auto +">");
		document.writeln("<param name=\"bgcolor\" value="+ bg +">");
		document.writeln("<param name=\"pluginspage\" value=\"http://www.apple.com/quicktime/download/\">");
		document.writeln("<embed src="+movie+" width="+w+" height="+h+" scale="+scl+" cache=\"true\" bgcolor="+bg+" autoplay="+auto+" controller="+ctrl+" pluginspage=\"http://www.apple.com/quicktime/download/\"></embed>");
}


//Abrir Popup
function janela(mypage, myname, w, h, scroll, resid) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable='+ resid
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

//calendario
function sendForm(url,id,nav){
	var txt='';
	if (id) txt='&id='+ id 
	document.form.action = url+'?nav='+nav + txt;
	document.form.submit();
}

//calendario blog
function sendBlog(url,id,nav){
	var txt='';
	if (id) txt='&tipo='+ id 
	document.form.action = url+'?nav='+nav + txt;
	document.form.submit();
}


//mudaFonte
var tam = 11;

function mudaFonte(tipo){
  if( tipo == 'mais' ){
    if( tam < 16 ) tam += 2 ;    			 
  }else{
    if( tam > 9 ) tam -= 2 ;
  }
  if(document.getElementById('mudaFonte'))
    mudaFonteRecursiva( tipo , document.getElementById('mudaFonte') ) ;

  if(document.getElementById( 'mudaFoto' ))
    mudaFonteRecursiva( tipo , document.getElementById('mudaFoto') ) ;  
}

function mudaFonteRecursiva( tipo , domElement ){		
  for( var i = 0 ; i < domElement.childNodes.length ; i++ )  {
    mudaFonteRecursiva( tipo , domElement.childNodes.item( i )  ) ;
  }
  if( domElement.style )
    domElement.style.fontSize = tam+'px';
}

//busca
function sendBusca(){
	document.busca.submit();
}

