var expanded = false;


function catalog_expandIt(whichEl,picture){
theLayer=document.getElementById(whichEl).style;
theLayer.display = (theLayer.display == "none" ) ? "" : "none";
thePicture=document.getElementById(picture);
if(theLayer.display == "none"){
thePicture.src='imgs/icoPlus.gif';
} else{
thePicture.src='imgs/icoMinus.gif';
}
}

function catalog_collapser(whichEl,picture){
theLayer=document.getElementById(whichEl).style;
theLayer.display = "none";
thePicture=document.getElementById(picture);
thePicture.src='imgs/icoPlus.gif';
}

function catalog_collapseOthers(count,skip){
for(i=1;i<=count;i++){
whichEl="node" + i;
picture="pic"+i;
if(i!=skip){
catalog_collapser(whichEl,picture)
}
}
}

function catalog_expandAll(count){
for(i=1;i<=count;i++){
whichEl="node" + i;
picture="pic"+i;

catalog_expandCollapseAll(whichEl,picture);
}
theLayer=document.getElementById(whichEl).style;

if(theLayer.display == "none"){
//document.getElementById("expandCollapse").innerHTML='Expand all';
expanded=true;
}else{
//document.getElementById("expandCollapse").innerHTML='Collapse all';
expanded=false;
}
}

function catalog_expandCollapseAll(whichEl,picture){
theLayer=document.getElementById(whichEl).style;
theLayer.display = (expanded==true ) ? "" : "none";
thePicture=document.getElementById(picture);

if(theLayer.display == "none"){
thePicture.src='imgs/icoPlus.gif';
}else{
thePicture.src='imgs/icoMinus.gif';
}
}

function tabs(a,id){a.blur();$("tabs").className=a.parentNode.className;document.getElementById('addItemsel').value=id;return false}

