function firePopUp(element){

	Lightview.show({
	href: '#'+element,
	rel: 'inline',
	options: { autosize: true,topclose: true,closeButton: 'large'}
	});
	
	Tips.hideAll();
}

function fireError(){
	
	Lightview.hide();
	alert('Niestety wystąpił błąd.');

}

function LightviewLoading(){ }
function LightviewLoaded(){ }
function hideLightview(){ Lightview.hide();}

function hideflashMessage(){
	
	if($('flashMessage')){
	$('flashMessage').fade({duration: 3.0});
	}
	
}

function hideComment(id){
	comment = $$('tr.comm_'+id);
	for (var i=0; i < comment.length; i++) {comment[i].hide();};
	Tips.hideAll();
}

Event.observe(window, 'load', function() {
    setTimeout(function() {hideflashMessage();}, 10000);
});

function add_events_to_class(elements_class,element_event,element_function){
	
	var stuff = $$(elements_class);
	for (var i = stuff.length - 1; i >= 0; i--){
	
		Event.observe(stuff[i],element_event,element_function);
	};
	
}

function clearText(thefield){
if (thefield.defaultValue==thefield.value){
thefield.value = "";
}
}


