
function set_item_class(id){for(i=1;i<=10;i++){if(id==i){document.getElementById("pro_"+i+"_2").style.display="";document.getElementById("pro_"+i+"_2").style.background="url(/images/item_h"+i+"_on.gif) no-repeat 14px 0px";document.getElementById("pro_"+i+"_1").style.display="none";}else{document.getElementById("pro_"+i+"_2").style.display="none";document.getElementById("pro_"+i+"_1").style.display="";document.getElementById("pro_"+i+"_1").style.background="url(/images/item_h"+i+".gif) no-repeat 19px 5px";}}}function setitem(obj,pro,id,itemdl,setvalid,bid){var fodinfo=document.getElementById(itemdl).getElementsByTagName("li");if(pro=="jianjie"){readurl="../setajax/readjianjie.asp?sid="+id+"&tmp="+Math.random();}else if(pro=="art"){readurl="../setajax/readitem.asp?sid="+id+"&bid="+bid+"&tmp="+Math.random();}for(i=0;i<fodinfo.length;i++){if(obj==fodinfo[i]){fodinfo[i].className="itemdl_on";$.ajax({type:"POST",url:readurl,data:"",success:function(msg){$("#"+setvalid).html(msg);}});}else
{fodinfo[i].className="itemdl_off";}}}function showitem(obj,id,itemdl,setvalid,idcount){var fodinfo=document.getElementById(itemdl).getElementsByTagName("li");for(i=0;i<fodinfo.length;i++){if(obj==fodinfo[i]){fodinfo[i].className="itemdl_on";ii=i+1
document.getElementById(setvalid+ii).style.display="";}else
{fodinfo[i].className="itemdl_off";ii=i+1
document.getElementById(setvalid+ii).style.display="none";}}}function getly(){if(document.lyform.name.value==""){alert("请填写你的姓名!");document.lyform.name.focus();return false;}if(document.lyform.tel.value==""){alert("请填写你的联系电话!");document.lyform.tel.focus();return false;}if(document.lyform.comefrom.value==""){alert("请填写您现在的住址!");document.lyform.comefrom.focus();return false;}if(document.lyform.age.value!=""){if(isNumber(document.lyform.age.value)==false||document.lyform.age.value<1||document.lyform.age.value>100){alert("请输入真实年龄！");document.lyform.age.focus();return false;}}if(document.lyform.message.value==""||document.lyform.message.value=="请输入最多300个字的留言"){alert("请填写您的留言内容!");document.lyform.message.focus();return false;}if(document.lyform.vercode.value==""){alert("请填写验证码!");document.lyform.vercode.focus();return false;}}function checkss_1(){if(document.searchform.word.value==""||document.searchform.word.value=="关键字"){alert("请输入搜索字符");document.searchform.word.focus();return false;}if(document.searchform.word.value.length<2){alert("请输入至少两个字符");document.searchform.word.focus();return false;}}function checkss_2(){if(document.form_ss.word.value==""||document.form_ss.word.value=="关键字"){alert("请输入搜索字符");document.form_ss.word.focus();return false;}if(document.form_ss.word.value.length<2){alert("请输入至少两个字符");document.form_ss.word.focus();return false;}}function isNumber(name){if(name.length==0)return false;for(i=0;i<name.length;i++){if(name.charAt(i)<"0"||name.charAt(i)>"9")return false;}return true;}