function readcookie(name) { var cookievalue = ""; var search_s = name + "="; if(document.cookie.length > 0) { offset = document.cookie.indexof(search_s); if (offset != -1) { offset += search_s.length; end = document.cookie.indexof(";", offset); if (end == -1) end = document.cookie.length; cookievalue = unescape(document.cookie.substring(offset, end)) } } if(cookievalue=='null'){ cookievalue=''; } return cookievalue; } function writecookie(name, value, hours) { var expire = ""; if(hours != null) { expire = new date((new date()).gettime() + hours * 3600); expire = "; expires=" + expire.togmtstring(); } if(value==null){ value=''; } document.cookie = name + "=" + escape(value) + expire+ ";path=/;"; } //退出 function clear_cookies(name,url){ writecookie(name,''); if(name=='zz_userid'){ if(url){ var tmp_arr=url.split("/vip_"); if(tmp_arr[1]){ var tmp_arr2=tmp_arr[1].split("."); if(tmp_arr2[0]){ var tmp_cok=tmp_arr2[0]+'_gouwuche'; writecookie(tmp_cok,''); } } } } if(url!=''){ location.href=url; //$("#fixedshopcar").hide(); }else{ location.reload(); } } /*function clear_cookies(){ writecookie('ev_userid',''); document.getelementbyid("login_info").innerhtml = '
注册 | 登录
'; }*/ function hcmarquee(id,mw,mh,mr,sr,ms,pause){ var obj=document.getelementbyid(id); obj.ss=false; //stop tag obj.mr=mr; //marquee rows obj.sr=sr; //marquee display rows obj.mw=mw; //marquee width obj.mh=mh; //marquee height obj.ms=ms; //marquee speed obj.pause=pause; //pause time obj.pt=0; //pre top obj.st=0; //stop time obj.mul=1; obj.con=""; with(obj){ style.width=mw+"px"; style.height=mh+"px"; nowrap=false; onmouseover=stopm; onmouseout=startm; scrolltop=0+"px"; scrollleft=0+"px"; } if(obj.mr!=1){ obj.tt=mh*mr/sr; obj.ct=mh; //current top obj.innerhtml+=obj.innerhtml; setinterval(scrollup,obj.ms); } function scrollup(){ if(obj.ss==true) return; obj.ct+=1; if(obj.ct==obj.mh+1){ obj.st+=1; obj.ct-=1; if(obj.st==(obj.pause*obj.mul)){ obj.ct=0; obj.st=0; if(obj.mul==1) obj.mul = 1; else obj.mul = 1; } }else { obj.pt=(++obj.scrolltop); if(obj.pt==obj.tt){obj.scrolltop=0;} } } function stopm(){obj.ss=true;} function startm(){obj.ss=false;} }