function tmpValidateHeadKeyWord(curForm) { var strSearchType,strSearchCategory,strSearchKeyword,url strSearchType = curForm.s_type.value; strSearchCategory = curForm.s_category.value; strSearchKeyword = curForm.s_keyword.value; url=""; if (strSearchType=="") { alert("请选择搜索区域!"); curForm.s_type.focus(); return false; } if (strSearchCategory=="") { alert("请选择搜索类别!"); curForm.s_category.focus(); return false; } if (strSearchKeyword.length<1) { alert("请选择要搜索的商品关键字!"); curForm.s_keyword.focus(); return false; } if (strSearchType=="1") { if (strSearchCategory.substring(0,9)=="0000.0001") { url="/collection/sort.asp"; } else if (strSearchCategory.substring(0,9)=="0000.0002") { url="/book/sort.asp"; } } else if (strSearchType=="2") { url="/e1988auction/fixapricelist.asp"; } else if (strSearchType=="3") { url="/news/list.asp"; } else if (strSearchType=="4") { url="http://bbs.e1988.com/query.asp?keyword=" + escape(strSearchKeyword) + "&sType=" + escape(strSearchCategory) + "&act=query" } else if (strSearchType=="5") { url="/groupbuy/list.asp"; } 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|商城;5|聚时惠;3|资讯" ; //strPage += ";2|特价频道;4|交易频道"; 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 ; strPage1 = "0000.0001|所有收藏;0000.0001.0001|--邮票;0000.0001.0003|--邮资封片;0000.0001.0011|--港澳台;0000.0001.0013|--外国邮票;0000.0001.0004|--人民币;0000.0001.0005|--世界货币;0000.0001.0014|--古钱币;0000.0001.0012|--金银币;0000.0001.0006|--集邮用品;0000.0001.0007|--图书文献;0000.0001.0009|--投资精品;0000.0001.0015|--杂项;0000.0001.0010|--礼品;0000.0001.0008|--书画;0000.0001.0016|--奇石名石;0000.0001.0017|--红木把玩;0000.0001.0018|--邮票加盟专区" ; strPage2 = "0000.0001|所有收藏" ; //strPage3 = "1,2,76|所有资讯" ; strPage3 = " |所有资讯" ; strPage4 = "2|主标题" ; strPage5 = "1|邮品;2|钱币;3|礼品摆件;4|金银币;5|其它" ; 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; 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(document.HeadKeyWord.s_type); document.HeadKeyWord.s_type.value=strSearchType; tmpLoadHeadSearchCategory(document.HeadKeyWord.s_type,document.HeadKeyWord.s_category) ; document.HeadKeyWord.s_category.value=strSearchCategory; } document.writeln("
"); document.writeln("
 
"); document.writeln("
"); document.writeln("
"); /*document.writeln("
");*/ document.writeln("
"); document.writeln("
"); document.writeln("
"); tmpLoadHeadSearch('1','0000.0001');