$(function(){
	$('.index-tab li').mouseover(function(){
		var name = "#index-link" + this.id.substring(9);
		$('.index-link').hide();
		$(name).show();
		$('.index-tab .act').removeClass('act');
		$(this).addClass('act');
	});
	$('body').click(function(){
		searchDisabledTop();	
	});
	
	$(document).ready(function() {
		$("#adbtn").click(function () {
			var tmpScrollTop = document.documentElement.scrollTop; 
			var bodywidth = document.body.clientWidth;
			var o_width = parseInt($("#ad").css('width'));
			$("#ad").css({
				left:bodywidth>o_width?(bodywidth-o_width)/2:0,
				top:tmpScrollTop + 150
			}).show();
		});
		$("#Close").click(function () {
			$("#ad").hide();
		});			
	});
});

/**2010.07.22 add start by shan**/
function searchButtonTop(style, value,obj) {
	$('#type_top').val(value);
	$('#category_top').css('display',style);
	if(style=="none"){
		$('#kw_select_top').val($(obj).find('a').html());
	}
}
/* search disabled */
function searchDisabledTop() {
	var obj = document.getElementById('category_top');
	if(obj)
	obj.style.display = 'none';
}

function scheckTop() {
	var val = $('#keyword_top').val();
	if(val=="关键词搜索"){
		alert("请输入关键词");
		return false;
	}
	
	var typeTop = $('#type_top').val();
	//文章检索
	if(typeTop == 'other'){
		document.search_top.action="search.asp"
	//产品检索
	}else{
		document.search_top.action="p_search_list.asp?keyword="+val;
	}
	
	return true;
}

/**2010.07.22 add end by shan**/



function $$$I(id){
	return"string"==typeof id?document.getElementById(id):id
}

var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F70e9a975bc7ecad762a6e41c0901ad6e' type='text/javascript'%3E%3C/script%3E"));

