function ViewTempBlock(id,text,timeout){
	$('#'+id).html(text);
	$('#'+id).show('slow');
	setTimeout('HideTempBlock("'+id+'")',timeout);
}

function HideTempBlock(id){
	$('#'+id).hide('slow');
}

function ShowBlockWithText(id,text){
	$('#'+id).html(text);
	$('#'+id).show('slow');
}

function ShowBlock(id){
	$('#'+id).show('slow');
}

function HideBlock(id){
	$('#'+id).hide('slow');
}

function ToggleBlock(id,speed){
	alert($('#'+id).is(':hidden'));
	if ($('#'+id).attr('display')=='none'){
		$('#'+id).hide(speed);
	}else{
		$('#'+id).show(speed);
	}
}

function checkall( p_formname, p_state ) {
	var t_elements = (eval("document." + p_formname + ".elements"));
	for (var i = 0; i < t_elements.length; i++) {
    	if(t_elements[i].type == "checkbox") {
            if( t_elements[i].checked == p_state )
                t_elements[i].checked = !p_state;
            else
                t_elements[i].checked = p_state;
   		}
  	}
}

