/*


 				MACHINE GENERATED FILE - DO NOT EDIT



		File generated on: Fri, 17 Jun 2011 17:15:09

		Copyright (c) 2008-2009 Group Logic Incorporated. All rights reserved.

		This source code may be used only by organizations licensed to use MassTransit, in conjunction with normal MassTransit usage. No portion 
		of it may be redistributed or modified without the written permission of Group Logic, Inc. See the Group Logic Software License Agreement 
		for more information.

		
		*****EDITED
			Scott McRae, 9/13/2011
			Remove extra "?" from ERRMSG redirect
*/




$R('com.grouplogic.GLIUtil');$G.kMassTransit_PopupDivID='popdiv';(function(){com.grouplogic.GLIUtil=Base.extend({mSreen:null,mCookiesSupported:false,constructor:function(){this.base();},isNull:function(val){return(val==null);},isUndefined:function(v){return(typeof(v)==undefined);},isValid:function(v){return!(this.isNull(v)||this.isUndefined(v));},substr:function(str,offset,len){if($G.isIE7&&offset<0){return str.substr(str.length+offset,len)}else{return str.substr(offset,len);}},cookiesSupported:function(){return this.mCookiesSupported;},createCookie:function(name,value,days){if(days){var date=new Date();date.setTime(date.getTime()+(days*24*60*60*1000));var expires="; expires="+date.toGMTString();}
else var expires="";document.cookie=name+"="+value+expires+"; path=/";},readCookie:function(name){var nameEQ=name+"=";var ca=document.cookie.split(';');for(var i=0;i<ca.length;i++)
{var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length);}
return null;},eraseCookie:function(name){this.createCookie(name,"",-1);},testForCookieSupport:function(){var cookiesSupported=false;try{this.createCookie('djhTestCookie','supported',1);if(this.readCookie('djhTestCookie')){cookiesSupported=true;this.eraseCookie('djhTestCookie');}}catch(e){}
return cookiesSupported;},getScreenSize:function(){if(this.isNull(this.mScreen)){this.mScreen=new Object();this.mScreen.h=screen.availWidth;this.mScreen.v=screen.availHeight;}
return this.mScreen;},getWindowSize:function(w){var winSizeObj=new Object();if(navigator.userAgent.indexOf('Opera')==-1)
{winSizeObj.h=w.document.documentElement.clientWidth|w.document.body.clientWidth|w.document.body.scrollWidth;winSizeObj.v=w.document.documentElement.clientHeight|w.document.body.clientHeight|w.document.body.scrollHeight;}
else
{winSizeObj.h=w.innerWidth;winSizeObj.v=w.innerHeight;}
return winSizeObj;},getPageSize:function(){var xScroll,yScroll;if(window.innerHeight&&window.scrollMaxY){xScroll=document.body.scrollWidth;yScroll=window.innerHeight+window.scrollMaxY;}else if(document.body.scrollHeight>document.body.offsetHeight){xScroll=document.body.scrollWidth;yScroll=document.body.scrollHeight;}else if(document.documentElement&&document.documentElement.scrollHeight>document.documentElement.offsetHeight){xScroll=document.documentElement.scrollWidth;yScroll=document.documentElement.scrollHeight;}else{xScroll=document.body.offsetWidth;yScroll=document.body.offsetHeight;}
var windowWidth,windowHeight;if(self.innerHeight){windowWidth=self.innerWidth;windowHeight=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientHeight){windowWidth=document.documentElement.clientWidth;windowHeight=document.documentElement.clientHeight;}else if(document.body){windowWidth=document.body.clientWidth;windowHeight=document.body.clientHeight;}
if(yScroll<windowHeight){pageHeight=windowHeight;}else{pageHeight=yScroll;}
if(xScroll<windowWidth){pageWidth=windowWidth;}else{pageWidth=xScroll;}
arrayPageSize={"pageWidth":pageWidth,"pageHeight":pageHeight,"windowWidth":windowWidth,"windowHeight":windowHeight};return arrayPageSize;},getMousePositonRelativeToDoc:function(e){var posx=0;var posy=0;if(!e)var e=window.event;if(e.pageX||e.pageY){posx=e.pageX;posy=e.pageY;}
else if(e.clientX||e.clientY){posx=e.clientX+document.body.scrollLeft
+document.documentElement.scrollLeft;posy=e.clientY+document.body.scrollTop
+document.documentElement.scrollTop;}
var mousePosObj={x:posx,y:posy};return mousePosObj;},getMousePositionRelativeToTarget:function(e){var targetX=0;var targetY=0;if(typeof e.offsetX=='number'){targetX=e.offsetX;targetY=e.offsetY;}else{targetX=e.clientX;targetY=e.clientY;for(var offMark=e.target;offMark;offMark=offMark.offsetParent){targetX-=offMark.offsetLeft;}
for(var offMark=e.target;offMark;offMark=offMark.offsetParent){targetY-=offMark.offsetTop;}}
var mousePosObj={x:targetX,y:targetY};return mousePosObj;},randomString:function(size){var chars="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";var string_length=size;var randomstring='';for(var i=0;i<string_length;i++){var rnum=Math.floor(Math.random()*chars.length);randomstring+=chars.substring(rnum,rnum+1);}
return randomstring;},unixTimestamp:function(){var now=new Date();return parseInt(now.getTime().toString().substring(0,10));},clone:function(obj){var newObj=(obj instanceof Array)?[]:{};for(i in obj){if(i=='clone')continue;if(obj[i]&&typeof obj[i]=="object"){newObj[i]=this.clone(obj[i]);}else{newObj[i]=obj[i];}}
return newObj;},getStyleSheetRules:function(s){if(s.cssRules)
return s.cssRules;else if(s.rules)
return s.rules;else
return undefined;},getCSSPropertyValue:function(selector,r){var result;var rr=r.toLowerCase();for(s=0;s<document.styleSheets.length;s++){var rules=this.getStyleSheetRules(document.styleSheets[s]);if(rules){for(i=0;i<rules.length;i++){if(selector==rules[i].selectorText.toLowerCase()){if(rules[i].style[r]){return rules[i].style[r];}}}}}
return result;}});var __gli_Utils=window.$G.gliUtils=new com.grouplogic.GLIUtil();})();
var skipBrowserCheck=true;function checkBrowser()
{if(ie4||(win&&ie5&&!ie5x)||(ie5mac&&nu<5.2)||(saf&&nu<125)||(mac&&moz&&moz_brow_ver_num<1000700)||(win&&moz&&moz_brow_ver_num<1050001)){document.location='?action=General.browserdownload';return false;}
return true;}
if(!skipBrowserCheck){checkBrowser();}
$G['handlers'].addLoadEventHandler(window,function(){$f('admin_contact_text').reveal(null,2000);});
$R('com.grouplogic.MTWebUtils');(function(){var undefined;var kWebClientMIMEType="application/x-MTWebClient2";var regExPatterns={IS_SAFARI:/safari/i,IS_IE:/(msie|internet explorer)/i,IS_ROOT_ELEM:/^body|html$/i,IS_MASSTRANSIT_WEBCLIENT:/mtwebclient2/i};com.grouplogic.MTWebUtils=Base.extend({constructor:function(){this.base();},isValidEmailAddress:function(testAddress){var emailRegEx=/^([a-zA-Z0-9])+((([a-zA-Z0-9_\-]*)|[\.])([a-zA-Z0-9]))*\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;return((testAddress.length<=64)&&testAddress.match(emailRegEx));},ignoreEnter:function(e)
{if(!e)
{e=window.event;}
if(e.keyCode==13)
{e.cancelBubble=true;e.returnValue=false;}}});var __gli_utils=window.$G.gliMTWebUtils=new com.grouplogic.MTWebUtils();})();
$R('com.grouplogic.TransferLackey');var inst=false;(function(){var undefined;com.grouplogic.RequestFilesLackey=Base.extend({mDebug:false,mDebugClassName:'requestfileslackey',mErrorText:'',mClickables:null,requestFilesURL:"index.php?action=General.requestFiles",constructor:function(){this.base();},dbg:function(submodule,op,msg){if(this.mDebug){$G.debug.dbgtrace(this.mDebugClassName,submodule,op,msg,"#65a564");}},setErrorText:function(msg){if(msg!="")
{$j("#statusInfo #statusText").html("&nbsp;");}
this.mErrorText=msg+'<br/>';$j("#errorInfo #errorText").html(this.mErrorText);},appendErrorText:function(msg){this.mErrorText=this.mErrorText+' '+msg+'<br/>';$j("#errorInfo #errorText").html(this.mErrorText);},installEventHandlers:function(){$j(this.mClickableElements).each(function(i){$G.requestFilesLackey.dbg('','installEventHandlers','action='+this.action+', id='+this.elemID);switch(this.action){case"INVOKE_REQUESTFILESLACKEY_METHOD":$j("#"+this.elemID).bind(this.eventType,this.eventData,this.proc);break;case"NAVIGATE":$j("#"+this.elemID).bind(this.eventType,function(){window.location.href=this.url});break;default:$G.requestFilesLackey.dbg('','installEventHandlers','The '+this.action+' event was not handled.');break;}});},handleOnReady:function(){this.dbg('','HandleOnReady','this is a test.');$j("input:text:visible:first").focus();$G.requestFilesLackey.mClickableElements=[{"eventType":"blur","action":"INVOKE_REQUESTFILESLACKEY_METHOD","elemID":"recipient_email","proc":$G.requestFilesLackey.ValidateRequest},{"eventType":"blur","action":"INVOKE_REQUESTFILESLACKEY_METHOD","elemID":"subject","proc":$G.requestFilesLackey.ValidateRequest},{"eventType":"blur","action":"INVOKE_REQUESTFILESLACKEY_METHOD","elemID":"body","proc":$G.requestFilesLackey.ValidateRequest},{"eventType":"click","action":"INVOKE_REQUESTFILESLACKEY_METHOD","elemID":"getlink","proc":$G.requestFilesLackey.SwitchGetLink},{"eventType":"submit","action":"INVOKE_REQUESTFILESLACKEY_METHOD","elemID":"requestForm","proc":$G.requestFilesLackey.SubmitRequest},{"eventType":"click","action":"INVOKE_REQUESTFILESLACKEY_METHOD","elemID":"clear_form_button","proc":$G.requestFilesLackey.ClearForm}];$G.requestFilesLackey.installEventHandlers();},SwitchGetLink:function(){var $getlink=$j('#getlink').is(':checked');if($getlink)
{$j('#subjectField').css("visibility","hidden");$j('#bodyField').css("visibility","hidden");}
else
{$j('#subjectField').css("visibility","visible");$j('#bodyField').css("visibility","visible");}
$G.requestFilesLackey.ValidateRequest();},ValidateRequest:function(){var $isValidRequest=false;var $to=$j('#recipient_email').val();var $subject=$j('#subject').val();var $body=$j('#body').val();var $getlink=$j('#getlink').is(':checked');$G.requestFilesLackey.setErrorText('');if(($to=="")&&($subject=="")&&($body==""))
{$j('#clear_form_button').attr("disabled",1).addClass("disabled");}
else
{$j('#clear_form_button').removeAttr("disabled").removeClass("disabled");}
var $allEmailsValid=true;var $newRecipientList=$to.split(';');if(($getlink)&&($newRecipientList.length>1))
{$G.requestFilesLackey.setErrorText("Multiple email addresses are not permitted when using 'Just give me a link'.");$allEmailsValid=false;}
else
{for($key in $newRecipientList)
{var $newRecipient=$newRecipientList[$key];$newRecipient=$newRecipient.replace(/^\s+|\s+$/g,"");if($newRecipient!="")
{var $validEmail=$G.gliMTWebUtils.isValidEmailAddress($newRecipient);if(!$validEmail)
{$allEmailsValid=false;$G.requestFilesLackey.appendErrorText($newRecipient+" is not a valid email address.");}}}}
if($allEmailsValid&&(($subject!="")||($getlink)))
{$isValidRequest=true;$j('#make_request_button').removeAttr("disabled").removeClass("disabled");}
else
{$j('#make_request_button').attr("disabled",1).addClass("disabled");}
return $isValidRequest;},ClearForm:function(){if(confirm('Are you sure you want to clear this form?')){$G.requestFilesLackey.setErrorText("");$j('#recipient_email').val("");$j('#subject').val("");$j('#body').val("");$j('#getlink').attr('checked',false);$j('#clear_form_button').attr("disabled",1).addClass("disabled");$j('#make_request_button').attr("disabled",1).addClass("disabled");$j('#subjectField').css("visibility","visible");$j('#bodyField').css("visibility","visible");}},SubmitRequest:function(){if($G.requestFilesLackey.ValidateRequest())
{var $to=$j('#recipient_email').val();var $getlink=($j('#getlink').is(':checked'));var $subject=$j('#subject').val();var $body=$j('#body').val();$G.requestFilesLackey.dbg('','SubmitRequest','Making request.  To='+$to+'; Link only='+$getlink+'; Subject='+$subject+'; Body='+$body);return true;}
else
{return false;}}});})();
$G.kTransportMethodHTTP="http";$G.kTransportMethodPlugin="plugin";$G.kTransferDirectionUpload=0;$G.kTransferDirectionDownload=1;$G.kAJAXStatus_Success="success";$G.kAJAXStatus_Error="error";$G.kAJAXStatus_Timeout="timeout";$G.kAJAXStatus_ParserError="parsererror";$G.kTableFormat_File=0;$G.kTableFormat_TopLevelFolder=1;$G.kHTTPProgressStatus_PercentComplete="percentage_complete";$G.kHTTPMessage_Type="messagetype"
$G.kHTTPMessage_Type_Status="status"
$G.kHTTPMessage_Type_Progress="progress"
$G.kHTTPStatus_Type="type";$G.kHTTPStatus_Type_Error="error";$G.kHTTPStatus_Type_Warning="warning";$G.kHTTPStatus_Type_Info="info";$G.kHTTPStatus_Type_Done="done";$G.kHTTPStatus_FileId="fileId";$G.kHTTPStatus_Message="message";$G.kHTTPStatus_ErrorCode="errorCode";$G.kHTTPStatus_Timestamp="timestamp";$G.kHTTPProgress_Key="progressKey";$G.kHTTPProgress_Key_TotalFiles="totalFiles";$G.kHTTPProgress_Key_CurrentFile="currentFile";$G.kHTTPProgress_Key_NumberZipped="numberZipped";$G.kHTTPProgress_Key_ZippingComplete="zippingComplete";$G.kHTTPProgress_Key_TotalSize="totalBytes";$G.kHTTPProgress_Key_TotalSent="totalBytesTransferred";$G.kHTTPProgress_Key_NumberIngested="numberIngested";$G.kHTTPProgress_Value="progressValue";$G.kError_HTTPCouldNotAccessTempFile=9;$G.kError_HTTPClientDisconnected=11;$G.kError_HTTPNoFilesDownloaded=21;$G.kError_HTTPPostTooBigForUpload=22;$G.kError_HTTPNoFilesUploaded=23;$G.kError_HTTPUploadProgressUnavailable=24;$G.kError_HTTPTooBigToZip=26;
$R('com.grouplogic.PluginDetector');(function(){var undefined;var kWebClientMIMEType="application/x-MTWebClient2";var kWebKitClientMIMETypekey="application/x-mtwebkitplugin";var regExPatterns={IS_SAFARI:/safari/i,IS_IE:/(msie|internet explorer)/i,IS_FIREFOX:/(firefox)/i,IS_SNOW_LEOPARD:/(OS X 10_6)/i,IS_CHROME:/chrome/i,IS_WINDOWS:/(windows)/i,IS_MACINTOSH:/(mac)/i,IS_ROOT_ELEM:/^body|html$/i,IS_MASSTRANSIT_WEBCLIENT:/mtwebclient2/i,IS_MASSTRANSIT_WEBKIT:/mtwebkitplugin/i};com.grouplogic.PluginDetector=Base.extend({mDebug:false,pluginDownloadURL:"index.php?action=General.plugindownload",unsupportedBrowserURL:"index.php?action=General.plugindownload",pluginInstalled:undefined,constructor:function(){this.base();},dbgPluginDetect:function(op,msg){if(this.mDebug){$G.debug.dbgtrace('pluginDetect','',op,msg,"#65a564");}},getTransport:function(httpTransferAllowed,desiredTransport,autoHttpFallback,pluginDownloadURL,unsupportedBrowserURL){var resolvedTransport;var browserSupportsPlugin=!((regExPatterns.IS_CHROME.test(navigator.userAgent))||(!regExPatterns.IS_WINDOWS.test(navigator.userAgent)&&!regExPatterns.IS_MACINTOSH.test(navigator.userAgent)));if(pluginDownloadURL!=undefined)
{this.pluginDownloadURL=pluginDownloadURL;}
if(unsupportedBrowserURL!=undefined)
{this.unsupportedBrowserURL=unsupportedBrowserURL;}
this.dbgPluginDetect('getTransport','HTTP Transfer allowed? '+(httpTransferAllowed?"true":"false")+'; desired transport: '+desiredTransport);if(desiredTransport==$G.kTransportMethodHTTP&&httpTransferAllowed)
{this.dbgPluginDetect('getTransport','Using HTTP for transport, as requested.');resolvedTransport=$G.kTransportMethodHTTP;}
else if(!browserSupportsPlugin)
{if(httpTransferAllowed)
{this.dbgPluginDetect('getTransport','Using HTTP for transport even though plugin was requested because the plugin is not supported on this browser.');resolvedTransport=$G.kTransportMethodHTTP;}
else
{this.dbgPluginDetect('getTransport','Plugin not supported on this browser. Redirecting user: '+this.unsupportedBrowserURL);document.location=this.unsupportedBrowserURL;return;}}
else
{var isInstalled=this.isInstalled();if(!isInstalled&&httpTransferAllowed&&autoHttpFallback)
{this.dbgPluginDetect('getTransport','Using HTTP for transport.  Plugin was requested but is not installed.');resolvedTransport=$G.kTransportMethodHTTP;}
else if(!isInstalled&&(!httpTransferAllowed||!autoHttpFallback))
{this.dbgPluginDetect('getTransport','Plugin required, but not installed. Redirecting user to plugin download: '+this.pluginDownloadURL);document.location=this.pluginDownloadURL;return;}
else if(isInstalled)
{this.dbgPluginDetect('getTransport','Using plugin for transport, as requested.');resolvedTransport=$G.kTransportMethodPlugin;}}
this.dbgPluginDetect('getTransport','Resolved transport: '+resolvedTransport);return resolvedTransport;},isInstalled:function(){if(this.pluginInstalled==undefined)
{var isIE=regExPatterns.IS_IE.test(navigator.userAgent);if(isIE)
{this.pluginInstalled=detectAXWebClientPlugin();}
else
{var isSafari=regExPatterns.IS_SAFARI.test(navigator.userAgent)&&regExPatterns.IS_MACINTOSH.test(navigator.userAgent);var isSafariOnMac106=isSafari&&regExPatterns.IS_SNOW_LEOPARD.test(navigator.userAgent);var isSafari51OrLater=false;if(isSafari)
{this.dbgPluginDetect('isInstalled','Checking for Safari 5.1 or later.');var versionSearchString="Version";var index=navigator.userAgent.indexOf(versionSearchString,0);if(index!=-1)
{var versionValue=parseFloat(navigator.userAgent.substr(index+versionSearchString.length+1));this.dbgPluginDetect('isInstalled','Safari version is '+versionValue);isSafari51OrLater=(versionValue>=5.1);}}
if((isSafariOnMac106)&&(!isSafari51OrLater))
{this.pluginInstalled=this.detectPlugin(regExPatterns.IS_MASSTRANSIT_WEBKIT);}
else
{this.pluginInstalled=this.detectPlugin(regExPatterns.IS_MASSTRANSIT_WEBCLIENT);}}
this.dbgPluginDetect('isInstalled','MassTransit plugin installed? '+this.pluginInstalled);}
return this.pluginInstalled;},detectPlugin:function(mimeTypeRegEx){var pluginFound=false;if(navigator.plugins&&navigator.plugins.length>0)
{var pluginsArrayLength=navigator.plugins.length;this.dbgPluginDetect('detectPlugin','Scanning for webclient plugin: '+pluginsArrayLength+' plugins installed ');for(i=0;i<pluginsArrayLength;i++)
{for(var j=0;j<navigator.plugins[i].length;j++)
{if(mimeTypeRegEx.test(navigator.plugins[i][j].type))
{pluginFound=true;break;}}
if(pluginFound)break;}}
return pluginFound;}});var __gli_pluginDetector=window.$G.gliPluginDetector=new com.grouplogic.PluginDetector();})();
$R('com.grouplogic.TransferLackeyUpload');(function(){var undefined;var regExPatterns={IS_IE:/(msie|internet explorer)/i,IS_SAFARI:/(safari)/i,IS_FIREFOX:/(firefox)/i,IS_10_4:/(OS X 10_4|OS X 10.4)/i,IS_SNOW_LEOPARD:/(OS X 10_6)/i,IS_MACINTOSH:/(Mac)/i};com.grouplogic.PluginLackey=Base.extend({mDebug:false,mDebugNotifications:false,mWebClientMIMEType:"application/x-MTWebClient2",mWebKitClientMIMETypekey:"application/x-mtwebkitplugin",mPluginElemID:"MTWebClient",mPluginElem:null,mPluginVersion:'',mRequiredVersion:undefined,mLatestVersion:undefined,mPluginSupported:true,mInitialized:false,mAllowsDragAndDrop:undefined,kWebClientDropAreaID:"wc_drop_area",mPluginDownloadURL:"index.php?action=General.plugindownload",isIE:false,isSafari:false,isSafariOnMac106:false,isSafari51OrLater:false,constructor:function(latestAvailableVersion,minimumRequiredVersion){this.base();this.mRequiredVersion=minimumRequiredVersion;this.mLatestVersion=latestAvailableVersion;this.isIE=regExPatterns.IS_IE.test(navigator.userAgent);this.isSafari=regExPatterns.IS_SAFARI.test(navigator.userAgent)&&regExPatterns.IS_MACINTOSH.test(navigator.userAgent);this.isSafariOnMac106=this.isSafari&&regExPatterns.IS_SNOW_LEOPARD.test(navigator.userAgent);this.isSafari51OrLater=false;if(this.isSafari)
{this.dbg('','constructor','Checking for Safari 5.1 or later.');var versionSearchString="Version";var index=navigator.userAgent.indexOf(versionSearchString,0);if(index!=-1)
{var versionValue=parseFloat(navigator.userAgent.substr(index+versionSearchString.length+1));this.dbg('','constructor','Safari version is '+versionValue);this.isSafari51OrLater=(versionValue>=5.1);}}
if(this.isSafari51OrLater&&(this.mRequiredVersion!=null)&&this.comparePluginVersions("7,2,3,121",this.mRequiredVersion))
{this.mRequiredVersion="7,2,3,121";this.dbg('','constructor','Forcing up minimium required version for plug-in on Safari 5.1 to at least 7.2.3x121.');}
this.dbg('','constructor','Finished constructing the plugin lackey.');},dbg:function(submodule,op,msg){if(this.mDebug){$G.debug.dbgtrace('pluginLackey',submodule,op,msg,"#65a584");}},dbgnotify:function(op,msg){if(this.mDebugNotifications){$G.debug.dbgtrace('pluginLackey','notifications',op,msg,'#2F91FF');}},initializeDragAndDropElements:function(webClientDropAreaID){this.kWebClientDropAreaID=webClientDropAreaID;this.dbg('','constructor','Initializing the drop area ID in the plugin lackey to '+this.kWebClientDropAreaID);},initializePluginDownloadURL:function(pluginDownloadURL){this.mPluginDownloadURL=pluginDownloadURL;},initializePluginElement:function(){var result=false;try{if(this.isIE)
this.mPluginElem=$j("#"+this.mPluginElemID)[0].object;else
this.mPluginElem=$j("#"+this.mPluginElemID)[0];if(this.mPluginElem)
{var unparsedPluginVersion=this.mPluginElem.Initialize(function(ths){return function(message){return ths.NotificationCallback.call(ths,message);};}($G.transferLackey),function(ths){return function(message){ths.LoggingCallback.call(ths,message);};}($G.transferLackey));this.dbg('','initializePluginElement','json: '+unparsedPluginVersion);this.mPluginVersion=JSON.parse(unparsedPluginVersion)["version"];this.dbg('','initializePluginElement','web client plugin loaded, version='+this.mPluginVersion);this.mAllowsDragAndDrop=JSON.parse(unparsedPluginVersion)["support_dragdrop"];this.dbg('','initializePluginElement','web plugin supports drag-and-drop='+((this.mAllowsDragAndDrop)?"true":"false"));$j("#pluginVersion").text(this.mPluginVersion);this.redirectIfWrongVersion();this.mInitialized=true;result=true;}
else
{this.dbg('','initializePluginElement','could not find the plugin');throw('Could not find the page element for the plugin. [ID='+this.mPluginElemID+']');}}catch(e){this.dbg('','initializePluginElement','exception initializing the plugin; '+e.toString());throw e;}finally{}
return result;},redirectIfWrongVersion:function(){if(this.mRequiredVersion==null)
{}
else if(this.comparePluginVersions(this.mRequiredVersion,this.mPluginVersion)||this.isUnsupportedVersion(this.mPluginVersion))
{if(regExPatterns.IS_10_4.test(navigator.userAgent)&&(!this.comparePluginVersions("7,1,0,277",this.mPluginVersion)))
{}
else
{this.dbg('','redirectIfWrongVersion','wrong plugin version; requiredVer='+this.mRequiredVersion+', installedVer='+this.mPluginVersion);this.mPluginSupported=false;document.location=this.mPluginDownloadURL;}}},isUnsupportedVersion:function(checkVersion){var isUnsupported=false;var checkVersionArray=checkVersion.split('.');var buildNumberArray=checkVersionArray[2].split('x');checkVersionArray[2]=buildNumberArray[0];checkVersionArray[3]=buildNumberArray[1];if(checkVersionArray.length!=4){isUnsupported=true;}
else
{var majorVersion=parseInt(checkVersionArray[0],10);var minorVersion=parseInt(checkVersionArray[1],10);var minorMinorVersion=parseInt(checkVersionArray[2],10);var buildVersion=parseInt(checkVersionArray[3],10);this.dbg('','isUnsupportedVersion','Plugin version: '+majorVersion+','+minorVersion+','+minorMinorVersion+','+buildVersion);if((majorVersion==6)&&(minorVersion==2)){isUnsupported=true;}}
if(isUnsupported)
{this.dbg('','isUnsupportedVersion','Plugin version is unsupported');}
else
{this.dbg('','isUnsupportedVersion','Plugin version is supported');}
return isUnsupported;},comparePluginVersions:function(checkVersion,installedVersion){var firstGreater=false;var checkVersionArray=checkVersion.split(',');var installedVersionArray;if(installedVersion.indexOf('.')>0)
{installedVersionArray=installedVersion.split('.');var buildNumberArray=installedVersionArray[2].split('x');installedVersionArray[2]=buildNumberArray[0];var buildNumber=parseInt(buildNumberArray[1],10);installedVersionArray.push(buildNumber);if(installedVersionArray.length!=4){firstGreater=true;}}
else
{installedVersionArray=installedVersion.split(',');}
if(parseInt(checkVersionArray[0],10)>parseInt(installedVersionArray[0],10)){firstGreater=true;}else if(parseInt(checkVersionArray[0],10)==parseInt(installedVersionArray[0],10)){if(parseInt(checkVersionArray[1],10)>parseInt(installedVersionArray[1],10)){firstGreater=true;}else if(parseInt(checkVersionArray[1],10)==parseInt(installedVersionArray[1],10)){if(parseInt(checkVersionArray[2],10)>parseInt(installedVersionArray[2],10)){firstGreater=true;}else if(parseInt(checkVersionArray[2],10)==parseInt(installedVersionArray[2],10)){if(parseInt(checkVersionArray[3],10)>parseInt(installedVersionArray[3],10)){firstGreater=true;}}}}
return firstGreater;},isUpgradeAvailable:function(){var result=false;if(this.mPluginVersion)
{if(regExPatterns.IS_10_4.test(navigator.userAgent)&&(!this.comparePluginVersions("7,1,0,277",this.mPluginVersion)))
{result=false;}
else
{result=this.comparePluginVersions(this.mLatestVersion,this.mPluginVersion);}}
return result;},isMinimumVersion:function(){var result=false;if(this.mPluginVersion)
result=!(this.comparePluginVersions(this.mRequiredVersion,this.mPluginVersion));return result;},insertPluginIntoDoc:function(height,width,elementID){var pluginHTML;if(this.isIE)
{pluginHTML='<object ID="'+this.mPluginElemID+'" CLASSID="CLSID:4A0B03A9-6720-4838-99FA-2DE73147F9A1" HEIGHT="'+height+'" WIDTH="'+width+'"></object>';}
else if((this.isSafariOnMac106)&&!(this.isSafari51OrLater))
{pluginHTML='<embed type="'+this.mWebKitClientMIMETypekey+'" height='+height+' width='+width+' ID="'+this.mPluginElemID+'"/>';}
else
{pluginHTML='<embed type="'+this.mWebClientMIMEType+'" height='+height+' width='+width+' ID="'+this.mPluginElemID+'"/>';}
if(elementID!=undefined)
{$j("#"+elementID).append(pluginHTML);}
else
{document.write(pluginHTML);}},getPluginVersion:function(){return this.mPluginVersion;},addEvent:function(el,type,fn){if(document.addEventListener){if(el&&el.nodeName){el.addEventListener(type,fn,false);}else if(el&&el.length){for(var i=0;i<el.length;i++){addEvent(el[i],type,fn);}}}else{if(el&&el.nodeName){el.attachEvent('on'+type,function(){return fn.call(el,window.event);});}else if(el&&el.length){for(var i=0;i<el.length;i++){addEvent(el[i],type,fn);}}}},getAllowsDragAndDrop:function(){var allowsDragAndDrop=this.getAllowsDragAndDropNatively();if(!allowsDragAndDrop)
{userAgent=navigator.userAgent;isSafari=regExPatterns.IS_SAFARI.test(userAgent);isSnowLeopard=regExPatterns.IS_SNOW_LEOPARD.test(userAgent);if((isSnowLeopard&&isSafari)||this.isSafari51OrLater)
{allowsDragAndDrop=true;$j("#MTWebClient").css("visibility","hidden");$j("#"+this.kWebClientDropAreaID).addClass("DragArea");var drop=document.querySelector("#"+this.kWebClientDropAreaID);this.addEvent(drop,'dragover',$G.transferLackey.cancelDrag);this.addEvent(drop,'dragenter',$G.transferLackey.cancelDrag);this.addEvent(drop,'drop',$G.transferLackey.onFileDrop);}}
this.dbg('','allowsDragAndDrop','Allows Drag?'+allowsDragAndDrop);return allowsDragAndDrop;},getAllowsDragAndDropNatively:function(){var allowsDragAndDrop=false;userAgent=navigator.userAgent;isIE=regExPatterns.IS_IE.test(userAgent);isMac=regExPatterns.IS_MACINTOSH.test(userAgent);isFirefox=regExPatterns.IS_FIREFOX.test(userAgent);isSnowLeopard=regExPatterns.IS_SNOW_LEOPARD.test(userAgent);if(this.mAllowsDragAndDrop==undefined)
{this.dbg('','getAllowsDragAndDrop','Drag and drop support was not specified by plugin initialization; using defaults.');allowsDragAndDrop=!this.isSafari51OrLater&&!isSnowLeopard&&!(isMac&&isFirefox);}
else
{allowsDragAndDrop=this.mAllowsDragAndDrop&&!(isMac&&isFirefox);}
return allowsDragAndDrop;},getSupportsUDT:function(){return(this.mPluginVersion>="6.2.0");},getSupportsMultipleAddressing:function(){return(this.mPluginVersion>="7.1.0");},getSupportsSubjectAndMessage:function(){return(this.mPluginVersion>="7.1.0");},getPluginElem:function(){return this.mPluginElem;},setPluginParam:function(paramName,paramValue){var setPluginParamJSONRequest={"version":this.mPluginVersion,"type":"Request","code":"SetParameter","name":paramName,"value":paramValue};var setPluginParamJSONString=JSON.stringify(setPluginParamJSONRequest);this.dbg('requestss','setparam','msg='+setPluginParamJSONString);if(result=this.mPluginElem.ExecuteRequest(setPluginParamJSONString)){this.dbg('requests','setparam',"MTWebClient.ExecuteRequest('SetParameter') returned "+result);}else{this.dbg('requests','setparam',"<span style='color:red'>MTWebClient.ExecuteRequest('SetParameter') returned "+result+"</span>");}}});})();
$R('com.grouplogic.TransferLackey');var inst=false;(function(){var undefined;var regExPatterns={IS_WINDOWS:/windows/i,IS_MAC:/mac/i};com.grouplogic.TransferLackey=Base.extend({mDebug:false,mDebugLoading:false,mDebugEventHandlers:false,mDebugPluginRequests:false,mDebugPluginLogging:false,mDebugNotifications:false,mDebugAjax:false,mDebugFiles:false,mDebugContacts:false,mDebugServices:false,mDebugClassName:'transferlackey',mTransferData:{},mInfoText:'',mErrorText:'',mStatusTableEmpty:true,mCurrentRowOdd:true,mTransferStarted:false,mTransferErrorsOccurred:false,mTransferComplete:false,mTransferCancelled:false,mTransferFailed:false,mNoFilesTransferred:false,mStopStatusUpdates:false,mHideProgressPercentage:false,clickables:null,constantClickables:null,mPlatform:undefined,mPathSeparator:'\\',switchTransportURL:"index.php?action=FileTransfer.setRequestedTransport",httpStatusURL:"index.php?action=FileTransfer.get_http_status_messages",mThisPageURL:"",httpTransferAllowed:false,kThickboxWidth:630,kThickboxHeight:440,kProgressUnchanged:'unchanged',kConnectionNoTransfersText:"No files could be transferred. Please see the table below for errors.",kConnectionCancelled:"Connection cancelled",kConnectionFailed:"Connection failed",constructor:function(httpTransferAllowed){this.base();if(regExPatterns.IS_WINDOWS.test(navigator.userAgent))
{this.mPlatform='Windows';}
else if(regExPatterns.IS_MAC.test(navigator.userAgent))
{this.mPlatform='Macintosh';}
else
{this.mPlatform='Unknown';}
if(this.mPlatform=='Windows')
{this.mPathSeparator='\\';}
else
{this.mPathSeparator='\/';}
this.httpTransferAllowed=httpTransferAllowed;},dbg:function(submodule,op,msg){if(this.mDebug){$G.debug.dbgtrace(this.mDebugClassName,submodule,op,msg,"#65a564");}},dbgload:function(op,msg){if(this.mDebugLoading){$G.debug.dbgtrace(this.mDebugClassName,'load',op,msg,"#5a35a5");}},dbgevnt:function(op,msg){if(this.mDebugEventHandlers){$G.debug.dbgtrace(this.mDebugClassName,'event',op,msg,'#3366CC');}},dbgrequests:function(op,msg){if(this.mDebugPluginRequests){$G.debug.dbgtrace(this.mDebugClassName,'requests',op,msg,'#33CC66');}},dbgpluginlog:function(op,msg){if(this.mDebugPluginLogging){$G.debug.dbgtrace('pluginLackey','plugin log',op,msg,'#FF9D2F');}},dbgnotify:function(op,msg){if(this.mDebugNotifications){$G.debug.dbgtrace(this.mDebugClassName,'notifications',op,msg,'#2F91FF');}},dbgfiles:function(op,msg){if(this.mDebugFiles){$G.debug.dbgtrace(this.mDebugClassName,'files',op,msg,'#721E95');}},dbgcontacts:function(op,msg){if(this.mDebugContacts){$G.debug.dbgtrace(this.mDebugClassName,'contacts',op,msg,'#721E95');}},dbgservices:function(op,msg){if(this.mDebugServices){$G.debug.dbgtrace(this.mDebugClassName,'services',op,msg,'#721E95');}},dbgajax:function(op,msg){if(this.mDebugAjax){$G.debug.dbgtrace(this.mDebugClassName,'ajax',op,msg,'#721E85');}},setInfoText:function(msg,timestamp){if(!this.mStopStatusUpdates)
{if(!this.mTransferStarted)
{this.mInfoText=msg+'<br/>';$j("#statusInfo #statusText").html(this.mInfoText);}
else
{this.clearLightboxStatusTable();this.addLightboxStatusRow($G.kHTTPStatus_Type_Info,msg,timestamp);}}},appendInfoText:function(msg,timestamp){if(!this.mStopStatusUpdates)
{if(!this.mTransferStarted)
{this.mInfoText=this.mInfoText+' '+msg+'<br/>';$j("#statusInfo #statusText").html(this.mInfoText);}
else
{this.addLightboxStatusRow($G.kHTTPStatus_Type_Info,msg,timestamp);}}},appendWarningText:function(msg,timestamp){if(!this.mStopStatusUpdates)
{if(!this.mTransferStarted)
{this.appendInfoText(msg);}
else
{this.addLightboxStatusRow($G.kHTTPStatus_Type_Warning,msg,timestamp);}}},setErrorText:function(msg,timestamp){if(!this.mStopStatusUpdates)
{if(!this.mTransferStarted)
{if(msg!="")
{this.mErrorText=msg+'<br/>';}
else
{this.mErrorText=msg;}
$j("#errorInfo #errorText").html(this.mErrorText);}
else
{this.clearLightboxStatusTable();if(msg!="")
{this.addLightboxStatusRow($G.kHTTPStatus_Type_Error,msg,timestamp);}}}},appendErrorText:function(msg,timestamp){if(!this.mStopStatusUpdates)
{if(!this.mTransferStarted)
{this.mErrorText=this.mErrorText+' '+msg+'<br/>';$j("#errorInfo #errorText").html(this.mErrorText);}
else
{this.addLightboxStatusRow($G.kHTTPStatus_Type_Error,msg,timestamp);}}},clearLightboxStatusTable:function(){if(!this.mStopStatusUpdates)
{this.mStatusTableEmpty=true;$j("#statusMessages #statusMessageTable").css("display","none");$j("#statusMessages #statusMessageTable").find("tr").remove();}},addLightboxStatusRow:function(severity,msg,timestamp){if(timestamp==undefined)
{timestamp=this.getCurrentFormattedDate();}
var severityCell;if(severity==$G.kHTTPStatus_Type_Error)
{severityCell="<td class='error severity'>Error</td>";}
else if(severity==$G.kHTTPStatus_Type_Warning)
{severityCell="<td class='warning severity'>Warning</td>";}
else
{severityCell="<td class='info severity'>Info</td>";}
var oddOrEven=this.mCurrentRowOdd?"odd":"even";this.mCurrentRowOdd=!this.mCurrentRowOdd;var newRow="<tr class='"+oddOrEven+"'><td class='timestamp'>"+timestamp+"</td>"+severityCell+"<td class='message'>"+msg+"</td></tr>";$j("#statusMessages #statusMessageTable tbody").prepend(newRow);if(this.mStatusTableEmpty)
{this.mStatusTableEmpty=false;$j("#statusMessages #statusMessageTable").css("display","block");}},getCurrentFormattedDate:function(){var now=new Date();var year=now.getFullYear();var month=now.getMonth()+1;var date=now.getDate();var hour=now.getHours();var minute=now.getMinutes();var second=now.getSeconds();var amOrPm=(hour<12)?'AM':'PM';var hour=(hour<13)?hour:(hour-12);month=(month<10)?('0'+month):month;date=(date<10)?('0'+date):date;hour=(hour<10)?('0'+hour):hour;minute=(minute<10)?('0'+minute):minute;second=(second<10)?('0'+second):second;var currentDate=year+'-'+month+'-'+date+' '+hour+':'+minute+':'+second+' '+amOrPm;return currentDate;},setClickableElements:function(elemArray){if(this.constantClickables!=null)
{this.clickables=this.constantClickables.concat(elemArray);}
else
{this.clickables=elemArray;}},setConstantClickableElements:function(elemArray){this.constantClickables=elemArray;},installEventHandlers:function(){$j(this.clickables).each(function(i){$G.transferLackey.dbgevnt('installEventHandlers','action='+this.action+', id='+this.elemID);switch(this.action){case"INVOKE_TRANSFERLACKEY_METHOD":$j("#"+this.elemID).bind(this.eventType,this.eventData,this.proc);break;case"NAVIGATE":$j("#"+this.elemID).bind(this.eventType,function(){window.location.href=this.url});break;default:$G.transferLackey.dbgevnt('installEventHandlers','The '+this.action+' event was not handled.');break;}});},removeEventHandlers:function(){$j(this.clickables).each(function(i){$G.transferLackey.dbgevnt('removeEventHandlers','id='+this.elemID);$j("#"+this.elemID).unbind(this.eventType);});},handleOnUnload:function(){this.UpdateProgress(false);this.removeEventHandlers();},handleOnLoad:function(){this.installEventHandlers();},setTransferData:function(data){for(var j in data){this.mTransferData[j]=data[j];}},setTransferStarted:function(){this.mTransferStarted=true;$j("#progressIndicatorBox").css("display","block");$j("#hiddenModalContent").css("display","block");tb_show(this.kThickboxTitleCaption,"#TB_inline?height="+this.kThickboxHeight+"&width="+this.kThickboxWidth+"&inlineId=hiddenModalContent&modal=true",false,this.ResetFTForm);$j("#transferBlurb").html(this.kTransferBlurbText);},setTransferComplete:function(){this.mTransferComplete=true;if(this.mTransferCancelled)
{this.UpdateProgress(true,'',this.kProgressUnchanged);this.appendWarningText(this.kConnectionCancelled);this.UpdateTransferResult(this.kConnectionCancelled);}
else if(this.mTransferFailed)
{this.UpdateProgress(true,'',this.kProgressUnchanged);this.appendErrorText(this.kConnectionFailed);this.UpdateTransferResult(this.kConnectionFailed);}
else
{if(this.mTransferErrorsOccurred)
{if(this.mNoFilesTransferred)
{this.UpdateProgress(true,'');this.UpdateTransferResult(this.kConnectionNoTransfersText);}
else
{this.UpdateProgress(true,'',100);this.UpdateTransferResult(this.kConnectionWithErrorsText);}}
else
{this.UpdateProgress(true,'',100);this.UpdateTransferResult(this.kConnectionSuccessfulText);}}
$j("a#TB_closeWindowButton").text('Close');},NotificationCallback:function(message){this.dbgnotify('callback','received:'+message);try{if(!this.mStopStatusUpdates)
{var objMsg=JSON.parse(message);switch(objMsg.code){case"Error":{this.mTransferErrorsOccurred=true;this.appendErrorText(objMsg.text);break;}
case"Warning":{this.appendWarningText(objMsg.text);break;}
case"ProgressUpdated":{this.UpdateProgress(true,objMsg.data_progress,objMsg.progress_bar,objMsg.total_files,objMsg.current_file);break;}
case"ConnectionOpened":{this.UpdateProgress(true,"Connection opened...");break;}
case"ConnectionCanceled":{this.mTransferCancelled=true;this.setTransferComplete();break;}
case"ConnectionFailed":{this.mTransferFailed=true;this.setTransferComplete();break;}
case"ConnectionCompleted":{break;}
case"FileNameUpdated":{break;}
case"ConnectionClosed":{this.setTransferComplete();break;}
default:{this.dbgnotify('Unknown notification type received: '+objMsg.code);break;}}}}catch(e){this.dbgnotify('callback','ERROR: exception processing notification; '+e.toString());this.setErrorText('Exception occurred processing notification: '+e.toString());}finally{}
return true;},HandleUpdateMessage:function(message){if(message[$G.kHTTPMessage_Type]==$G.kHTTPMessage_Type_Status)
{if(message[$G.kHTTPStatus_Type]==$G.kHTTPStatus_Type_Error)
{this.mTransferErrorsOccurred=true;this.appendErrorText(message[$G.kHTTPStatus_Message],message[$G.kHTTPStatus_Timestamp]);if((message[$G.kHTTPStatus_ErrorCode]==$G.kError_HTTPPostTooBigForUpload)||(message[$G.kHTTPStatus_ErrorCode]==$G.kError_HTTPTooBigToZip)||(message[$G.kHTTPStatus_ErrorCode]==$G.kError_HTTPCouldNotAccessTempFile))
{this.mNoFilesTransferred=true;}}
else if(message[$G.kHTTPStatus_Type]==$G.kHTTPStatus_Type_Warning)
{if(message[$G.kHTTPStatus_ErrorCode]==$G.kError_HTTPUploadProgressUnavailable)
{}
else
{this.appendWarningText(message[$G.kHTTPStatus_Message],message[$G.kHTTPStatus_Timestamp]);if(message[$G.kHTTPStatus_ErrorCode]==$G.kError_HTTPClientDisconnected)
{this.mTransferCancelled=true;this.setTransferComplete();}
else if(message[$G.kHTTPStatus_ErrorCode]==$G.kError_HTTPNoFilesDownloaded)
{this.mNoFilesTransferred=true;}
else if(message[$G.kHTTPStatus_ErrorCode]==$G.kError_HTTPNoFilesUploaded)
{this.mNoFilesTransferred=true;}}}
else if(message[$G.kHTTPStatus_Type]==$G.kHTTPStatus_Type_Info)
{this.appendInfoText(message[$G.kHTTPStatus_Message],message[$G.kHTTPStatus_Timestamp]);}
else if(message[$G.kHTTPStatus_Type]==$G.kHTTPStatus_Type_Done)
{this.setTransferComplete();}
else
{this.dbgajax('RefreshProgress','Unhandled status type: '+message[$G.kHTTPStatus_Type]);}}
else
{this.dbgajax('RefreshProgress','Unhandled message type: '+message[$G.kHTTPMessage_Type]);}},RefreshProgress:function(){$j.ajaxSetup({cache:false});$j.getJSON(this.httpStatusURL+"&id="+$G.transferLackey.mTransferData['transfer_identifier'],function(data,textStatus){if(textStatus==$G.kAJAXStatus_Success)
{$G.transferLackey.dbgajax('RefreshProgress',JSON.stringify(data));for(i in data)
{$G.transferLackey.HandleUpdateMessage(data[i]);}}
else if(textStatus==$G.kAJAXStatus_Timeout)
{$G.transferLackey.dbgajax('RefreshProgress','HTTP status information request timed out.');}
else if(textStatus==$G.kAJAXStatus_Error||textStatus==$G.kAJAXStatus_ParserError)
{$G.transferLackey.setErrorText('An error occurred retrieving HTTP status information.');}});},UpdateProgress:function(showProgress,progressText,progressPercentage,numFiles,currentFile){if(!showProgress)
{$j('#progressSummaryText').html('&nbsp;');$j('#progressIndicatorText #percentComplete').html('&nbsp;');$j('#progressIndicatorText #fileProgress').html('&nbsp;');$j('#progressIndicatorImgBase').css("display","none");$j('#progressOverlay #progressFill').width("0%");}
else
{if(progressText!=undefined)
{if(progressText=='')
progressText='&nbsp;';$j('#progressSummaryText').html(progressText);}
if(progressPercentage!=this.kProgressUnchanged)
{if(progressPercentage!=undefined)
{$j('#progressIndicatorImgBase').css("display","block");if(!this.mHideProgressPercentage)
{$j('#progressIndicatorText #percentComplete').html(progressPercentage+'% complete');}
$j('#progressOverlay #progressFill').width(progressPercentage+"%");}
else
{$j('#progressIndicatorImgBase').css("display","none");$j('#progressOverlay #progressFill').width("0%");$j('#progressIndicatorText #percentComplete').html('&nbsp;');}}
if((numFiles!=undefined)&&(currentFile!=undefined))
{$j('#progressIndicatorText #fileProgress').html(' - Transferring file '+currentFile+' of '+numFiles);}
else
{$j('#progressIndicatorText #fileProgress').html('&nbsp;');}
$j('#progressIndicatorBox').css("display","block");}},UpdateTransferResult:function(message){$j('#transferResult').html(message);},LoggingCallback:function(message){try{this.dbgpluginlog('logmsg','received:'+message);}catch(e){this.dbgpluginlog('callback','ERROR: exception writing to debug log; '+e.toString());this.setErrorText('Exception occurred writing to debug log: '+e.toString());}finally{}},SwitchTransport:function(eventData,newTransport){var transferlackeyObject=eventData.data;transferlackeyObject.dbg('','SwitchTransport','Switching transport to '+newTransport);window.location=transferlackeyObject.switchTransportURL+"&transport="+newTransport+"&redirect="+escape(transferlackeyObject.mThisPageURL);},ResetFTForm:function(){$G.transferLackey.mStopStatusUpdates=true;$G.transferLackey.dbgevnt('ResetFTForm','Redirecting to '+$G.transferLackey.mThisPageURL+' because the page is being reset.');window.location=$G.transferLackey.mThisPageURL;return false;},GetDisplayFileSize:function(fileSizeInBytes){var accumulatedSize=Math.round(fileSizeInBytes);var sizeUnit;if(accumulatedSize>=1024)
{accumulatedSize=Math.round((fileSizeInBytes/1024)*100)/100;if(accumulatedSize>=1024)
{accumulatedSize=Math.round((accumulatedSize/1024)*100)/100;if(accumulatedSize>=1024)
{accumulatedSize=Math.round((accumulatedSize/1024)*100)/100;sizeUnit=" GB";}
else
{sizeUnit=" MB";}}
else
{sizeUnit=" KB";}}
else
{sizeUnit=" bytes";}
return accumulatedSize+sizeUnit;},DecodeHTMLEntities:function(textToDecode){var decoded=$j("<div></div>").html(textToDecode).text();return decoded;}});})();
$R('com.grouplogic.TransferLackeyUpload');(function(){var undefined;com.grouplogic.TransferLackeyUpload=com.grouplogic.TransferLackey.extend({mDebugClassName:'tlupload',mSendToList:[],mSendToText:"",dropoffURL:"index.php?action=FileTransfer.dropoff",mThisPageURL:"index.php?action=FileTransfer.dropoff",setShowMessageURL:"index.php?action=FileTransfer.setShowMessage",mSendToValidationErrorText:"",mHTTPSelectorIDNum:0,kDefaultServerName:"MassTransit Server",kMaxFileNameLength:55,kFileNameTruncationString:"...",kThickboxTitleCaption:"Send Files",kFlexboxTotalWidth:200,kFlexboxArrowWidth:26,kConnectionSuccessfulText:"Your files have been sent successfully.",kConnectionWithErrorsText:"Files have been sent with errors.  Please see the table below for errors.",kSendToValidationErrorTextNoAdhoc:"Please select a valid contact from the drop-down list.",kSendToValidationErrorTextAdhoc:"Please enter a valid e-mail address or select from the drop-down list.",kSendToTooltipText:"Type one or multiple email addresses semicolon delimited, or a contact name, or click the down arrow (if available) to scroll through the list of available recipients.",kEmailSettingsValidationErrorText:"You must enter a subject.",kBrowseButtonID:"upload_request_button",kPluginUploadID:"wc_plugin_upload",kWebClientDropAreaID:"wc_drop_area",kDropAreaTextID:"drop_area_text",kIEDropAreaTextID:"IEDropAreaLabel",constructor:function(httpTransferAllowed){this.base(httpTransferAllowed);},handleOnLoad:function(){this.base();this.SwitchShowEmailSettings();this.updateUploadControls();},handleOnUnload:function(){this.ClearAllUploadFiles();this.base();},handleOnReady:function(transferData,serviceListJSON,contactListJSON,watermark){try
{this.setTransferData(transferData);if(watermark=='')
{watermark=this.kDefaultServerName;}
$j("#uploadBody").maxLength(4096);var flexboxContactList={'results':[],'total':0};var flexboxWidth=this.kFlexboxTotalWidth;if(contactListJSON!="")
{this.setForwardingContacts(contactListJSON);flexboxContactList={'results':contactListJSON,'total':contactListJSON.length};this.dbgcontacts('handleOnReady',JSON.stringify(flexboxContactList));}
if(this.mTransferData["has_ad_hoc_access"])
{this.mSendToValidationErrorText=this.kSendToValidationErrorTextAdhoc;}
else
{this.mSendToValidationErrorText=this.kSendToValidationErrorTextNoAdhoc;}
$j('#sendTo').flexbox(flexboxContactList,{maxCacheBytes:1,highlightMatchesRegExModifier:'gi',autoCompleteFirstMatch:false,watermark:watermark,paging:false,maxCacheBytes:0,allowInput:true,allowAdHoc:this.mTransferData['has_ad_hoc_access'],showResults:(contactListJSON.length!=0),showArrow:(contactListJSON.length!=0),initialValue:this.mTransferData['defaultFwdContact'],onSelect:function(){$G.transferLackey.updateUploadControls();},width:flexboxWidth});if(this.mTransferData["has_ad_hoc_access"])
{$j('#sendTo').attr('title',$G.transferLackey.kSendToTooltipText);}
if(!this.mTransferData["has_ad_hoc_access"]&&(contactListJSON.length==0))
{$j('#sendTo_input').attr('disabled',1);$j('#resetSendTo').css("display","none");}
if(serviceListJSON!="")
{this.setServiceSelections(serviceListJSON);var flexboxServiceList={'results':serviceListJSON,'total':serviceListJSON.length};this.dbgservices('Dropoff',JSON.stringify(flexboxServiceList));$j("#serviceSelection").flexbox(flexboxServiceList,{highlightMatchesRegExModifier:'gi',autoCompleteFirstMatch:false,paging:false,allowInput:true,maxCacheBytes:0,allowAdHoc:false,onSelect:function(){$G.transferLackey.updateUploadControls();},width:$G.transferLackey.kFlexboxTotalWidth});}
var clickableElements=[{"eventType":"click","action":"INVOKE_TRANSFERLACKEY_METHOD","elemID":"resetSendTo","proc":$G.transferLackey.resetSendTo},{"eventType":"click","action":"INVOKE_TRANSFERLACKEY_METHOD","elemID":"addSendTo","proc":$G.transferLackey.updateUploadControls},{"eventType":"click","action":"INVOKE_TRANSFERLACKEY_METHOD","eventData":$G.transferLackey,"elemID":"switch_transport","proc":$G.transferLackey.SwitchTransport},{"eventType":"click","action":"INVOKE_TRANSFERLACKEY_METHOD","eventData":$G.transferLackey,"elemID":"clear_form_button","proc":$G.transferLackey.ClearFileTransferForm},{"eventType":"click","action":"INVOKE_TRANSFERLACKEY_METHOD","elemID":"showemailsettings","proc":$G.transferLackey.SwitchShowEmailSettings},{"eventType":"keydown","action":"INVOKE_TRANSFERLACKEY_METHOD","eventData":$G.transferLackey,"elemID":"uploadSubject","proc":$G.transferLackey.updateUploadControls},{"eventType":"keydown","action":"INVOKE_TRANSFERLACKEY_METHOD","eventData":$G.transferLackey,"elemID":"uploadBody","proc":$G.transferLackey.updateUploadControls}];this.setConstantClickableElements(clickableElements);$j("#the_files_plugin").tablesorter({widthFixed:true,cssAsc:"sortSelection",cssDesc:"sortSelection",headers:{3:{sorter:false}},widgets:['zebra']});this.handleOnLoad();this.updateTabOrder();}
catch(e)
{var msg=e.toString();$G.transferLackey.dbg('Dropoff','dspFileTransfer_dropoff.tpl',msg);this.setErrorText('An error occurred initializing the transfer page: '+msg);}
finally{}},setForwardingContacts:function(forwardingContacts){this.mTransferData['forwardingContacts']=forwardingContacts;this.dbgcontacts('set list','forwarding contacts: '+JSON.stringify(forwardingContacts));},setServiceSelections:function(serviceSelections){this.mTransferData['services']=serviceSelections;this.dbgservices('set list','services: '+JSON.stringify(serviceSelections));},onSendToNameSelected:function(){this.addSendTo(true);this.updateUploadControls();},updateTabOrder:function(){var $tabindex=1;$tabindex=this.setNextInTabOrder('#sendTo_input',$tabindex);$tabindex=this.setNextInTabOrder('#serviceSelection_input',$tabindex);$tabindex=this.setNextInTabOrder('#upload_request_button',$tabindex);if(this.mHTTPSelectorIDNum==0)
{$tabindex=this.setNextInTabOrder('#httpFileSelector',$tabindex);}
else
{$j('#httpFileSelector').attr('tabindex',-1);$j('#httpFileSelector_F'+(this.mHTTPSelectorIDNum-1)).attr('tabindex',-1);$tabindex=this.setNextInTabOrder('#httpFileSelector_F'+this.mHTTPSelectorIDNum,$tabindex);}
$tabindex=this.setNextInTabOrder('#showemailsettings',$tabindex);$tabindex=this.setNextInTabOrder('#uploadSubject',$tabindex);$tabindex=this.setNextInTabOrder('#uploadBody',$tabindex);$tabindex=this.setNextInTabOrder('#clear_form_button',$tabindex);$j('#start_upload_button').attr('tabindex',-1);},setNextInTabOrder:function(elementName,currentTabIndex){if(!$j(elementName).is(":visible")||$j(elementName).disabled)
{$j(elementName).attr('tabindex',-1);return currentTabIndex;}
else
{$j(elementName).attr('tabindex',currentTabIndex);return currentTabIndex+1;}},isValidContactService:function(chosenContact,chosenService,logErrors){if(this.mTransferData['contact_xor_service']&&chosenService!=""&&chosenContact!=""){if(logErrors)
{this.setErrorText("You may select a contact or a service, but not both.  Please un-select one and try again.");}
return false;}
else if(this.mTransferData['force_forward_or_service']&&(chosenService==""&&chosenContact=="")){if(logErrors)
{this.setErrorText("Please choose a contact or service before starting the file transfer.");}
return false;}
return true;},isValidEmailSettings:function(subject,body){var $showemailsettings=$j('#showemailsettings').is(':checked');if(!$showemailsettings)
return true;else
return((subject!="")&&(subject!=undefined))},isInForwardingContactsList:function(contactName){if(this.mTransferData['forwardingContacts']==undefined||this.mTransferData['forwardingContacts'].length==0)
{return false;}
else if(contactName.length==0)
{return true;}
else
{var testContactName=contactName.toLowerCase();for(var i=0;i<this.mTransferData['forwardingContacts'].length;i++)
{var thisName=this.mTransferData['forwardingContacts'][i]['name'].toLowerCase();if(thisName==testContactName)
{return true;}}}
return false;},isValidSendToInput:function(forwardingContact){if((forwardingContact==="")||(forwardingContact===undefined))
{return true;}
else if(this.mTransferData['has_ad_hoc_access'])
{return(this.isInForwardingContactsList(forwardingContact)||$G.gliMTWebUtils.isValidEmailAddress(forwardingContact));}
else
{return this.isInForwardingContactsList(forwardingContact);}},isValidForSubmit:function(logErrors){var $isValid=true;var $errorList="";if(logErrors)
{$G.transferLackey.setErrorText("");}
if($G.transferLackey.mNumberOfFiles<=0)
{$isValid=false;if(logErrors)
{$G.transferLackey.setErrorText("Please select at least one file to upload and try again.");}}
if(!$G.transferLackey.addSendTo(logErrors))
{$isValid=false;}
var subjectText=$j("#uploadSubject").val();var bodyText=$j("#uploadBody").val();var chosenContact=$G.transferLackey.buildSendToList();var chosenService=$j('#serviceSelection_hidden').val();chosenService=(chosenService==undefined)?"":chosenService;if(!$G.transferLackey.isValidEmailSettings(subjectText,bodyText))
{if(logErrors||$isValid)
{$G.transferLackey.setErrorText($G.transferLackey.kEmailSettingsValidationErrorText);}
$isValid=false;}
if(!($G.transferLackey.isValidContactService(chosenContact,chosenService,(logErrors||$isValid))))
{$isValid=false;}
return $isValid;},SwitchShowEmailSettings:function(){var $showemailsettings=$j('#showemailsettings').is(':checked');$j.ajaxSetup({cache:false});$j.getJSON($G.transferLackey.setShowMessageURL+"&showMessage="+$showemailsettings);if($showemailsettings)
{$j('#subjectField').css("visibility","visible");$j('#bodyField').css("visibility","visible");$j('#subjectField').css("display","block");$j('#bodyField').css("display","block");}
else
{$j('#subjectField').css("visibility","hidden");$j('#bodyField').css("visibility","hidden");$j('#subjectField').css("display","none");$j('#bodyField').css("display","none");$G.transferLackey.setErrorText("");}
$G.transferLackey.updateUploadControls();},resetSendTo:function(){$j("#sendTo_input").val("");$j('#sendTo_hidden').val("");$j("#sendTo_input").focus();$G.transferLackey.updateUploadControls();},addSendTo:function(){var $newRecipientListStr=$j('#sendTo_hidden').val();var $inputValid=true;if(($newRecipientListStr!=undefined)&&($newRecipientListStr!=""))
{var $newRecipientList;if($G.transferLackey.supportsMultipleAddressing())
{$newRecipientList=$newRecipientListStr.split(';');}
else
{if(($newRecipientListStr.indexOf(';')!=-1)||($G.transferLackey.mSendToList.length!=0))
{$inputValid=false;if(this.httpTransferAllowed)
{$G.transferLackey.setErrorText('The installed version of the plugin does not support multiple addressing and can only send to a single recipient.<br/>For multiple addressing, please download the latest version of the plugin or switch to use HTTP mode.');}
else
{$G.transferLackey.setErrorText('The installed version of the plugin does not support multiple addressing and can only send to a single recipient.<br/>To use multiple addressing, please download the latest version of the plugin.');}}
else
{$newRecipientList=[$newRecipientListStr];}}
if($inputValid)
{var $namesFailingValidation=[];for($key in $newRecipientList)
{var $newRecipient=$newRecipientList[$key];$newRecipient=$newRecipient.replace(/^\s+|\s+$/g,"");if($newRecipient!="")
{if($G.transferLackey.isValidSendToInput($newRecipient))
{var index=$G.transferLackey.findInSendToList($newRecipient);if(index==-1)
{$G.transferLackey.mSendToList.push($newRecipient);}}
else
{$inputValid=false;$namesFailingValidation.push($newRecipient);}}}
$G.transferLackey.rebuildSendToText();$j("#sendToList #sendToNames").html($G.transferLackey.mSendToText);if(!$inputValid)
{$namesFailingStr=$namesFailingValidation.join(";");$j("#sendTo_input").val($namesFailingStr);$j('#sendTo_hidden').val($namesFailingStr);$G.transferLackey.setErrorText($G.transferLackey.mSendToValidationErrorText);}
else
{$G.transferLackey.setErrorText("");$j("#sendTo_input").val("");$j('#sendTo_hidden').val("");}}}
return $inputValid;},removeSendTo:function($itemToRemove){var $indexToRemove=this.findInSendToList(unescape($itemToRemove));if($indexToRemove!=-1)
{this.mSendToList.splice($indexToRemove,1);this.rebuildSendToText();$j("#sendToList #sendToNames").html($G.transferLackey.mSendToText);}},findInSendToList:function(sendToItem){var $index=-1;for(key in this.mSendToList)
{if(sendToItem.toLowerCase()==this.mSendToList[key].toLowerCase())
{$index=key;break;}}
return $index;},buildSendToList:function(){return this.mSendToList;},rebuildSendToText:function(){this.mSendToText="";for(key in this.mSendToList)
{if(key!=0)
this.mSendToText+='<br/>';this.mSendToText+=this.mSendToList[key];this.mSendToText+='&nbsp;<a href="#" onclick="$G.transferLackey.removeSendTo(\''+escape(this.mSendToList[key])+'\');">'+'<img class="removeRecipientIcon" src="images/spacer.gif">'+'</a>';}},ClearAllUploadFiles:function(){this.dbgevnt('clear form','deleting all files');this.updateUploadControls();},ClearFileTransferForm:function(eventData){if(confirm('Are you sure you want to clear this form?')){var transferlackeyObject=eventData.data;transferlackeyObject.ResetFTForm();}},truncateFileName:function(file_name){var truncated_file_name=file_name;if(file_name.length>this.kMaxFileNameLength)
{var midPoint=Math.floor(file_name.length/2);var numberOfCharsToRemove=file_name.length-this.kMaxFileNameLength;if(numberOfCharsToRemove>this.kFileNameTruncationString.length)
{var stringToRemove=truncated_file_name.substr(Math.floor(midPoint-(numberOfCharsToRemove/2)),numberOfCharsToRemove);truncated_file_name=truncated_file_name.replace(stringToRemove,this.kFileNameTruncationString);}}
return truncated_file_name;}});})();
$R('com.grouplogic.TransferLackeyUploadHTTP');(function(){var undefined;var regExPatterns={IS_SAFARI:/safari/i,IS_TIGER:/(OS X 10_4|OS X 10.4)/i,IS_VERSION_3:/version\/3\./i};com.grouplogic.TransferLackeyUploadHTTP=com.grouplogic.TransferLackeyUpload.extend({mDebugClassName:'tlUploadHTTP',mNumberOfFiles:0,mNumFilesSent:0,mTotalBytes:0,mBytesSent:0,mNumFilesIngested:0,mNextRowOdd:true,uploadTimer:undefined,uploadHttpElements:[],mTransferCompleteTimer:undefined,mUseGenericProgress:false,mGenericProgressPercent:0,mMaxHttpUploads:undefined,mIsMacChrome:false,mIsSafari51OrLater:false,kTransferBlurbText:"Please do not close your browser window while files are sending or the transfer will stop.",constructor:function(latestAvailableVersion,minimumRequiredVersion,httpTransferAllowed,maxHttpUploads){this.base(httpTransferAllowed);this.mMaxHttpUploads=maxHttpUploads;if(/mac/i.test(navigator.userAgent))
{this.mIsMacChrome=/chrome/i.test(navigator.userAgent);if(/safari/i.test(navigator.userAgent))
{var versionSearchString="Version";var index=navigator.userAgent.indexOf(versionSearchString,0);if(index!=-1)
{var versionValue=parseFloat(navigator.userAgent.substr(index+versionSearchString.length+1));this.mIsSafari51OrLater=(versionValue>=5.1);}}}
this.dbgload('constructor','Web client is in UPLOAD mode using HTTP as transport.');},insertPluginElement:function(redirectURL,isHidden,height,width){this.dbgload('insertPluginElement','HTTP transport -- no plugin element to insert.');},initializeHttpMode:function(){$j("#other_transport").html("MassTransit Plug-in");$j("#transportMethod").html(" using HTTP");if(!$G.gliPluginDetector.isInstalled())
{$j("#switch_transport").css("display","none");$j("#upgrade_link").css("display","block");}
var clickableElements=[{"eventType":"click","eventData":$G.transferLackey,"action":"INVOKE_TRANSFERLACKEY_METHOD","elemID":"start_upload_button","proc":$G.transferLackey.StartHTTPUpload}];$j("#wc_http_upload").css("display","block");$j("#httpUploadWarning").css("display","block");$j("#the_files_plugin").css("display","none");$j("#"+$G.transferLackey.kPluginUploadID).css("display","none");$j("#"+$G.transferLackey.kWebClientDropAreaID).css("display","none");$j("#httpFileSelector").MultiFile({list:'#the_files_http',STRING:{file:'$file',selected:'Selected: $file',remove:'<img class="removeIcon" src="images/spacer.gif">'},onFileSelect:function(element,value,master_element){var isValid=true;if($G.transferLackey.mPlatform=='Macintosh')
{if($G.transferLackey.mIsMacChrome||$G.transferLackey.mIsSafari51OrLater)
{var slashPos=value.lastIndexOf('\\');if(slashPos!=-1)
{value=value.substr(slashPos+1);}}
isValid=$G.transferLackey.isValidHTTPFileName(value);}
if(!isValid)
{$G.transferLackey.setErrorText(value+' could not be added to the upload file list because it has illegal characters in the name.');$G.transferLackey.dbgevnt('afterFileAppend','Invalid file name: '+value+'; file not added');}
if($G.transferLackey.mNumberOfFiles==$G.transferLackey.mMaxHttpUploads)
{var slashPos=value.lastIndexOf($G.transferLackey.mPathSeparator);if(slashPos!=-1)
{value=value.substr(slashPos+1);}
$G.transferLackey.setErrorText('"'+value+'" cannot be added for sending.  A maximum of '+$G.transferLackey.mMaxHttpUploads+' files can be sent in a single HTTP transfer.<br/>  To send more than '+$G.transferLackey.mMaxHttpUploads+' files in a single transfer, use the MassTransit Plug-in.');$G.transferLackey.dbgevnt('afterFileAppend','Maximum number of files already queued. '+value+'; file not added');isValid=false;}
return isValid;},afterFileRemove:function(element,value,master_element){$G.transferLackey.dbgevnt('afterFileRemove',value);$G.transferLackey.mNumberOfFiles--;$G.transferLackey.updateUploadControls();$G.transferLackey.mNextRowOdd=true;$j(master_element.list[0]).children().filter("div").each(function(){var t=$j(this);var oddOrEven=($G.transferLackey.mNextRowOdd)?"odd":"even";$G.transferLackey.mNextRowOdd=!$G.transferLackey.mNextRowOdd;t.removeClass("odd").removeClass("even").addClass(oddOrEven);});},afterFileAppend:function(element,value,master_element){$G.transferLackey.dbgevnt('afterFileAppend',value);var slashPos=value.lastIndexOf($G.transferLackey.mPathSeparator);if(slashPos!=-1)
{value=value.substr(slashPos+1);}
if($G.transferLackey.mIsMacChrome||$G.transferLackey.mIsSafari51OrLater)
{var slashPos=value.lastIndexOf('\\');if(slashPos!=-1)
{value=value.substr(slashPos+1);}}
$G.transferLackey.mNumberOfFiles++;var oddOrEven=($G.transferLackey.mNextRowOdd)?"odd":"even";$G.transferLackey.mNextRowOdd=!$G.transferLackey.mNextRowOdd;$j(master_element.list[0].lastChild).addClass(oddOrEven);$j(master_element.list[0].lastChild.lastChild).text($G.transferLackey.truncateFileName(value));},afterFileSelect:function(element,value,master_element){$G.transferLackey.mHTTPSelectorIDNum+=1;$G.transferLackey.updateUploadControls();}});var options={beforeSubmit:function(){if(!$G.transferLackey.isValidForSubmit(true))
{return false;}
var chosenService=$j("#serviceSelection_hidden").val();var subjectText=$j("#uploadSubject").val();var bodyText=$j("#uploadBody").val();subjectText=(subjectText=="")?$G.transferLackey.mTransferData['defaultSubject']:subjectText;var chosenContact=JSON.stringify($G.transferLackey.buildSendToList());$j("input#httpFwdUser").val(chosenContact);$j("input#httpService").val(chosenService);$j("input#httpSubject").val(subjectText);$j("input#httpBody").val(bodyText);chosenService=(chosenService==undefined)?"":chosenService;subjectText=(subjectText==undefined)?$G.transferLackey.mTransferData['defaultSubject']:subjectText;bodyText=(bodyText==undefined)?"":bodyText;$G.transferLackey.setTransferStarted();$j("#TB_closeWindowButton").text('Cancel');$G.transferLackey.uploadTimer=window.setInterval(function(){$G.transferLackey.RefreshProgress();},1000);$G.transferLackey.UpdateProgress(false);},success:function(){$G.transferLackey.mTransferCompleteTimer=window.setTimeout(function(){if(!$G.transferLackey.mTransferComplete)
{$G.transferLackey.appendErrorText('An unexpected error occurred uploading the file(s) to the web server.  Please try your upload again.');$G.transferLackey.setTransferComplete();}},5000);}};$j('#nonFlashForm').ajaxForm(options);return clickableElements;},handleOnLoad:function(){var newClickables;newClickables=this.initializeHttpMode();this.setClickableElements(newClickables);this.base();},SwitchTransport:function(eventData){this.base(eventData,$G.kTransportMethodPlugin);},ResetFTForm:function(){if(!$G.transferLackey.mTransferStarted||$G.transferLackey.mTransferComplete)
{return this.base();}
else if(confirm('Are you sure you want to abort the transfer?')){return this.base();}
else
{return true;}},updateUploadControls:function(){if($G.transferLackey.mNumberOfFiles>0)
{$j("#summaryFileDisplay #showFolderSummary").css("display","none");$j("#summaryFileDisplay #sizeSummary").css("display","none");$j("#the_files_http").css("display","block");$j('#clear_form_button').removeAttr('disabled').removeClass("disabled");$j('#detailedFileDisplay').css("display","block").css("visibility","visible");$j("#summaryFileDisplay #numberOfFiles").text($G.transferLackey.mNumberOfFiles);if($G.transferLackey.mNumberOfFiles==1)
{$j("#summaryFileDisplay #singleFile").css("display","inline");$j("#summaryFileDisplay #pluralFiles").css("display","none");}
else if($G.transferLackey.mNumberOfFiles>1)
{$j("#summaryFileDisplay #singleFile").css("display","none");$j("#summaryFileDisplay #pluralFiles").css("display","inline");}
else
{$j("#summaryFileDisplay #singleFile").css("display","none");$j("#summaryFileDisplay #pluralFiles").css("display","none");}
$j("#summaryFileDisplay").css("visibility","visible");}
else
{$j("#summaryFileDisplay").css("visibility","hidden");$j("#detailedFileDisplay").css("display","none").css("visibility","hidden");var chosenService=$j("#serviceSelection_hidden").val();var subjectText=$j("#uploadSubject").val();var bodyText=$j("#uploadBody").val();chosenService=(chosenService==undefined)?"":chosenService;subjectText=(subjectText==undefined)?"":subjectText;bodyText=(bodyText==undefined)?"":bodyText;if(chosenService!=""||subjectText!=""||bodyText!="")
{$j("#clear_form_button").removeAttr('disabled').removeClass("disabled");}
else
{$j('#clear_form_button').attr('disabled',1).addClass("disabled");}}
if($G.transferLackey.isValidForSubmit(false))
{$G.transferLackey.setErrorText("");$j('#start_upload_button').removeAttr('disabled').removeClass("disabled");}
else
{$j('#start_upload_button').attr('disabled',1).addClass("disabled");}
if($G.transferLackey.mSendToList.length!=0)
{$j("#clear_form_button").removeAttr('disabled').removeClass("disabled");}
$G.transferLackey.updateTabOrder();},HandleUpdateMessage:function(message){if(message[$G.kHTTPMessage_Type]==$G.kHTTPMessage_Type_Progress)
{if(message[$G.kHTTPProgress_Key]==$G.kHTTPProgress_Key_TotalFiles)
{this.mTotalFilesTransferring=message[$G.kHTTPProgress_Value];}
else if(message[$G.kHTTPProgress_Key]==$G.kHTTPProgress_Key_CurrentFile)
{this.mNumFilesSent=message[$G.kHTTPProgress_Value];}
else if(message[$G.kHTTPProgress_Key]==$G.kHTTPProgress_Key_TotalSize)
{this.mTotalBytes=message[$G.kHTTPProgress_Value];}
else if(message[$G.kHTTPProgress_Key]==$G.kHTTPProgress_Key_TotalSent)
{this.mBytesSent=message[$G.kHTTPProgress_Value];}
else if(message[$G.kHTTPProgress_Key]==$G.kHTTPProgress_Key_NumberIngested)
{this.mNumFilesIngested=message[$G.kHTTPProgress_Value];}
else
{this.dbgajax('HandleUpdateMessage','Unknown progress message type: '+message[$G.kHTTPProgress_Key]);}}
else
{var messageHandled=false;if(message[$G.kHTTPMessage_Type]==$G.kHTTPMessage_Type_Status)
{if(message[$G.kHTTPStatus_Type]==$G.kHTTPStatus_Type_Warning)
{if(message[$G.kHTTPStatus_ErrorCode]==$G.kError_HTTPUploadProgressUnavailable)
{this.mUseGenericProgress=true;messageHandled=true;}}}
if(!messageHandled)
{this.base(message);}}},RefreshProgress:function(){this.base();if(this.mTransferComplete)
{window.clearInterval(this.uploadTimer);window.clearTimeout(this.mTransferCompleteTimer);}
else if(this.mUseGenericProgress)
{this.mHideProgressPercentage=true;progressText='Transferring files...';this.mGenericProgressPercent=((this.mGenericProgressPercent)%100)+10;this.UpdateProgress(true,progressText,this.mGenericProgressPercent);}
else if(this.mNumFilesIngested>0)
{progressText='Processing files...';this.UpdateProgress(true,progressText,100);}
else if(this.mTotalBytes>0)
{progressText='Sending '+this.mBytesSent+' of '+this.mTotalBytes+' bytes.';progressPercentage=Math.round((this.mBytesSent/this.mTotalBytes)*100);this.UpdateProgress(true,progressText,progressPercentage,this.mNumberOfFiles,this.mNumFilesSent);}},ClearAllUploadFiles:function(){$j('#httpFileSelector').MultiFile('reset');$j("#nonFlashForm").resetForm();$j("#the_files_http div").remove();this.dbgevnt('clear form','deleting all files');this.updateUploadControls();},StartHTTPUpload:function(eventData){if(!$G.transferLackey.isValidForSubmit())
{return false;}
else
{$G.transferLackey.setErrorText('');$G.transferLackey.setInfoText('');$j("#nonFlashForm").submit();}},supportsMultipleAddressing:function(){return true;},isValidHTTPFileName:function(filename){var userAgentString=navigator.userAgent;var isSafari3OnTiger=regExPatterns.IS_TIGER.test(navigator.userAgent)&&regExPatterns.IS_SAFARI.test(navigator.userAgent)&&regExPatterns.IS_VERSION_3.test(navigator.userAgent);var RegExInvalidCharacters=/([\?<>\|\\\/:\"\*])|([. ]$)/;if(isSafari3OnTiger)
{RegExInvalidCharacters=/([\?<>\|\\:\"\*])|([. ]$)/;}
return(!RegExInvalidCharacters.test(filename));}});})();
$R('com.grouplogic.TransferLackeyUploadPlugin');(function(){var undefined;var regExPatterns={IS_IE:/(msie|internet explorer)/i,IS_FF4:/(firefox\/4)/i};com.grouplogic.TransferLackeyUploadPlugin=com.grouplogic.TransferLackeyUpload.extend({mDebugClassName:'tlUploadPlugin',mPluginLackey:null,uploadPluginElements:[],mNumberOfFiles:0,mFilesToUploadSize:0,mTopLevelFolders:[],mNumTopLevelFolders:0,mHiddenFileList:[],mRemovePathMap:[],mNumRowsShown:0,mMaxRowsToShow:100,mHideExcessRows:true,mSomeRowsHidden:false,mFileTransferLimit:0,mNextRowOdd:true,kTransferBlurbText:"You may close this window at any time without stopping the transfer. File transfer information is available in the MassTransit Web Assistant.",kWebClientID:"MTWebClient",constructor:function(latestAvailableVersion,minimumRequiredVersion,httpTransferAllowed,maxRowsToShow,fileTransferLimit){this.base(httpTransferAllowed);this.mPluginLackey=new com.grouplogic.PluginLackey(latestAvailableVersion,minimumRequiredVersion);if(maxRowsToShow!=undefined)
{this.mMaxRowsToShow=maxRowsToShow;}
if(fileTransferLimit!=undefined)
{this.mFileTransferLimit=fileTransferLimit;}
this.dbgload('constructor','Web client is in UPLOAD mode using the plugin as transport.');},insertPluginElement:function(redirectURL,isHidden,height,width){if(height==undefined)
height=120;if(width==undefined)
width=240;if(isHidden==undefined)
{isHidden=!this.mPluginLackey.getAllowsDragAndDrop();}
userAgent=navigator.userAgent;this.dbgload('insertPluginElement',userAgent);isIE=regExPatterns.IS_IE.test(userAgent);isFF4=regExPatterns.IS_FF4.test(userAgent);if(isHidden)
{height=1;width=1;}
else
{if(isIE||isFF4)
{$j("#"+this.kPluginUploadID).css("visibility","visible");$j("#"+this.kWebClientDropAreaID).css("visibility","visible");$j("#"+this.kIEDropAreaTextID).css("display","block");}}
try
{this.mPluginLackey.insertPluginIntoDoc(height,width);if(isFF4)
{$j("#"+this.kWebClientID).css({opacity:1});}}
catch(e)
{var msg=e.toString();this.setErrorText('An error occurred loading the MassTransit plug-in: '+msg);this.dbgload('insertPluginElement','Encountered error inserting plugin: '+msg);if((redirectURL!=undefined)||(redirectURL==''))
{this.dbgload('insertPluginElement','Error encountered.  Redirecting to '+redirectURL);window.location=redirectURL;}}
finally{}},initializePluginMode:function(){$j("#other_transport").html("HTTP");$j("#transportMethod").html(" using MassTransit Plug-in");window.setTimeout(function(){try
{$G.transferLackey.mPluginLackey.initializePluginElement();if($G.transferLackey.mPluginLackey.isUpgradeAvailable())
{$j("#upgrade_link").css("display","inline");}
if($G.transferLackey.mPluginLackey.getAllowsDragAndDrop())
{$j("#"+$G.transferLackey.kPluginUploadID).css("visibility","visible");$j("#"+$G.transferLackey.kWebClientDropAreaID).css("visibility","visible");userAgent=navigator.userAgent;isIE=regExPatterns.IS_IE.test(userAgent);isFF4=regExPatterns.IS_FF4.test(userAgent);if(isIE||isFF4)
{$j("#"+$G.transferLackey.kIEDropAreaTextID).css("display","block");}
else
{$j("#"+$G.transferLackey.kDropAreaTextID).css("display","block");}}
if(!$G.transferLackey.mPluginLackey.getSupportsSubjectAndMessage())
{$j('#EmailControls').css('display','none');}
$G.transferLackey.mPluginLackey.setPluginParam("FileTransferLimit",$G.transferLackey.mFileTransferLimit);}
catch(e)
{$G.transferLackey.setErrorText(e.toString());}},1000);var clickableElements=[{"eventType":"click","eventData":$G.transferLackey,"action":"INVOKE_TRANSFERLACKEY_METHOD","elemID":$G.transferLackey.kBrowseButtonID,"proc":$G.transferLackey.SelectFilesToUpload},{"eventType":"click","eventData":$G.transferLackey,"action":"INVOKE_TRANSFERLACKEY_METHOD","elemID":"start_upload_button","proc":$G.transferLackey.StartUpload},{"eventType":"click","eventData":$G.transferLackey,"action":"INVOKE_TRANSFERLACKEY_METHOD","elemID":"show_all_files_link","proc":$G.transferLackey.ShowAllFiles},{"eventType":"click","eventData":$G.transferLackey,"action":"INVOKE_TRANSFERLACKEY_METHOD","elemID":"show_all_files_bottom","proc":$G.transferLackey.ShowAllFiles}];$j("#the_files_http").css("display","none");$j("#drop_area_IE").css("display","block");$j("#DragAndDropArea").css("visibility","visible");$j("#"+$G.transferLackey.kBrowseButtonID).css("display","block");$j(".useTooltip").tooltip({showURL:false});this.base();return clickableElements;},handleOnLoad:function(){var newClickables;newClickables=this.initializePluginMode();this.setClickableElements(newClickables);this.base();},isValidEmailSettings:function(subject,body){if(!this.mPluginLackey.getSupportsSubjectAndMessage())
{return true;}
else
{return this.base(subject,body);}},cancelDrag:function(e){if(e.preventDefault)e.preventDefault();return false;},onFileDrop:function(e){if(e.preventDefault)e.preventDefault();if(e.dataTransfer.types)
{var formattedFileList=[];var files=e.dataTransfer.files;var uris=e.dataTransfer.getData("text/uri-list").split("\n");$G.transferLackey.dbg('','getAllowsDragAndDrop',"File Count: "+files.length);for(var i=0;i<files.length;i++)
{var filePath=uris[i];var splitpoint=filePath.indexOf($G.transferLackey.mPathSeparator);splitpoint=filePath.indexOf($G.transferLackey.mPathSeparator,splitpoint+1);splitpoint=filePath.indexOf($G.transferLackey.mPathSeparator,splitpoint+1);filePath=decodeURIComponent(filePath.slice(splitpoint));var relPath="";$G.transferLackey.dbg('','getAllowsDragAndDrop',"Last index: "+filePath.lastIndexOf("/")+"; length: "+filePath.length);if(filePath.lastIndexOf("/")==(filePath.length-1))
{filePath=filePath.slice(0,filePath.length-1);}
fileSizeFloat=files[i].fileSize+0.01;formattedFileList[formattedFileList.length]={"file_path":filePath,"relative_path":relPath,"size":fileSizeFloat};}
var queueFilesJSONRequest={"version":this.mParsedVersion,"type":"Request","code":"QueueFilesForUpload","files_ul":formattedFileList};var queueFilesJSONRequestString=JSON.stringify(queueFilesJSONRequest);$G.transferLackey.dbgrequests('queuefiles','msg='+queueFilesJSONRequestString);if(result=$G.transferLackey.mPluginLackey.getPluginElem().ExecuteRequest(queueFilesJSONRequestString)){$G.transferLackey.dbgrequests('queuefiles',"MTWebClient.ExecuteRequest('QueueFilesForUpload') returned "+result);}else{$G.transferLackey.setErrorText('An error occurred executing the QueueFilesForUpload request: '+result);dbgrequests('queuefiles',"<span style='color:red'>MTWebClient.ExecuteRequest('QueueFilesForUpload') returned "+result+"</span>");}}
return false;},NotificationCallback:function(message){this.dbgnotify('callback','received:'+message);try{var objMsg=JSON.parse(message);switch(objMsg.code){case"FilesAddedToUploadList":{$G.transferLackey.setInfoText('Building list of files to upload, please wait.');setTimeout(function(){var newTableRows='';var currentErrorMessage=$G.transferLackey.mErrorText;$j.each(objMsg.files_ul,function(index,value){$G.transferLackey.mNumberOfFiles++;$G.transferLackey.mFilesToUploadSize+=value.size;$G.transferLackey.addToTopLevelFolders(value.relative_path);if((!$G.transferLackey.mHideExcessRows)||($G.transferLackey.mNumRowsShown<$G.transferLackey.mMaxRowsToShow))
{newTableRows+=$G.transferLackey.addFileToTable(value.file_path,value.relative_path,value.size);$G.transferLackey.mNumRowsShown++;}
else
{$G.transferLackey.mSomeRowsHidden=true;$G.transferLackey.mHiddenFileList.push(value);}});$j("#detailedFileDisplay").css("display","block");$j("#the_files_plugin tbody").append(newTableRows);$G.transferLackey.setInfoText('');$G.transferLackey.updateUploadControls();$G.transferLackey.setErrorText(currentErrorMessage);},0);break;}
case"FilesDeletedFromUploadList":{var relPathWithouthTrailingSep='';$j.each(objMsg.files_ul,function(index,value){$G.transferLackey.mNumberOfFiles--;$G.transferLackey.mFilesToUploadSize-=value.size;pathSepPosition=value.relative_path.indexOf($G.transferLackey.mPathSeparator);relPathWithouthTrailingSep=value.relative_path.substr(0,pathSepPosition);$G.transferLackey.mTopLevelFolders[relPathWithouthTrailingSep]--;if($G.transferLackey.mTopLevelFolders[relPathWithouthTrailingSep]==0)
$G.transferLackey.mNumTopLevelFolders--;if(!$G.transferLackey.mTransferStarted)
{if($G.transferLackey.removeFileFromTable(value.file_path,value.relative_path))
$G.transferLackey.mNumRowsShown--;}});if(!$G.transferLackey.mTransferStarted)
{$G.transferLackey.FillFileTable();}
break;}
default:{this.base(message);break;}}}catch(e){this.setErrorText('An error occurred processing notifications: '+e.toString());this.dbgnotify('callback','ERROR: exception processing notification; '+e.toString());}finally{}
return true;},SwitchTransport:function(eventData){this.base(eventData,$G.kTransportMethodHTTP);},ShowAllFiles:function(eventData){$G.transferLackey.mHideExcessRows=false;$G.transferLackey.FillFileTable();},setTransferStarted:function(){$j("#"+$G.transferLackey.kWebClientDropAreaID).css("visibility","hidden");$j("#DragAndDropArea").css("visibility","hidden");this.base();},supportsMultipleAddressing:function(){return $G.transferLackey.mPluginLackey.getSupportsMultipleAddressing();},RestripeTable:function(){$G.transferLackey.mNextRowOdd=true;$j("#the_files_plugin tbody").children().each(function(){var t=$j(this);var oddOrEven=($G.transferLackey.mNextRowOdd)?"odd":"even";$G.transferLackey.dbg('','test','handling '+oddOrEven+' row...');$G.transferLackey.mNextRowOdd=!$G.transferLackey.mNextRowOdd;t.removeClass("odd").removeClass("even");t.addClass(oddOrEven);});},FillFileTable:function(){$G.transferLackey.RestripeTable();var newTableRows='';var numRowsToAdd=$G.transferLackey.mMaxRowsToShow-$G.transferLackey.mNumRowsShown;if((!$G.transferLackey.mHideExcessRows)||(numRowsToAdd>=$G.transferLackey.mHiddenFileList.length))
{numRowsToAdd=$G.transferLackey.mHiddenFileList.length;$G.transferLackey.mSomeRowsHidden=false;}
for(i=0;i<numRowsToAdd;i++)
{itemToAdd=$G.transferLackey.mHiddenFileList.shift();newTableRows+=$G.transferLackey.addFileToTable(itemToAdd.file_path,itemToAdd.relative_path,itemToAdd.size);$G.transferLackey.mNumRowsShown++;}
$j("#the_files_plugin tbody").append(newTableRows);$G.transferLackey.updateUploadControls();},updateUploadControls:function(){if($G.transferLackey.mNumberOfFiles>0)
{var accumulatedSize=$G.transferLackey.GetDisplayFileSize($G.transferLackey.mFilesToUploadSize);$j("#summaryFileDisplay #totalSize").text(accumulatedSize);if($G.transferLackey.mNumTopLevelFolders>0)
{$j("#summaryFileDisplay #showFolderSummary").css("display","inline");$j("#summaryFileDisplay #numberOfFolders").text($G.transferLackey.mNumTopLevelFolders);if($G.transferLackey.mNumTopLevelFolders==1)
{$j("#summaryFileDisplay #singleFolder").css("display","inline");$j("#summaryFileDisplay #pluralFolders").css("display","none");}
else
{$j("#summaryFileDisplay #singleFolder").css("display","none");$j("#summaryFileDisplay #pluralFolders").css("display","inline");}}
else
{$j("#summaryFileDisplay #showFolderSummary").css("display","none");}
$j('#clear_form_button').removeAttr('disabled').removeClass("disabled");$j('#detailedFileDisplay').css("display","block").css("visibility","visible");$j("#summaryFileDisplay #numberOfFiles").text($G.transferLackey.mNumberOfFiles);if($G.transferLackey.mNumberOfFiles==1)
{$j("#summaryFileDisplay #singleFile").css("display","inline");$j("#summaryFileDisplay #pluralFiles").css("display","none");}
else if($G.transferLackey.mNumberOfFiles>1)
{$j("#summaryFileDisplay #singleFile").css("display","none");$j("#summaryFileDisplay #pluralFiles").css("display","inline");}
else
{$j("#summaryFileDisplay #singleFile").css("display","none");$j("#summaryFileDisplay #pluralFiles").css("display","none");}
if($G.transferLackey.mSomeRowsHidden)
{$j("#summaryFileDisplay #numFilesShown").text($G.transferLackey.mNumRowsShown);$j("#summaryFileDisplay #someFilesHidden").css("display","inline");$j("#detailedFileDisplay #someFilesHidden2").css("display","inline");}
else
{$j("#summaryFileDisplay #someFilesHidden").css("display","none");$j("#detailedFileDisplay #someFilesHidden2").css("display","none");}
$j("#summaryFileDisplay").css("visibility","visible");}
else
{$j("#summaryFileDisplay").css("visibility","hidden");$j("#detailedFileDisplay").css("display","none").css("visibility","hidden");var chosenService=$j("#serviceSelection_hidden").val();var subjectText=$j("#uploadSubject").val();var bodyText=$j("#uploadBody").val();chosenService=(chosenService==undefined)?"":chosenService;subjectText=((subjectText==undefined)||(subjectText==""))?$G.transferLackey.mTransferData['defaultSubject']:subjectText;bodyText=(bodyText==undefined)?"":bodyText;if(chosenService!=""||subjectText!=""||bodyText!="")
{$j("#clear_form_button").removeAttr('disabled').removeClass("disabled");}
else
{$j('#clear_form_button').attr('disabled',1).addClass("disabled");}
$j("#summaryFileDisplay #showFolderSummary").css("display","none");}
if($G.transferLackey.isValidForSubmit(false))
{$G.transferLackey.setErrorText("");$j('#start_upload_button').removeAttr('disabled').removeClass("disabled");}
else
{$j('#start_upload_button').attr('disabled',1).addClass("disabled");}
if($G.transferLackey.mSendToList.length!=0)
{$j("#clear_form_button").removeAttr('disabled').removeClass("disabled");}
$j("#the_files_plugin").trigger("update");$G.transferLackey.updateTabOrder();},addToTopLevelFolders:function(relativePath){PathSepPosition=0;folderName="";if((relativePath!=undefined)&&(relativePath.length>0))
{pathSepPosition=relativePath.indexOf(this.mPathSeparator);folderName=relativePath.substr(0,pathSepPosition);if(folderName in this.mTopLevelFolders)
{this.mTopLevelFolders[folderName]+=1;}
else
{this.mTopLevelFolders[folderName]=1;}
if(this.mTopLevelFolders[folderName]==1)
{this.mNumTopLevelFolders++;}}},getUniqueFileId:function(filePath,relativePath){return(escape(filePath+'|'+relativePath)).replace(/(\\|\/|%|\.|\*|\@|\+)/g,'__');},addFileToTable:function(file_path,relative_path,file_size){var slashPos=file_path.lastIndexOf(this.mPathSeparator);this.mRemovePathMap.push({'filePath':file_path,'relativePath':relative_path,'fileSize':file_size});var removeIndex=this.mRemovePathMap.length-1;var fileRowId=this.getUniqueFileId(file_path,relative_path);var truncatedFileName=this.truncateFileName(file_path.substr(slashPos+1));var displayFileSize=Math.round(file_size/1024);if(displayFileSize==0)
displayFileSize=1;var oddOrEven=(this.mNextRowOdd)?"odd":"even";this.mNextRowOdd=!this.mNextRowOdd;return newElement='<tr id="'+fileRowId+'" class="UploadFileList-label '+oddOrEven+'">'+'<td class="UploadFileList-title" wrap="nowrap">'+truncatedFileName+'</td>'+'<td class="wrap_anywhere" wrap="nowrap">'+file_path.substr(0,slashPos)+'</td>'+'<td class="UploadFileList-size" wrap="nowrap">'+displayFileSize+'</td>'+'<td class="UploadFileList-remove" wrap="nowrap">'+'<a href="#" onclick="$G.transferLackey.DeleteFileFromUploadList('+removeIndex+');">'+'<div class="removeIcon"></div>'+'</a>'+'</td>'+'</tr>';},removeFileFromTable:function(the_file,relative_path){try{var rowId=$G.transferLackey.getUniqueFileId(the_file,relative_path);var rowToDelete=$j("#"+rowId);if(rowToDelete.length==0)
{$G.transferLackey.dbg('','removeFileFromTable','File to remove from table could not be found: '+rowId);return false;}
else
{rowToDelete.remove();return true;}}
catch(e){$G.transferLackey.dbg('','removeFileFromTable','Exception occurred removing file from table: '+e.toString());}},ClearAllUploadFiles:function(){},StartUpload:function(eventData){var transferlackeyObject=eventData.data;transferlackeyObject.StartUploadDirect(transferlackeyObject);},StartUploadDirect:function(transferlackeyObject){var chosenService="";var subjectText="";var bodyText="";var chosenServiceIndex=0;var chosenContactIndex=0;var validationError=false;var errorText="";chosenService=$j('#serviceSelection_hidden').val();subjectText=$j("#uploadSubject").val();bodyText=$j("#uploadBody").val();chosenService=(chosenService==undefined)?"":chosenService;subjectText=((subjectText==undefined)||(subjectText==""))?$G.transferLackey.mTransferData['defaultSubject']:subjectText;bodyText=(bodyText==undefined)?"":bodyText;if(transferlackeyObject.isValidForSubmit())
{var chosenContact=$G.transferLackey.buildSendToList();transferlackeyObject.setErrorText('');transferlackeyObject.setTransferStarted();transferlackeyObject.UpdateProgress(true,'Launching MassTransit Assistant...');if(!transferlackeyObject.mPluginLackey.getSupportsUDT()&&(transferlackeyObject.mTransferData['transport']=="UDT"))
{transferlackeyObject.appendWarningText('This version of the plugin does not support UDT transfers.  TCP/IP will be used instead.  Update to the latest plugin to use UDT to transfer files.');}
if(transferlackeyObject.mPluginLackey.getSupportsMultipleAddressing())
{var startUploadJSONRequest={"version":transferlackeyObject.mPluginLackey.getPluginVersion(),"type":"Request","code":"StartUpload","metadata":{"xml_metadata":transferlackeyObject.mTransferData['metadata'],"fwd_user":chosenContact,"service":chosenService,"job_ticket_id":transferlackeyObject.mTransferData['job_ticket_id'],"subject":subjectText,"message":bodyText},"who":transferlackeyObject.mTransferData['who'],"transport":transferlackeyObject.mTransferData['transport'],"host_addr":transferlackeyObject.mTransferData['host_addr'],"host_port":transferlackeyObject.mTransferData['host_port'],"who_plus":transferlackeyObject.mTransferData['who_plus'],"ssl_params":transferlackeyObject.mTransferData['ssl_params']};}
else
{var startUploadJSONRequest={"version":transferlackeyObject.mPluginLackey.getPluginVersion(),"type":"Request","code":"StartUpload","fwd_user":chosenContact[0],"service":chosenService,"metadata":transferlackeyObject.mTransferData['metadata'],"job_ticket_id":transferlackeyObject.mTransferData['job_ticket_id'],"who":transferlackeyObject.mTransferData['who'],"transport":transferlackeyObject.mTransferData['transport'],"host_addr":transferlackeyObject.mTransferData['host_addr'],"host_port":transferlackeyObject.mTransferData['host_port'],"who_plus":transferlackeyObject.mTransferData['who_plus'],"ssl_params":transferlackeyObject.mTransferData['ssl_params'],"subject":subjectText,"note":bodyText};}
var startUploadJSONString=JSON.stringify(startUploadJSONRequest);transferlackeyObject.dbgrequests('startupload','msg='+startUploadJSONString);if(result=transferlackeyObject.mPluginLackey.getPluginElem().ExecuteRequest(startUploadJSONString))
{transferlackeyObject.dbgrequests('startupload',"MTWebClient.ExecuteRequest('StartUpload') returned "+result);transferlackeyObject.UpdateProgress(true,'Queued transfer...');}
else
{transferlackeyObject.dbgrequests('startupload',"<span style='color:red'>MTWebClient.ExecuteRequest('StartUpload') returned "+result+"</span>");}}},SelectFilesToUpload:function(eventData){var transferlackeyObject=eventData.data;return transferlackeyObject.SelectFilesToUploadDirect(transferlackeyObject);},SelectFilesToUploadDirect:function(transferlackeyObject){var uploadJSONRequest={'version':transferlackeyObject.mParsedVersion,'type':'Request','code':'SelectFilesToUpload'};var uploadJSONString=JSON.stringify(uploadJSONRequest);transferlackeyObject.dbgrequests('upload','msg='+uploadJSONString);var pluginElem=transferlackeyObject.mPluginLackey.getPluginElem();var result=false;if(pluginElem==null)
{transferlackeyObject.dbgrequests('upload',"MTWebClient.ExecuteRequest('SelectFilesToUpload') could not be handled because the plugin was not fully loaded.");}
else
{result=pluginElem.ExecuteRequest(uploadJSONString)
if(result){transferlackeyObject.dbgrequests('upload',"MTWebClient.ExecuteRequest('SelectFilesToUpload') returned "+result);}else{transferlackeyObject.dbgrequests('upload',"<span style='color:red'>MTWebClient.ExecuteRequest('SelectFilesToUpload') returned "+result+"</span>");}}
return result;},DeleteFileFromUploadList:function(removeIndex){var formattedFileList=[];if(this.mRemovePathMap.length<=removeIndex)
{this.dbgrequests('DeleteFileFromUploadList','Invalid index for deletion: '+removeIndex);this.setErrorText('The file you requested to delete was invalid.');}
else
{fileSizeFloat=this.mRemovePathMap[removeIndex]['fileSize']+0.01;formattedFileList[formattedFileList.length]={"file_path":this.mRemovePathMap[removeIndex]['filePath'],"relative_path":this.mRemovePathMap[removeIndex]['relativePath'],"size":fileSizeFloat};var deleteFilesJSONRequest={"version":this.mParsedVersion,"type":"Request","code":"DeleteFilesFromUploadList","files_ul":formattedFileList};var deleteFilesJSONRequestString=JSON.stringify(deleteFilesJSONRequest);this.dbgrequests('deletefiles','msg='+deleteFilesJSONRequestString);if(result=this.mPluginLackey.getPluginElem().ExecuteRequest(deleteFilesJSONRequestString)){this.dbgrequests('deletefiles',"MTWebClient.ExecuteRequest('DeleteFilesFromUploadList') returned "+result);}else{this.setErrorText('An error occurred executing the DeleteFilesFromUploadList request: '+result);this.dbgrequests('deletefiles',"<span style='color:red'>MTWebClient.ExecuteRequest('DeleteFilesFromUploadList') returned "+result+"</span>");}}}});})();
$R('com.grouplogic.TransferLackeyEmbedUploadPlugin');(function(){var undefined;com.grouplogic.TransferLackeyEmbedUploadPlugin=com.grouplogic.TransferLackeyUploadPlugin.extend({mDebugClassName:'tlEmbedUploadPlugin',mErrorPlainText:'',mTransferCancelledURL:'',mTransferFailedURL:'',mTransferErrorNoFilesURL:'',mTransferErrorWithFilesURL:'',mTransferCompleteURL:'',constructor:function(latestAvailableVersion,minimumRequiredVersion,completeURL,errorURL,cancelURL,pluginDownloadURL){var httpTransferAllowed=false;var maxRowsToShow=0;var fileTransferLimit=undefined;this.base(latestAvailableVersion,minimumRequiredVersion,httpTransferAllowed,maxRowsToShow,fileTransferLimit);if(pluginDownloadURL!=undefined)
{this.mPluginLackey.initializePluginDownloadURL(pluginDownloadURL);}
if(cancelURL!=undefined)
{this.mTransferCancelledURL=cancelURL;}
if(errorURL!=undefined)
{this.mTransferFailedURL=errorURL;this.mTransferErrorNoFilesURL=errorURL;this.mTransferErrorWithFilesURL=errorURL;}
if(completeURL!=undefined)
{this.mTransferCompleteURL=completeURL;}},setErrorText:function(msg,timestamp){this.mErrorPlainText=msg;this.base(msg,timestamp);},appendErrorText:function(msg,timestamp){this.mErrorPlainText=this.mErrorPlainText+'\n'+msg;this.base(msg,timestamp);},handleOnReady:function(transferData){var serviceListJSON='';var contactListJSON='';var watermark='';this.base(transferData,serviceListJSON,contactListJSON,watermark);},updateUploadControls:function(){this.base();if(this.mNumberOfFiles>0)
{this.dbgnotify('NotificationCallback','Files to upload!');this.StartUploadDirect(this);}
else
{this.dbgnotify('NotificationCallback','No files to upload.');}},setTransferStarted:function(){this.mTransferStarted=true;},setTransferComplete:function(){this.dbgnotify('setTransferComplete','setTransferComplete (single upload) running');this.base();if((this.mTransferCancelled)&&(''!=this.mTransferCancelledURL))
{document.location=this.mTransferCancelledURL;}
else if((this.mTransferFailed)&&(''!=this.mTransferFailedURL))
{document.location=this.mTransferFailedURL+'&ERRMSG='+this.mErrorPlainText;}
else
{if(this.mTransferErrorsOccurred)
{if((this.mNoFilesTransferred)&&(''!=this.mTransferErrorNoFilesURL))
{document.location=this.mTransferErrorNoFilesURL+'&ERRMSG='+this.mErrorPlainText;}
else if(''!=this.mTransferErrorNoFilesURL)
{document.location=this.mTransferErrorWithFilesURL+'&ERRMSG='+this.mErrorPlainText;}}
else if(''!=this.mTransferCompleteURL)
{document.location=this.mTransferCompleteURL;}}}});})();
$R('com.grouplogic.TransferLackeyImmediateUploadPlugin');(function(){var undefined;com.grouplogic.TransferLackeyImmediateUploadPlugin=com.grouplogic.TransferLackeyEmbedUploadPlugin.extend({mDebugClassName:'tlImmediateUploadPlugin',mErrorPlainText:'',mTransferCancelledURL:'',mTransferFailedURL:'',mTransferErrorNoFilesURL:'',mTransferErrorWithFilesURL:'',mTransferCompleteURL:'',constructor:function(latestAvailableVersion,minimumRequiredVersion,completeURL,errorURL,cancelURL,pluginDownloadURL){this.base(latestAvailableVersion,minimumRequiredVersion,completeURL,errorURL,cancelURL,pluginDownloadURL);this.dbgload('constructor','Web client is in IMMEDIATE UPLOAD mode using the plugin as transport.');},insertPluginElement:function(){var redirectURL="";this.base(redirectURL,true);},SelectFilesToUploadDirect:function(transferlackeyObject){var retValue=this.base(transferlackeyObject);if((!retValue)&&(''!=this.mTransferCancelledURL))
{this.dbgnotify('setTransferComplete','Redirecting to transfer cancelled');document.location=this.mTransferCancelledURL;}
return retValue;},handleOnReady:function(transferData){this.base(transferData);window.setTimeout(function(){if($G.transferLackey.mPluginLackey.mPluginSupported)
{$G.transferLackey.SelectFilesToUploadDirect($G.transferLackey);}},1000);}});})();
$R('com.grouplogic.TransferLackeySingleUploadPlugin');(function(){var undefined;com.grouplogic.TransferLackeySingleUploadPlugin=com.grouplogic.TransferLackeyEmbedUploadPlugin.extend({mDebugClassName:'tlSingleUploadPlugin',mErrorPlainText:'',mTransferCancelledURL:'',mTransferFailedURL:'',mTransferErrorNoFilesURL:'',mTransferErrorWithFilesURL:'',mTransferCompleteURL:'',constructor:function(latestAvailableVersion,minimumRequiredVersion,completeURL,errorURL,cancelURL,pluginDownloadURL,browseButtonID,dropAreaWrapperID,webClientDropAreaID,dropAreaTextID,ieDropAreaTextID){this.base(latestAvailableVersion,minimumRequiredVersion,completeURL,errorURL,cancelURL,pluginDownloadURL);if(browseButtonID!=undefined)
{this.kBrowseButtonID=browseButtonID;}
if(dropAreaWrapperID!=undefined)
{this.kPluginUploadID=dropAreaWrapperID;}
if(webClientDropAreaID!=undefined)
{this.kWebClientDropAreaID=webClientDropAreaID;this.mPluginLackey.initializeDragAndDropElements(this.kWebClientDropAreaID);}
if(dropAreaTextID!=undefined)
{this.kDropAreaTextID=dropAreaTextID;}
if(ieDropAreaTextID!=undefined)
{this.kIEDropAreaTextID=ieDropAreaTextID;}
this.dbgload('constructor','Web client is in SINGLE UPLOAD mode using the plugin as transport.');},insertPluginElement:function(height,width){var redirectURL="";this.base(redirectURL,undefined,height,width);}});})();
$R('com.grouplogic.TransferLackeyDownload');(function(){var undefined;com.grouplogic.TransferLackeyDownload=com.grouplogic.TransferLackey.extend({mDebugClassName:'tldownload',downloadPluginElements:[],downloadHttpElements:[],pickupURL:"index.php?action=FileTransfer.pickup",deleteFileByIdURL:"index.php?action=FileTransfer.deleteFileById",requeueFileURL:"index.php?action=FileTransfer.requeueFile",switchTableStyleURL:"index.php?action=FileTransfer.setTableStyle",mThisPageURL:"index.php?action=FileTransfer.pickup",mTableStyle:0,mNumberOfFilesAvailable:0,mSizeOfFilesAvailable:0,mNumberOfFilesSelected:0,mSizeOfFilesSelected:0,mNumberOfFilesShown:0,mNumberOfToSendFilesAvailable:0,mNumberOfSentFilesAvailable:0,mSizeOfToSendFilesAvailable:0,mSizeOfSentFilesAvailable:0,mFolderSelected:false,mMaxRowsToShow:undefined,kThickboxTitleCaption:"Download Files",kConnectionSuccessfulText:"Your files have been downloaded successfully.",kConnectionWithErrorsText:"Files have been received with errors.  Please see the table below for errors.",constructor:function(httpTransferAllowed,maxRowsToShow){this.mMaxRowsToShow=maxRowsToShow;this.base(httpTransferAllowed);},handleOnReady:function(transferData,downloadFiles,$totalFileSize){try
{this.setTransferData(transferData);this.setDownloadFileList(downloadFiles);this.mTableStyle=transferData['tableStyle'];for(var j=0;j<this.mTransferData['downloadFileList'].length;j++){if(this.mTransferData['downloadFileList'][j].file_status==300)
{this.mNumberOfSentFilesAvailable++;}
else
{this.mNumberOfToSendFilesAvailable++;}}
this.mSizeOfToSendFilesAvailable=this.mTransferData['totalFileSizeToSend'];this.mSizeOfSentFilesAvailable=this.mTransferData['totalFileSizeSent'];this.updateDownloadControls();var clickableElements=[{"eventType":"click","eventData":$G.transferLackey,"action":"INVOKE_TRANSFERLACKEY_METHOD","elemID":"toggle_all_files_checkbox","proc":$G.transferLackey.ToggleAllFiles},{"eventType":"click","eventData":$G.transferLackey,"action":"INVOKE_TRANSFERLACKEY_METHOD","elemID":"switch_transport","proc":$G.transferLackey.SwitchTransport},{"eventType":"click","eventData":$G.transferLackey,"action":"INVOKE_TRANSFERLACKEY_METHOD","elemID":"showAlreadyDownloaded","proc":$G.transferLackey.SwitchShowAlreadyDownloaded},{"eventType":"click","eventData":$G.transferLackey,"action":"INVOKE_TRANSFERLACKEY_METHOD","elemID":"switch_table_style","proc":$G.transferLackey.SwitchTableStyle}];this.setConstantClickableElements(clickableElements);if(0!=(this.mNumberOfToSendFilesAvailable+this.mNumberOfSentFilesAvailable))
{sortColumns=[[4,0]];if(this.mTableStyle==$G.kTableFormat_TopLevelFolder)
{sortColumns=[[1,1]];}
$j("#the_files").tablesorter({widthFixed:true,cssAsc:"sortSelection",cssDesc:"sortSelection",sortList:sortColumns,headers:{0:{sorter:false}},widgets:['zebra']});}
this.handleOnLoad();}
catch(e)
{var msg=e.toString();$G.transferLackey.dbg('Pickup','dspFileTransfer_pickup.tpl',msg);this.setErrorText('An error occurred initializing the transfer page: '+msg);}
finally{}},setDownloadFileList:function(downloadList){this.mTransferData['downloadFileList']=downloadList;this.dbgfiles('set list','files to download: '+JSON.stringify(downloadList));},updateDownloadControls:function(){this.UpdateFileCountAndSize();if(this.mNumberOfFilesAvailable>0)
{$j('#detailedFileDisplay').css("display","block").css("visibility","visible");var accumulatedSizeTotal=this.GetDisplayFileSize(this.mSizeOfFilesAvailable);$j("#summaryFileDisplay #sizeTotal").text(accumulatedSizeTotal);$j("#summaryFileDisplay #numberOfFilesTotal").text(this.mNumberOfFilesAvailable);if(this.mNumberOfFilesAvailable==1)
{$j("#summaryFileDisplay #singleFileTotal").css("display","inline");$j("#summaryFileDisplay #pluralFilesTotal").css("display","none");}
else if(this.mNumberOfFilesAvailable>1)
{$j("#summaryFileDisplay #singleFileTotal").css("display","none");$j("#summaryFileDisplay #pluralFilesTotal").css("display","inline");}
else
{$j("#summaryFileDisplay #singleFileTotal").css("display","none");$j("#summaryFileDisplay #pluralFilesTotal").css("display","none");}
if(this.mNumberOfFilesShown!=this.mNumberOfFilesAvailable)
{$j('#filesShown').css("visibility","visible");$j("#filesShown #numberOfFilesShown").text(this.mNumberOfFilesShown);}
else
{$j('#filesShown').css("visibility","hidden");}
if(this.mNumberOfFilesSelected>0)
{$j("#selectedFileDisplay").css("visibility","visible");if(this.mNumberOfFilesSelected==this.mNumberOfFilesAvailable)
{$j('#selectedFileDisplay #allFilesSelected').css("display","inline");$j('#selectedFileDisplay #someFilesSelected').css("display","none");}
else
{var accumulatedSizeSelected=this.GetDisplayFileSize(this.mSizeOfFilesSelected);$j("#summaryFileDisplay #sizeSelected").text(accumulatedSizeSelected);$j("#summaryFileDisplay #numberOfFilesSelected").text(this.mNumberOfFilesSelected);if(this.mNumberOfFilesSelected==1)
{$j("#summaryFileDisplay #singleFileSelected").css("display","inline");$j("#summaryFileDisplay #pluralFilesSelected").css("display","none");}
else if(this.mNumberOfFilesSelected>1)
{$j("#summaryFileDisplay #singleFileSelected").css("display","none");$j("#summaryFileDisplay #pluralFilesSelected").css("display","inline");}
else
{$j("#summaryFileDisplay #singleFileSelected").css("display","none");$j("#summaryFileDisplay #pluralFilesSelected").css("display","none");}
$j('#selectedFileDisplay #allFilesSelected').css("display","none");$j('#selectedFileDisplay #someFilesSelected').css("display","inline");}}
else
{$j("#selectedFileDisplay").css("visibility","hidden");}
$j("#summaryFileDisplay").css("visibility","visible");}
else
{$j('#detailedFileDisplay').css("display","none").css("visibility","hidden");$j("#summaryFileDisplay").css("visibility","hidden");}},RestripeTable:function(){$G.transferLackey.mNextRowOdd=true;$j("#the_files tbody").children().removeClass("odd even").filter(':even').addClass("even").end().filter(':odd').addClass("odd");},SwitchTableStyle:function(eventData){var transferlackeyObject=eventData.data;var newTableStyle=(transferlackeyObject.mTableStyle==0)?1:0;transferlackeyObject.dbg('','SwitchTableView','Switching tableView to '+newTableStyle);window.location=transferlackeyObject.switchTableStyleURL+"&tableStyle="+newTableStyle+"&redirect="+escape(transferlackeyObject.mThisPageURL);},SwitchShowAlreadyDownloaded:function(){var showAlreadyDownloaded=$j('#showAlreadyDownloaded').attr("checked");if(showAlreadyDownloaded)
{$j('#detailedFileDisplay').css("display","block").css("visibility","visible");$j("#the_files tbody").children().removeClass("hiddenrow");}
else
{$j("#the_files tbody").children().each(function(){var t=$j(this);if(t.hasClass("alreadydownloaded"))
{t.addClass("hiddenrow");}});}
$G.transferLackey.RestripeTable();$G.transferLackey.updateDownloadControls();},ToggleAllFiles:function(eventData){var transferlackeyObject=eventData.data;var toggleValue=$j('#toggle_all_files_checkbox').attr("checked");transferlackeyObject.dbgevnt('ToggleAllFiles','control checkbox value: '+toggleValue);transferlackeyObject.GetFileCheckboxes().filter(function(nv){return function(idx){return(this.checked!=nv);};}(toggleValue)).each(function(nv){return function(idx){$j(this).attr("checked",nv);};}(toggleValue));transferlackeyObject.updateDownloadControls();},GetFileCheckboxes:function(){return $j('#the_files tbody input:visible');},UpdateFileCountAndSize:function(){var checkboxes=this.GetFileCheckboxes();var showAlreadyDownloaded=$j('#showAlreadyDownloaded').attr("checked");this.mNumberOfFilesAvailable=(showAlreadyDownloaded)?(this.mNumberOfToSendFilesAvailable+this.mNumberOfSentFilesAvailable):this.mNumberOfToSendFilesAvailable;this.mSizeOfFilesAvailable=(showAlreadyDownloaded)?(this.mSizeOfToSendFilesAvailable+this.mSizeOfSentFilesAvailable):this.mSizeOfToSendFilesAvailable;this.mNumberOfFilesSelected=0;this.mSizeOfFilesSelected=0;this.mFolderSelected=false;for(var i=0;i<checkboxes.length;i++){if(checkboxes[i].checked==true){if(this.mTableStyle==$G.kTableFormat_File)
{var thisFileSize=parseInt(checkboxes[i].className,10);this.mNumberOfFilesSelected++;this.mSizeOfFilesSelected+=thisFileSize;}
else
{var numFilesAndSize=checkboxes[i].className.split("|");this.mNumberOfFilesSelected+=parseInt(numFilesAndSize[0]);this.mSizeOfFilesSelected+=parseInt(numFilesAndSize[1]);if(parseInt(numFilesAndSize[2])==1)
{this.mFolderSelected=true;}}}}
if(this.mTableStyle==$G.kTableFormat_File)
{this.mNumberOfFilesShown=(this.mMaxRowsToShow<=this.mNumberOfFilesAvailable)?this.mMaxRowsToShow:this.mNumberOfFilesAvailable;}
else
{this.mNumberOfFilesShown=this.mNumberOfFilesAvailable;}
if(this.mNumberOfFilesShown==this.mNumberOfFilesSelected)
{$j('#toggle_all_files_checkbox').attr("checked",true);}
else
{$j('#toggle_all_files_checkbox').attr("checked",false);}},GetSelectedFiles:function(){var selectedFiles=new Array();this.GetFileCheckboxes().filter(function(idx){return this.checked;}).each(function(sf){return function(idx){if($G.transferLackey.mTableStyle==$G.kTableFormat_File)
{sf[sf.length]=this.id;}
else
{var idList=this.id.split('_');for(eachId in idList)
{sf[sf.length]=idList[eachId];}}};}(selectedFiles));this.dbgevnt('GetSelectedFiles',selectedFiles)
return selectedFiles;},DeleteFileById:function(fileId,fileName,fileSize,numFiles){this.dbgevnt('DeleteFileById','Request to delete file '+fileId);if(this.mTableStyle==$G.kTableFormat_File)
{$confirmText='Are you sure you want to delete the file "'+fileName+'"?  You will not be able to download the file once it is deleted.';}
else
{$confirmText='Are you sure you want to delete the '+numFiles+' file(s) in the folder "'+fileName+'"?  You will not be able to download any of the files in this folder once it is deleted.';}
if(confirm($confirmText))
{$j.ajaxSetup({cache:false});$j.getJSON(this.deleteFileByIdURL+"&file_id="+fileId,function(ths,id,fname,fsize,fnum){return function(data,textStatus){if(textStatus==$G.kAJAXStatus_Success)
{if(!data['succeeded'])
{deletionFailed=true;if(this.mTableStyle==$G.kTableFormat_File)
{ths.setErrorText('The file "'+fname+'" could not be deleted.');}
else
{ths.setErrorText('One or more files in the folder "'+fname+'" could not be deleted.');var rowToDelete=$j("#"+id);if(rowToDelete.length==0)
{ths.dbg('','DeleteFileById','File to remove from table could not be found: '+fileId);}
else
{rowToDelete.remove();ths.mNumberOfFilesAvailable-=fnum;ths.mNumberOfToSendFilesAvailable-=fnum;ths.mNumberOfFilesShown-=fnum;ths.mSizeOfFilesAvailable=ths.mSizeOfFilesAvailable-fsize;ths.mSizeOfToSendFilesAvailable=ths.mSizeOfToSendFilesAvailable-fsize;}}}
else
{var rowToDelete=$j("#"+id);if(rowToDelete.length==0)
{ths.dbg('','DeleteFileById','File to remove from table could not be found: '+fileId);}
else
{rowToDelete.remove();ths.mNumberOfFilesAvailable-=fnum;ths.mNumberOfToSendFilesAvailable-=fnum;ths.mNumberOfFilesShown-=fnum;ths.mSizeOfFilesAvailable=ths.mSizeOfFilesAvailable-fsize;ths.mSizeOfToSendFilesAvailable=ths.mSizeOfToSendFilesAvailable-fsize;}
ths.RestripeTable();ths.updateDownloadControls();}}
else if(textStatus==$G.kAJAXStatus_Timeout)
{$G.transferLackey.dbgajax('RefreshProgress','HTTP status information request timed out.');}
else if(textStatus==$G.kAJAXStatus_Error||textStatus==$G.kAJAXStatus_ParserError)
{$G.transferLackey.setErrorText('An error occurred retrieving HTTP status information.');}};}(this,fileId,fileName,fileSize,numFiles));}},RequeueFile:function(fileId,fileInfo){this.dbgevnt('RequeueFile','Request to requeue file '+fileInfo['file_name']);var retFileInfo=undefined;$j.ajaxSetup({cache:false,async:false});output=$j.getJSON(this.requeueFileURL+"&file_id="+fileId,function(ths,id,finfo){return function(data,textStatus){if(textStatus==$G.kAJAXStatus_Success)
{if(!data['succeeded'])
{ths.appendErrorText('The file "'+finfo['file_name']+'" could not be queued for sending: '+data['errorMessage']);finfo=undefined;}
else
{finfo['file_id']=data['fileID'];}}
else if(textStatus==$G.kAJAXStatus_Timeout)
{$G.transferLackey.setErrorText('An error occurred adding the file "'+finfo['file_name']+'" to send.');}
else if(textStatus==$G.kAJAXStatus_Error||textStatus==$G.kAJAXStatus_ParserError)
{$G.transferLackey.setErrorText('An error occurred adding the file "'+finfo['file_name']+'" to send.');}
retFileInfo=finfo;};}(this,fileId,fileInfo));return retFileInfo;}});})();
$R('com.grouplogic.TransferLackeyDownloadHTTP');(function(){var undefined;com.grouplogic.TransferLackeyDownloadHTTP=com.grouplogic.TransferLackeyDownload.extend({mDebugClassName:'tlDownloadHTTP',downloadTimer:undefined,mTotalFiles:0,mNumberZipped:0,mTotalSize:0,mTotalSent:0,mZippingComplete:false,downloadSelectedHttpURL:"index.php?action=FileTransfer.download_selected_http",downloadAllHttpURL:"index.php?action=FileTransfer.download_all_http",kTransferBlurbText:"Please do not close your browser window while files are downloading or the transfer will stop.",constructor:function(latestAvailableVersion,minimumRequiredVersion,httpTransferAllowed,maxRowsToShow){this.base(httpTransferAllowed,maxRowsToShow);this.dbgload('constructor','Web client is in DOWNLOAD mode using the http as transport.');},insertPluginElement:function(redirectURL,isHidden,height,width){this.dbgload('insertPluginElement','HTTP transport -- no plugin element to insert.');},initializeHttpMode:function(){$j("#other_transport").html("MassTransit Plug-in");$j("#transportMethod").html(" using HTTP");if(!$G.gliPluginDetector.isInstalled())
{$j("#switch_transport").css("display","none");$j("#upgrade_link").css("display","block");}
$j("#compress_files").css("display","block");var clickableElements=[{"eventType":"click","eventData":$G.transferLackey,"action":"INVOKE_TRANSFERLACKEY_METHOD","elemID":"downloadAll","proc":$G.transferLackey.DownloadAllHTTP},{"eventType":"click","eventData":$G.transferLackey,"action":"INVOKE_TRANSFERLACKEY_METHOD","elemID":"downloadSelected","proc":$G.transferLackey.DownloadSelectedHTTP}];return clickableElements;},handleOnLoad:function(){var newClickables;newClickables=this.initializeHttpMode();this.setClickableElements(newClickables);this.updateDownloadControls();this.base();},updateDownloadControls:function(){this.base();var showAlreadyDownloaded=$j('#showAlreadyDownloaded').attr("checked");if((this.mNumberOfFilesAvailable>0)&&(!showAlreadyDownloaded)&&(!this.mTransferData['hideDownloadAllButton']))
{$j('#download_controls #downloadAll').removeAttr("disabled").removeClass("disabled");}
else
{$j('#download_controls #downloadAll').attr("disabled",1).addClass("disabled");}
if(this.mNumberOfFilesSelected>0)
{$j('#download_controls #downloadSelected').removeAttr("disabled").removeClass("disabled");if((this.mNumberOfFilesSelected==1)&&(!this.mFolderSelected))
{$j('#zipMyDownload').attr("disabled",0);}
else
{$j('#zipMyDownload').attr("disabled",1).attr("checked",1);}}else{$j('#download_controls #downloadSelected').attr("disabled",1).addClass("disabled");$j('#zipMyDownload').attr("disabled",1).attr("checked",1);}},HandleUpdateMessage:function(message){if(message[$G.kHTTPMessage_Type]==$G.kHTTPMessage_Type_Progress)
{if(message[$G.kHTTPProgress_Key]==$G.kHTTPProgress_Key_TotalFiles)
{this.mTotalFiles=message[$G.kHTTPProgress_Value];}
else if(message[$G.kHTTPProgress_Key]==$G.kHTTPProgress_Key_NumberZipped)
{this.mNumberZipped=message[$G.kHTTPProgress_Value];}
else if(message[$G.kHTTPProgress_Key]==$G.kHTTPProgress_Key_ZippingComplete)
{this.mZippingComplete=message[$G.kHTTPProgress_Value];}
else if(message[$G.kHTTPProgress_Key]==$G.kHTTPProgress_Key_TotalSize)
{this.mTotalSize=message[$G.kHTTPProgress_Value];}
else if(message[$G.kHTTPProgress_Key]==$G.kHTTPProgress_Key_TotalSent)
{this.mTotalSent=message[$G.kHTTPProgress_Value];}
else
{this.dbgajax('HandleUpdateMessage','Unknown progress message type: '+message[$G.kHTTPProgress_Key]);}}
else
{this.base(message);}},RefreshProgress:function(){this.base();if(this.mTransferComplete)
{window.clearInterval($G.transferLackey.downloadTimer);}
else if(!this.mZippingComplete&&(this.mTotalFiles>0))
{progressText='Zipping file '+this.mNumberZipped+' of '+this.mTotalFiles+'...';this.UpdateProgress(true,progressText);}
else if(this.mTotalSize>0)
{progressText='Receiving '+this.mTotalSent+' of '+this.mTotalSize+' bytes.';progressPercentage=Math.round((this.mTotalSent/this.mTotalSize)*100);this.UpdateProgress(true,progressText,progressPercentage);}},SwitchTransport:function(eventData){this.base(eventData,$G.kTransportMethodPlugin);},ResetFTForm:function(){if(!$G.transferLackey.mTransferStarted||$G.transferLackey.mTransferComplete)
{return this.base();}
else if(confirm('Are you sure you want to abort the transfer?')){return this.base();}
else
{return true;}},QueueUnqueuedFiles:function(selectedFiles){var currentFile;var numFound=0;var newSelectedFiles=[];for(var j=0;(j<this.mTransferData['downloadFileList'].length&&numFound<selectedFiles.length);j++){for(var k=0;k<selectedFiles.length;k++){if(selectedFiles[k]==this.mTransferData['downloadFileList'][j].file_id)
{numFound++;if(this.mTransferData['downloadFileList'][j].file_status==300)
{currentFile=this.mTransferData['downloadFileList'][j];currentFile['file_path']=this.DecodeHTMLEntities(currentFile['file_path']);currentFile=this.RequeueFile(currentFile['file_id'],currentFile);if(currentFile!=undefined)
{this.dbgevnt('QueueUnqueuedFiles',JSON.stringify(currentFile));newSelectedFiles.push(currentFile['file_id']);}
else
{this.dbgevnt('QueueUnqueuedFiles','Current file is undefined -- requeue must have failed.');this.mTransferErrorsOccurred=true;}}
else
{newSelectedFiles.push(selectedFiles[k]);}}}}
return newSelectedFiles;},DownloadAllHTTP:function(eventData){$G.transferLackey.setErrorText('');$G.transferLackey.setInfoText('');$G.transferLackey.setTransferStarted();$j("#TB_closeWindowButton").text("Cancel");var transferlackeyObject=eventData.data;var useCompression=$j("#zipMyDownload").is(":checked");transferlackeyObject.downloadTimer=window.setInterval((function(){$G.transferLackey.RefreshProgress();}),1000);var iframeContents=$j("#wc_http_iframe").contents();var iframeForm=iframeContents.find("form#http_download_form");iframeContents.find("input#useCompression").val(useCompression);iframeContents.find("input#transfer_identifier").val(transferlackeyObject.mTransferData['transfer_identifier']);iframeForm.attr("action",transferlackeyObject.downloadAllHttpURL);iframeForm.submit();},DownloadSelectedHTTP:function(eventData){$G.transferLackey.setErrorText('');$G.transferLackey.setInfoText('');$G.transferLackey.setTransferStarted();$j("#TB_closeWindowButton").html("Cancel");var useCompression=$j("#zipMyDownload").is(":checked");var showAlreadyDownloaded=$j('#showAlreadyDownloaded').attr("checked");var transferlackeyObject=eventData.data;transferlackeyObject.downloadTimer=window.setInterval((function(){$G.transferLackey.RefreshProgress();}),1000);var iframeContents=$j("#wc_http_iframe").contents();var iframeForm=iframeContents.find("form#http_download_form");var selectedFiles=transferlackeyObject.GetSelectedFiles();iframeContents.find("input#useCompression").val(useCompression);iframeContents.find("input#transfer_identifier").val(transferlackeyObject.mTransferData['transfer_identifier']);if((!showAlreadyDownloaded)&&(selectedFiles.length==transferlackeyObject.GetFileCheckboxes().length))
{iframeForm.attr("action",transferlackeyObject.downloadAllHttpURL);iframeForm.submit();}
else
{if(showAlreadyDownloaded)
{selectedFiles=transferlackeyObject.QueueUnqueuedFiles(selectedFiles);}
if(selectedFiles.length==0)
{transferlackeyObject.dbgevnt('DownloadSelectedHTTP','No files available for download.');transferlackeyObject.mNoFilesTransferred=true;transferlackeyObject.mTransferErrorsOccurred=true;transferlackeyObject.setTransferComplete();}
else
{iframeContents.find("input#selectedFiles").val(selectedFiles);iframeForm.attr("action",transferlackeyObject.downloadSelectedHttpURL);iframeForm.submit();}}}});})();
$R('com.grouplogic.TransferLackeyDownloadPlugin');(function(){var undefined;com.grouplogic.TransferLackeyDownloadPlugin=com.grouplogic.TransferLackeyDownload.extend({mDebugClassName:'tlDownloadPlugin',mPluginLackey:null,waitingForDownload:false,kTransferBlurbText:"You may close this window at any time without stopping the transfer. File download information is available in the MassTransit Web Assistant.",constructor:function(latestAvailableVersion,minimumRequiredVersion,httpTransferAllowed,maxRowsToShow){this.base(httpTransferAllowed,maxRowsToShow);this.mPluginLackey=new com.grouplogic.PluginLackey(latestAvailableVersion,minimumRequiredVersion);this.dbgload('constructor','Web client is in DOWNLOAD mode using the plugin as transport.');},insertPluginElement:function(redirectURL){height=1;width=1;try
{this.mPluginLackey.insertPluginIntoDoc(height,width);}
catch(e)
{var msg=e.toString();this.setErrorText('An error occurred loading the MassTransit plugin.'+msg);this.dbgload('insertPluginElement','Encountered error inserting plugin: '+msg);if((redirectURL!=undefined)||(redirectURL==''))
{this.dbgload('insertPluginElement','Error encountered.  Redirecting to '+redirectURL);window.location=redirectURL;}}
finally{}},initializePluginMode:function(){$j("#other_transport").html("HTTP");$j("#transportMethod").html(" using MassTransit Plug-in");window.setTimeout(function(){try
{$G.transferLackey.mPluginLackey.initializePluginElement();if($G.transferLackey.mPluginLackey.isUpgradeAvailable())
{$j("#upgrade_link").css("display","inline");}}
catch(e)
{$G.transferLackey.dbgload('initializePluginMode','Caught an exception: '+e.toString());$G.transferLackey.setErrorText(e.toString());}},1000);var clickableElements=[{"eventType":"click","eventData":$G.transferLackey,"action":"INVOKE_TRANSFERLACKEY_METHOD","elemID":"downloadAll","proc":$G.transferLackey.DownloadAll},{"eventType":"click","eventData":$G.transferLackey,"action":"INVOKE_TRANSFERLACKEY_METHOD","elemID":"downloadSelected","proc":$G.transferLackey.DownloadSelected}];return clickableElements;},handleOnLoad:function(){var newClickables;newClickables=this.initializePluginMode();this.setClickableElements(newClickables);this.updateDownloadControls();this.base();},NotificationCallback:function(message){this.dbgnotify('callback','received:'+message);try{var objMsg=JSON.parse(message);switch(objMsg.code){case"ConnectionClosed":{if(this.waitingForDownload){this.waitingForDownload=false;}
this.base(message);break;}
default:{this.base(message);break;}}}catch(e){this.setErrorText('An error occur processing a notification from the MassTransit plug-in: '+e.toString());this.dbgnotify('callback','ERROR: exception processing notification; '+e.toString());}finally{}
return true;},updateDownloadControls:function(){this.base();var showAlreadyDownloaded=$j('#showAlreadyDownloaded').attr("checked");if((this.mNumberOfFilesAvailable>0)&&(!showAlreadyDownloaded)&&(!this.mTransferData['hideDownloadAllButton']))
{$j('#downloadAll').removeAttr("disabled").removeClass("disabled");}
else
{$j('#downloadAll').attr("disabled",1).addClass("disabled");}
if(this.mNumberOfFilesSelected>0)
{$j('#downloadSelected').removeAttr("disabled").removeClass("disabled");}
else
{$j('#downloadSelected').attr("disabled",1).addClass("disabled");}},SwitchTransport:function(eventData){this.base(eventData,$G.kTransportMethodHTTP);},SelectDownloadLocation:function(){var downloadJSONRequest={'version':this.mParsedVersion,'type':'Request','code':'SelectDownloadLocation'};var downloadJSONString=JSON.stringify(downloadJSONRequest);this.dbgrequests('download','select location msg='+downloadJSONString);if(result=this.mPluginLackey.getPluginElem().ExecuteRequest(downloadJSONString)){this.dbgrequests('download',"MTWebClient.ExecuteRequest('SelectDownloadLocation') returned "+result);}else{this.dbgrequests('download',"<span style='color:red'>MTWebClient.ExecuteRequest('SelectDownloadLocation') returned "+result+"</span>");}
return result;},StartDownload:function(filesToDownload){if(filesToDownload.length==0)
{this.mNoFilesTransferred=true;this.mTransferErrorsOccurred=true;this.setTransferComplete();}
else
{var startDownloadJSONRequest={"version":this.mParsedVersion,"type":"Request","code":"StartDownload","files_dl":filesToDownload,"who":this.mTransferData['who'],"transport":this.mTransferData['transport'],"host_addr":this.mTransferData['host_addr'],"host_port":this.mTransferData['host_port'],"who_plus":this.mTransferData['who_plus'],"ssl_params":this.mTransferData['ssl_params']};var startDownloadJSONString=JSON.stringify(startDownloadJSONRequest);this.dbgrequests('download','msg='+startDownloadJSONString);this.UpdateProgress(true,'Launching MassTransit Assistant...');if(!this.mPluginLackey.getSupportsUDT()&&(this.mTransferData['transport']=="UDT"))
{this.appendWarningText('This version of the plugin does not support UDT transfers.  TCP/IP will be used instead.  Update to the latest plugin to use UDT to transfer files.');}
if(result=this.mPluginLackey.getPluginElem().ExecuteRequest(startDownloadJSONString)){this.dbgrequests('download',"MTWebClient.ExecuteRequest('StartDownload') returned "+result);this.waitingForDownload=true;this.UpdateProgress(true,'Queued transfer...');}else{this.dbgrequests('download',"<span style='color:red'>MTWebClient.ExecuteRequest('StartDownload') returned "+result+"</span>");}}},GetSelectedFilesDetails:function(){var selectedFilesJSON="[";var numFound=0;var selectedFiles=this.GetSelectedFiles();var currentFile;for(var j=0;(j<this.mTransferData['downloadFileList'].length&&numFound<selectedFiles.length);j++){for(var k=0;k<selectedFiles.length;k++){if(selectedFiles[k]==this.mTransferData['downloadFileList'][j].file_id){if(numFound>0){selectedFilesJSON+=",";}
currentFile=this.mTransferData['downloadFileList'][j];currentFile['file_path']=this.DecodeHTMLEntities(currentFile['file_path']);if(currentFile['file_status']==300)
{currentFile=this.RequeueFile(currentFile['file_id'],currentFile);}
if(currentFile!=undefined)
{this.dbgevnt('GetSelectedFilesDetails',JSON.stringify(currentFile));selectedFilesJSON+=JSON.stringify(currentFile);numFound++;}
else
{this.dbgevnt('GetSelectedFilesDetails','Current file is undefined -- requeue must have failed.');this.mTransferErrorsOccurred=true;}}}}
selectedFilesJSON+="]";this.dbgevnt('GetSelectedFilesDetails',selectedFilesJSON);return selectedFilesJSON;},GetAllFilesDetails:function(){var allFilesList=[];for(var j=0;j<this.mTransferData['downloadFileList'].length;j++){if(this.mTransferData['downloadFileList'][j]['file_status']!=300)
{this.mTransferData['downloadFileList'][j]['file_path']=this.DecodeHTMLEntities(this.mTransferData['downloadFileList'][j]['file_path']);allFilesList.push(this.mTransferData['downloadFileList'][j]);}}
return allFilesList;},DownloadSelected:function(eventData){var transferlackeyObject=eventData.data;if(transferlackeyObject.SelectDownloadLocation()){transferlackeyObject.setTransferStarted();var downloadFileList=transferlackeyObject.GetSelectedFilesDetails();transferlackeyObject.dbgevnt('DownloadSelected',downloadFileList);transferlackeyObject.StartDownload(JSON.parse(downloadFileList));}},DownloadAllDirect:function(transferlackeyObject){if(transferlackeyObject.SelectDownloadLocation()){transferlackeyObject.setTransferStarted();fileList=transferlackeyObject.GetAllFilesDetails();transferlackeyObject.StartDownload(fileList);}},DownloadAll:function(eventData){var transferlackeyObject=eventData.data;transferlackeyObject.DownloadAllDirect(transferlackeyObject);}});})();
$R('com.grouplogic.TransferLackeyImmediateDownloadPlugin');(function(){var undefined;com.grouplogic.TransferLackeyImmediateDownloadPlugin=com.grouplogic.TransferLackeyDownloadPlugin.extend({mDebugClassName:'tlImmediateDownloadPlugin',mErrorPlainText:'',mTransferCancelledURL:'',mTransferFailedURL:'',mTransferErrorNoFilesURL:'',mTransferErrorWithFilesURL:'',mTransferCompleteURL:'',constructor:function(latestAvailableVersion,minimumRequiredVersion,completeURL,errorURL,cancelURL,pluginDownloadURL){var httpTransferAllowed=false;var maxRowsToShow=0;this.base(latestAvailableVersion,minimumRequiredVersion,httpTransferAllowed,maxRowsToShow);if(pluginDownloadURL!=undefined)
{this.mPluginLackey.initializePluginDownloadURL(pluginDownloadURL);}
if(cancelURL!=undefined)
{this.mTransferCancelledURL=cancelURL;}
if(errorURL!=undefined)
{this.mTransferFailedURL=errorURL;this.mTransferErrorNoFilesURL=errorURL;this.mTransferErrorWithFilesURL=errorURL;}
if(completeURL!=undefined)
{this.mTransferCompleteURL=completeURL;this.dbgload('constructor',completeURL);}
this.dbgload('constructor','Web client is in IMMEDIATE DOWNLOAD mode using the plugin as transport.');},setErrorText:function(msg,timestamp){this.mErrorPlainText=msg;this.base(msg,timestamp);},appendErrorText:function(msg,timestamp){this.mErrorPlainText=this.mErrorPlainText+'\n'+msg;this.base(msg,timestamp);},insertPluginElement:function(){this.base(this.mTransferFailedURL,true);},handleOnReady:function(transferData,downloadFilesJSON){var transformedDownloadFilesJSON="[";for(var j=0;(j<downloadFilesJSON['files'].length);j++){if(j>0){transformedDownloadFilesJSON+=",";}
var fileInfo={'file_path':downloadFilesJSON['files'][j]['relative_path'],'file_name':downloadFilesJSON['files'][j]['name'],'file_id':downloadFilesJSON['files'][j]['id']};transformedDownloadFilesJSON+=JSON.stringify(fileInfo);}
transformedDownloadFilesJSON+="]";this.dbgload('handleOnReady',transformedDownloadFilesJSON);this.base(transferData,JSON.parse(transformedDownloadFilesJSON));window.setTimeout(function(){if($G.transferLackey.mPluginLackey.mPluginSupported)
{$G.transferLackey.DownloadAllDirect($G.transferLackey);}},1000);},SelectDownloadLocation:function(){var retValue=this.base();if((!retValue)&&(''!=this.mTransferCancelledURL))
{this.dbgnotify('setTransferComplete','Redirecting to transfer cancelled');document.location=this.mTransferCancelledURL;}
return retValue;},setTransferStarted:function(){this.mTransferStarted=true;},setTransferComplete:function(){this.dbgnotify('setTransferComplete','setTransferComplete (immediate download) running');this.base();if((this.mTransferCancelled)&&(''!=this.mTransferCancelledURL))
{this.dbgnotify('setTransferComplete','Redirecting to transfer cancelled');document.location=this.mTransferCancelledURL;}
else if((this.mTransferFailed)&&(''!=this.mTransferFailedURL))
{this.dbgnotify('setTransferComplete','Redirecting to transfer error (failure)');document.location=this.mTransferFailedURL+'&ERRMSG='+this.mErrorPlainText;}
else
{if(this.mTransferErrorsOccurred)
{this.dbgnotify('setTransferComplete','Redirecting to transfer error');if((this.mNoFilesTransferred)&&(''!=this.mTransferErrorNoFilesURL))
{document.location=this.mTransferErrorNoFilesURL+'&ERRMSG='+this.mErrorPlainText;}
else if(''!=this.mTransferErrorNoFilesURL)
{document.location=this.mTransferErrorWithFilesURL+'&ERRMSG='+this.mErrorPlainText;}}
else if(''!=this.mTransferCompleteURL)
{this.dbgnotify('setTransferComplete','Redirecting to transfer complete');document.location=this.mTransferCompleteURL;}}}});})();
$R('com.grouplogic.TransferLackeyFactory');(function(){var undefined;com.grouplogic.TransferLackeyFactory=Base.extend({mDebug:false,dbg:function(submodule,op,msg){if(this.mDebug){$G.debug.dbgtrace('transferlackeyfactory',submodule,op,msg,"#65a564");}},constructTransferLackey:function(latestAvailableVersion,minimumRequiredVersion,httpTransferAllowed,transport,transferDirection,maxRowsToShow,fileTransferLimit,maxHttpUploads){var transferLackey;if(transferDirection==$G.kTransferDirectionUpload)
{if(transport==$G.kTransportMethodHTTP)
{this.dbg('','constructTransferLackey','Creating a TransferLackeyUploadHTTP.');transferLackey=new com.grouplogic.TransferLackeyUploadHTTP(latestAvailableVersion,minimumRequiredVersion,httpTransferAllowed,maxHttpUploads);}
else if(transport==$G.kTransportMethodPlugin)
{this.dbg('','constructTransferLackey','Creating a TransferLackeyUploadPlugin.');transferLackey=new com.grouplogic.TransferLackeyUploadPlugin(latestAvailableVersion,minimumRequiredVersion,httpTransferAllowed,maxRowsToShow,fileTransferLimit);}
else
{this.dbg('','constructTransferLackey','ERROR - unknown transport method direction; creating a TransferLackeyUpload.');transferLackey=new com.grouplogic.TransferLackeyUpload(latestAvailableVersion,minimumRequiredVersion,httpTransferAllowed);}}
else if(transferDirection==$G.kTransferDirectionDownload)
{if(transport==$G.kTransportMethodHTTP)
{this.dbg('','constructTransferLackey','Creating a TransferLackeyDownloadHTTP.');transferLackey=new com.grouplogic.TransferLackeyDownloadHTTP(latestAvailableVersion,minimumRequiredVersion,httpTransferAllowed,maxRowsToShow);}
else if(transport==$G.kTransportMethodPlugin)
{this.dbg('','constructTransferLackey','Creating a TransferLackeyDownloadPlugin.');transferLackey=new com.grouplogic.TransferLackeyDownloadPlugin(latestAvailableVersion,minimumRequiredVersion,httpTransferAllowed,maxRowsToShow);}
else
{this.dbg('','constructTransferLackey','ERROR - unknown transport method direction; creating a TransferLackeyDownload.');transferLackey=new com.grouplogic.TransferLackeyDownload(latestAvailableVersion,minimumRequiredVersion,httpTransferAllowed,maxRowsToShow);}}
else
{this.dbg('','constructTransferLackey','ERROR - unknown transfer direction; creating a TransferLackey.');transferLackey=new com.grouplogic.TransferLackey(latestAvailableVersion,minimumRequiredVersion,httpTransferAllowed,transport,transferDirection);}
return transferLackey;},constructImmediateUploadTransferLackey:function(latestAvailableVersion,minimumRequiredVersion,completeURL,errorURL,cancelURL,pluginDownloadURL){this.dbg('','constructImmediateUploadTransferLackey','Creating a TransferLackeyImmediateUploadPlugin.');transferLackey=new com.grouplogic.TransferLackeyImmediateUploadPlugin(latestAvailableVersion,minimumRequiredVersion,completeURL,errorURL,cancelURL,pluginDownloadURL);return transferLackey;},constructSingleUploadTransferLackey:function(latestAvailableVersion,minimumRequiredVersion,completeURL,errorURL,cancelURL,pluginDownloadURL,browseButtonID,dropAreaWrapperID,webClientDropAreaID,dropAreaTextID,ieDropAreaTextID){this.dbg('','constructSingleUploadTransferLackey','Creating a TransferLackeySingleUploadPlugin.');transferLackey=new com.grouplogic.TransferLackeySingleUploadPlugin(latestAvailableVersion,minimumRequiredVersion,completeURL,errorURL,cancelURL,pluginDownloadURL,browseButtonID,dropAreaWrapperID,webClientDropAreaID,dropAreaTextID,ieDropAreaTextID);return transferLackey;},constructImmediateDownloadTransferLackey:function(latestAvailableVersion,minimumRequiredVersion,completeURL,errorURL,cancelURL,pluginDownloadURL){this.dbg('','constructImmediateDownloadTransferLackey','Creating a TransferLackeyImmediateDownloadPlugin.');transferLackey=new com.grouplogic.TransferLackeyImmediateDownloadPlugin(latestAvailableVersion,minimumRequiredVersion,completeURL,errorURL,cancelURL,pluginDownloadURL);return transferLackey;}});var __gli_transferLackeyFactory=window.$G.gliTransferLackeyFactory=new com.grouplogic.TransferLackeyFactory();})();
