
	/*
	* Permet de swaper entre les états d'une rubrique (ouverture/fermeture)
	*/
	function swapRubrikByText(oRubHead)
	{
		//Base: 'RubrikContent_'...
		if( getObj('RubrikContent_'+oRubHead).className == 'RubrikContent_open' )
		{
			// TODO: close
			getObj('RubrikContent_'+oRubHead).className = 'RubrikContent_close';
			getObj(oRubHead).innerText = "[+]";
		}else{
			// TODO open
			getObj('RubrikContent_'+oRubHead).className = 'RubrikContent_open';
			getObj(oRubHead).innerText = "[-]";
			
		}
	}
	
	
	/*
	* Permet d'obtenir la valeur de la combobox si la valeur n'est pas nulle ou vide (retourne false dans ce cas, sinon value)
	*/
	function getComboValue(sCBX_DownloadablesFiles)
	{
		if( getObj(sCBX_DownloadablesFiles) && getObj(sCBX_DownloadablesFiles).options[getObj(sCBX_DownloadablesFiles).selectedIndex].value!='' )
		{
			return getObj(sCBX_DownloadablesFiles).options[getObj(sCBX_DownloadablesFiles).selectedIndex].value;
		}else{ return false; }
	}
	
	
	// Affiche dans une nouvelle fenêtre le fichier sélectionné!
	function view_DownloadbleFile(sModKEY)
	{
		sCBX_DownloadablesFiles = "CBX_"+sModKEY;
		sDownloadableFileKey = getComboValue(sCBX_DownloadablesFiles);
		sDownloadableFileINFO = sDownloadableFileKey.split("_");
		sDlFileExtension = sDownloadableFileINFO[0];
		sDownloadableFile = sDownloadableFileKey+'.'+String(sDlFileExtension).toLowerCase();
		if(sDownloadableFile){
			sBasePAth = getObj('LibURL').value;
			iw = getObj('POPUP_SIZES_WIDTH_'+sModKEY).value;
			ih = getObj('POPUP_SIZES_HEIGHT_'+sModKEY).value;
			rs = (getObj('WINDOW_RESIZABLE_'+sModKEY).value == '1')? 'yes':'no';
			suri = sBasePAth+sDownloadableFile;
			CTKModPopup = openCTKModPopup(suri,iw,ih,rs);
			CTKModPopup.focus();
			return true;
		}
	}

	function get_DownloadbleFile(sModKEY)
	{
		sCBX_DownloadablesFiles = "CBX_"+sModKEY;
		sDownloadableFileKey = getComboValue(sCBX_DownloadablesFiles);
		sDownloadableFileINFO = sDownloadableFileKey.split("_");
		sDlFileExtension = sDownloadableFileINFO[0];
		sDownloadableFile = sDownloadableFileKey+'.'+String(sDlFileExtension).toLowerCase();
		if(sDownloadableFile){
			sBasePAth = getObj('LibPATH').value;
			iw = getObj('POPUP_SIZES_WIDTH_'+sModKEY).value;
			ih = getObj('POPUP_SIZES_HEIGHT_'+sModKEY).value;
			rs = 'no';
			name = sDownloadableFile;
			suri = getObj('CurURL').value+'download.php?name='+name+'&file='+sBasePAth+sDownloadableFile;
			CTKModPopup = openCTKModPopup(suri,iw,ih,rs);
			CTKModPopup.focus();
			return true;
		}
	}
	
	
	/*
	* Permet d'ouvrir une nouvelle fenêtre popup identifiée. Core V3.4
	*/
	var CTKModPopup = null;
	function openCTKModPopup(strURL,w,h,r)
	{
		var oImg = new Image();
		oImg.src = strURL;
		
		var FULLSCREEN_const = 'no';
		
		OW = OH = 0;
		OW = oImg.width || oImg.clientWidth || oImg.offsetWidth || oImg.naturalWidth ; //
		OH = oImg.height || oImg.clientHeight || oImg.offsetHeight || oImg.naturalHeight ; //			
			
		var sh = parseInt(screen.availHeight || screen.width);
		var sw = parseInt(screen.availWidth || screen.height);
		var pH = (OH!=0)?(OH+36):h; // Win Titlebar width and win borders
		var pW = (OW!=0)?(OW+40):w; // VScrollbar width and win borders
		var resize = r;
		var hasSB = (arguments.length==5)? arguments[4] :'yes' ;
		
		var winCTKModPop = window.open(strURL,'winCTKModPop','top='+((sh-pH)/2)+',left='+((sw-pW)/2)+',width='+pW+',status=yes,height='+pH+',scrollbars='+hasSB+',resizable='+resize+',fullscreen='+FULLSCREEN_const);
		return winCTKModPop;
	}
	
	
	/*
	// Affiche dans une nouvelle fenêtre l'url cible de la vignette!
	*/
	function showThumbnailTarget(sTarget)
	{
		suri = (sTarget=='')?'About:blank':sTarget;
		iw = 800;
		ih = 600;
		rs = 'yes';
		CTKModPopup = openCTKModPopup(suri,iw,ih,rs);
		CTKModPopup.focus();
		return true;
	}
