
function _switchCss (_id,_css) {
	if ($(_id)) {
		$(_id).href = _css;
	}
}
function integraSubmitForm(_form){
	var s=0;
	$(_form).select("input[type='checkbox']").each(function(item){
		if (item.checked)
			s++;
	});
	if (s>0)
		$(_form).submit();
		else
		alert('Selezionare almeno un documento')
}

function bellottiSelectAllType(_cb){
	var el=Element.extend(_cb);
	//alert(el);
	var currRow = el.up().up();
	var cursor= currRow.next();
	while( cursor ){
		if(cursor.getAttribute('class')=='testata' || (cursor && cursor.className=='testata') )
			break;

		//cursor.select('input').checked=false;

		cursor.select('input').first().checked=el.checked;

		cursor=cursor.next();
	}
}
function locationReplace (val) {
	var pathName = location.pathname;
	var jsIdPosition = pathName.indexOf(";jsessionid");
	if (jsIdPosition != -1) {
		var newLoc = pathName.substr(0,jsIdPosition)+val;
		alert(newLoc);
		location.assign(newLoc);
		
	}else {
		location.assign(pathName+val);
	}
}
