var oActivatedAnchorPrevious='';
var oActivatedIdFilesBlockPrevious='';
function loadFiles(iId, sType, oAnchor){
	oAnchor.style.backgroundColor='#7ca9a6';
	oFilesBlock=document.getElementById('filesBlock_'+iId);
	oFilesBlock.style.display='block';
	if(oActivatedAnchorPrevious!=='' && oActivatedAnchorPrevious!==oAnchor){
		oActivatedAnchorPrevious.style.backgroundColor='#d3e7e6';
	}
	if(oActivatedIdFilesBlockPrevious!=='' && oActivatedIdFilesBlockPrevious!==oFilesBlock){
		oActivatedIdFilesBlockPrevious.style.display='none';
	}
	oActivatedIdFilesBlockPrevious=oFilesBlock;
	oActivatedAnchorPrevious=oAnchor;
}

function showTip(id, oActivator){
	oSubtitle=document.getElementById('subtile_'+id);
	oDate=document.getElementById('sdate_'+id);
	oType=document.getElementById('stype_'+id);
	alert(oSubtitle.innerHTML);
	oActivator.title=oSubtitle.innerHTML+oDate.innerHTML+oType.innerHTML;
}
var oActivatedPrevious='';
var oActivatorPrevious='';
function showSub(id, oActivator){
	oActivated=document.getElementById('hiddenBloc_'+id);
	oActivatedImgBlock=document.getElementById('imagesPan_'+id);
	if(oActivatedImgBlock!==null){
		oActivatedImgBlock.innerHTML=aImagesBlocks[id];
		Ext.ux.Lightbox.register('a.lb-refgallery_'+id, true); // true to show them as a set
		//alert('a.lb-refgallery_'+id);
		//alert(aImagesBlocks[id]+id);  refgallery_
	}
	//alert(aImagesBlocks[id]);
	if (oActivatedPrevious==''){
		for(i=0;i<oIdOfRef.length;i++){
			id=oIdOfRef[i].id;
			document.getElementById('activator_'+id).style.fontWeight='';
			document.getElementById('hiddenBloc_'+id).style.display='none';
		}
	} 

	if (oActivated.active!==true){
		oActivated.style.display='block';
		oActivator.style.fontWeight='bold';
		oActivated.active=true;
	} else {
		oActivated.style.display='none';
		oActivator.style.fontWeight='';
		oActivated.active=false;
	}
		
	if(oActivatedPrevious!=='' && oActivatedPrevious!==oActivated){
		//oActivatedPrevious.style.display='none';
	} 
	if(oActivatorPrevious!=='' && oActivatorPrevious!==oActivator){
		//oActivatorPrevious.style.fontWeight='';
	}
	
	oActivatedPrevious=oActivated;
	oActivatorPrevious=oActivator;
}

var fShowVisual=function(id,panelId){
	oPanelImg=Ext.getCmp('imageBloc'+panelId);
	oPanelImg.load(base_url+'index.php/sections/getImg/'+id+'/'+panelId);
};
var fShowZoom=function(id,panelId){
	oPanelZoo=Ext.getCmp('oZoomWindPan');
	oWinZoo=Ext.getCmp('oZoomWind');
	oWinZoo.show();
	oPanelZoo.load(base_url+'index.php/sections/getZoom/'+id+'/'+panelId);
};
var fShowDescription=function(id,panelId){
	oPanelImg=Ext.getCmp('fichiersBloc'+panelId);
	oPanelImg.load(base_url+'index.php/sections/getFileInfo/'+id);
};
Ext.BLANK_IMAGE_URL = '../../resources/images/default/s.gif';

Ext.onReady(function(){

	
});
