// CONSTANTS // cookie IDs - these are two character codes used for specific pages var APPLETALK_COOKIE_ID = "atalk"; var ETHERNET_COOKIE_ID = "ether"; var LPR_LPD_COOKIE_ID = "lpr"; var MICROSOFT_NETWORKING_COOKIE_ID = "msNetwork"; var NETWARE_COOKIE_ID = "netware"; var RAW_TCP_IP_PRINTING_COOKIE_ID = "raw"; var SSDP_COOKIE_ID = "ssdp"; var TCP_IP_COOKIE_ID = "tcpIp"; var USB_COOKIE_ID = "usb"; var PARALLEL_COOKIE_ID = "parallel"; // cookie names being set var INDEX_PAGE_LINK_COOKIE = "IndexPageLink"; var NEW_VALUE_COOKIE = "NewValue"; var SET_NEW_VALUE_COOKIE = "SetNewValue"; // values for cookies being set var USE_NEW_VALUE_COOKIE = "1"; // locations of information stored in cookies var COOKIE_ID_INDEX = 0; // a kludge to allow the correct authentication page to be chosen var CHOOSE_AUTHENTICATION_PAGE = "authenticationChosen"; // DeleteCookie() will remove the named cookie from the cookie file. function DeleteCookie ( inCookieName ) { // set the value of the name to nothing, this should wipe out the cookie document.cookie = inCookieName + "=" + "; path=/"; } // GetCookie() will retrieve the value associated with the cookie name passed in. function GetCookie ( inCookieName ) { var dcookie = document.cookie; var cname = inCookieName + "="; var clen = dcookie.length; var cbegin = 0; while ( cbegin < clen ) { var vbegin = cbegin + cname.length; if ( dcookie.substring( cbegin, vbegin ) == cname ) { var vend = dcookie.indexOf ( ";", vbegin ); if ( -1 == vend ) { vend = clen; } return unescape( dcookie.substring( vbegin, vend )); } cbegin = dcookie.indexOf( " ", cbegin ) + 1; if ( 0 == cbegin ) { break; } } return null; } // SetCookie() will add the cookie name, value and expiration date and time // (if specified) to the cookie file. function SetCookie ( inCookieName, inCookieValue, inCookieExpiration) { document.cookie = inCookieName + "=" + escape( inCookieValue ) + ( inCookieExpiration ? "; expires=" + inCookieExpiration.toGMTString() : "" ) + "; path=/"; } function OpenStatusTab() { SetCookie( "statusSelected", 2); top.location = "/index.dhtml"; }