"); var sFromUrl = "http://"; var sSLTUrl = ""; var sCheckFlag = "file"; function InitDocument(){ lang.TranslatePage(document); if (!bAllowUpload){ sCheckFlag = "url"; } RadioClick(sCheckFlag); d_fromurl.value = sFromUrl; adjustDialog(); } function RadioClick(what){ if (what=="url"){ d_fromurl.disabled=false; if (config.AllowBrowse=="1"){ d_browse.disabled=false; } d_checkfromurl.checked=true; if (bAllowUpload){ d_checkfromfile.checked=false; document.myuploadform.uploadfile.disabled=true; } }else{ d_checkfromurl.checked=false; document.myuploadform.uploadfile.disabled=false; d_checkfromfile.checked=true; d_fromurl.disabled=true; if (config.AllowBrowse=="1"){ d_browse.disabled=true; } } } function UploadError(s_Flag){ AbleItems(); RadioClick('file'); divProcessing.style.display="none"; try { BaseAlert(document.myuploadform.uploadfile, getUploadErrDesc(s_Flag, sAllowExt, sAllowSize)); } catch(e){} } function UploadSaved(sPathFileName, sPathFileName_s){ d_fromurl.value = sPathFileName; if (sPathFileName_s){ sSLTUrl = sPathFileName_s; } ReturnValue(); } function ReturnValue(){ sFromUrl = d_fromurl.value; try{ oLink.value=sFromUrl; oThumbnail.value=sSLTUrl; }catch(e){} window.returnValue = null; window.close(); } function ok(){ if (d_checkfromurl.checked){ ReturnValue(); }else{ if (!IsExt(document.myuploadform.uploadfile.value,sAllowExt)){ UploadError("ext"); return false; } DisableItems(); divProcessing.style.display=""; document.myuploadform.submit(); } } function DisableItems(){ d_checkfromfile.disabled=true; d_checkfromurl.disabled=true; d_fromurl.disabled=true; if (config.AllowBrowse=="1"){ d_browse.disabled=true; } Ok.disabled=true; } function AbleItems(){ d_checkfromfile.disabled=false; d_checkfromurl.disabled=false; d_fromurl.disabled=false; if (config.AllowBrowse=="1"){ d_browse.disabled=false; } Ok.disabled=false; }
: