
function setTab(name, from, cursel, n) {
	for (i = from; i <= n; i++) {
		var menu = document.getElementById(name + i);
		var con = document.getElementById("con_" + name + "_" + i);
		menu.className = i == cursel ? "hover" : "";
		con.style.display = i == cursel ? "block" : "none";
	}
}
function changeLabel(lNum, allN, bName) {
	for (i = 1; i <= allN; i++) {
		obj = document.getElementById(bName + i);
		sObj1 = document.getElementById("l_show" + i);
		if (lNum == i) {
			obj.className = bName + i;
			sObj1.style.display = "";
		} else {
			obj.className = bName + i + "_1";
			sObj1.style.display = "none";
		}
	}
}

$(function(){
	if($("#newskey")){
		$("#newskey").click(function(){
			if($(this).val() == '--输入关键字--'){
				$(this).val("");
				$(this).css({"color":"#000000"});	
			}
		});
		$("#newskey").blur(function(){
			if($(this).val()==""){			
				$(this).css({"color":"#999999"});
				$(this).val("--输入关键字--");
			}		
		});
		$("#newsSelBtn").click(function(){
			var $newsKey = $.trim($("#newskey").val());
			if($newsKey == '' || $newsKey=='--输入关键字--'){
				alert("请输入查询关键字!");
				return false;
			}
			var url = $("#newsSearchForm").attr("action")+"?keyWords="+$newsKey;
	
			window.open(encodeURI(encodeURI(url)));
		});
	}
});

