﻿
    var xmlHttp = null;
    function gettjdl() {
        if (document.getElementById("searchdata1").value.length > 0) {
            try {
                // Firefox, Opera 8.0+, Safari
                xmlHttp = new XMLHttpRequest();
            }
            catch (e) {
                // Internet Explorer
                try {
                    xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
                }
                catch (e) {
                    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
                }
            }
            if (xmlHttp == null) {
                return;
            }
            else {
                var url = "gettjdl.aspx";
                xmlHttp.onreadystatechange = stateChanged;
                xmlHttp.open("GET", url, true);
                xmlHttp.send(null);
            }
        }
        else 
        {
            alert("请输入查询关键字");
            document.getElementById("searchdata1").focus();
        }
        
    }
    function stateChanged()
    {
        if (xmlHttp.readyState == 4) 
        {
            if (xmlHttp.status == 200) 
            {
                var my = "";
                my =  xmlHttp.responseText
                xmlHttp = null;
                document.getElementById("searchform").action = my;
                document.getElementById("searchform").acceptCharset = "GB2312";
                
                document.getElementById("searchform").submit();
                //alert(my);
            }
            
        }
}
   

var CurrSearchBTNID = 's1';
function SearchClick(AObj)
{
 if (CurrSearchBTNID != AObj.id)
 {
    // alert(CurrSearchBTNID);
	var tm=document.getElementById(CurrSearchBTNID);
    tm.style.background='url(images/bg16.jpg)';
    tm.setAttribute("valign","bottom",0);
    CurrSearchBTNID = AObj.id;
    //alert(CurrSearchBTNID);
 	AObj.style.background='url(images/bg17.jpg)';
 	AObj.setAttribute("valign","middle",0);
 	//document.getElementById('myidshow').innerHTML = document.getElementById("div"+AObj.id).innerHTML;
 	document.getElementById("divs1").style.display = "none";
 	document.getElementById("divs2").style.display = "none";
 	document.getElementById("divs3").style.display = "none";
 	//document.getElementById("divs3").style.display = "none";

 	document.getElementById("div" + CurrSearchBTNID).style.display = "";
 	//alert(tds.id);
 	//tds.style.display = true;
 }
}
function SearchMouseOver(AObj)
{
 if (CurrSearchBTNID != AObj.id)
 {
 	AObj.style.background='url(images/bg15.jpg)';
 	AObj.setAttribute("valign","middle",0);
 }
}
function SearchMouseOut(AObj)
{
 if (CurrSearchBTNID != AObj.id)
 {
  	AObj.style.background='url(images/bg16.jpg)';
  	AObj.setAttribute("valign","bottom",0);
 }

}




