function txtfocus(el) { if (el.defaultvalue == el.value) { el.value = ''; el.style.color = '#000'; } } function txtblur(el) { if (el.value == '') { el.value = el.defaultvalue; el.style.color = '#666'; } } //全站顶部搜索验证 function checkallsearch() { if (jtrim(document.allsearch.keyword.value)=='' || jtrim(document.allsearch.keyword.value)=='请输入查询关键字') { window.alert ("请输入查询关键字!"); document.allsearch.keyword.value=""; document.allsearch.keyword.focus(); return false; } return true } function checktopsearch() { if (jtrim(document.topsearchform.keyword.value)=='' || jtrim(document.topsearchform.keyword.value)=='请输入查询关键字') { window.alert ("请输入查询关键字!"); document.topsearchform.keyword.value=""; document.topsearchform.keyword.focus(); return false; } return true } //网站首页验证登陆框函数02 function checkindexmemberlogin02() { if (jtrim(document.indexloginform.username.value)=='') { window.alert ("请输入您的会员名 !"); document.indexloginform.username.focus(); return false; } if (!isusername(document.indexloginform.username.value)){ document.indexloginform.username.focus(); return false; } if (jtrim(document.indexloginform.username.value).length<5||jtrim(document.indexloginform.username.value).length>20) { window.alert ("您的会员名长度请保持在5-20字符!") document.indexloginform.username.focus(); return false; } if (jtrim(document.indexloginform.password.value)=='') { window.alert ("请输入您的密码 !"); document.indexloginform.password.focus(); return false; } if (jtrim(document.indexloginform.password.value).length<6||jtrim(document.indexloginform.password.value).length>10) { window.alert ("您的密码长度请保持在6-10字符!"); document.indexloginform.password.focus(); return false; } return true } //网站首页验证登陆框函数 function checkindexmemberlogin() { if(!document.indexloginform.usertype[0].checked&&!document.indexloginform.usertype[1].checked){ window.alert ("请选择会员类型!"); return false; } if (jtrim(document.indexloginform.username.value)=='') { window.alert ("请输入您的会员名 !"); document.indexloginform.username.focus(); return false; } //if (!isusername(document.indexloginform.username.value)){ //document.indexloginform.username.focus(); //return false; //} if (jtrim(document.indexloginform.username.value).length<5||jtrim(document.indexloginform.username.value).length>20) { window.alert ("您的会员名长度请保持在5-20字符!") document.indexloginform.username.focus(); return false; } if (jtrim(document.indexloginform.password.value)=='') { window.alert ("请输入您的密码 !"); document.indexloginform.password.focus(); return false; } if (jtrim(document.indexloginform.password.value).length<6||jtrim(document.indexloginform.password.value).length>10) { window.alert ("您的密码长度请保持在6-10字符!"); document.indexloginform.password.focus(); return false; } if (jtrim(document.indexloginform.checkcode.value)=='') { alert("请输入验证码!"); document.indexloginform.checkcode.focus(); return (false); } if (strlength(jtrim(document.indexloginform.checkcode.value))!= 6){ alert("验证码输入不正确,请返回调整!"); document.indexloginform.checkcode.focus(); return false; } return true } //网站顶部登陆验证登陆框函数 function checkpagetopmemberlogin() { if (jtrim(document.topmemberform.username.value)=='') { window.alert ("请输入您的会员名 !"); document.topmemberform.username.focus(); return false; } //if (!isusername(document.topmemberform.username.value)){ //document.topmemberform.username.focus(); //return false; //} if (jtrim(document.topmemberform.username.value).length<5||jtrim(document.topmemberform.username.value).length>20) { window.alert ("您的会员名长度请保持在5-20字符!") document.topmemberform.username.focus(); return false; } if (jtrim(document.topmemberform.password.value)=='') { window.alert ("请输入您的密码 !"); document.topmemberform.password.focus(); return false; } if (jtrim(document.topmemberform.password.value).length<6||jtrim(document.topmemberform.password.value).length>10) { window.alert ("您的密码长度请保持在6-10字符!"); document.topmemberform.password.focus(); return false; } return true } //志愿者频道页中部登陆验证登陆框函数 function checkpagememberlogin2() { if (jtrim(document.memberlogin2.username.value)=='') { window.alert ("请输入您的会员名 !"); document.memberlogin2.username.focus(); return false; } //if (!isusername(document.memberlogin2.username.value)){ //document.memberlogin2.username.focus(); //return false; //} if (jtrim(document.memberlogin2.username.value).length<5||jtrim(document.memberlogin2.username.value).length>20) { window.alert ("您的会员名长度请保持在5-20字符!") document.memberlogin2.username.focus(); return false; } if (jtrim(document.memberlogin2.password.value)=='') { window.alert ("请输入您的密码 !"); document.memberlogin2.password.focus(); return false; } if (jtrim(document.memberlogin2.password.value).length<6||jtrim(document.memberlogin2.password.value).length>10) { window.alert ("您的密码长度请保持在6-10字符!"); document.memberlogin2.password.focus(); return false; } return true } //资讯中心评论验证函数current function checkcomment() { if (jtrim(document.commentform.content.value)==""){ alert("评论内容不能为空!"); document.commentform.content.focus(); return false; } if (strlength(jtrim(document.commentform.content.value))<2){ alert("评论内容不能少于2字符或1汉字,请返回调整!"); document.commentform.content.focus(); return false; } if (strlength(jtrim(document.commentform.content.value))>1000){ alert("评论内容限500汉字或1000字符,请返回调整!"); document.commentform.content.focus(); return false; } if (jtrim(document.commentform.checkcode.value)=='') { alert("请输入验证码!"); document.commentform.checkcode.focus(); return (false); } if (strlength(jtrim(document.commentform.checkcode.value))!= 6){ alert("验证码输入不正确,请返回调整!"); document.commentform.checkcode.focus(); return false; } document.commentform.submit(); } //分类信息留言评论验证函数current function checkfenleiguestbook() { if (jtrim(document.fenleiguestbook.content.value)==""){ alert("留言内容不能为空!"); document.fenleiguestbook.content.focus(); return false; } if (strlength(jtrim(document.fenleiguestbook.content.value))<20){ alert("留言内容不能少于10汉字或20字符,请返回调整!"); document.fenleiguestbook.content.focus(); return false; } if (strlength(jtrim(document.fenleiguestbook.content.value))>2000){ alert("留言内容限1000汉字或2000字符,请返回调整!"); document.fenleiguestbook.content.focus(); return false; } if (jtrim(document.fenleiguestbook.checkcode.value)=='') { alert("请输入验证码!"); document.fenleiguestbook.checkcode.focus(); return (false); } if (strlength(jtrim(document.fenleiguestbook.checkcode.value))!= 6){ alert("验证码输入不正确,请返回调整!"); document.fenleiguestbook.checkcode.focus(); return false; } document.fenleiguestbook.submit(); } //搜索验证函数current function placehoder(){ var keyword=jtrim(document.searchform.keyword.value); var stype=jtrim(document.searchform.stype.value); if(keyword==''){ window.alert ("请输入搜索关键词!"); document.searchform.keyword.focus(); return false; } if(stype==''||stype=='0'){ window.alert ("请输入搜索类型!"); document.searchform.stype.focus(); return false; } if(stype=='1'){ document.searchform.action="/fenlei/search.asp?keyword="+keyword+"&stype="+stype; }else if(stype=='2'){ document.searchform.action="/store/search.asp?keyword="+keyword+"&stype="+stype; }else if(stype=='3'){ document.searchform.action="/info/search.asp?keyword="+keyword+"&stype="+stype; }else{ return false; } return true } //搜索验证函数 //全站搜索 //切换代码函数开始 var isie = navigator.useragent.tolowercase().indexof("msie")!=-1; var go = function(elemid){ if(document.getelementbyid){ return document.getelementbyid(elemid); }else if(document.layers){ document.layers[elemid]; }else{ return eval('document.all.' + elemid); } } function menu(mid,idx){ for(var i=0;i<10;i++){ if(!go("m_"+mid+"_"+i)) break; go("m_"+mid+"_"+i).classname = "menuoff"; go("c_"+mid+"_"+i).style.display = "none"; } go("m_"+mid+"_"+idx).classname = "menuon"; go("c_"+mid+"_"+idx).style.display = "block"; } //切换代码函数结束 function showdiv0(divnum,divbefor,id){ for(i=1;i<=divnum;i++){ try{ if(i==divbefor){ document.getelementbyid(id+i).style.display="inline"; }else{ document.getelementbyid(id+i).style.display="none"; } }catch(e){ } } } function showdivgj(divnum,divbefor,id){ for(i=1;i<=divnum;i++){ try{ if(i==divbefor){ document.getelementbyid("t_"+id+"_"+i).src="/images/goxinxian/"+id+i+"_1.png"; document.getelementbyid("c_"+id+"_"+i).style.display=""; }else{ document.getelementbyid("t_"+id+"_"+i).src="/images/goxinxian/"+id+i+".png"; document.getelementbyid("c_"+id+"_"+i).style.display="none"; } }catch(e){ } } } /*切换显示内容*/ function showdiv(divnum,divbefor,id){ for(i=1;i<=divnum;i++){ try{ if(i==divbefor){ document.getelementbyid("t_"+id+"_"+i).classname="current"; document.getelementbyid("c_"+id+"_"+i).style.display=""; }else{ document.getelementbyid("t_"+id+"_"+i).classname=""; document.getelementbyid("c_"+id+"_"+i).style.display="none"; } }catch(e){ } } } /*视频滑动门*/ var $=function(id) { return document.getelementbyid(id); } function show_menu(num){ for(i=0;i<100;i++){ if($('li0'+i)){ $('h0'+i).style.display='none'; $('li0'+i).style.display='none'; $('f0'+i).classname='shipin03'; } } $('h0'+num).style.display='block';//触发以后标题块 $('li0'+num).style.display='block';//触发以后信息块 $('f0'+num).classname='shipin030';//触发以后tag样式 } //分类列表的收起与展开 function openorclose(obj,flag,n){ obj.style.display = 'none'; if(n == 1){ document.getelementbyid("con_"+flag).style.height = "auto"; document.getelementbyid(flag+"_shouqi").style.display = ''; } else{ document.getelementbyid("con_"+flag).style.height = "24px"; document.getelementbyid(flag+"_zhankai").style.display = ''; } } function go(u) {window.location = u;} //全站顶部搜索选项卡切换 function showsearchdiv(divnum,divbefor,id){ for(i=1;i<=divnum;i++){ try{ if(i==divbefor){ document.getelementbyid("t_"+id+"_"+i).classname="current"; document.getelementbyid("allsearch").action=document.getelementbyid("c_"+id+"_"+i).value; }else{ document.getelementbyid("t_"+id+"_"+i).classname=""; } }catch(e){ } } } function correctpng() { for(var i=0; i" img.outerhtml = strnewhtml i = i-1 } } } window.attachevent("onload", correctpng);