/*
 * JSMin
 * Javascript Compressor
 * http://www.crockford.com/
 * http://www.smallsharptools.com/Projects/Packer/
*/

// D:\YouConvertIt\YouConvertIt\_JS\Forms\Public_ConvertFile.js

var UploaderTool=new UploaderToolClass();function Public_ConvertFile()
{this.hdnEmailID=null;this.txtEmailID=null;this.rcmbTelComboTree=null;this.cmbTelComboID=null;this.hdnSelectedFileNameID=null;this.rvEmailID=null;this.ttProgressTooltipID=null;this.radProgressAreaID=null;this.hdnEmailStatusID=null;this.btnSubmitID=null;this.AfterLogiContinue=false;this.Continue=false;this.OnClientFileSelected=function(rU,eventArgs)
{UploaderTool.ClientFileSelected(eventArgs);}
this.FillHiddenWithEmail=function(ValidationGroup)
{if(Page_ClientValidate(ValidationGroup)===true)
{var h=$y(this.hdnEmailID);var t=$y(this.txtEmailID);t.value=trim(t.value);h.value=t.value;return true;}
else
{return false;}}
this.removeFileFromUploadList=function(td,fiID)
{UploaderTool.RemoveRow(td)
UploaderTool.RemoveUploader(fiID)}
this.checkUploadedFilesSize=function(PA,args)
{UploaderTool.checkUploadedFilesSize(PA,args);}
this.treeCollapseAllNodes=function()
{var combo=$find(this.cmbTelComboID);var tree=combo.get_items().getItem(0).findControl(this.rcmbTelComboTree);tree.unselectAllNodes();for(var i=0;i<tree.get_allNodes().length;i++)
{tree.get_allNodes()[i].collapse();}}
this.ShowConvertToComboBox=function()
{$find(this.cmbTelComboID).showDropDown();}
this.ComboTreeNodeClicking=function(args)
{var node=args.get_node();if(node.get_attributes().getAttribute("VN")==="T")
{node.toggle();}
else
{var combo=$find(this.cmbTelComboID);combo.set_text(node.get_text());combo.set_value(node.get_value());UploaderTool.AddNewRow($y(this.hdnSelectedFileNameID).value,node.get_text(),node.get_value());UploaderTool.AddNewUploader();cancelDropDownClosing=false;combo.hideDropDown();combo.set_text('');combo.set_value('');combo.disable();}}
this.ClientValidateUpload=function(source,arguments)
{if((UploaderTool.u().getFileInputs().length<2))
{arguments.IsValid=false;}
else
{}}
this.ShowInvalidExtension=function(inExt)
{var a=radalert('<h4>Extension ["'+inExt+'"] is not supported, if you wish you can use the Send Files page to send the file with no conversion.</h4>',330,100,'youconvertit');}
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':this.Continue=true;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.confirmCallBackFn=function(arg)
{if(arg)
{Form.ForceSubmit();}}
this.LoggedIn=function(iIn)
{ValidatorEnable($y(this.rvEmailID),false);$y(this.rvEmailID).style.display="none";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.LoggedOut=function()
{ValidatorEnable($y(this.rvEmailID),true);$y(this.rvEmailID).style.display="none";}
this.ShowProgress=function()
{var tt=$find(this.ttProgressTooltipID);var area=$find(this.radProgressAreaID);tt.show();area.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;}
this.HideProgress=function()
{var tt=$find(this.ttProgressTooltipID);var area=$find(this.radProgressAreaID);area.hide();tt.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.ForceSubmit=function()
{var Sb=$y(this.btnSubmitID);Sb.click();this.ShowProgress();return false;}}
function UploaderChanged()
{var h=$y(UploaderTool.hdnSelectedPathID);FireOnChange(h);}
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;');}}
function ComboTreeNodeClickingEvent(sender,args)
{Form.ComboTreeNodeClicking(args);}

