// Funções Javascript

function abrirPop(ta,la,ha,sc)
{
	var x,y,scrol
	if(sc=='scroll')
		scrol="yes";
	else
		scrol="no";
	
	x = (screen.height - parseInt(ha))/2;
	y = (screen.width - parseInt(la))/2;

	window.open('',''+ta+'','location=no,status=no,scrollbars='+scrol+',width='+la+',height='+ha+',top='+x+',left='+y+'')
}

var sel = 0;

function selecionarCheckBox(){ 
	
	sel == 0 ? sel = 1 : sel = 0;
	
	for (i=0;i<document.formulario.elements.length;i++) 
	{
	var str = document.formulario.elements[i].name;
	
	//alert(str.search(/h/));
	
	if(str.search(/ch/) != -1)	
	{
		
		 //if (document.formulario.elements[i].checked==1)
		 //{
		//	 document.formulario.elements[i].checked=0;
		 //}
		 //else
		 //{
			 document.formulario.elements[i].checked=sel;
		// }
	}
	}
} 

function confirmaAcao(aURL, sTexto)
{
	if(confirm(sTexto)) 
	{
		location.href = aURL;
	}
}

function mudaImg(alvo,imagem)
{
	alvo.src = imagem;
}