﻿// JavaScript Document

/*显示城市切换效果,ID作为隐藏层的城市列表,i值控制是否显示*/
function showhidden(id,i){ 
	if(i==1){
		document.getElementById(id).style.display="block";
	}else{
		document.getElementById(id).style.display="none";
		}
}

/*导航图片的鼠标移动切换*/
/*cid为当前层的ID值，i为切换变量 1为当前显示，2为高亮显示*/
/*function bannerAlt(cid,i){
	var temp = document.getElementById(cid).src;
	if(i==1){
	temp = temp.replace("A","B");
	}
	if(i==2){
		temp = temp.replace("B","A");
	}
	document.getElementById(cid).src = temp;
	}*/

/*产品模块层的背景及字体颜色的切换*/
function productAlt(i){
	if(i==1){
	this.className = "product_model_red";
	alert("aaaa"+this.className);
	}
	if(i==2){
	this.className = "product_model";
	alert("aaaa"+this.className);
	}
	}

				

/*快捷服务的展开特效*/
	
function producecloseall(){
	document.getElementById("index_cheapandprom").style.display = "none";
	document.getElementById("index_hotsell").style.display = "none";
	/*
	document.getElementById("index_newproduce").style.display = "none";
	*/
	document.getElementById("index_tyterminal").style.display = "none";
	document.getElementById("index_lovemusic").style.display = "none";
	

}
function produceshow(pid){
	producecloseall();
	document.getElementById(pid).style.display = '';
}
function tshow(tid){
	/* modify by gengnan 20100518 start*/
	//document.getElementById('t1').className = 'index_promotions_title_nohover';
	//document.getElementById('t2').className = 'index_promotions_title_nohover';
	//document.getElementById('t3').className = 'index_promotions_title_nohover';
	//document.getElementById('t4').className = 'index_promotions_title_nohover';
	//document.getElementById('t5').className = 'index_promotions_title_nohover';	
	
	//alert(document.getElementById('t1'));
	//alert($("#t1"));
	$("#t1").removeClass("index_promotions_title_hover"); 
	$("#t2").removeClass("index_promotions_title_hover");
	$("#t3").removeClass("index_promotions_title_hover");
	$("#t4").removeClass("index_promotions_title_hover");
	$("#t5").removeClass("index_promotions_title_hover");
	
	$("#t1").addClass("index_promotions_title_nohover"); 
	$("#t2").addClass("index_promotions_title_nohover"); 
	$("#t3").addClass("index_promotions_title_nohover"); 
	$("#t4").addClass("index_promotions_title_nohover"); 
	$("#t5").addClass("index_promotions_title_nohover"); 
	
	//alert(document.getElementById(tid));
	//alert($("#"+tid));
	//document.getElementById(tid).className = 'index_promotions_title_hover';
	
	$("#"+tid).removeClass("index_promotions_title_nohover"); 
	$("#"+tid).addClass("index_promotions_title_hover"); 
	
	/* modify by gengnan 20100518 end*/
	
}

//业务列表的JS效果
function g(o){return document.getElementById(o);}
function hoverLi(n){
//如果有N个标签,就将i<=N;
for(var i=1;i<=5;i++){
	g('tb_'+i).className='product_list_nohover floatLeft';
	g('tbc_'+i).style.display='none';
	g('tbd_'+i).style.display='none';
	g('tba_'+i).className='index_titletext1';
	}
	g('tbc_'+n).style.display='block';
	g('tbd_'+n).style.display='block';
	g('tb_'+n).className='product_list_hover floatLeft';
	g('tba_'+n).className='index_titletext1_over';
}

function outLi(){
//如果有N个标签,就将i<=N;
for(var i=1;i<=5;i++){
	g('tb_'+i).className='product_list_nohover floatLeft';
	g('tbc_'+i).style.display='none';
	g('tbd_'+i).style.display='none';
	g('tba_'+i).className='index_titletext1';
	}
}

