home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1998 March
/
CHIPCD_3_98.iso
/
software
/
testsoft
/
exchange
/
webdata
/
usa
/
lib
/
jsroot.inc
< prev
next >
Wrap
Text File
|
1997-08-25
|
4KB
|
130 lines
<%
'<!-- Microsoft Outlook Web Access-->
'<!-- Jsroot.inc : Javascript Functions used by root.asp -->
'<!-- Copyright (c) Microsoft Corporation 1993-1997. All rights reserved.-->
%>
<!--#include file="jsutil.inc"-->
<!--#include file="lang.inc"-->
<script language="Javascript">
function onImage(imageName,imageNum) {}
function offImage(imageName,imageNum) {}
function IsNum(str) {
flag = str.length;
for (i = 0; i < str.length; i++) {
if ((str.substring(i, i+1) < '0') || (str.substring(i, i+1) > '9'))
{
flag = false;
break;
}
}
return(flag);
}
function ToNum(str, defnum) {
if (IsNum(str)) return(eval(str))
else return(defnum)
}
function updateStatus(numMessages) {
count = numMessages
mailboxTimerID = window.setTimeout("updateStatus(count)", 10000)
parent.defaultStatus = "<% =L_strTotalMessages_StatusBar%>" + count
}
function SetNewFolderPick(folderID) {
self.command_fr.location="<%=bstrVirtRoot%>/inbox/commands.asp?store=<%=iStore%>&command=newfolder&obj=" + folderID;
}
function clickPrev() {
if (currentPage==1) alert("<% =L_strAlreadyAtBeginning_Message%>")
else {
currentPage = currentPage - 1
self.title_fr.document.gotoForm.Page.value = currentPage
self.msg_fr.location = "messages.asp?obj=<%=szObj%>&page=" + currentPage
}
}
function clickNext(countPages) {
if (currentPage>=countPages) alert("<% =L_strAlreadyAtEnd_Message%>")
else {
currentPage=currentPage + 1
self.title_fr.document.gotoForm.Page.value = currentPage
self.msg_fr.location = "messages.asp?obj=<%=szObj%>&page=" + currentPage
}
}
function updateRefresh(folderID) {
var selection = self.title_fr.document.gotoForm.viewSelect.selectedIndex + 1;
self.peer_fr.location="peerfldr.asp?obj=" + folderID + "&paint=1&page=" + currentPage + "&view=" + selection;
}
function updateView(selection) {
currentPage=1
self.title_fr.location = "title.asp?obj=<%=szObj%>&page=" + currentPage + "&view=" + selection
self.msg_fr.location = "messages.asp?obj=<%=szObj%>&page=" + currentPage + "&view=" + selection
}
function updatePage(countPages) {
var newPage = self.title_fr.document.gotoForm.Page.value
if (!IsNum(newPage) || newPage < 1 || newPage > countPages) {
if (countPages==1)
displayMessage= "<% =L_strOnlyHaveOnePage_Message%>"
else
displayMessage= "<% =L_strEnterNumberBetween_Message%>"
alert(displayMessage)
self.title_fr.document.gotoForm.Page.value = eval(currentPage)
}
else {
currentPage = eval(newPage)
self.msg_fr.location = "messages.asp?obj=<%=szObj%>&page=" + currentPage
}
}
function newFolder(){
var iNameLen=0;
var x=0;
var fNameOK=false;
if (null!=(folderName = prompt("<%=L_strEnterFolderName_Message%>","<%=L_strDefaultFolderName_Text%>")))
{
iNameLen=folderName.length;
if (iNameLen > 256) {
alert("<%=L_strFolderNameTooLong_Message%>")
}
else if(iNameLen > 0) {
for(x=0;x<iNameLen;x++) {
if (folderName.charAt(x)!=" ") {
fNameOK=true;
break;
}
}
if (fNameOK!=false)
self.command_fr.location="commands.asp?action=newfolder&foldername="+escape(folderName);
else {
alert("<%=L_strFolderNameAllSpaces_Message%>");
newFolder();
}
}
}
}
function deleteFolder(){
if (confirm("<%=L_strDeleteFolder_Message%>")) {
self.command_fr.location="<%=bstrVirtRoot%>/inbox/commands.asp?action=deletefolder"
}
}
function deleteAllMessage() {
if (confirm("<%=L_ConfirmEmptyDelItemFldr_Message%>")) {
self.peer_fr.location="peerfldr.asp?action=deleteAllMessages"
}
}
</script>