var zhangxu={$:function(objname){if(document.getelementbyid){return eval('document.getelementbyid("'+objname+'")')}else{return eval('document.all.'+objname)}},isie:navigator.appversion.indexof("msie")!=-1?true:false,addevent:function(l,i,i){if(l.attachevent){l.attachevent("on"+i,i)}else{l.addeventlistener(i,i,false)}},delevent:function(l,i,i){if(l.detachevent){l.detachevent("on"+i,i)}else{l.removeeventlistener(i,i,false)}},readcookie:function(o){var o="",l=o+"=";if(document.cookie.length>0){var i=document.cookie.indexof(l);if(i!=-1){i+=l.length;var i=document.cookie.indexof(";",i);if(i==-1)i=document.cookie.length;o=unescape(document.cookie.substring(i,i))}};return o},writecookie:function(i,l,o,c){var o="",i="";if(o!=null){o=new date((new date).gettime()+o*3600000);o="; expires="+o.togmtstring()};if(c!=null){i=";domain="+c};document.cookie=i+"="+escape(l)+o+i},readstyle:function(i,l){if(i.style[l]){return i.style[l]}else if(i.currentstyle){return i.currentstyle[l]}else if(document.defaultview&&document.defaultview.getcomputedstyle){var i=document.defaultview.getcomputedstyle(i,null);return i.getpropertyvalue(l)}else{return null}}}; //����ͼƭ���캯�� //ui&ue dept. mengjia //080623 function scrollpic(scrollcontid,arrleftid,arrrightid,dotlistid){this.scrollcontid=scrollcontid;this.arrleftid=arrleftid;this.arrrightid=arrrightid;this.dotlistid=dotlistid;this.dotclassname="dotitem";this.dotonclassname="dotitemon";this.dotobjarr=[];this.pagewidth=0;this.framewidth=0;this.speed=10;this.space=10;this.pageindex=0;this.autoplay=true;this.autoplaytime=5;var _autotimeobj,_scrolltimeobj,_state="ready";this.stripdiv=document.createelement("div");this.listdiv01=document.createelement("div");this.listdiv02=document.createelement("div");if(!scrollpic.childs){scrollpic.childs=[]};this.id=scrollpic.childs.length;scrollpic.childs.push(this);this.initialize=function(){if(!this.scrollcontid){throw new error("����ָ��scrollcontid.");return};this.scrollcontdiv=zhangxu.$(this.scrollcontid);if(!this.scrollcontdiv){throw new error("scrollcontid������ȷ�ķ���.(scrollcontid = \""+this.scrollcontid+"\")");return};this.scrollcontdiv.style.width=this.framewidth+"px";this.scrollcontdiv.style.overflow="hidden";this.listdiv01.innerhtml=this.listdiv02.innerhtml=this.scrollcontdiv.innerhtml;this.scrollcontdiv.innerhtml="";this.scrollcontdiv.appendchild(this.stripdiv);this.stripdiv.appendchild(this.listdiv01);this.stripdiv.appendchild(this.listdiv02);this.stripdiv.style.overflow="hidden";this.stripdiv.style.zoom="1";this.stripdiv.style.width="36855px";this.listdiv01.style.cssfloat="left";this.listdiv02.style.cssfloat="left";zhangxu.addevent(this.scrollcontdiv,"mouseover",function("scrollpic.childs["+this.id+"].stop()"));zhangxu.addevent(this.scrollcontdiv,"mouseout",function("scrollpic.childs["+this.id+"].play()"));if(this.arrleftid){this.arrleftobj=zhangxu.$(this.arrleftid);if(this.arrleftobj){zhangxu.addevent(this.arrleftobj,"mousedown",function("scrollpic.childs["+this.id+"].rightmousedown()"));zhangxu.addevent(this.arrleftobj,"mouseup",function("scrollpic.childs["+this.id+"].rightend()"));zhangxu.addevent(this.arrleftobj,"mouseout",function("scrollpic.childs["+this.id+"].rightend()"))}};if(this.arrrightid){this.arrrightobj=zhangxu.$(this.arrrightid);if(this.arrrightobj){zhangxu.addevent(this.arrrightobj,"mousedown",function("scrollpic.childs["+this.id+"].leftmousedown()"));zhangxu.addevent(this.arrrightobj,"mouseup",function("scrollpic.childs["+this.id+"].leftend()"));zhangxu.addevent(this.arrrightobj,"mouseout",function("scrollpic.childs["+this.id+"].leftend()"))}};if(this.dotlistid){this.dotlistobj=zhangxu.$(this.dotlistid);if(this.dotlistobj){var pages=math.round(this.listdiv01.offsetwidth/this.framewidth+0.4),i,tempobj;for(i=0;i=this.listdiv01.scrollwidth){this.scrollcontdiv.scrollleft=this.scrollcontdiv.scrollleft+this.space-this.listdiv01.scrollwidth}else{this.scrollcontdiv.scrollleft+=this.space};this.accountpageindex()};this.moveright=function(){if(this.scrollcontdiv.scrollleft-this.space<=0){this.scrollcontdiv.scrollleft=this.listdiv01.scrollwidth+this.scrollcontdiv.scrollleft-this.space}else{this.scrollcontdiv.scrollleft-=this.space};this.accountpageindex()};this.leftend=function(){if(_state!="floating"){return};_state="stoping";clearinterval(_scrolltimeobj);var fill=this.pagewidth-this.scrollcontdiv.scrollleft%this.pagewidth;this.move(fill)};this.rightend=function(){if(_state!="floating"){return};_state="stoping";clearinterval(_scrolltimeobj);var fill=-this.scrollcontdiv.scrollleft%this.pagewidth;this.move(fill)};this.move=function(num,quick){var thismove=num/5;if(!quick){if(thismove>this.space){thismove=this.space};if(thismove<-this.space){thismove=-this.space}};if(math.abs(thismove)<1&&thismove!=0){thismove=thismove>=0?1:-1}else{thismove=math.round(thismove)};var temp=this.scrollcontdiv.scrollleft+thismove;if(thismove>0){if(this.scrollcontdiv.scrollleft+thismove>=this.listdiv01.scrollwidth){this.scrollcontdiv.scrollleft=this.scrollcontdiv.scrollleft+thismove-this.listdiv01.scrollwidth}else{this.scrollcontdiv.scrollleft+=thismove}}else{if(this.scrollcontdiv.scrollleft-thismove<=0){this.scrollcontdiv.scrollleft=this.listdiv01.scrollwidth+this.scrollcontdiv.scrollleft-thismove}else{this.scrollcontdiv.scrollleft+=thismove}};num-=thismove;if(math.abs(num)==0){_state="ready";if(this.autoplay){this.play()};this.accountpageindex();return}else{this.accountpageindex();settimeout("scrollpic.childs["+this.id+"].move("+num+","+quick+")",this.speed)}};this.next=function(){if(_state!="ready"){return};_state="stoping";this.move(this.pagewidth,true)};this.play=function(){if(!this.autoplay){return};clearinterval(_autotimeobj);_autotimeobj=setinterval("scrollpic.childs["+this.id+"].next()",this.autoplaytime*1000)};this.stop=function(){clearinterval(_autotimeobj)};this.pageto=function(num){if(_state!="ready"){return};_state="stoping";var fill=num*this.framewidth-this.scrollcontdiv.scrollleft;this.move(fill,true)};this.accountpageindex=function(){this.pageindex=math.round(this.scrollcontdiv.scrollleft/this.framewidth);if(this.pageindex>math.round(this.listdiv01.offsetwidth/this.framewidth+0.4)-1){this.pageindex=0};var i;for(i=0;i= 7)this.start(); } marquee.prototype.start = function() { if(this.id == -1)return; if(this.waittime < 800)this.waittime = 800; if(this.timer < 20)this.timer = 20; if(this.width == 0)this.width = parseint(this.id.style.width); if(this.height == 0)this.height = parseint(this.id.style.height); if(typeof this.direction == "string")this.direction = this.directionarray[this.direction.tostring().tolowercase()]; this.halfwidth = math.round(this.width / 2); this.halfheight = math.round(this.height / 2); this.bakstep = this.step; this.id.style.width = this.width + "px"; this.id.style.height = this.height + "px"; if(typeof this.scrollstep != "number")this.scrollstep = this.direction > 1 ? this.width : this.height; var templateleft = "
msclass_temp_htmlmsclass_temp_html
"; var templatetop = "
msclass_temp_html
msclass_temp_html
"; var msobj = this; msobj.temphtml = msobj.id.innerhtml; if(msobj.direction <= 1) { msobj.id.innerhtml = templatetop.replace(/msclass_temp_html/g,msobj.id.innerhtml); } else { if(msobj.scrollstep == 0 && msobj.delaytime == 0) { msobj.id.innerhtml += msobj.id.innerhtml; } else { msobj.id.innerhtml = templateleft.replace(/msclass_temp_html/g,msobj.id.innerhtml); } } var timer = this.timer; var delaytime = this.delaytime; var waittime = this.waittime; msobj.startid = function(){msobj.scroll()} msobj.continue = function() { if(msobj.mouseover == 1) { settimeout(msobj.continue,delaytime); } else { clearinterval(msobj.timerid); msobj.ctl = msobj.stop = 0; msobj.timerid = setinterval(msobj.startid,timer); } } msobj.pause = function() { msobj.stop = 1; clearinterval(msobj.timerid); settimeout(msobj.continue,delaytime); } msobj.begin = function() { msobj.clientscroll = msobj.direction > 1 ? msobj.id.scrollwidth / 2 : msobj.id.scrollheight / 2; if((msobj.direction <= 1 && msobj.clientscroll <= msobj.height + msobj.step) || (msobj.direction > 1 && msobj.clientscroll <= msobj.width + msobj.step)) { msobj.id.innerhtml = msobj.temphtml; delete(msobj.temphtml); return; } delete(msobj.temphtml); msobj.timerid = setinterval(msobj.startid,timer); if(msobj.scrollstep < 0)return; msobj.id.onmousemove = function(event) { if(msobj.scrollstep == 0 && msobj.direction > 1) { var event = event || window.event; if(window.event) { if(msobj.isnotopera) { msobj.eventleft = event.srcelement.id == msobj.id.id ? event.offsetx - msobj.id.scrollleft : event.srcelement.offsetleft - msobj.id.scrollleft + event.offsetx; } else { msobj.scrollstep = null; return; } } else { msobj.eventleft = event.layerx - msobj.id.scrollleft; } msobj.direction = msobj.eventleft > msobj.halfwidth ? 3 : 2; msobj.abscenter = math.abs(msobj.halfwidth - msobj.eventleft); msobj.step = math.round(msobj.abscenter * (msobj.bakstep*2) / msobj.halfwidth); } } msobj.id.onmouseover = function() { if(msobj.scrollstep == 0)return; msobj.mouseover = 1; clearinterval(msobj.timerid); } msobj.id.onmouseout = function() { if(msobj.scrollstep == 0) { if(msobj.step == 0)msobj.step = 1; return; } msobj.mouseover = 0; if(msobj.stop == 0) { clearinterval(msobj.timerid); msobj.timerid = setinterval(msobj.startid,timer); } } } settimeout(msobj.begin,waittime); } marquee.prototype.scroll = function() { switch(this.direction) { case 0: this.ctl += this.step; if(this.ctl >= this.scrollstep && this.delaytime > 0) { this.id.scrolltop += this.scrollstep + this.step - this.ctl; this.pause(); return; } else { if(this.id.scrolltop >= this.clientscroll) { this.id.scrolltop -= this.clientscroll; } this.id.scrolltop += this.step; } break; case 1: this.ctl += this.step; if(this.ctl >= this.scrollstep && this.delaytime > 0) { this.id.scrolltop -= this.scrollstep + this.step - this.ctl; this.pause(); return; } else { if(this.id.scrolltop <= 0) { this.id.scrolltop += this.clientscroll; } this.id.scrolltop -= this.step; } break; case 2: this.ctl += this.step; if(this.ctl >= this.scrollstep && this.delaytime > 0) { this.id.scrollleft += this.scrollstep + this.step - this.ctl; this.pause(); return; } else { if(this.id.scrollleft >= this.clientscroll) { this.id.scrollleft -= this.clientscroll; } this.id.scrollleft += this.step; } break; case 3: this.ctl += this.step; if(this.ctl >= this.scrollstep && this.delaytime > 0) { this.id.scrollleft -= this.scrollstep + this.step - this.ctl; this.pause(); return; } else { if(this.id.scrollleft <= 0) { this.id.scrollleft += this.clientscroll; } this.id.scrollleft -= this.step; } break; } } //-->