Post by iAlex on Dec 19, 2007 22:57:02 GMT -5
This will allow you to expand/collapse the entire info centre. It will also remember your choice.
Main Footer.
Cross Browser.
Open Source.
<script type="text/javascript">
<!--
/*Expand/Collapse Info Centre - By iAlex - Open Source*/
if(location.href.match(/action/) || !location.href.match(/action/) && !document.modifyForm && !document.postForm){
var iTd=document.getElementsByTagName('td');
var i=iTd.length;
while(--i){
if(iTd.item(i).className=="titlebg" && iTd.item(i).colSpan=="2" && iTd.item(i).align=="center" && iTd.item(i).innerHTML.match(/>Info Center</)){
var iInSpan=document.createElement('span');
iInSpan.innerHTML=' - <font size="1">(Expand/Collapse)</font>';
iTd.item(i).appendChild(iInSpan);
iInSpan.style.cursor='pointer';
iInSpan.onclick=function(){iInfoCollapse(this);};
(document.cookie.match('iInfoCollapse=iCollapsed'))? iInfoCollapse(iInSpan) : '';
break;
}
}
}
function iInfoCollapse(iSpan){
var iTr=iSpan.parentNode.parentNode
var iTab=iTr.parentNode.parentNode.rows;
var a=iTab.length;
(iTr.nextSibling.style.display=="none")? document.cookie='iInfoCollapse=iCollapsed;expires=Sat, 20 Jan 1990 12:12:12 UTC; path=/;' : document.cookie='iInfoCollapse=iCollapsed;expires=Sat, 20 Jan 2050 12:12:12 UTC; path=/;';
while(--a){
(iTab.item(a).style.display=="none")? iTab.item(a).style.display='' : iTab.item(a).style.display='none';
}
}
//-->
</script>
Main Footer.
Cross Browser.
Open Source.
<script type="text/javascript">
<!--
/*Expand/Collapse Info Centre - By iAlex - Open Source*/
if(location.href.match(/action/) || !location.href.match(/action/) && !document.modifyForm && !document.postForm){
var iTd=document.getElementsByTagName('td');
var i=iTd.length;
while(--i){
if(iTd.item(i).className=="titlebg" && iTd.item(i).colSpan=="2" && iTd.item(i).align=="center" && iTd.item(i).innerHTML.match(/>Info Center</)){
var iInSpan=document.createElement('span');
iInSpan.innerHTML=' - <font size="1">(Expand/Collapse)</font>';
iTd.item(i).appendChild(iInSpan);
iInSpan.style.cursor='pointer';
iInSpan.onclick=function(){iInfoCollapse(this);};
(document.cookie.match('iInfoCollapse=iCollapsed'))? iInfoCollapse(iInSpan) : '';
break;
}
}
}
function iInfoCollapse(iSpan){
var iTr=iSpan.parentNode.parentNode
var iTab=iTr.parentNode.parentNode.rows;
var a=iTab.length;
(iTr.nextSibling.style.display=="none")? document.cookie='iInfoCollapse=iCollapsed;expires=Sat, 20 Jan 1990 12:12:12 UTC; path=/;' : document.cookie='iInfoCollapse=iCollapsed;expires=Sat, 20 Jan 2050 12:12:12 UTC; path=/;';
while(--a){
(iTab.item(a).style.display=="none")? iTab.item(a).style.display='' : iTab.item(a).style.display='none';
}
}
//-->
</script>