function showCria(showID, hideID)
{
	$('#t' + showID).addClass('cont1_t1_h');
	$('#c' + showID).show();
	$('#t' + hideID).removeClass('cont1_t1_h');
	$('#c' + hideID).hide();
	
}

function showTab(tabName, currID, startID, endID)
{
	for (var i = startID; i <= endID; i++){
		$('#' + tabName + i).removeClass('cont2_nav1_h');
		$('#' + tabName + i + 'cont').hide();
	}
	$('#' + tabName + currID).addClass('cont2_nav1_h');
	$('#' + tabName + currID + 'cont').show();
}

//获取二级分类列表
function getCategoryList(parentID)
{
	$('#CategoryID').html('<option value="0">--请选择二级分类--</option>');
	if (parentID > 0){
		$.get('index-action_getCategoryList-parentid_' + parentID + '.html', '', showCategoryList, 'json');
	}
}

//显示二级分类列表
function showCategoryList(data)
{
	for(i in data){
		$('#ProductCategoryID').append('<option value="' + i + '">' + data[i] + '</option>');
	}
}

//广告banner循环播放
var maxID = 7;
var maxShow = 6;
timerID = setInterval("adPlay()", 5000);
function adPlayBak()
{
	var temp = $('#adsLogo1').html();
	for (i = 1; i <= maxShow; i++){
		var nextID = i + 1;
		$('#adsLogo' + i ).html($('#adsLogo' + nextID).html());
	}
	$('#adsLogo' + maxID ).html(temp);
}
function adPlay()
{
	var temp = document.getElementById('adsLogo1').innerHTML;
	
	for (i = 1; i <= maxShow; i++){
		var nextID = i + 1;
		document.getElementById('adsLogo' + i).innerHTML = document.getElementById('adsLogo' + nextID).innerHTML;
	}
	document.getElementById('adsLogo' + maxID).innerHTML = temp;
}

