function displayBlock(id) {
	
	var block = document.getElementById(id);
	if(block.style.display == "inline")
		block.style.display = "none";
	else
		block.style.display = "inline";
}

function showBlock(id) {
	var block = document.getElementById(id);
	block.style.display = "block";
}

function hideBlock(id) {
	var block = document.getElementById(id);
	block.style.display = "none";
}

function jump( url) {
	
	window.location.href = url;
} 
function jumpFromSelect(theSelect){

    window.location.href = theSelect.options[theSelect.selectedIndex].value
}

function reloadPageFromSelect(theSelect, param, url) {
	
	window.location.href = url + "/" + param + "/" + theSelect.options[theSelect.selectedIndex].value;
}

/**
 * marks all rows and selects its first checkbox inside the given element
 * the given element is usaly a table or a div containing the table or tables
 *
 * @param container DOM element
 */
function markAllRows( container_id, uncheck) {
	
	var rows = document.getElementById(container_id).getElementsByTagName('tr');
	
	var checkbox;
	
	for ( var i = 0; i < rows.length; i++ ) {
	
		checkboxes = rows[i].getElementsByTagName( 'input' );
		
		for ( var j = 0; j < checkboxes.length; j++) {
		
			checkbox = checkboxes[j];
			if ( checkbox && checkbox.type == 'checkbox' ) {			
				
				
				if ( checkbox.disabled == false ) {
										 				
					checkbox.checked = !uncheck;
				}
			}
		}
	}
	

	return true;
}
