
<!-- MANIPULAR PROPRIEDADES CSS
function MM_findObj(n, d) { //v4.01
  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 && d.getElementById) x=d.getElementById(n); return x;
}

function MM_changeProp(objName,x,theProp,theValue) { //v6.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
    if (theValue == true || theValue == false)
      eval("obj."+theProp+"="+theValue);
    else eval("obj."+theProp+"='"+theValue+"'");
  }
}
//-->


function favoritos() {
	url="http://www.rocknews.com.br";
	title="RockNews";
	if (window.sidebar) window.sidebar.addPanel(title, url,""); //FF
	else if( window.external ) window.external.AddFavorite( url, title); //IE
	else if(window.opera && window.print) return true; //Demais, que não têm essa opção
}

function janela(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function enquete(f) {
	campo=document.form2.enquete;
	valor="";

	if(!f) 
		for (a=0; a<campo.length; a++) {
			if (campo[a].checked) {
				valor = campo[a].value
			}
		}

	janela('enquete.php?voto='+valor,'Enquete','menubar=no,scrollbars=no,resizable=no,width=400,height=200,top=40,left=85');
}

var dom = document.getElementById;
var iex = document.all;
var ns4 = document.layers;

function getElement(name,nest){
	nest = nest ? 'document.'+nest+'.' : '';
	var el = dom ? document.getElementById(name) : iex ? document.all[name] : ns4 ? eval(nest+'document.'+name) : false;
	el.css = ns4 ? el : el.style;
	return el;
}


/************************************************************************************************************
(C) www.dhtmlgoodies.com, November 2005

This is a script from www.dhtmlgoodies.com. You will find this and a lot of other scripts at our website.	

Terms of use:
You are free to use this script as long as the copyright message is kept intact. However, you may not
redistribute, sell or repost it without our permission.

Thank you!

www.dhtmlgoodies.com
Alf Magne Kalleland

************************************************************************************************************/

var dhtmlgoodies_slideSpeed = 30;	// Higher value = faster
var dhtmlgoodies_timer = 1;	// Lower value = faster

var objectIdToSlideDown = false;
var dhtmlgoodies_activeId = false;
function showHideContent(a)
{
	if(!isNaN(a)) { d=document.getElementById('agenda_q'+a);}
	else d=this;

	var numericId = d.id.replace(/[^0-9]/g,'');
	velha=numericId;
	var answerDiv = document.getElementById('agenda_a' + numericId);
	if(!answerDiv.style.display || answerDiv.style.display=='none'){

		if(dhtmlgoodies_activeId &&  dhtmlgoodies_activeId!=numericId){
			objectIdToSlideDown = numericId;
			slideContent(dhtmlgoodies_activeId,(dhtmlgoodies_slideSpeed*-1));
		}else{
			answerDiv.style.display='block';
			answerDiv.style.visibility='visible';
			slideContent(numericId,dhtmlgoodies_slideSpeed);
		}
	}else{
		slideContent(numericId,(dhtmlgoodies_slideSpeed*-1));
		dhtmlgoodies_activeId = false;
		velha="";
	}	
}


function slideContent(inputId,direction)
{
	var obj =document.getElementById('agenda_a' + inputId);
	var contentObj = document.getElementById('agenda_ac' + inputId);
	height = obj.clientHeight;
	height = height + direction;
	rerunFunction = true;
	if(height>contentObj.offsetHeight){
		height = contentObj.offsetHeight;
		rerunFunction = false;
	}
	if(height<=0){
		height = 1;
		rerunFunction = false;
	}

	obj.style.height = height + 'px';
	var topPos = height - contentObj.offsetHeight;
	if(topPos>0)topPos=0;
	contentObj.style.top = topPos + 'px';
	if(rerunFunction){
		setTimeout('slideContent(' + inputId + ',' + direction + ')',dhtmlgoodies_timer);
	}else{
		if(height==1){
			obj.style.display='none'; 
			if(objectIdToSlideDown && objectIdToSlideDown!=inputId){
				document.getElementById('agenda_a' + objectIdToSlideDown).style.display='block';
				document.getElementById('agenda_a' + objectIdToSlideDown).style.visibility='visible';
				slideContent(objectIdToSlideDown,dhtmlgoodies_slideSpeed);				

			}
		}else{
			dhtmlgoodies_activeId = inputId;
			if(show_radio) abre2();			
		}
	}
}



function initShowHideDivs()
{
	var divs = document.getElementsByTagName('DIV');
	var divCounter = 1;
	id_abrir="";
	for(var no=0;no<divs.length;no++){
		if(divs[no].className=='agenda' || divs[no].className=='agenda abre'){
			divs[no].onclick=showHideContent;
			divs[no].id = 'agenda_q'+divCounter;

			if(divs[no].className=='agenda abre') id_abrir=divCounter;
			
			var answer = divs[no].nextSibling;
			while(answer && answer.tagName!='DIV') answer = answer.nextSibling;
			
			answer.id = 'agenda_a'+divCounter;	
			
			contentDiv = answer.getElementsByTagName('DIV')[0];
			contentDiv.style.top = 0 - contentDiv.offsetHeight + 'px'; 	
			contentDiv.className='agenda_answer_content';
			contentDiv.id = 'agenda_ac' + divCounter;
			answer.style.display='none';
			divCounter++;
		}		 
	}	

	if(id_abrir!="") showHideContent(id_abrir);
}

function contato(f,tipo) {
	nome=getElement("nome"+f+tipo);
	disp=getElement("contatoto");
	contatoto.innerHTML=nome.innerHTML;
	document.contato.idcontato.value=f+"_"+tipo;
//	alert(document.contato.idcontato.value);
}

function valida_contato() {
	str="";
	valida=true;
	cor="#f75000";
	with (document.contato){	
		if (nome.value==""){
			str+="- O campo de nome é obrigatório\n";
			nome.style.backgroundColor=cor;
			valida=false;
		}
		if (email.value==""){
			str+="- O campo de assunto é obrigatório\n";
			email.style.backgroundColor=cor;
			valida=false;
		}
		if (mensagem.value==""){
			str+="- O campo de mensagem é obrigatório\n";
			mensagem.style.backgroundColor=cor;
			valida=false;
		}
	}

	if(!valida) alert("Os seguintes erros foram encontrados:\n"+str);
	return valida;
}

velha="";