home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 2000 April
/
VPR0004B.BIN
/
DRIVER
/
COMPAQ
/
SP12255
/
sp12255.exe
/
DMWEBC1.CAB
/
Lcdefine.tpl
< prev
next >
Wrap
Text File
|
1999-03-23
|
5KB
|
219 lines
<!-- $Id: LCDEFINE.TPL 1.26 1998/11/18 $ -->
<!-- Copyright (C) 1998 Compaq Computer Corporation -->
<!-- Define global constants and variables for Lite Console -->
<SCRIPT LANGUAGE="JavaScript">
//-----------------------------------------------------------------------------------------
// Cookie and page configuration stuff
//-----------------------------------------------------------------------------------------
function Cookie( document, name, days, path, domain, secure )
{
this.$document = document;
this.$name = name;
if(days)
{
this.$expiration = new Date((new Date()).getTime() + days*24*3600000);
}
else
{
this.$expiration = null;
}
this.$path = ( path ? path : null );
this.$domain = ( domain ? domain : null );
this.$secure = ( secure ? secure : null );
}
function _Cookie_store()
{
var cookieval = "";
var cookie;
var prop;
for( prop in this )
{
if (("$" == prop.charAt(0)) || ("function" == typeof(this[prop])))
{
continue;
}
if( "" != cookieval )
{
cookieval += "&";
}
cookieval += prop + ":" + escape( this[prop] );
}
cookie = this.$name + "=" + cookieval;
if(this.$expiration)
{
cookie += "; expires=" + this.$expiration.toGMTString();
}
if(this.$path)
{
cookie += "; path=" + this.$path;
}
if(this.$domain)
{
cookie += "; domain=" + this.$domain;
}
if(this.$secure)
{
cookie += "; secure";
}
this.$document.cookie = cookie;
}
function _Cookie_load()
{
var allcookies = this.$document.cookie;
var end;
var cookieval;
var a;
var i;
if("" == allcookies)
{
return false;
}
start = allcookies.indexOf(this.$name + "=");
if( -1 == start )
{
return false;
}
start += this.$name.length + 1;
end = allcookies.indexOf(";", start);
if( -1 == end )
{
end = allcookies.length;
}
cookieval = allcookies.substring(start, end);
a = cookieval.split("&");
for(i=0; i<a.length; i++)
{
a[i] = a[i].split(":");
this[ a[i][0] ] = unescape( a[i][1] );
}
return true;
}
function _Cookie_remove()
{
var cookie;
cookie = this.$name + "=";
if(this.$path)
{
cookie += "; path=" + this.$path;
}
if(this.$domain)
{
cookie += "; domain=" + this.$domain;
}
cookie += "; expires=Fri, 02-Jan-1970 00:00:00 GMT";
this.$document.cookie = cookie;
}
//new Cookie();
Cookie.prototype.store = _Cookie_store;
Cookie.prototype.load = _Cookie_load;
Cookie.prototype.remove = _Cookie_remove;
LcVersion = "LcVersion";
LcPcName = "LcPcName";
LcAlertId = "LcAlertId";
LcAlertDate = "LcAlertDate";
LcMenu = "LcMenu";
LcCbFull = "LcCbFull";
LcCbStandard = "LcCbStandard";
LcCbFailed = "LcCbFailed";
LcCbDegraded = "LcCbDegraded";
LcCbNormal = "LcCbNormal";
LcCbUnknown = "LcCbUnknown";
LcCbNonmanaged = "LcCbNonmanaged";
LcPcName = "LcPcName";
LcIp1 = "LcIp1";
LcIp2 = "LcIp2";
LcIp3 = "LcIp3";
LcIp4 = "LcIp4";
LcIpFrom1 = "LcIpFrom1";
LcIpFrom2 = "LcIpFrom2";
LcIpFrom3 = "LcIpFrom3";
LcIpFrom4 = "LcIpFrom4";
LcIpTo1 = "LcIpTo1";
LcIpTo2 = "LcIpTo2";
LcIpTo3 = "LcIpTo3";
LcIpTo4 = "LcIpTo4";
LcWorkgroupName = "LcWorkgroupName";
LcDomainName = "LcDomainName";
LcNetIpFrom1 = "LcNetIpFrom1";
LcNetIpFrom2 = "LcNetIpFrom2";
LcNetIpFrom3 = "LcNetIpFrom3";
LcNetIpFrom4 = "LcNetIpFrom4";
LcNetIpTo1 = "LcNetIpTo1";
LcNetIpTo2 = "LcNetIpTo2";
LcNetIpTo3 = "LcNetIpTo3";
LcNetIpTo4 = "LcNetIpTo4";
LC_MANAGER = "LC_MANAGER";
LcFilterMode = "LcFilterMode";
LcNetworkMode = "LcNetworkMode";
SelectedPc = "SelectedPc";
LcSubMenu = "LcSubMenu";
LiteConsoleInfo = new Cookie(document, "LiteConsoleInfo", 30);
LiteConsoleInfo.load();
function configSet( configItem, itemValue )
{
LiteConsoleInfo[configItem] = itemValue;
LiteConsoleInfo.store();
}
function configGet( configItem )
{
var itemValue = null;
// if( "undefined" == typeof( LiteConsoleInfo[ configItem ] ))
// {
// if( "undefined"!=typeof( configDefaults[ configItem ] ))
// {
// itemValue = configDefaults[ configItem ];
// }
// configSet( configItem, itemValue );
// }
return LiteConsoleInfo[ configItem ];
}
</SCRIPT>