/*MESSAGE FOR SONY - This comment can be removed
These functions are the same as on the existing ODW except:
1. 'for(i=1;i<3;i++){' - i<3 varies depending on number of items
2. Image folders changed
*/
var expanded=false;

function expandIt(whichEl,picture){
	theLayer=document.getElementById(whichEl).style;
	theLayer.display = (theLayer.display == "none" ) ? "" : "none";
	thePicture=document.getElementById(picture);
	if(theLayer.display == "none"){
		thePicture.src="/bravia/image/layout/content/icoPlusC1.gif";
	}else{
		thePicture.src="/bravia/image/layout/content/icoMinusC1.gif";
	}
}

function expandAll(count){
	for(i=1;i<=count;i++){
		whichEl="node" + i;
		picture="pic"+i;

		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 expandCollapseAll(whichEl,picture){
	theLayer=document.getElementById(whichEl).style;
	theLayer.display = (expanded==true ) ? "" : "none";
	thePicture=document.getElementById(picture);
	
	if(theLayer.display == "none"){
		thePicture.src="/bravia/image/layout/content/icoPlusC1.gif";
	}else{
		thePicture.src="/bravia/image/layout/content/icoMinusC1.gif";
	}
}