58 lines
1.2 KiB
JavaScript
58 lines
1.2 KiB
JavaScript
function CheckSessionExpiry() {
|
|
var OK = false;
|
|
var match ='';
|
|
var re = /(EXPIRED)/;
|
|
var x = window.dialogArguments;
|
|
|
|
// str = x.cntdwn.innerHTML;
|
|
str = top.navigation.document.all("cntdwn").innerHTML;
|
|
match = re.exec(str);
|
|
if (match == null) {
|
|
OK = false;
|
|
} else {
|
|
OK = true;
|
|
ShowErrorBox("Your login session is expired. Please logout and re-login.","Session Expired");
|
|
}
|
|
return OK;
|
|
}
|
|
|
|
function CheckSessionExpiryFromChild() {
|
|
var OK = false;
|
|
var match ='';
|
|
var re = /(EXPIRED)/;
|
|
var x = window.dialogArguments;
|
|
|
|
// str = x.cntdwn.innerHTML;
|
|
str = x.top.navigation.document.all("cntdwn").innerHTML;
|
|
match = re.exec(str);
|
|
if (match == null) {
|
|
OK = false;
|
|
} else {
|
|
OK = true;
|
|
ShowErrorBox("Your login session is expired. Please logout and re-login.","Session Expired");
|
|
}
|
|
return OK;
|
|
}
|
|
function loadPage(frame,page) {
|
|
frame.location.href = page;
|
|
}
|
|
function toUpper(field) {
|
|
field.value = field.value.toUpperCase()
|
|
}
|
|
|
|
function strToUpper(strval){
|
|
var result = strval.toUpperCase();
|
|
return result;
|
|
}
|
|
|
|
function makeHash(loginid,passwd)
|
|
{
|
|
var id = strToUpper(loginid);
|
|
result = calcMD5(id + passwd);
|
|
|
|
return result;
|
|
}
|
|
|
|
function redirect(location){
|
|
window.location = location;
|
|
} |