var kl;
Spry.Utils.addLoadListener(function() {
	Spry.$$("#klAccordion").forEach(function(n) {
		kl = new Spry.Widget.Accordion("klAccordion", { useFixedPanelHeights: false });
		});
});


//checa Campos
function checkrequired(which) {
	var pass=true;
	if (document.images) {
		for (i=0;i<which.length;i++) {
		var tempobj=which.elements[i];
		if (tempobj.name.substring(0,8)=="required") {
			if (((tempobj.type=="text"||tempobj.type=="textarea")&&
			tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&
			tempobj.selectedIndex==0)) {
				pass=false;
				break;
			}
		}
	}
}
if (!pass) {
	shortFieldName=tempobj.name.substring(8,30).toUpperCase();
	alert("O campo "+shortFieldName+" deve ser preenchido.");
	return false;
} 
else
return true;
}

function abrir(pagina,largura,altura) {
		w = screen.width;
		h = screen.height;
		meio_w = w/2;
		meio_h = h/2;
		altura2 = altura/2;
		largura2 = largura/2;
		meio1 = meio_h-altura2;
		meio2 = meio_w-largura2;
		//window.open(pagina,'','height=' + altura + ', width=' + largura + ', top='+meio1+', left='+meio2+'');
		
		window.open(pagina,'','height=' + altura + ', width=' + largura + ', top='+meio1+', left='+meio2+', toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no');
}














