//clicked - false means it is off and has a plus, true means that it is on and has a minus
var clicked = null;
var ttkchildImgCount= null;
var ttkchildNodes = null;

window.onDomReady(function(){

	var ttkstrContainer = "div.ttk_main_content";
	ttkchildNodes = $$(ttkstrContainer).getElementsByTagName("div");
	
	for (i = 0; i < ttkchildNodes.length; i++)
	{
		// Add the Img to the childDivs array only if it's a shiftDivCell
		if(ttkchildNodes[i].tagName.toLowerCase() == "div" && ttkchildNodes[i].className.toLowerCase().indexOf("ttk_tabs") != -1)
		{
			ttkchildImgCount++;
		}
	}
	clicked = new Array(ttkchildImgCount);
	for(var i = 0; i < ttkchildImgCount; i++)
	{
		clicked[i] = false;
	}
});
//function to slide cart views for cart
function tog_pm(index){
	if(!clicked[index]){
		//show minus
		$("minus["+index+"]").setStyle('display', 'block');
		//show plus
		$("plus["+index+"]").setStyle('display', 'none');
		//show content
		document.getElementById('tcontent['+index+']').style.display = 'block';
		//expanded content
		clicked[index] = true;
	}
	else{
		//hide minus 
		$("minus["+index+"]").setStyle('display', 'none');
		//show plus
		$("plus["+index+"]").setStyle('display', 'block');
		//hide content
		document.getElementById('tcontent['+index+']').style.display = 'none';
		//collapsed content
		clicked[index] = false;
	}
return;
}