// 供求滚动
function GQgd(li){
	$(".gq li").removeClass();
li.className="Current";
var t=($(li).text()=="供应资源")?"1":"0";
$("#mtext").html("");
$("#mtext").load("/inc/topGQ.asp?t="+t, function(){
$(".wu").hover(function(){$(this).next().show();},function(){$(this).next().hide();});
});
//m0.innerHTML=mtext.innerHTML ;
//
//alert($(".wu").size());
}

function ShowQy(li) {
$(".qiye li").removeClass();
li.className="current";
$("#qiye").load("/inc/qiye.asp?id="+li.id);

}

function ShowList(obj) {
	var nodes = obj.parentNode.childNodes;
	for (var i = 0; i < nodes.length; i++) {
		nodes(i).className = (obj == nodes(i)) ? "current" : "";
	}
	var ulid = $(obj.parentNode).attr("name");
	$("#" + ulid).html("<img src=/images/loading.gif>数据加载中，请稍候。");
	var myDate = new Date();
var sj=myDate.getTime(); 
	$("#" + ulid).load("/inc/top.asp?cid=" + obj.id.replace("li", "")+"&sj="+sj);
	//$("#" + ulid).load("/info/info" + obj.id.replace("li", ""));
		//nodes(i).style.backgroundPositionX =(obj == nodes(i))?"-132px":"0px";
	//'';
	//$("ul[name=" + obj.id + "]").show().siblings(".rm4bg,.rm2bg").hide();

}
	//插入flash
	function MakeFlash(Url,Width,Height){                   
document.writeln("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"" + Width + "\" height=\"" + Height + "\">");   
document.writeln("<param name=\"movie\" value=\"" + Url + "\">");   
document.writeln("<param name=\"quality\" value=\"high\" />");       
document.writeln("<param name=\"wmode\" value=\"transparent\">");//透明
document.writeln("<param name=\"menu\" value=\"false\">");
document.writeln("<embed src=\"" + Url + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" + Width + "\"  height=\"" + Height + "\">");   
document.writeln("</object>");     
} 
	//
    $(document).ready(function() {
//绑定搜索按钮事件
        $("#doSearch").click(function() {
			var Qstr="";
			var fcid=$("#fcid").val();//栏目
			if(fcid!="") Qstr=Qstr+"&fcid="+ fcid;
			
			var cid=$("#cid").val();//版块
			if(fcid!="") Qstr=Qstr+"&cid="+ cid;
			
			var City=$("#City").val();//城市
			if(City!="-请选择-") Qstr=Qstr+"&City="+ City;
			
			var Days=$("#Days").val();//时间
			if(Days!="0") Qstr=Qstr+"&Days="+ Days;
			
            var v = $.trim($("#searchKey").val());
            if (v && v != "标题关键字") Qstr=Qstr+"&q="+ escape(v);
			if(Qstr==""){
			alert("至少选择或填写一项！");
			return;}
			else
			window.location.href ="/Search.asp?"+Qstr.substring(1)+"&page=1";
            //else
//			$("#searchKey").focus();
        });
		//底部企业搜索
        $("input[name=company]").focus(function() {
            if ($(this).val() == "关键字") $(this).val("");
        }).blur(function() {
            if ($.trim($(this).val()) == "") $(this).val("关键字");
        })
//搜索关键字
        $("#searchKey").focus(function() {
            if ($(this).val() == "标题关键字") $(this).val("");
            $(this).addClass("input borderhover");
        }).blur(function() {
            if ($.trim($(this).val()) == "") $(this).val("标题关键字");
            $(this).removeClass("input borderhover");
        }).keydown(function(e) {
            if (e.keyCode == 13 && !window.auHaveSelected) {
                $("#searchKey").val($("<div></div>").html($("#searchKey").val()).text());
                $("#doSearch").click();
                return false;
            }
        });
		//菜单栏显示当前
		var dizhi=location.pathname.replace("default.asp","");
		var Ca = $(".nav a[href='" + dizhi + "']");
		if (Ca.size() > 0)
		{Ca.parent().addClass("navCurrent");}
    });
