function describe(x) {
	var firstCell = x.parentNode.childNodes[0];
	var secondCell = x.parentNode.childNodes[1];
	if (!x.parentNode.parentNode.childNodes[0].className) {
		firstCell = x.parentNode.childNodes[1];
		secondCell = x.parentNode.childNodes[3];
	}
	var description;
	for (i = 0; i < x.parentNode.childNodes.length; i++) {
		if (x.parentNode.childNodes[i].className == "newsdescription") {
			description = x.parentNode.childNodes[i];
			break;
		}
	}
	
	if (description.style.display == 'block') {
		description.style.display = 'none';
		x.parentNode.style.backgroundColor = "";
		firstCell.className = 'start';
		secondCell.className = 'end';
		
	} else {
		description.style.display = 'block';
		x.parentNode.style.backgroundColor = "#cccccc";
		categoryColor = description.childNodes[description.childNodes.length - 1].className;
		firstCell.className = categoryColor;
		firstCell.style.color = '#000';
		secondCell.className = categoryColor;
		secondCell.style.color = '#000';
		
	}
	
	
}










function expand_block(x , task) {
	var firstCell = x.parentNode.childNodes[0];
	var secondCell = x.parentNode.childNodes[1];
	if (!x.parentNode.parentNode.childNodes[0].className) {
		firstCell = x.parentNode.childNodes[1];
		secondCell = x.parentNode.childNodes[3];
	}
	var description;
	for (i = 0; i < x.parentNode.childNodes.length; i++) {
		if (x.parentNode.childNodes[i].className == "hidden_block") {
			description = x.parentNode.childNodes[i];
			break;
		}
	}
	
	
	if(task == 'close'){
            description.style.display = 'none';
	}
	
	else{
            description.style.display = 'block';
	}	
	
}



function expand_block2(x) {
	var firstCell = x.parentNode.childNodes[0];
	var secondCell = x.parentNode.childNodes[1];
	if (!x.parentNode.parentNode.childNodes[0].className) {
		firstCell = x.parentNode.childNodes[1];
		secondCell = x.parentNode.childNodes[3];
	}
	var description;
	for (i = 0; i < x.parentNode.childNodes.length; i++) {
			if (x.parentNode.childNodes[i].className == "hidden_block") {
			description = x.parentNode.childNodes[i];
			break;
		}
	}
	
	
	
        if (description.style.display == 'block') {
	   description.style.display = 'none';
	} else {
	    description.style.display = 'block';
	}
	
}






function expand_block3(x) {
	 if (document.getElementById(x).style.display == 'block') {
	document.getElementById(x).style.display = 'none';
	} else {
	document.getElementById(x).style.display = 'block';
	}
}
