<!--
function tmpValidateHeadKeyWord(curForm)
{
    var strSearchType,strSearchCategory,strSearchKeyword,url
    strSearchType = curForm.Search_Type.value;
    strSearchCategory = curForm.Search_Category.value;
    strSearchKeyword = curForm.Search_Keyword.value;
    url="";
    if (strSearchType=="")
    {
        alert("请选择搜索区域！");
        curForm.Search_Type.focus();
        return false;
    }
    if (strSearchCategory=="")
    {
        alert("请选择搜索类别！");
        curForm.Search_Category.focus();
        return false;
    }
    if (strSearchKeyword.length<1)
    {		
        alert("请选择要搜索的商品关键字！");
        curForm.Search_Keyword.focus();
        return false;
    }
    if (strSearchType=="1")
    {
        //alert(strSearchCategory.substring(0,9));
        if (strSearchCategory.substring(0,9)=="0000.0001")
        {
            url="/Merchandise/Collection/sort.asp";
        }
        else if (strSearchCategory.substring(0,9)=="0000.0002")
        {
            url="/Book/list.aspx";
        }
    }
    else if (strSearchType=="2")
    {
        url="/E1988Auction/FixAPriceList.asp";
    }
    else if (strSearchType=="3")
    {
        url="/news/list.aspx";
    }
    else if (strSearchType=="4")
    {
        url="http://bbs.e1988.com/query.asp?keyword=" + escape(strSearchKeyword) + "&sType=" + escape(strSearchCategory) + "&act=query"
    }
    else if (strSearchType=="5")
    {
        url="/ebook/default.aspx"
    }
    else if (strSearchType=="6")
    {
        url="/zj/list.aspx";
    }
    if (url=="")
    {
        return false;
    }
    else
    {
        if (strSearchType=="4")
        {
            window.open(url).focus();
        }
        else
        { 
            curForm.action = url ;
            curForm.submit()
        }
        return true;
    }
}

function tmpLoadHeadSearchType(currentControl)
{
    var i,arr1,arr2,strPage;
    strPage = "1|商城;2|特价频道;3|资讯;4|交易频道" ;
    strPage = "1|商城;3|资讯;5|阅读;6|专家" ;
    
    if (strPage=="")
	{
	    currentControl.length=1;
		currentControl.options[0].value="";
		currentControl.options[0].text="";
	}
	else
	{
	    arr1 = strPage.split(";");
	    currentControl.length = arr1.length+1;
		for(i=0;i<=arr1.length;++i)
		{
			if (i==0)
			{
				currentControl.options[i].value="";
				currentControl.options[i].text="区域";
			}
			else
			{
				arr2=arr1[i-1].split("|");
				currentControl.options[i].value=arr2[0];
				currentControl.options[i].text=arr2[1];
			}			
		} 				
	}
}

function tmpLoadHeadSearchCategory(ControlPage,ControlPlace)
{
    var i,arr1,arr2,intPage,strPage,strPage1,strPage2,strPage3,strPage4,strPage5,strPage6 ;
    
    //strPage1 = "0000.0001|所有收藏;0000.0001.0001|--邮票;0000.0001.0002|--珍邮;0000.0001.0003|--邮资封片;0000.0001.0004|--人民币;0000.0001.0005|--钱币/杂项;0000.0001.0006|--集邮用品;0000.0001.0007|--集邮文献;0000.0001.0008|--油画;0000.0001.0009|--门市精品;"
    strPage1= "0000.0002|图书" ;
    strPage2 = "0000.0001|所有收藏" ;
    strPage3 = "2|资讯" ;
    strPage4 = "2|标题" ;
    strPage5 = "0|关键字;1|书名;2|出版社;3|ISBN;4|作者" ;
    strPage6 = "0|其它学科;1|政治学;2|经济学;3|哲学;4|社会学;5|历史学;6|文学;7|民族研究;8|教育学;9|法学" ;
    
    intPage = ControlPage.value ;
    ControlPlace.value = "";
    switch (intPage)
	{
	    case "1":
			strPage = strPage1;
			break;
	    case "2":
			strPage = strPage2;
			break;
	    case "3":
			strPage = strPage3;
			break;
	    case "4":
			strPage = strPage4;
			break;
	    case "5":
			strPage = strPage5;
			break;
	    case "6":
			strPage = strPage6;
			break;
		default:
		    strPage = "";
	}
	
	if (strPage=="")
	{
	    ControlPlace.length=1;
		ControlPlace.options[0].value="";
		ControlPlace.options[0].text="类别";
	}
	else
	{
	    arr1 = strPage.split(";");
	    //alert(arr1.length);
	    if (arr1.length==1)
	    {
	        ControlPlace.length = arr1.length;
	        arr2=arr1[0].split("|");
	        ControlPlace.options[0].value=arr2[0];
			ControlPlace.options[0].text=arr2[1];
	    }
	    else
	    {
	        ControlPlace.length = arr1.length+1;
		    for(i=0;i<=arr1.length;++i)
		    {
			    if (i==0)
			    {
				    ControlPlace.options[i].value="";
				    ControlPlace.options[i].text="类别";
			    }
			    else
			    {
				    arr2=arr1[i-1].split("|");
				    ControlPlace.options[i].value=arr2[0];
				    ControlPlace.options[i].text=arr2[1];
			    }			
		    }
		}
	}
}

function tmpLoadHeadSearch(strSearchType,strSearchCategory)
{
    tmpLoadHeadSearchType(HeadKeyWord.Search_Type);
    HeadKeyWord.Search_Type.value=strSearchType;
    tmpLoadHeadSearchCategory(HeadKeyWord.Search_Type,HeadKeyWord.Search_Category) ;
    HeadKeyWord.Search_Category.value=strSearchCategory;
}
//-->
