// TOGGLE TARGET //
var currentTarget = null;

function toggleTarget(ind, anc){
	var target = {
		div: document.getElementById("d"+ind),
		par: document.getElementById("p"+ind),
		lnk: document.getElementById("a"+ind)
	};
	
	if(currentTarget == null){
		target.lnk.style.color = "silver";
		target.lnk.onmouseover = null;
		target.lnk.onmouseout = null;
		target.par.style.display = 'block';
		target.div.style.background = '#DDDDDD url("./imgs/bg_menuItem_30.gif") repeat-x';
		currentTarget = target;
	}
	else
	{
		if(currentTarget.div == target.div){
			target.lnk.style.color = "orange";
			target.lnk.onmouseover = function(){this.style.color = "orange"};
			target.lnk.onmouseout = function(){this.style.color = "black"};
			target.par.style.display = 'none';
			target.div.style.background = 'none';
			currentTarget = null;
		} else{
			currentTarget.lnk.style.color = "black";
			currentTarget.lnk.onmouseover = function(){this.style.color = "orange"};
			currentTarget.lnk.onmouseout = function(){this.style.color = "black"};
			currentTarget.par.style.display = "none";
			currentTarget.div.style.background = 'none';
			
			target.lnk.style.color = "silver";
			target.lnk.onmouseover = null;
			target.lnk.onmouseout = null;
			target.par.style.display = 'block';
			target.div.style.background = '#DDDDDD url("./imgs/bg_menuItem_30.gif") repeat-x';
			
			currentTarget = target;
		}
	}
}
