function getFileUploadControls(){return $(".fileUploadControl")}function hasFileUploadControls(a){if(a!==null&&a.length>0){return true}else{return false}}function registerFileChangeHandlers(){var a=getFileUploadControls();if(hasFileUploadControls(a)){a.change(getFullFilenames)}}function getFullFilenames(){var b=[];var m;var f={};var j="";var k=[];var d="";var i=-1;var e=false;var a=false;var h;var l="";var g="";var c="";if(this){e=false;l="ctl00_cphBody_FileName_"+this.getAttribute("SectionName");h=document.getElementById(l);if(this.value!==undefined&&this.value!==""){g=this.value.match(/\.([^\.]+)$/)[1];j=this.getAttribute("AllowedFileExtensions");d=this.getAttribute("MaxFileSize");if(j&&d){if(j.length!==0){k=j.split(",");for(i in k){if(k[i].toLowerCase()===g.toLowerCase()){e=true;break}}if(e){if(d>0){if(this.files){c=(this.files[0].size/1048576);if(c>d){a=true;this.setAttribute("value","");if(h){h.innerHTML=""}if(objDictionary.gstrExceedsMaxFileSizeMsg){alert(objDictionary.gstrExceedsMaxFileSizeMsg.format(c.toString().substr(0,4),d))}else{alert("Your file ("+c.toString().substr(0,4)+" MB) exceeds the maximum file size allowed ("+d+" MB)")}}}}if(!a){if(h){h.innerHTML=this.value.match(/[^\/\\]+$/)}b.push(new FileInfo(this.getAttribute("id"),this.value,this.getAttribute("id").match(/\_(\d+)$/)[1]))}}else{this.setAttribute("value","");if(h){h.innerHTML=""}if(objDictionary.gstrInvalidExtensionMsg){alert(objDictionary.gstrInvalidExtensionMsg.format(g.toUpperCase(),k.join(", ")))}else{alert("Extension "+g.toUpperCase()+" is not allowed in this field. You may upload the following file types: "+k.join(", "))}}}}else{if(h){h.innerHTML=this.value.match(/[^\/\\]+$/)}b.push(new FileInfo(this.getAttribute("id"),this.value,this.getAttribute("id").match(/\_(\d+)$/)[1]))}}else{if(h){h.innerText=""}}}var n=(window.parent)?window.parent:window;f=n.document.getElementById("ctl00_cphBody_FileUploads");if(f!==null){if(f.value!==""){m=JSON.parse(f.value)}else{m={UserFileUpload:[]}}f.value="";$.each(b,function(o,p){m.UserFileUpload.push({Control:p.control,FormDocInfoID:p.formDocInfoID,FileName:p.filename})});f.value=JSON.stringify(m)}return b}function FileInfo(c,a,b){this.control=c?c:"";this.filename=a?a:"";this.formDocInfoID=b?b:""}function displayFileUploadLinks(){var c;var n=getFileUploadControls();var d;var f,e,m,a=3,l;var q,b,g,p;var h,k;var o;$.each(n,function(i,j){j=$(j);d=j.attr("id");q=document.createElement("div");g=document.createElement("a");b=document.createElement("a");if(objDictionary.gstrFileUploadControlIDs&&objDictionary.gstrFileUploadControlIDs.length!==0){c=objDictionary.gstrFileUploadControlIDs.split(",");for(f=0,e=c.length;f