﻿/***************/
function checkSearch(f)
{
    if( f.key.value == "")
    {
        alert("请输入关键字!");
        return false;
    }
    if( f.searchtype.value == "1")
    {
        f.action = "http://www.anyp.com/product/search.aspx";
    }
    else if( f.searchtype.value == "2")
    {
        f.action = "http://www.anyp.com/business/search.aspx";
    }
    else if( f.searchtype.value == "3")
    {
        f.action = "http://www.anyp.com/company/search.aspx";
    }
    else
    {
        f.action = "TagArticle.aspx";
    }
    f.searchtype.disabled = true;
    return true;
}

/************************/
function selectType(type)
{		
    var ul = document.getElementById("searchTypes");
    for( var i=0;i<ul.children.length;i++)
    {
        if(i==type) ul.children[i].className = "on";
        else ul.children[i].className = "";
    }
    sform.searchtype.value = type;
	if(type=="2")
		document.getElementById("radiosearch").style.display="block";
	else
		document.getElementById("radiosearch").style.display="none";
}

/*************************/
function selectSupply(type)
{
    if( type == "1")
        document.getElementById("radioType1").checked = true;
    else if( type == "2")
        document.getElementById("radioType2").checked = true;
    else if( type == "3")
        document.getElementById("radioType3").checked = true;
    else
        document.getElementById("radioType0").checked = true;
}

/*************************/
function goBbs(uid,key)
{
    if( uid == "" || key =="")
        window.navigate("http://bbs.anyp.com/");
    else
        window.navigate("http://bbs.anyp.com/loginok.aspx?u="+uid+"&p="+key);
    
}
