//\///// //\ overLIB Debug Plugin //\ This file requires overLIB 4.10 or later. //\ //\ overLIB 4.05 - You may not remove or change this notice. //\ Copyright Erik Bosrup 1998-2003. All rights reserved. //\ Contributors are listed on the homepage. //\ See http://www.bosrup.com/web/overlib/ for details. // $Revision$ $Date$ // //\///// //\mini //////// // PRE-INIT // Ignore these lines, configuration is below. //////// if (typeof olInfo == 'undefined' || typeof olInfo.meets == 'undefined' || !olInfo.meets(4.10)) alert('overLIB 4.10 or later is required for the Debug Plugin.'); else { var olZindex; registerCommands('allowdebug'); //////// // PLUGIN FUNCTIONS //////// // Parses Debug Parameters function parseDebugExtras(pf, i, ar) { var k = i, v; if (k < ar.length) { if (ar[k] == ALLOWDEBUG) { v = ar[k + 1]; if(typeof v == 'string') {v = ar[++k]; if (pf != 'ol_') setCanShowParm(v);} return k; } } return -1; } // Debug main routine function showProperties() { var args = showProperties.arguments, sho, shoObj, vis, lvl = 0, istrt = 0, theDiv = 'showProps', txt = ''; if (args.length == 0) return; if (args.length % 2 && typeof args[0] == 'string') { istrt = 1; theDiv = args[0]; } sho = createDivContainer(theDiv); if (olNs4) { shoObj = sho; txt += '
'; } else { with(sho.style) { backgroundColor = '#ffffcc'; padding = '5px'; border = '1px #000000 solid'; } shoObj = sho.style; } lvl = getLayerLevel(theDiv); if(typeof sho.position == 'undefined') { sho.position = new Pagelocation(10 + lvl*20, 10, 1); if(typeof olZindex == 'undefined') olZindex = getDivZindex(); shoObj.zIndex = olZindex + 1 + lvl; } txt += ''; txt += ''; txt += ''; for (var i = istrt; i'; txt += '
' + theDiv + 'X
ItemValue
' + args[++i] + '
' + (olNs4 ? '
' : ''); if (olNs4) { sho.document.open(); sho.document.write(txt); sho.document.close(); } else { if(olIe5&&isMac) sho.innerHTML = ''; sho.innerHTML = txt; } showAllVisibleLayers(); } function getLayerLevel(lyr) { var i = 0; if (typeof document.popups == 'undefined') { document.popups = new Array(lyr); } else { var l = document.popups; for (var i = 0; i/g,">").replace(/"/g,"""); } //////// // PLUGIN REGISTRATIONS //////// registerCmdLineFunction(parseDebugExtras); }