|
Post by James on Apr 5, 2005 3:54:59 GMT
Main Footer. <script type="text/javascript"> <!--
/* Show/Hide Admin Panel v1
Created by A._Leon Copyright © 2003 - 2005 SolidSnakeDesigns.com All Rights Reserved
This code may not be redistributed without express permission from the creator. This header must stay intact at all times. */
//Hide them on load? yes or no //Make sure it's lowercase var Hide = 'yes';
if (location.href.match(/action=admin/i)) { var iList = document.getElementsByTagName("ul"); var iNum = -1; for (var b = 0; b < iList.length; b ++) { IsShown = (Hide == "yes")? '+' : '-'; iNum ++; iList.item(b).previousSibling.innerHTML += '[<a href="javascript:SHAdmin(' + iNum + ')">' + IsShown + '</a>]<br/>'; iList.item(b).style.display = (Hide == "yes")? 'none' : ''; }
function SHAdmin(objnum) { var iUL = document.getElementsByTagName("ul").item(objnum); if (iUL.style.display == "none") { iUL.previousSibling.getElementsByTagName("a").item(0).innerHTML = '-'; iUL.style.display = ''; } else { iUL.previousSibling.getElementsByTagName("a").item(0).innerHTML = '+'; iUL.style.display = 'none'; } } }
//--> </script>Change the red to either yes or no[Cross Browser]
|
|