home *** CD-ROM | disk | FTP | other *** search
- //***********************
- // GLOBAL COLOR VARIABLES
- //***********************
-
- var gszBgColorMenu = 'buttonface';
- var gszBgColorBand = 'highlight';
-
- var gszColorTabDefault = 'buttontext';
- var gszBgColorTabDefault = 'buttonface';
-
- var gszColorTabSelected = 'highlighttext';
- var gszBgColorTabSelected = 'highlight';
-
- var gszColorTabDisabled = 'inactivecaptiontext';
- var gszBgColorTabDisabled = 'inactivecaption';
-
- var gszColorAnchorMenuDefault = 'buttontext';
- var gszColorAnchorMenuSelected = 'highlighttext';
-
-
- //**********************************
- // FIXED CONSTANTS (Not localizable)
- //**********************************
-
- var giRepTotalTabs = 3; // zero-based array
-
-
- //*****************
- //UTILITY FUNCTIONS
- //*****************
-
- function GetElementIndex(ElementID)
- {
- // Purpose: Given an Element ID formatted as follows:
- // "divCaption_12"
- // returns the numeric portion after the underscore character;
- // returns -1 if delimiter not found.
-
- var iDelimitLoc = ElementID.indexOf( '_' );
-
- if( iDelimitLoc == -1 ) {
- // Return -1 if delimiter not found (which shouldn't happen)
- return iDelimitLoc;
- }
- else {
- var theIndex = ElementID.substring( iDelimitLoc + 1, ElementID.length );
- // TODO: Confirm that theIndex is numeric and does not contain illegal characters
- return theIndex;
- }
- }
-
-
- function ClickMenu() // top taskbar click
- {
- var el;
-
- el = window.event.srcElement
- OpenView(el)
- SetView(GetElementIndex(el.id))
-
- }
-
-
- function InitialView() // main
- {
- message.style.display = "";
-
- switch(GetView())
- {
- case '-1':
- SetView(0)
- OpenView(document.all.mnu_0)
- break;
- case '0':
- OpenView(document.all.mnu_0)
- break;
- case '1':
- OpenView(document.all.mnu_1)
- break;
- case '2':
- OpenView(document.all.mnu_2)
- break;
- }
-
- }
-
-
- function GetView() // InitialView - main
- {
- var cookie = "";
- var point;
-
- cookie = document.cookie;
- if(cookie == "")
- return '-1';
-
- point = cookie.indexOf("view=");
- if(point == -1)
- return '-1';
- point += 5
- cookie = cookie.slice(point);
- point = cookie.indexOf(";");
- if(point == -1)
- return cookie;
- //if (!objSQLServer.issysadmin)
- // return '0'; // if not the system admin show the first menu
- return cookie.slice(0, point);
- }
-
-
- function SetView(view_num) // top taskbar click and InitialView - main
- {
- var path
- var slash
- var cookie
- path = window.location.pathname
- path = path.slice(1)
- slash = path.lastIndexOf("\\")
- path = path.slice(0, slash)
-
- cookie = "view=" + view_num + ";"
- document.cookie = cookie
- document.cookie = "expires=01 Jan 3000 00:00:00 GMT;"
- }
-