//前台公共函数

/**
 * 切换多栏目板块中的指定栏目
 * tdTag 当前选中的页签单元格
 * blockTag 整个多栏目板块主键
 */
function changeMuchColumn(tdTag,blockTag){
	
	//获取所有td标签
	var allColumnTds = getElementsInNodeByAttribute(tdTag.parentNode.parentNode.parentNode.id,'id','columntitlesub');
	if (allColumnTds!=null){
		var i=0;
		while(i<allColumnTds.length){
			//标签头
			var headTag = getNodeElementById(allColumnTds[i],'columntaghead');
			//标签中间
			var middleTag = getNodeElementById(allColumnTds[i],'columntitle');
			//标签尾
			var foodTag = getNodeElementById(allColumnTds[i],'columntagfood');
			
			if (middleTag==tdTag){
				middleTag.background='images/schema1/right_1_r1_c2.jpg';
				headTag.style.backgroundImage='url(images/schema1/right_1_r1_c1.jpg)';
				headTag.style.backgroundRepeat = 'no-repeat';
				headTag.style.backgroundPosition = 'right';
				
				foodTag.style.backgroundImage='url(images/schema1/right_1_r1_c4.jpg)';
				foodTag.style.backgroundRepeat='no-repeat';
				
				getNodeElementById(blockTag,'columncontent'+middleTag.getAttribute('columnno')).style.display='block';
			}else{
				middleTag.background='images/schema1/right_2_r1_c2.jpg';
				
				headTag.style.backgroundImage='url(images/schema1/right_2_r1_c1.jpg)';
				headTag.style.backgroundRepeat = 'no-repeat';
				headTag.style.backgroundPosition = 'right';
				
				foodTag.style.backgroundImage='url(images/schema1/right_2_r1_c4.jpg)';
				foodTag.style.backgroundRepeat='no-repeat';
				
				getNodeElementById(blockTag,'columncontent'+middleTag.getAttribute('columnno')).style.display='none';
			}
			i++;
		}
	}
}