/*!
 * FSI Server Interface
 * http://www.fsi-viewer.com
 *
 * Copyright (C) 2000-2016 NeptuneLabs GmbH - All rights reserved.
 *
 * Version: 3.0.0
 */
;function StatusBarControl(interfaceControl){var self=this;var ic=interfaceControl;var strFiles;var statusBarTimer;this.setUsername=function(uvar){var objRight=document.getElementById("statusRight");if(objRight){objRight.innerHTML=ic.getTranslator().translateComponentTextValue("components","login","Username",true)+": "+uvar}};this.setServerVersion=function(svar){var objServerVersion=document.getElementById("statusServerVersion");if(objServerVersion&&svar&&svar!=""){objServerVersion.innerHTML=svar+"&nbsp;-&nbsp;"}};this.setFolderStats=function(images,dirs,complete,lastModified,nSelectedItems,strVisibleRange){if(statusBarTimer){window.clearTimeout(statusBarTimer)}statusBarTimer=setTimeout(function(){setFolderStatsAsync(images,dirs,complete,lastModified,nSelectedItems,strVisibleRange)},25)};this.setFilesString=function(str){strFiles=ic.getTranslator().translateScriptText(str)};var setFolderStatsAsync=function(images,dirs,complete,lastModified,nSelectedItems,strVisibleRange){var translator=ic.getTranslator();var tdSep='<td><img src="'+ic.getSkinPath()+'images/statusbar_seperator.gif" width="19" height="18" border="0" /></td>';var objMid=document.getElementById("statusMiddle");if(objMid){var statusTextArray=Array();if(nSelectedItems&&nSelectedItems>0){statusTextArray.push(translator.translateScriptText("SelectedItems")+": "+ic.makeNiceInt(nSelectedItems))}if(images&&images>0){statusTextArray.push(strFiles+": "+ic.makeNiceInt(images));if(complete&&images>complete){statusTextArray.push(complete+" ("+translator.translateScriptText("InProgress")+": "+ic.makeNiceInt(images-complete)+")")}}if(dirs&&dirs>0){statusTextArray.push(translator.translateScriptText("Directories")+": "+ic.makeNiceInt(dirs))}if(lastModified&&lastModified>0){var dateObj=new Date();dateObj.setTime(lastModified);statusTextArray.push(translator.translateScriptText("LastChanges")+": "+translator.formatLocaleDate(dateObj))}if(strVisibleRange&&strVisibleRange.length>0){statusTextArray.push(translator.translateScriptText("ViewingItemsFromTo")+": "+strVisibleRange)}if(statusTextArray.length>0){var statusText=statusTextArray.join("</td>"+tdSep+"<td>");statusText='<table class="statusTableMiddle" cellpadding="0" cellspacing="0" border="0"><tr>'+tdSep+"<td>"+statusText+"</td>"+tdSep+"</tr></table>";objMid.innerHTML=statusText}else{objMid.innerHTML="---"}}};self.setFilesString("files")};