var isNav, isIE; var coll = ""; var styleObj = ""; if (parseInt(navigator.appVersion) >= 4) { if (navigator.appName == "Netscape") { isNav = true; } else { isIE = true; coll = "all."; styleObj = ".style"; } } function creatTime(){ today=new Date(); var nowTime=""; if (today.getHours()>=5 && today.getHours()<8 ) nowTime="早上"; else if (today.getHours()>=8 && today.getHours()<13 ) nowTime="上午"; else if (today.getHours()>=13 && today.getHours()<19 ) nowTime="下午"; else if (today.getHours()>=19 || today.getHours()<5 ) nowTime="晚上"; function initArray(){ this.length=initArray.arguments.length; for(var i=0;i=5 && today.getHours()<8 ) nowTime="早上"; else if (today.getHours()>=8 && today.getHours()<13 ) nowTime="上午"; else if (today.getHours()>=13 && today.getHours()<19 ) nowTime="下午"; else if (today.getHours()>=19 || today.getHours()<5 ) nowTime="晚上"; function initArray(){ this.length=initArray.arguments.length; for(var i=0;i 0) alert(Msg); } function Post(field, value) { document.forms[0].action = 'email1.php?&' + field + '='; if (value != null) document.forms[0].action += value; else document.forms[0].action += 'Yes'; if (typeof(Validate) == 'undefined' || Validate()) document.forms[0].submit(); //window.close(); } function Get(field, value) { var url = document.forms[0].action += '?&' + field + '='; if (value != null) url += value; else url += 'Yes'; document.location = url; } function SetOption(name, value) { for (var i=0; i0)form.action +="&del=1"; else form.action +="?del=1"; alert(form.action); form.submit(); } function bakchk(form) { var f=0; for (var i=0;i0)chMax=chInfo[4]; //变量最大长度 if(chMin==0 && chInfo[7]>0)chMin=chInfo[7]; //变量最小长度 msg = ""; if(!chMust && (chElement.value==chInfo[2] || mtrim(chElement.value)=="")){ // 1、表单值为默认值 并且可以为空时,通过! //document.all.item("span_"+chElement.name).innerHTML = ""; if(mtrim(chElement.value)=="")chElement.value=""; return true; }else if(chMust==1 && mtrim(chElement.value)==""){ alert(chName+"为必填项!"); if(mtrim(chElement.value)=="")chElement.value=""; if(chElement.type != "hidden") chElement.focus(); return false; } if(!checkPattern(chElement.value,chID,chMax,chMin)){ if(chMust==1) msg = chName + chInfo[10] + "此项为必填项!"; else msg = chName + chInfo[10] + "您也可以将该项清空!"; alert(msg); if(chElement.type != "hidden") chElement.focus(); return false; } if(chElement.value.length>chMax && chInfo[3]==1){ msg = chName+chInfo[5]+"为"+chMax+"个!"; if(chMust) msg = msg+"此项为必填项!"; else msg = msg+"您也可以将该项清空!"; alert(msg); if(chElement.type != "hidden") chElement.focus(); return false; }else if(chElement.value.length7) var max=is_null?31:30; else var max=is_null?32:31; } for(index = 0;index= max) selectedday = max-1; if(dayOption.value == selectedday) dayOption.selected = true; sDay.add(dayOption); } } function changdate(eDate,sYear,sMonth,sDay,eName){ if(!sYear.options[sYear.selectedIndex].text && eName==sYear){ for(ind=0;ind Max) { alert("要求 " + Min + " 和 " + Max + " 之间的数值,并且小数部分不得多于两位,已将值设为最接近的值!"); value = parseFloat(value); value = Math.round(value * 100)/100; if(value>= Max)value = Max; else if(value <= Min || !value ) value = Min; element.value = value; return false; } return true; } function responpage(url,ty,bid,id){ var ms=""; if(ty=="open"){ ms="该新闻目前为关闭状态,若执行\"开启\"操作,则会正式启用对外发布。是否确定\"开启\"?"; }else{ ms="该新闻目前为开启状态,若执行\"关闭\"操作,则会关闭不再对外发布。是否确定\"关闭\"?"; } if(confirm(ms)){ window.location=url+"?ty="+ty+"&bigclass="+bid+"&id="+id; } } function check_confirm(limit_time,limit_hour,limit_min,limit_radio){ var limit; if(limit_radio[0].checked){ limit=0; } if(limit_radio[1].checked){ limit=1; } if(limit==0){ var ms="该新闻设置为长期有效,是否确定?"; }else{ var lim_str=limit_time.substring(0,4)+"年"+limit_time.substring(5,7)+"月"+limit_time.substring(8,10)+"日"; var limit_hour=new Number(limit_hour); var limit_min=new Number(limit_min); var ms="该新闻的关闭时间设置为"+lim_str+ ""+limit_hour+"时"+limit_min+"分"+",是否确定?"; } if(!confirm(ms)){ return false; }else{ return true; } } function disDiv(varname){ var value=varname.value; var element=document.getElementById("dislimit"); if(value==0){ element.style.display="none"; }else{ element.style.display="block"; } }