// JavaScript Document
var SEPgallery = {
	init:function(photo){
		if(photo!=null){
			SEPgallery.photo = photo;
		}
		SEPgallery.getPage(0);
	},	
	getPage: function(limitpage){
		if($('SEPgallery')){
			// recharge la liste dans la page
			
			var myurl = "/crue/trt/trt_list.php?limitv="+limitpage;
			var param = "reload_page=1";
			if(document.getElementById('SEPgalleryfilter')){
				param += "&departement="+document.getElementById('departement').value;
				param += "&ville="+document.getElementById('ville').value;
				param += "&description="+document.getElementById('description2').value;
				param += "&quality="+document.getElementById('quality').value;
			}
			if(SEPgallery.photo!=null){
				param += "&photo="+SEPgallery.photo;
			}
			$('SEPgallery').set('html','<div align="center"><img src="/images/ajax-loader.gif" /></div>');
			new Request({url:myurl ,method: 'post',data: param, onComplete :function(e){
				$('SEPgallery').set('html',e);
				Mediabox.scanPage();
			}}).send();																		 
		}
	},
	choosephoto: function(photo,src){
		parent.SEPkit.choosephoto(photo,src);
	}
}
