邮件服务器-邮件系统-邮件技术论坛(BBS)

 找回密码
 会员注册
查看: 2544|回复: 2
打印 上一主题 下一主题

[求助] util_owa.js

[复制链接]
跳转到指定楼层
顶楼
发表于 2006-8-17 17:41:31 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
我不小心把util_owa.js文件给覆盖掉了,请问哪位有exchange最初的这个文件!  
发给我,modem_cat@163.com 或贴出来。谢了!
沙发
发表于 2006-8-18 11:07:30 | 只看该作者
//Copyright (c) 2000-2003 Microsoft Corporation. All rights reserved.
var g_nFontHeight = 13;var g_fIsMimeInstalled = false;var g_sLogonPageGuid = "{57A118C6-2DA9-419d-BE9A-F92B0F9A418B}";var m_rgHotkeys = new Array();var C_HK_NONE = 0;var C_HK_CB = 1;
function AccessFld(o)
{return (null != o.length) ? o[0] : o;}

function openGal(szFieldNameTo, szFieldNameCc, szFieldNameBcc, oMsg)
{var rgParams = new Array();if (szFieldNameTo != null)
{rgParams["ToName"] = szFieldNameTo;rgParams["CcName"] = szFieldNameCc;rgParams["BccName"] = szFieldNameBcc;rgParams["objMessage"] = oMsg;}
else
{rgParams["fnAddRecip"] = sendToNewMessage;}
rgParams["search"] = g_iDefaultAddrSearch;if(typeof(g_sContactsFolder) == "string")
rgParams["contacts"] = g_sContactsFolder;rgParams["fCertCheck"] = g_fIsMimeInstalled;rgParams["fontHeight"] = g_nFontHeight;var nFontHeight = g_nFontHeight - 2;var nWidth = 110 + 30 * nFontHeight;var nHeight = 210 + 25 * nFontHeight;var vRetval = window.showModelessDialog(g_sBase + "?Cmd=dialog&template=dlg_gal&ver=6.5.6944.0" + "&theme="+g_thid, rgParams, "dialogHeight:"+nHeight+"px;dialogWidth:"+nWidth+"px;status:no;resizable:yes;help:no;");}

function sendToNewMessage(sEm)
{if (g_fIsIE6Tpl)
_mimeOpenNewWindow(g_sDrafts + "/?Cmd=new&mailtoaddr="+sEm, true);else
openNewWindow(g_sBase + "/" + g_sDrafts + "/?Cmd=new&mailtoaddr="+sEm,"",700, 500, true);}

function openNewWindow(sFileName, sWindowName, nWidth, nHeight, fUsrSize)
{if ("newMessageWindow" == sWindowName || "" == sWindowName)
{sWindowName = new String(Math.round(Math.random() * 100000));}
if (fUsrSize != null && fUsrSize)
{var newHeight = 0;var newWidth = 0;try
{newHeight = parent.g_iNewWindowHeight;newWidth = parent.g_iNewWindowWidth;if (newHeight != null)
nHeight = newHeight;if (newWidth != null)
nWidth = newWidth;} catch (e) {}
}
return (window.open(sFileName, sWindowName,
"toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,width=" +
nWidth + ",height=" + nHeight));}

function setAttachOnClick(oAttachments)
{var rgAnchors = oAttachments.getElementsByTagName("A");if (null != rgAnchors && rgAnchors.length)
{for (i =0;i < rgAnchors.length;i++)
{if (-1 != rgAnchors.href.indexOf("translate=0"))
rgAnchors.onclick = OnClick_EmbeddedAttach;}
}
}

function OnClick_EmbeddedAttach()
{var szURL = this._href;openNewWindow(szURL,"",700, 500);window.event.returnValue = false;window.event.cancelBubble = true;}

function _mimeCheckMimeInstalled ()
{if (( typeof g_fIsMimeEnabled != "undefined") && g_fIsMimeEnabled &&
(getOS(window.navigator.userAgent) >= 5) &&
oClientCaps.isComponentInstalled("{b0f84fec-95ad-4f3e-8fc0-6bc1bbadbf0d}", "ComponentID", g_sMimeVersion))
{g_fIsMimeInstalled = 1;return true;}
else
{return false;}
}

function _mimeOpenNewWindow(szFolderURL, fUsrSize)
{openNewWindow(g_sBase + (g_sBase.lastIndexOf("/") != (g_sBase.length - 1) ? "/" : "") + szFolderURL + ((g_fIsMimeEnabled && g_fIsMimeInstalled)?"&mime=1":""),"",700, 500, fUsrSize);}

function openEditRuleDialog(rgParams)
{var iFontHeight = g_nFontHeight - 2;var iWidth = (25 * iFontHeight) + 345;var iHeight = (13 * iFontHeight) + 385;window.showModalDialog(rgParams["URL"] + "/?cmd=editrule", rgParams, "dialogHeight:" + iHeight +
"px;dialogWidth:" + iWidth + "px;status:no;resizable:yes;help:no;");}

function fnForceImagePaint()
{if (window.document.all.dirtyImage == null)
window.document.body.insertAdjacentHTML("beforeEnd", "<DIV id=\"dirtyImage\" style=\"display:none;\"></DIV>");window.document.all.dirtyImage.innerHTML = "<IMG style=\"\" src=\"" + g_szVirtualRoot + "/img/icon-msg-unread.gif\">";}

function LaunchHelp(o)
{if (o)
openNewWindow(AccessFld(o).innerText, "OutlookWebAccessHelp", 640, 540).focus();else if (idHelpLinkText != null)
openNewWindow(AccessFld(idHelpLinkText).innerText, "OutlookWebAccessHelp", 640, 540).focus();}

function parseURLfor(szWhat)
{var re = new RegExp("[?|&]" + szWhat + "=([^&]*)","gi");var arr = re.exec(window.document.location.search);return ((arr==null) ? null : arr[1]);}

function toUTF8(szInput)
{var wch, x, uch = "", szRet = "";for (x = 0;x < szInput.length;x++)
{wch = szInput.charCodeAt(x);if (!(wch & 0xFF80))
{szRet += "%" + wch.toString(16);}
else if (!(wch & 0xF800))
{uch = "%" + (wch>>6 | 0xC0).toString(16) +
"%" + (wch & 0x3F | 0x80).toString(16);szRet += uch;}
else
{uch = "%" + (wch >> 12 | 0xE0).toString(16) +
"%" + (((wch >> 6) & 0x3F) | 0x80).toString(16) +
"%" + (wch & 0x3F | 0x80).toString(16);szRet += uch;}
}
return(szRet);}

function openNewFolderDialog(szBaseURL, szDisplayName, szVirtualRoot)
{var szNewFolderDialog = szBaseURL + "?Cmd=dialog&template=dlg_newfolder&ver=6.5.6944.0" + "&theme="+g_thid;var rgParams = new Array();rgParams["g_Location"] = szBaseURL;rgParams["g_DisplayName"]        =        szDisplayName;rgParams["g_VirtualRoot"] = szVirtualRoot;var nFontHeight = g_nFontHeight - 2;var nWidth = 50 + 20 * nFontHeight;var nHeight = 220 + 12 * nFontHeight;var hWin = window.showModalDialog(szNewFolderDialog, rgParams, "dialogHeight:"+nHeight+"px;dialogWidth:"+nWidth+"px;status:no;resizable:yes;help:no;")
}

function resizeButtons(winDocAll, rgszButtons)
{var nWidth = 0;for (var i = 0;i < rgszButtons.length;i++)
{var o = winDocAll[rgszButtons];if (o != null)
{var n = 0;if (o.scrollWidth > o.clientWidth)
n = o.scrollWidth-o.clientWidth + o.offsetWidth + 8;else
n = o.offsetWidth + 8;if (n > nWidth)
nWidth = n;}
}
if (nWidth < 50)
nWidth = 50;if (0 < nWidth)
{for (var i = 0;i < rgszButtons.length;i++)
{var o = winDocAll[rgszButtons];if (o != null)
o.style.width = "" + nWidth + "px";}
}
}

function updateNewWindowSize()
{try
{var iWidth = window.document.body.clientWidth;var iHeight = window.document.body.clientHeight;var dMaxPerc = 0.9;if (iWidth > (screen.availWidth * dMaxPerc))
{if ((screen.availWidth * dMaxPerc) > 500)
iWidth = Math.round(screen.availWidth * dMaxPerc);else
iWidth = 500;}
if (iHeight > (screen.availHeight * dMaxPerc))
{if ((screen.availHeight * dMaxPerc) > 550)
iHeight = Math.round(screen.availHeight * dMaxPerc);else
iHeight = 550;}
opener.parent.g_iNewWindowWidth = iWidth;opener.parent.g_iNewWindowHeight = iHeight;}
catch (e) {}
}

function resizeWindow()
{var oBody = window.document.body;var iHeight = 0;var iWidth = 0;var bResizeTo = false;if ((oBody.clientWidth < oBody.scrollWidth) || (oBody.clientHeight < oBody.scrollHeight))
{iWidth = oBody.scrollWidth + (2 * (parseInt(oBody.currentStyle.marginLeft, 10) + parseInt(oBody.currentStyle.marginRight, 10)));if (iWidth > screen.width)
{iWidth = screen.width;bResizeTo = true;}
iHeight = oBody.scrollHeight + (2 * (parseInt(oBody.currentStyle.marginTop, 10) + parseInt(oBody.currentStyle.marginBottom, 10)));if (iHeight > screen.height)
{iHeight = screen.height;bResizeTo = true;}
if (bResizeTo)
window.resizeTo(iWidth ,iHeight);else
window.resizeBy(iWidth - oBody.clientWidth, iHeight - oBody.clientHeight);}
}

function resizeDialog()
{var oBody = window.document.body;if (oBody.clientHeight < oBody.scrollHeight)
{var iHeight = oBody.scrollHeight + (parseInt(window.dialogHeight, 10) - oBody.clientHeight) + 20;window.dialogHeight = iHeight + "px";window.dialogTop = Math.round((screen.availHeight - iHeight) / 2);
}
if (oBody.clientWidth < oBody.scrollWidth)
{var iWidth = oBody.scrollWidth + (parseInt(window.dialogWidth, 10) - oBody.clientWidth ) + 20;window.dialogWidth = iWidth + "px";window.dialogLeft = Math.round((screen.availWidth - iWidth) / 2);
}
}

function getOS(sUserAgent)
{var OSVer = 0;try
{var iOSVer = sUserAgent.indexOf("Windows NT");if (iOSVer >= 0)
OSVer = parseInt(sUserAgent.substring (iOSVer+11, sUserAgent.indexOf (".", iOSVer)), 10);if (isNaN(OSVer)) OSVer = 0;}
catch(e) {}
return OSVer;}

function Hotkey(sKeyStroke, sCmd, iFlags, oElement)
{this.key = 0;this.ctrl = false;this.shift = false;this.alt = false;this.cmd = sCmd;this.flags = iFlags;this.element = oElement;var rgKey = sKeyStroke.split("+");for (var i=0;i<rgKey.length;i++)
{if ( "ctrl" === rgKey.toLowerCase() )
this.ctrl = true;else if ( "shift" === rgKey.toLowerCase() )
this.shift = true;else if ("alt" === rgKey.toLowerCase() )
this.alt = true;else if (0 == this.key)
{if (isNaN(parseInt(rgKey, 10)))
{var s = rgKey.toUpperCase();this.key = (isNaN(s.charCodeAt(0)) ? 0: s.charCodeAt(0));}
else
this.key = parseInt(rgKey, 10);}
}
}

function AddHotkey(sKeystroke, sCmd, iFlags)
{var oHk = new Hotkey(sKeystroke, sCmd, iFlags);var iHash = GenHash(oHk.ctrl, oHk.alt, oHk.shift, oHk.key);if (null == m_rgHotkeys[iHash])
m_rgHotkeys[iHash] = oHk;}

function ClearHotkeys()
{m_rgHotkeys = new Array();}

function GenHash(fCtrl, fAlt, fShift, iKey)
{var sHash = new String(iKey);sHash += (fCtrl ? "1" : "0");sHash += (fAlt ? "1" : "0");sHash += (fShift ? "1" : "0");return(parseInt(sHash, 10));}

function InitButtonHotkeys()
{var reAccel = /<U>(.)<\/U>/;var o;var sKeyStroke;var rgBtns = document.body.getElementsByTagName("BUTTON");for (var i = 0;i < rgBtns.length;i++)
{o = rgBtns;var rgRet = reAccel.exec(o.innerHTML);if (null != rgRet)
{sKeyStroke = "Alt+" + rgRet[1].toUpperCase();var oHk = new Hotkey(sKeyStroke, "", C_HK_CB, o);var iHash = GenHash(oHk.ctrl, oHk.alt, oHk.shift, oHk.key);if (null == m_rgHotkeys[iHash])
m_rgHotkeys[iHash] = oHk;}
}
}

function CheckHotkeys(e)
{if (null == e)
return;var iHash = GenHash(e.ctrlKey, e.altKey, e.shiftKey, e.keyCode);if (null == m_rgHotkeys[iHash])
return;var oKey = m_rgHotkeys[iHash];if (oKey.flags & C_HK_CB)
{e.cancelBubble = true;e.returnValue = false;}
if (null != oKey.element)
{var oElement = oKey.element;try
{if(!oElement.disabled)
oElement.click();}
catch(e) {}
}
else
{onCbClick(oKey.cmd, null, true);}
}

function isLogonPage(sText)
{return (-1 < sText.indexOf(g_sLogonPageGuid));}

function showLogonPage(sVRoot, sRedirectUrl, fOpenNew)
{if (fOpenNew)
{if (-1 < sRedirectUrl.indexOf("?"))
sRedirectUrl = sRedirectUrl.substring(0, sRedirectUrl.indexOf("?"));if ((0 < sRedirectUrl.length) && (sRedirectUrl.lastIndexOf("/") != (sRedirectUrl.length -1)))
sRedirectUrl += "/";openNewWindow(sVRoot + "/bin/auth/owalogon.asp?url=" + escape(sRedirectUrl) + "%3Fcmd=close&reason=3", "", 700, 500);}
else
{location.href = sVRoot + "/bin/auth/owalogon.asp?url=" + escape(sRedirectUrl) + "&reason=3";}
}
getBrowserVer.ver = null;
function getBrowserVer()
{if (getBrowserVer.ver != null)
return getBrowserVer.ver;var iBV = 0;var verRegExp=/MSIE \d+.\d+/;var oVer = navigator.appVersion.match(verRegExp);if (oVer != null)
{var verIExp=/ \d+.\d+/;oVer = oVer[0].match(verIExp);if (oVer != null)
{iBV = parseFloat(oVer[0]);if (isNaN(iBV))
iBV = 0;}
}
getBrowserVer.ver = iBV;return iBV;}

function logOff()
{if (event)
{event.cancelBubble = true;event.returnValue = false;}
try
{top.g_fWarnOnLogOff=false;}
catch(e){}
if (null != parent)
parent.location = "?Cmd=logoff";}
var E_FAIL = (1^ 0x80004005) + 1;var m_rgRequestFactory = new Array();
function requestFactory(szURL, szCommand, objContext, fnCallBack)
{var objXMLHTTP;var i=0;var iErrCode = 0;try
{this.xmlhttp = new ActiveXObject("MSXML2.xmlhttp");this.xmlVersion = 2;}
catch(e)
{this.xmlhttp = new ActiveXObject("Microsoft.xmlhttp");this.xmlVersion = 1;}
objXMLHTTP = this.xmlhttp;if(2 == this.xmlVersion)
{iErrCode = mf_XMLHTTPOpen(objXMLHTTP,szCommand,szURL,true, 3);}
if(E_FAIL == iErrCode)
{this.xmlhttp = new ActiveXObject("Microsoft.xmlhttp");this.xmlVersion = 1;objXMLHTTP = this.xmlhttp;}
if(1 == this.xmlVersion)
{var iErrCode = mf_XMLHTTPOpen(objXMLHTTP,szCommand,szURL,true, 1);}
if( 0 != iErrCode)
{this.xmlhttp = null;throw iErrCode;return;}
this.url = szURL;this.context = objContext;this.index = requestFactory.index;this.expand = false;this.lockRequest = false;if(null != fnCallBack)
{this.callBack = fnCallBack;this.xmlhttp.onreadystatechange = new
Function("requestDispatch(" + (this.index) + ")");}
m_rgRequestFactory[this.index] = this;requestFactory.index += 1;}
requestFactory.index = 0;
function requestDispatch(iIndex)
{var obj = m_rgRequestFactory[iIndex];if(null != obj && !obj.lockRequest && 4 == obj.xmlhttp.readystate)
{obj.lockRequest = true;if(obj.callBack != null)
obj.callBack(obj);delete m_rgRequestFactory[iIndex];}
}

function mf_XMLHTTPOpen(objXMLHTTP,szCommand,szURL,fisAsync, iOpenAttempts)
{var i;for(i= 0;i < iOpenAttempts;i++)
{try
{objXMLHTTP.open(szCommand, szURL, fisAsync);break;}
catch(e)
{if(E_FAIL != e.number || i == iOpenAttempts - 1)
return(e.number);}
}
return(0);}

function addToJunkList(sSMTP, iList, fGalLookup, sURL)
{var sCmd = "";switch (iList)
{case 0:
sCmd = "addsender=ts\n";break;case 1:
if ((sSMTP == null) || (sSMTP == ""))
return;sCmd = "addrecip=" + sSMTP + "\n" + (fGalLookup ? "gallookup=1\n" : "");break;case 2:
sCmd = "addsender=js\n";break;default:
return;}
var oReq = new requestFactory(sURL, "POST", null, addToJunkListEnd);var oHTTP = oReq.xmlhttp;var sBody = "cmd=savejunkemailrule\n" + sCmd;oHTTP.setRequestHeader("Accept-Language:", g_szAcceptLang);oHTTP.setRequestHeader("Content-type:", "application/x-www-UTF8-encoded");oHTTP.send(sBody);}

function addToJunkListEnd(oReq)
{if (oReq.xmlhttp.status != 200)
{if (oReq.xmlhttp.status == 440)
showLogonPage(g_szVirtualRoot, g_sBase, true);else
alert(L_ErrJunkSave);}
else
{var oXML = oReq.xmlhttp.responseXML;if ((oXML != null) && (oXML.xml != ""))
{var oErrNode = oXML.selectSingleNode("a:response/a:rule/a:errorstring");if (oErrNode)
{alert(oErrNode.text);}
}
}
}

function fmtstr(szFmt, rgArg)
{var i;var sz = szFmt;for (i = 0;i < rgArg.length;i++)
{sz = sz.replace("%" + (i + 1), (rgArg != null) ? rgArg : "");}
return sz;}

function resizeWells(oTbl)
{var i;for ( i = 0;i < oTbl.rows.length;i++ )
{var oRow = oTbl.rows;if (oRow)
{var oTD = oRow.children[0].children[0];if (oTD)
{var nLine = oTD .offsetHeight;var oWell = oRow.children[1].children[0];if (oWell)
{oWell.style.overflow = "auto";oWell.runtimeStyle.height = (oWell .scrollHeight > (nLine+3)) ? 2 * nLine : (nLine+3);}
else
oTD.runtimeStyle.height = nLine+3;}
}
}
}
藤椅
发表于 2006-8-18 12:08:06 | 只看该作者
顶一下吧
您需要登录后才可以回帖 登录 | 会员注册

本版积分规则

小黑屋|手机版|Archiver|邮件技术资讯网

GMT+8, 2026-8-6 05:48

Powered by Discuz! X3.2

© 2001-2016 Comsenz Inc.

本论坛为非盈利中立机构,所有言论属发表者个人意见,不代表本论坛立场。内容所涉及版权和法律相关事宜请参考各自所有者的条款。
如认定侵犯了您权利,请联系我们。本论坛原创内容请联系后再行转载并务必保留我站信息。此声明修改不另行通知,保留最终解释权。
*本论坛会员专属QQ群:邮件技术资讯网会员QQ群
*本论坛会员备用QQ群:邮件技术资讯网备用群

快速回复 返回顶部 返回列表