//函数,检测输入数据是否为数字 function CheckNumber(){ //0,普通数字;1,邮政编码;2,无小数点数字;3,带负号数字 var a=CheckNumber.arguments; var standarNumber; var b; if (a[0]==''){ return false; } a[0]=updateNumber(a[0]); if (a.length>1){ if (a[1]==0){ standarNumber='1234567890.'; } if (a[1]==1){ if (a[0].length!=6){ return false; } standarNumber='1234567890'; } if (a[1]==2){ standarNumber='1234567890'; } if (a[1]==3){ standarNumber='1234567890-'; } } else standarNumber='1234567890.'; for (var i=0;iEmail.lastIndexOf('.')) return false; return true; } //函数,闪动显示Title信息 var ShowOrder=1; var ShowTitleMessageOrder; var TitleInfo=new initArray('渔具商城-专业在线经营钓鱼用品','专业在线展示厂商钓鱼用品-渔具商城'); function TitleFlash(){ window.document.title=TitleInfo[ShowOrder]; ShowOrder=ShowOrder+1; if (ShowOrder>TitleInfo.length) ShowOrder=1; setTimeout('TitleFlash()',2000); } //函数,流动显示Title信息 var TitleMessage=''; for (var i=1;i<=TitleInfo.length;i++) TitleMessage=TitleMessage+''+TitleInfo[i]; var ShowTitleMessageOrder=TitleMessage.length; var l=TitleMessage.length; function FlowTitle(){ window.document.title=TitleMessage.substring(l-ShowTitleMessageOrder,l+1)+TitleMessage.substring(0,l-ShowTitleMessageOrder); ShowTitleMessageOrder=(ShowTitleMessageOrder-1) % l; if (ShowTitleMessageOrder<=0) ShowTitleMessageOrder=TitleMessage.length; setTimeout('FlowTitle()',500); } //函数,设置数组 function initArray(){ this.length=initArray.arguments.length for (var i=0;i=0){ return ' '+c; } else return c; } //显示当前公历时间 var timerID=null; var timerRunning=false; var xqArray=new initArray("星期日","星期一","星期二","星期三","星期四","星期五","星期六"); function StopClock(){ if(timerRunning) clearTimeout(timerID); timerRunning=false; } function StartClock(){ StopClock(); ShowTime(); } function ShowTime(){ var now=new Date(); var hours=TimeDigital(now.getHours()); var minutes=TimeDigital(now.getMinutes()); var seconds=TimeDigital(now.getSeconds()); var date=now.getDate(); var day=xqArray[(now.getDay()+1)]; var month=now.getMonth()+1; var year=now.getYear(); document.ShowTimeForm.ShowTime.value='公历:'+year+'年'+month+'月'+date+'日 '+day+' '+hours+'时'+minutes+'分'+seconds+'秒'; timerID=setTimeout("ShowTime()",1000); timerRunning=true; } function TimeDigital(content){ if (content<10) return ('0'+content); else return content; } //显示星级投票评分系统 function Vote(ID,Kind,Name,MainSpec){ var files="vote.asp?ID="+ID+"&Kind="+Kind+"&Name="+Name+"&MainSpec="+MainSpec; var newwindows=window.open(files,'vote','top=0,left='+(window.screen.availWidth-430)/2+',width=430,height=399,scrollbars=yes') } //显示大图片 function ShowPhoto(path,photoName,widthPhoto,heightPhoto){ var files="../retailplace/showphoto.asp?photoPath="+path+"&photoName="+photoName+"&photoWidth="+widthPhoto+"&photoHeight="+heightPhoto; if (widthPhoto!=0 && heightPhoto!=0){ window.open(files,'','width='+(widthPhoto)+',height='+(heightPhoto)+',resizable=yes,scrollbars=no'); } else{ window.open(files); } } //显示产品信息评论 function OpenComment(id,mm){ if(mm=="view") files="../bbs/subbbs.asp?kind=3&wareid="+id; else files="../bbs/pushinfo.asp?kind=3&wareid="+id; window.open(files) } //查看购物车 function ViewShoppingCart(){ var PathName=document.location.pathname.toLowerCase(); if (PathName.indexOf('retailplace')!=-1) var OpenList=window.open('shoppingcart.asp?','ShoppingCart','top=0,left='+(window.screen.availWidth-630)/2+',width=630,height=300,scrollbars=yes'); else { if (PathName=='/newcnft/default.asp') var OpenList=window.open('retailplace/shoppingcart.asp?','ShoppingCart','top=0,left='+(window.screen.availWidth-630)/2+',width=630,height=300,scrollbars=yes'); else var OpenList=window.open('../retailplace/shoppingcart.asp?','ShoppingCart','top=0,left='+(window.screen.availWidth-630)/2+',width=630,height=300,scrollbars=yes'); } } //展示商品Banner内容 function showWareBanner(filePath){ window.open(filePath,'ShowWareBanner','top=0,left='+(window.screen.availWidth-350)/2+',width=350,height=330,scrollbars=no'); } function showPravicy(){ window.open('/clientcenter/pravicy.htm','PRAVICY','top=0,left='+(window.screen.availWidth-700)/2+',width=700,height=530,scrollbars=no'); } //检测输入是否整数 function isInt(Number){ var StandardNumber='1234567890'; if (Number=='' || Number==null) return false for (var i=0;i=(abPixel(objParent,0)+48) || event.clientY<=(abPixel(objParent,1)+1)){ objEle.style.visibility='hidden'; } } } //距离 function abPixel(a,m){ var b,position,zz; position=0; b=a; while (b.tagName!='BODY' && m==0){ position=position+b.offsetLeft; b=b.offsetParent; } while (b.tagName!='BODY' && m==1){ position=position+b.offsetTop; b=b.offsetParent; } return position; } //隐藏设置浏览器功能 function hideSetBrowser(objEle){ if (event.clientX<=(abPixel(objEle,0)+1) || event.clientX>=(abPixel(objEle,0)+objEle.clientWidth-1) || event.clientY>=(abPixel(objEle,1)+objEle.clientHeight-1) || event.clientY<=(abPixel(objEle,1)+1)){ objEle.style.visibility='hidden'; } } //显示表格线 function showTrStyle(curObjEle,l,m,r,bgColor){ var objEle; if (showTrStyle.arguments.length>3){ curObjEle.style.backgroundColor=bgColor; } for (var i=0;i