function _remove_records(t){
	var c = document.getElementsByTagName('input');
	var removed = new Array();
	for(i=0; i<c.length; i++){
		if(c[i].type=='checkbox' && c[i].checked==true){
			removed.push(c[i].value);
		}
	}
	if(removed.length==0){
		alert('No selected records');
		return;
	}
	var a = confirm('You realy removed selected records ('+removed.length+')?');
	if(a){
	  window.location = 'handler.php?a=remove&id='+removed.join(',')+'&t='+t;
	}
}

window.onload = function(){
	// Init lightbox
	var a = document.getElementsByTagName('a');
	for(i=0; i<a.length; i++){
		var str = a[i].innerHTML;
		if(str.search('files') != -1){
			a[i].className = "lightbox";
		}
	}
	$('.lightbox').lightBox();
	
	// 
	var src;
	$("#icons img").mouseover(function(){
		src = $(this).attr('src');
		$(this).attr('src',src.replace('_1',''));
	});
	$("#icons img").mouseout(function(){
		$(this).attr('src',src);
	});
}
