var currslid = 1;
var slidint;
function setfoc(id){
	if (id==1){
		$('#subject_1_1,').attr("style","");
		$('#k1').addClass("ss");
		$('#k3,#k2,#k4,#k5,#k6').removeClass();
		$('#subject_1_2').attr("style","display:none");
		$('#subject_1_3').attr("style","display:none");
		$('#subject_1_4').attr("style","display:none");
		$('#subject_1_5').attr("style","display:none");
		$('#subject_1_6').attr("style","display:none");
	}
	if (id==2){
		$('#subject_1_2').attr("style","");
		$('#k2').addClass("ss");
		$('#k3,#k1,#k4,#k5,#k6').removeClass();
		$('#subject_1_1').attr("style","display:none");
		$('#subject_1_3').attr("style","display:none");
		$('#subject_1_4').attr("style","display:none");
		$('#subject_1_5').attr("style","display:none");
		$('#subject_1_6').attr("style","display:none");

	}
	if (id==3){
		$('#subject_1_3').attr("style","");
		$('#k3').addClass("ss");
		$('#k1,#k2,#k4,#k5,#k6').removeClass();
		$('#subject_1_1').attr("style","display:none");
		$('#subject_1_2').attr("style","display:none");
		$('#subject_1_4').attr("style","display:none");
		$('#subject_1_5').attr("style","display:none");
		$('#subject_1_6').attr("style","display:none");
	}
	if (id==4){
		$('#subject_1_4').attr("style","");
		$('#k4').addClass("ss");
		$('#k1,#k2,#k3,#k5,#k6').removeClass();
		$('#subject_1_1').attr("style","display:none");
		$('#subject_1_2').attr("style","display:none");
		$('#subject_1_3').attr("style","display:none");
		$('#subject_1_5').attr("style","display:none");
		$('#subject_1_6').attr("style","display:none");
	}
	if (id==5){
		$('#subject_1_5').attr("style","");
		$('#k5').addClass("ss_1");
		$('#k1,#k2,#k3,#k4').removeClass();
		$('#subject_1_1').attr("style","display:none");
		$('#subject_1_2').attr("style","display:none");
		$('#subject_1_3').attr("style","display:none");
		$('#subject_1_4').attr("style","display:none");
		$('#subject_1_6').attr("style","display:none");
	}
	if (id==6){
		$('#subject_1_6').attr("style","");
		$('#k1,#k2,#k3,#k4,#5').removeClass();
		$('#k5').addClass("ss_1");
		$('#subject_1_1').attr("style","display:none");
		$('#subject_1_2').attr("style","display:none");
		$('#subject_1_3').attr("style","display:none");
		$('#subject_1_4').attr("style","display:none");
		$('#subject_1_5').attr("style","display:none");
	}
}
function playnext(){
	if(currslid==6){
		currslid = 1;
	}
	else{
		currslid++;
	};
	//alert(currslid);
	setfoc(currslid);
	playit();
}
function playit(){
	slidint = setTimeout(playnext,2000);
}
function stopit(){
	clearTimeout(slidint);
}
window.onload = function(){
	playit();
}
$("#kkw").click(function(){
						
	var sm = encodeURI($("#sm").val());
	alert(sm);
	alert ('sssss');
		
})
$(function(){
	$('#syno3right01 li').mouseover(function(){
		$('#syno3right01 li').removeClass();
		if($(this).children('a').attr('id') == 'subject_1_5_a'){
			$(this).addClass("ss_1");
		}else{
			$(this).addClass("ss");
		}
		
		$('#subject_1_1,#subject_1_2,#subject_1_3,#subject_1_4,#subject_1_5,#subject_1_6').attr("style","display:none");
		$( '#'+$(this).children('a').attr('id').replace('_a','') ).attr("style",'');
	})
})
$(function(){
	$('#kw li').mousemove(function(){
		$('#kw li').removeClass();
		$(this).addClass("tut20");
		$('#sub_1_1,#sub_1_2,#sub_1_3,#sub_1_4').attr("style","display:none");
		$( '#'+$(this).children('a').attr('id').replace('_a','') ).attr("style",'');
		
		
	})
})

$(function(){
	$.ajax({
		type: "POST",
		url: "ajax.php?t=yhm",
		data:"" ,	
		success: function(data){
			$('#yhm').html(data);
		}
	});
//首页图片下拉
$('#gs').slideDown('slow').delay(10000).slideUp('slow');
});
function setHomepage()
{
	if (document.all)
	{
		document.body.style.behavior='url(#default#homepage)';
		document.body.setHomePage('http://www.gbicom.cn');

	}
	else if (window.sidebar)
	{
		if(window.netscape)
		{
			try
			{ 
				netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); 
			}
			catch (e)
			{
				alert( "该操作被浏览器拒绝，如果想启用该功能，请在地址栏内输入 about:config,然后将项 signed.applets.codebase_principal_support 值该为true" ); 
			}
		} 
		var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components. interfaces.nsIPrefBranch);
		prefs.setCharPref('browser.startup.homepage','http://www.baidu.com');
	}
}

//首页 交易安全 咨询导航  商标导航 的js变换
function scrollDoor(){
}
scrollDoor.prototype = {
	sd : function(menus,divs,openClass,closeClass){
		var _this = this;
		if(menus.length != divs.length)
		{
			alert("菜单层数量和内容层数量不一样!");
			return false;
		}
		for(var i = 0 ; i < menus.length ; i++)
		{
			_this.$(menus[i]).value = i;
			_this.$(menus[i]).onmouseover = function(){
				for(var j = 0 ; j < menus.length ; j++)
				{
					_this.$(menus[j]).className = closeClass;
					_this.$(divs[j]).style.display = "none";
				}
				_this.$(menus[this.value]).className = openClass;
				_this.$(divs[this.value]).style.display = "block";
			}
		}
	},
	$ : function(oid){
		if(typeof(oid) == "string")
			return document.getElementById(oid);
		return oid;
	}
}
window.onload = function(){
	var SDmodel = new scrollDoor();
	SDmodel.sd(["m01","m02","m03"],["c01","c02","c03"],"sd01","sd02");
}


