<!--
/*  Javascript
	
	index ->	
			show/hide divs

*/

/* ---- =show / hide divs ---- */
/* --------------------------- */

/* generic function for hiding / showing divs with links
   currently used on 	-> Home Page (breaking news box)
						-> Business Section (market update tabs)					
*/

function hasParent(e, id) {
	if (!e.parentNode) return false;
	if (e.parentNode.id == id) return e.parentNode;
	
	return hasParent(e.parentNode, id);
}

function showBNDiv(e) { // show divs and active tab for each section
  var eNews = hasParent(e, 'showHide');
  
  if (eNews) {
    eNews.className = e.id;
	}
}