//?????????? var pointNum = 2; //???????? var picLength = 5; //new???? var newDay = 3; //?????????????????? function byteLen(str){ var len; var i; len = 0; for (i=0;i255){ len+=2; }else{ len++; } } return len; } function formatTitle(title,length,date,notAddBlank){ var len =byteLen(title); var title; if (isNew(date)){ length = length - picLength; } if(len > length){ title = formatStr(title,length); }else{ if (notAddBlank){ }else{ for(var i=0;i "; } return title; } var tt= true; function isNew(date){ if (date){ var nowDate = new Date(); var pubDate = new Date(date); var iTime = nowDate - pubDate; if (iTime > 86400000 * newDay){ return false; }else{ return true; } return true; }else{ return false; } } // function formatStr(str,length,replaceSpace){ var len = 0; var i; var temp=""; var charLen; var bLen = byteLen(str); if (bLen > length){//?????????????????????? for (i=0;i255){ charLen = 2; }else{ charLen = 1; } if (len + charLen > length-pointNum){ break; }else{ temp = temp + str.charAt(i); len += charLen; } } for (i=0;i??????????????????") if (f['selectAll']){ f['selectAll'].style.display="none" } return } var iPages = 5; var iSubPage = (Cpage%iPages); var StartPage = Cpage - (iSubPage-1) var EndPage = -(iSubPage - iPages - Cpage) if(iSubPage==0){ EndPage =Cpage StartPage=Cpage -4 } if(EndPage-APage>0 ){ EndPage = APage } document.write('??'+APage+'??????') if(StartPage>1){ var page = StartPage - 1 document.write('<<  '); } for(var i=StartPage;i<=EndPage;i++) { if (i!=Cpage) { document.write(''+i+' '); }else { document.write(i + ' '); } } if(EndPage-APage<0){ var page = -(-1-EndPage) document.write(' >>  '); } document.write('??') document.write('') } function jump2page(no,form){ url = location.href var f = (document.forms[form]); f['page'].value=no; f.target="_self"; f.action=url; f.submit(); } var CMS_PAGE_PARA = ""; //???????? function jump2page(page){ var strUrl = document.location.href; var iLoc = strUrl.indexOf("?"); if (iLoc >= 0){ strUrl = strUrl.substring(0,iLoc); } strUrl = strUrl + "?" + CMS_PAGE_PARA + "&CMS_PAGE=" +page; document.location.href = strUrl; } // ※※※※※※※※※分页显示(默认) function paginate(pageCount,page,rowCount,pageRowCount){ document.write('
'); document.write('共' + rowCount + '条 '); document.write('共' + pageCount + '页 '); document.write('第' + page + '页  '); if (page > 1){ document.write('首页 '); document.write('上一页 '); }else{ document.write('首页 '); document.write('上一页 '); } if (page < pageCount){ document.write('下一页 '); document.write('末页 '); }else{ document.write('下一页 '); document.write('末页 '); } document.write('至页'); document.write(' GO'); document.write('
'); } //※※※※※※※※※优惠活动 function SplitPagehlmobile(APage,Cpage,form){ document.write(''); document.write(''); document.write(''); if (!form){ form = document.forms[0].name; } var f = (document.forms[form]); if(APage==0) { if (f['selectAll']){ f['selectAll'].style.display="none"; } return; } var iPages = 5; var iSubPage = (Cpage%iPages); var StartPage = Cpage - (iSubPage-1); var EndPage = -(iSubPage - iPages - Cpage); if(iSubPage==0){ EndPage =Cpage; StartPage=Cpage -4; } if(EndPage-APage>0 ){ EndPage = APage; } if(Cpage>1){ document.write(''); }else{ document.write(''); } for(var i=StartPage;i<=EndPage;i++) { if (i!=Cpage) { document.write(''); }else { document.write(''); } } if(Cpage'); document.write(''); document.write(''); }else{ document.write(''); } document.write(''); document.write(''); document.write(''); document.write('
'); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''+i+''); document.write(''); document.write(''+i+''); document.write(''); document.write(''); document.write(''); document.write(''); document.write('
'); } function ifDigit(obj){ slen=obj.length; for (i=0; i"9"){ return false; } } return true; } function checkPage(pageno,totalPage){ if(!ifDigit(pageno)){ return false; } if(pageno == "" || pageno > totalPage*1 || pageno < 1){ return false; } return true; } function goPage(pageno,totalPage){ if(!checkPage(pageno,totalPage)){ alert("注意:请输入合法页码数!"); document.all.pageNO.focus(); return; } jump2page(pageno); } function findObj(theObj, theDoc){ var p, i, foundObj; if(!theDoc) { theDoc = document; } if( (p = theObj.indexOf("?")) > 0 && parent.frames.length){ theDoc = parent.frames[theObj.substring(p+1)].document; theObj = theObj.substring(0,p); } for (i=0; !foundObj && i < theDoc.forms.length; i++) { foundObj = theDoc.forms[i][theObj]; } if( !foundObj && !(foundObj = theDoc[theObj]) && theDoc.all){ foundObj = theDoc.all[theObj]; } for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++) { foundObj = findObj(theObj,theDoc.layers[i].document); } if(!foundObj && document.getElementById){ foundObj = document.getElementById(theObj); } return foundObj; } var splitCharDefault = "|"; //?????????? //???????????? function getInputValue(name,splitChar){ if (!splitChar){ splitChar = splitCharDefault; } var input = findObj(name); if (!input){ return ""; } var strType; var strValue = ""; var isArray = false; try{ strType = input.type; } catch(e) { } if( !strType) { strType = input[0].type; isArray = true; } if ( strType == "select-one") { for(var i = 0; i < input.options.length;i++) { if( input.options[i].selected ){ strValue = input.options[i].value; break; } } }else if(strType == "radio") { if (isArray){ for(var i = 0 ; i < input.length; i++){ if( input[i].checked) { strValue = input[i].value; break; } } }else{ if(input.checked) { strValue = input.value; } } }else if( strType == "checkbox") { if (isArray){ for(var i = 0,tagflag=0 ; i < input.length; i++){ if( input[i].checked && !input[i].disabled) { // ???????????????????? if (tagflag == 0){ tagflag++; strValue = input[i].value; }else{ strValue = strValue + splitChar + input[i].value; } } } }else{ if(input.checked && !input.disabled) { strValue = input.value; } } }else { strValue = input.value; } return strValue; } //???????????? function setInputValue(name, value, splitChar){ if (!splitChar){ splitChar = splitCharDefault; } var input = findObj(name); var strType; var strValue; try{ strType = input.type; } catch(e) { ; } if( !strType) { strType = input[0].type; } if( strType == "select-one") { for(var i = 0; i < input.options.length;i++) { if( input.options[i].value == value){ input.options[i].selected = true; break; } } }else if(strType == "radio") { for(var i = 0 ; i < input.length; i++){ if( input[i].value == value) { input[i].checked = true; break; } } }else if(strType == "checkbox") { var astrValues = value.split(splitChar); for(var i = 0 ; i < input.length; i++){ for(var j = 0 ; j < astrValues.length; j++){ if( input[i].value == astrValues[j]) { input[i].checked = true; break; } } } }else { input.value = value; } }