home *** CD-ROM | disk | FTP | other *** search
- /* ======================================================================
- DESC: Common Miscellaneous Functions for the Administer Operations
-
- PLATFORMS: >= MS IE 4.0
- USAGE NOTES:
- ====================================================================== */
- var OSNameArray = new Array("4.0.1","95","4.90.","98","dows 95","95","dows 98","98","dows -95","95","dows -98","98","NT Work~4.","NTWS4","NT Server~4.","NTS4","NT Work~5.","NTWS5","NT Server~5.","NTS5");
-
- /* Add an <Option> entry with the text to the specified <Select> */
- function addElementToSelect(SelectObj,text) {
- var el = document.createElement("OPTION");
- el.text = text;
- SelectObj.options.add(el);
- return el;
- }
-
- /* if Key is ENTER change to TAB */
- function processKeyDown() {
- if (event.keyCode == 13)
- event.keyCode = 9
- }
- function processBSP() { // if Backspace and not editing, chnage to space to avoid navagating away
- if ( !(event.srcElement.type == "text" && event.srcElement.className != "idis") && event.keyCode == 8)
- event.keyCode = 32
- }
-
- /* Ckeck if object is disabled */
- function chkDisabled(Ckobj) {
- if ( top.MainLoaded == false || Ckobj.className == "idis" ) {
- if ( Ckobj.readOnly == false ) {
- Ckobj.readOnly = true;
- Ckobj.blur();
- }
- return true; // Yes
- }
- Ckobj.readOnly = false;
- return false; // No
- }
-
- function SetCursor(ctyp) {
- document.body.style.cursor=ctyp;
- }
-
- /* Map OSVer to name used by SA record */
- function mapOSVer(OSV) {
- var j=0;
- var KeyArr = new Array();
- for ( var i=0; i<OSNameArray.length; i+=2 ) {
- KeyArr = OSNameArray[i].split("~");
- for ( j=0; j<KeyArr.length; j++ ) {
- if ( OSV.indexOf(KeyArr[j]) < 0 ) // Find ID key in OS string
- break; // if no match
- }
- if ( j>=KeyArr.length ) // Break again if ID key match on all substrings
- break;
- }
- if ( i<OSNameArray.length ) { // if key found, use SA's name
- OSV = OSNameArray[i+1];
- }
- else { // otherwise, treat as unknown
- OSV = "Unknown";
- }
- return OSV;
- }
-