var currBlock = [null,null];

function showBlock(blockName,linkTag) {

	if(typeof(linkTag) != 'object') if(document.getElementById(linkTag)) linkTag = document.getElementById(linkTag);

	var oldLinkTag = currBlock[0];
	var oldBlock = currBlock[1];
	var block = document.getElementById(blockName);

	if(oldBlock != null) oldBlock.style.visibility = 'hidden';
	block.style.visibility = 'visible';
	
	if(oldLinkTag != null) oldLinkTag.className = '';
	linkTag.className = 'over';
	
	currBlock[0] = linkTag;
	currBlock[1] = block;
	
	
	
		var pointA = linkTag.getElementsByTagName('span').item(0);
		var pointB = block;
		var boxC = document.getElementById('boxC');
		var boxD = document.getElementById('boxD');
		
		boxC.style.left = (findPosX(pointA)+pointA.offsetWidth)+'px';
		boxD.style.left = (findPosX(pointB)-20)+'px';
		
		boxC.style.top = (findPosY(pointA)+(pointA.offsetHeight/2))+'px';
		boxD.style.top = (findPosY(pointB)+5)+'px';
		
		boxC.style.width = Math.max(0,(findPosX(pointB)-findPosX(pointA)-pointA.offsetWidth-20))+'px';
		boxD.style.width = 10+'px';
		
		boxC.style.height = '1px';
		boxD.style.height = (findPosY(pointA)-findPosY(pointB)+(pointA.offsetHeight/2)-5)+'px';
		
		boxC.style.border = '#cc0000 1px dashed';
		boxC.style.borderWidth = '1px 0px 0px 0px';
		boxD.style.border = '#cc0000 1px dashed';
		boxD.style.borderWidth = '1px 0px 0px 1px';
	
}