
function goToPage(num){	

	document.getElementById('numPage').value=num; 
	document.search_form.submit();
	
}


function resetSearchForm() {
	
	document.getElementById('cancellaSearchForm').value=1; 
	document.search_form.submit();
	
}

function orderBy(isSearch){	
	
	if(isSearch){	
		document.getElementById('ordine').value=document.getElementById('ordineFormOrderBy').value;
		document.search_form.submit();
	} else {
		document.orderby_form.submit();
	}
	
}

function setVerso(verso){	
	
	document.getElementById('verso').value=verso; 
	document.search_form.submit();
	
}



$j(document).ready(function(){
	
	
	$j(".tabella th:nth-child(odd)").addClass("alts");
	//$j("tr").find('td:first').addClass("tLeft");
	$j(".tabella tr").find('td:first').css("border-left","0");
		
	$j(".tabella tr:nth-child(odd)").addClass("odd");
	$j(".tabella tr").mouseover(function() {$j(this).addClass("over");}).mouseout(function() {$j(this).removeClass("over");});

	$j(".tabella table").find("th:first").css({background:"url("+root+"moduli/catalogo/img/bgTh1.gif) no-repeat left top"});
	
	
	$j(".tabella tfoot td").css({background:"url("+root+"moduli/catalogo/img/bgTf.jpg) no-repeat center bottom",color:"#fff", fontWeight:"bold" });
	
	
	$j(".tabella tfoot").find("td:first").css({background:"url("+root+"moduli/catalogo/img/bgTf.jpg) no-repeat left bottom"});	
		
		
		
	$j(".tabella tfoot").find("td:last").css({background:"url("+root+"moduli/catalogo/img/bgTf.jpg) no-repeat right bottom"});	
	
	
	var isLight=($j(".tabella table").find("th:last").attr("class")=="alts");

	if (isLight) $j(".tabella table").find("th:last").css("background","url("+root+"moduli/catalogo/img/bgTh1.gif) no-repeat right top");
	else $j(".tabella table").find("th:last").css("background","url("+root+"moduli/catalogo/img/bgTh2.gif) no-repeat right top");
	
	$j(".tabella").find("th:first").css("border-left","0");
	$j(".tabella").find("thead tr").css("background","none");
	
	
	
});
