changeItem = function(item){
	var bloco = getElm('scroll-texto').getElementsByTagName('blockquote');
	var arrItens = ['blogs','acoes','youtube'];

	scroller2._setPos(0, 5);
	if(item=='acoes'){getElm('seta').style.visibility='hidden';}
	else{getElm('seta').style.visibility='visible';}
	for(var i=0; i<bloco.length; i++){
		if(bloco[i].id=='block-'+item){
			bloco[i].className='dblock';
			getElm(arrItens[i]).src='img/mn_' +  arrItens[i] + '_on.gif';
			
		}
		else{
			bloco[i].className='dnone';
			getElm(arrItens[i]).src='img/mn_' +  arrItens[i] + '_off.gif';
		}
	}
}

function isDef(S){return(eval('typeof('+S+')')!='undefined'&&eval('typeof('+S+')')!='unknown');}
function getElm(id){return document.getElementById(id);}

checkFields = function() {			
	var fst_nvideos = document.getElementsByTagName('input');
	var textarea = elementById('dsComment');
	var fields ='';
	for(i=0;i<fst_nvideos.length; i++){
		if(fst_nvideos[i].className.indexOf('required')!=-1){
			if(fst_nvideos[i].type!='image'&&fst_nvideos[i].value==''){
				alert("Para continuar, preencha corretamente o campo " + fst_nvideos[i].title + ".");
				fst_nvideos[i].focus();
				return false;
			}
			else{
				if(fst_nvideos[i].className.indexOf('email')!=-1){
					if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(fst_nvideos[i].value))){
						alert("Preencha corretamente o seu e-mail.");
						fst_nvideos[i].focus();
						return false
					}
				}
			}
		}
	}
	
	if(textarea.value==''){
		alert("Para continuar, preencha corretamente o campo " + textarea.title + ".");
		textarea.focus();
		return false;
	}
	return true
}

wO = function(u,n,w,h,o,c){
	var l=t=18;if(c){l=(screen.availWidth-w)/2;t=(screen.availHeight-h)/2;}p=window.open(u,'pop_'+n,'left='+l+',top='+t+',width='+w+',height='+h+',scrollbars='+((o)?'yes':'no'));
}

elementById = function(element){
	return document.getElementById(element);
}