REM 模态对话框 REM 最后更新时间:0:24 2005-12-21 function mmshowModalDialog(spage,sArg,sWidth,sHeight) on error resume next mmshowModalDialog=window.showModalDialog(spage,sArg,"DialogWidth="&sWidth&"px;DialogHeight="&sHeight&"px;help:0;status:0;scroll:no") end function function mmshowModelessDialog(spage,sArg,sWidth,sHeight) on error resume next mmshowModelessDialog=showModelessDialog(spage,sArg,"DialogWidth="&sWidth&"px;DialogHeight="&sHeight&"px;help:0;status:0;scroll:no") end function function mmWebNoteDialog(spage,sArg,sWidth) mmWebNoteDialog=mmshowModalDialog(spage,sArg,sWidth,250) end function REM 命令 function mmCMD(spage) mmCMD=window.showModalDialog(spage,"mmCMD","DialogWidth=250px;DialogHeight=60px;help:0;status:0;scroll:no") end function function mmCMDTest(spage) mmCMDTest=window.showModalDialog(spage,"mmCMD","DialogWidth=800px;DialogHeight=600px;help:0;status:0;scroll:no") end function REM ========= function mmMsgBox(sMsg,sButtons) mmMsgBox=mmshowModalDialog("/inc/Object/DialogMsg/DialogMsg.asp?T=0&Buttons="&sButtons,sMSG,530,60) end function function mmAlert(sMsg,sButtons) mmAlert=mmshowModalDialog("/inc/Object/DialogMsg/DialogMsg.asp?T=1&Buttons="&sButtons,sMSG,530,60) end function function mmNote(sMsg,sButtons) mmNote=mmshowModelessDialog("/inc/Object/DialogMsg/DialogMsg.asp?T=0&Buttons="&sButtons,sMSG,530,60) end function REM ========= function mmRequest(sCMDString) mmRequest=showModalDialog("/inc/Functions/Req.asp?CMDString="&sCMDString,"dialog","DialogWidth=250px;DialogHeight=60px;help:0;status:0;scroll:no") end function function mmRequestTest(spage,sCMDString) mmRequestTest=showModalDialog(spage&"?CMDString="&sCMDString,"dialog","DialogWidth=800px;DialogHeight=600px;help:0;status:0;scroll:no") end function REM ==信函== Sub SendXMail(sReceiver,sSubject) Location="/Wadmin/XMail/NewMail_Step1.asp?Receiver="&sReceiver&"&Subject="&sSubject&"&MailFormat=1" End Sub Sub SendXRequest(sReceiver,sSubject) Location="/Wadmin/XMail/NewMail_Step1.asp?Receiver="&sReceiver&"&Subject="&sSubject&"&MailFormat=2" End Sub Sub SendXOrder(sReceiver,sSubject) Location="/Wadmin/XMail/NewMail_Step1.asp?Receiver="&sReceiver&"&Subject="&sSubject&"&MailFormat=3" End Sub REM ===收藏夹=== Function AddFavorites(sTitle) AddFavorites=mmshowModalDialog("/Wadmin/MyFavorites/DialogMyFavorites.asp?FavoritesTitle="&sTitle&"&FavoritesURL="&escape(location),"JoinTemp",530,150) End Function Function AddFavorites1(sTitle,sURL) AddFavorites1=mmshowModalDialog("/Wadmin/MyFavorites/DialogMyFavorites.asp?FavoritesTitle="&sTitle&"&FavoritesURL="&escape(sURL),"JoinTemp",530,150) End Function REM ===商友=== Function AddMyFriend(sFriendName) AddMyFriend=mmshowModalDialog("/Wadmin/MyFriends/Add_Friend_Step1.asp?FriendName="&sFriendName,"AddFriend",430,150) End Function REM ------------------------------------------------------- Function SendCMD_CN(sURL) dim XMLHttp Set XMLHttp=CreateObject("Microsoft.XMLHttp") XMLHttp.Open "Get", sURL, False XMLHttp.Send SendCMD_CN=StreamToStr(XMLHttp.ResponseBody) Set XMLHttp=Nothing End Function Function StreamToStr(vIn) strReturn = "" For i = 1 To LenB(vIn) ThisCharCode = AscB(MidB(vIn,i,1)) If ThisCharCode < &H80 Then strReturn = strReturn & Chr(ThisCharCode) Else NextCharCode = AscB(MidB(vIn,i+1,1)) strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode)) i = i + 1 End If Next StreamToStr = strReturn End Function Function ShowCalendar(sCurDate) ShowCalendar=mmshowModalDialog("/inc/Object/Canlendar/ObjCanlendar.htm",sCurDate,260,250) End Function Function SelectDate(sCurDate) dim returnValue returnValue=ShowCalendar(sCurDate) if isDate(returnValue) then SelectDate=returnValue else SelectDate="选择日期..." end if End Function Function SelectDateToElement(sElem) dim returnValue returnValue=ShowCalendar(sElem.Value) if isDate(returnValue) then sElem.Value=returnValue end if End Function Function SelectDateToElement2() dim returnValue Set sElem=window.event.srcElement returnValue=ShowCalendar(sElem.Value) if isDate(returnValue) then sElem.Value=returnValue end if End Function Function ShowFileBrowser() ShowFileBrowser=mmshowModalDialog("/inc/Object/FileBrowser/DialogFileBrowser.asp",,380,380) End Function REM 16:45 2006-12-18 Sub AutoResizeDialogWindow() DialogResize() document.onKeyDown=getRef("Dialog_OnKeyDown") End Sub Sub DialogResize() posHeight=Replace(window.dialogHeight,"px","")-document.body.clientHeight posWidth=Replace(window.dialogWidth,"px","")-document.body.clientWidth if document.body.scrollWidth+posWidth