/*
 * JSMin
 * Javascript Compressor
 * http://www.crockford.com/
 * http://www.smallsharptools.com/Projects/Packer/
*/

// D:\YouConvertIt\YouConvertIt\_JS\Forms\Public_SendFiles.js

var UploaderTool=new UploaderToolClass();UploaderTool.SendFilesOnly=true;function Public_SendFiles()
{this.hdnEmailID=null;this.txtEmailID=null;this.rvEmailID=null;this.ttProgressTooltipID=null;this.radProgressAreaID=null;this.hdnEmailStatusID=null;this.btnSubmitID=null;this.pnlMoreHeader=null;this.iconMoreHeader=null;this.iconLessHeader=null;this.lblMoreHeader=null;this.MoreBodyVisible=false;this.SenderEmail1=null;this.SenderEmail2=null;this.FirstValidationGroup=null;this.SecondValidationGroup=null;this.OnClientFileSelected=function(rU,eventArgs)
{var strFileName=GetFileName(eventArgs.get_fileInputField().value);UploaderTool.AddNewRow(strFileName);UploaderTool.AddNewUploader();}
this.ClientValidateUpload=function(source,arguments)
{if(UploaderTool.u().getFileInputs().length===1)
{arguments.IsValid=false;}}
this.FillHiddenWithEmail=function(ValidationGroup)
{if((Page_ClientValidate(this.FirstValidationGroup)===true)&&(Page_ClientValidate(this.SecondValidationGroup)===true))
{var h=$y(this.hdnEmailID);var t=$y(this.txtEmailID);t.value=trim(t.value);h.value=t.value;return true;}
return false;}
this.ChangeFileName=function(progressArea,args)
{var fn=GetFileName(args.ProgressData.CurrentOperationText);args.ProgressData.CurrentOperationText=fn;args.ProgressData.SecondaryValue=args.ProgressData.SecondaryValue+' ';}
this.checkUploadedFilesSize=function(PA,args)
{UploaderTool.checkUploadedFilesSize(PA,args);}
this.removeFileFromUploadList=function(td,fiID)
{UploaderTool.RemoveRow(td)
UploaderTool.RemoveUploader(fiID)}
this.LoggedIn=function(iIn)
{ValidatorEnable($y(this.rvEmailID),false);$y(this.rvEmailID).style.display="none";$y(this.txtEmailID).disabled=true;$y(this.SenderEmail1).disabled=true;$y(this.SenderEmail2).disabled=true;if(iIn===1)
{var a=radconfirm('<h4>You successfully logged in, would you like to continue with your request?.</h4>',Form.confirmCallBackFn,300,100,'Log in successful');}}
this.confirmCallBackFn=function(arg)
{if(arg)
{Form.ForceSubmit();}}
this.LoggedOut=function()
{ValidatorEnable($y(this.rvEmailID),true);$y(this.rvEmailID).style.display="none";$y(this.txtEmailID).value="";$y(this.txtEmailID).disabled=false;$y(this.SenderEmail1).disabled=false;$y(this.SenderEmail2).disabled=false;}
this.ToggleMoreHeader=function()
{this.MoreBodyVisible=!this.MoreBodyVisible;if(this.MoreBodyVisible)
{this.ShowMoreHeader();}
else
{this.HideMoreHeader();}}
this.ShowMoreHeader=function()
{SetInnerText($y(this.lblMoreHeader),"Less options ...");$y(this.iconMoreHeader).className='YCIHidden';$y(this.iconLessHeader).className='';}
this.HideMoreHeader=function()
{SetInnerText($y(this.lblMoreHeader),"More options ...");$y(this.iconLessHeader).className='YCIHidden';$y(this.iconMoreHeader).className='';}
this.ShowCorrectDialog=function()
{ValidatorEnable($y(this.rvEmailID),false);var h=$y(this.hdnEmailStatusID);switch(h.value)
{case'MandatoryEmail':break;case'LoggedInNoSpace':var a=radalert('<h4>You exceeded your inbox space limit, files uploaded will be processed but will not be saved in your inbox.</h4>',330,100,'youconvertit');TelerikJSDelayTillNull(a._name,'Form.ForceSubmit();');break;case'LoggedInWithSpace':this.ForceSubmit();break;case'Nothing':break;case'SuggestRegistration':PublicLogin.ShowPromotion(true);break;case'SuggestLogin':PublicLogin.ShowPublicLogin(true);break;case'NotActive':var a=radalert('<h4>Your account is disabled, please contact youconvertit administration for more details.</h4>',330,100,'youconvertit');break;case'PublicAccount':this.ForceSubmit();break;case'ResendConfirm':PublicLogin.ShowReConfirm();break;default:break;}}
this.ForceSubmit=function()
{var Sb=$y(this.btnSubmitID);Sb.click();this.ShowProgress();return false;}
this.HideProgress=function()
{var tt=$find(this.ttProgressTooltipID);var area=$find(this.radProgressAreaID);tt.hide();area.hide();}
this.ChangeFileName=function(progressArea,args)
{var fn=GetFileName(args.ProgressData.CurrentOperationText);args.ProgressData.CurrentOperationText=fn;args.ProgressData.SecondaryValue=args.ProgressData.SecondaryValue+' ';}
this.HidePromotionShowProgress=function(continueAfterThat)
{PublicLogin.HidePromotion();if(continueAfterThat===true)
{this.ForceSubmit();}}
this.ShowProgress=function()
{var tt=$find(this.ttProgressTooltipID);var area=$find(this.radProgressAreaID);area.show();tt.show();$telerik.$(".ruCancel",area.get_element()).click
(function(e)
{return Form.CancelUpload();});}
this.CancelUpload=function()
{var a=$find(this.radProgressAreaID);a.cancelRequest();this.HideProgress();return false;}}
function UploaderChanged()
{}
function FileExceedsSize(PA)
{if(!UploaderTool.bCancelRequest)
{UploaderTool.bCancelRequest=true;PA.cancelRequest();var a=radalert('<h4>File sizes exceed the maximum size allowed, upload canceled.</H4>');Form.HideProgress();TelerikJSDelayTillNull(a._name,'UploaderTool.bCancelRequest=false;');}}

