function $(id){	return document.getElementById(id);}

/*
function：划门显示
parameter：
name 划门表示名
cursel 选中项id
n 划门元素个数
author:118ss@163.com
example:
*/
function setlump(name,cursor,n,classid,moreid,classon,classout){
	var i;
	for(i=1;i <= n;i++){
		var onlump=name+i;
	  var oncontent="con_"+name+"_"+i;
		$(moreid).href="./?section-"+classid;
		$(onlump).className=i==cursor?classon:classout;
		$(oncontent).style.display=i==cursor?"block":"none";
	}
}

function setconsult(name,cursor,n,linkurl,moreid,classon,classout){
	var i;
	for(i=1;i <= n;i++){
		var onlump=name+i;
	  var oncontent="con_"+name+"_"+i;
		$(moreid).href=linkurl;
		$(onlump).className=i==cursor?classon:classout;
		$(oncontent).style.display=i==cursor?"block":"none";
	}
}

function killErr(){	return true;}
window.onerror=killErr;

function refreshcode(yzm,yzmid){ 
var newImg = $(yzmid);
newImg.src = yzm + '?s=' + (new Date()).getTime();
}

document.write("<div id=\"sys_title_div\"  style=\"display:none\">asdas</div>");
function hide_sys_show_title_div()
{
	var obj = document.getElementById('sys_title_div');
	obj.style.display = "none";
}

function show_sys_title_div(intxt,str,ev)
{//根据鼠标位置显示对象,参数ev为event
 var ObjX,ObjY;//对象的位置(x,y)
 var mouseX=10;//对象的(x)水平位置距离鼠标的宽度
 var mouseY=-2;//对象的(y)垂直位置距离鼠标的高度
 var obj = document.getElementById('sys_title_div');
 obj.style.display=str;//显示或隐藏对象
 if(str == "")
 {    
  if(ev.pageX || ev.pageY)
  {//firefox鼠标的位置
   ObjX = ev.pageX;
   ObjY = ev.pageY;
  }
  else
  {
  	//IE鼠标的位置

//以下两行为旧标准支持
  // ObjX = ev.clientX + document.body.scrollLeft- document.body.clientLeft;
  // ObjY = ev.clientY + document.body.scrollTop - document.body.clientTop;    
 //以下两行为新标准支持
   ObjX = ev.clientX + document.documentElement.scrollLeft- document.body.clientLeft;
   ObjY = ev.clientY + document.documentElement.scrollTop - document.body.clientTop;
  }
  ObjX = ObjX + mouseX;
  ObjY = ObjY - mouseY;
  obj.style.left = ObjX + 'px';
  obj.style.top = ObjY + 'px';
  obj.innerHTML=intxt;
 }
}

/*
function：加入收藏夹
parameter：
weburl 网址
webname 网站名称
author:118ss@163.com
example:
*/
function addfavorite(weburl,webname)
{
	if (document.all)
	{
	  window.external.addFavorite(weburl,webname);
	}
	else if (window.sidebar)
	{
	  window.sidebar.addPanel(webname,weburl,"");
	}
}

/*
function：设为首页
parameter：
o 对象
weburl 网址
author:118ss@163.com
example:sethome(this, http://www.bjsjwl.com)
*/
function sethome(o,weburl)
{
	if (document.all)
	{
	  o.style.behavior='url(#default#homepage)';
	  o.setHomePage(weburl);
	}
	else if (window.sidebar)
	{
	  o.style.behavior='url(#default#homepage)';
	  o.setHomePage(weburl);
	}
}

/*
function：设置png透明
parameter：
weburl 网址
webname 网站名称
author:118ss@163.com
example:<IMG src="b_a1.png" onload="setPng(this, 98, 73);" align=absMiddle>
*/
function setPng(img, w, h) 
{
	ua = window.navigator.userAgent.toLowerCase();
	if(!/msie/.test(ua))
		return;
	imgStyle = "display:inline-block;" + img.style.cssText;
	strNewHTML = "<span style=\"width:" + w + "px; height:" + h + "px;" + imgStyle + ";" + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + img.src + "', sizingMethod='scale');\"></span>";
	img.outerHTML = strNewHTML;
}


/*
 * myFocus焦点图基本库代码开始
 */
var myFocus={
	//myFocus JavaScript Library v1.0.0 beta
	//Design By Koen @ 2010.9.16
	//http://hi.baidu.com/koen_li
	$:function(id){return document.getElementById(id);},
	$$:function(tag,obj){return (typeof obj=='object'?obj:this.$(obj)).getElementsByTagName(tag);},
	$li:function(obj,n){return this.$$('li',this.$$('ul',obj)[n])},
	linear:function(t,b,c,d){return c*t/d + b;},
	easeIn:function(t,b,c,d){return c*(t/=d)*t*t*t + b;},
	easeOut:function(t,b,c,d){return -c*((t=t/d-1)*t*t*t - 1) + b;},
	easeInOut:function(t,b,c,d){return ((t/=d/2) < 1)?(c/2*t*t*t*t + b):(-c/2*((t-=2)*t*t*t - 2) + b);},
	style:function(obj,style){return (+[1,])?window.getComputedStyle(obj,null)[style]:obj.currentStyle[style];},//getStyle简化版
	opa:function(obj,v){//取得或设置对象透明度,默认100
		if(v!=undefined) {v=v>100?100:(v<0?0:v); obj.style.filter = "alpha(opacity=" + v + ")"; obj.style.opacity = (v / 100);}
		else return (!+[1,])?((obj.filters.alpha)?obj.filters.alpha.opacity:100):((obj.style.opacity)?obj.style.opacity*100:100);
	},
	animate:function(obj,prop,val,spd,type,fn){
		var opa=prop=='opacity'?true:false;
		if(opa&&obj.style.display=='none'){obj.style.display='';this.opa(obj,0);}
		var t=0,b=opa?this.opa(obj):parseInt(this.style(obj,prop)),c=val-b,d=spd||50,st=type||'easeOut',m=c>0?'ceil':'floor';
		if(obj[prop+'Timer']) clearInterval(obj[prop+'Timer']);
		obj[prop+'Timer']=setInterval(function(){
			if(opa&&t<d){myFocus.opa(obj,Math[m](myFocus[st](++t,b,c,d)));}
			else if(!opa&&t<d){obj.style[prop]=Math[m](myFocus[st](++t,b,c,d))+'px';}
			else {if(opa&&val==0){obj.style.display='none'}clearInterval(obj[prop+'Timer']);fn&&fn.call(obj);}
		},10);return this;
	},
	fadeIn:function(obj,speed,fn){this.animate(obj,'opacity',100,speed==undefined?20:speed,'linear',fn);return this;},
	fadeOut:function(obj,speed,fn){this.animate(obj,'opacity',0,speed==undefined?20:speed,'linear',fn);return this;},
	slide:function(obj,params,speed,easing,fn){for(var p in params) this.animate(obj,p,params[p],speed,easing,fn);return this;},
	stop:function(obj){//停止所有运动函数
		var animate=['left','right','top','bottom','width','height','opacity'];
		for(var i=0;i<animate.length;i++) if(obj[animate[i]+'Timer']) clearInterval(obj[animate[i]+'Timer']);
		return this;
	},
	initCSS:function(p){
		var css=[],oStyle = document.createElement('style');oStyle.type='text/css';
		if(p.width){css.push('.'+p.style+' *{margin:0;padding:0;border:0;list-style:none;}.'+p.style+'{position:relative;width:'+p.width+'px;height:'+p.height+'px;overflow:hidden;font:12px/1.5 Verdana,Geneva,sans-serif;background:#fff;}.'+p.style+' .loading{position:absolute;z-index:9999;width:100%;height:100%;color:#666;text-align:center;padding-top:'+0.3*p.height+'px;background:#fff url(./images/loading.gif) center '+0.4*p.height+'px no-repeat;}.'+p.style+' .pic,.'+p.style+' .pic *{width:'+p.width+'px;height:'+p.height+'px;}.'+p.style+' .txt li,.'+p.style+' .txt li span,.'+p.style+' .txt-bg{width:'+p.width+'px;height:'+p.txtHeight+'px;line-height:'+p.txtHeight+'px;overflow:hidden;}')}
		if(oStyle.styleSheet){oStyle.styleSheet.cssText=css.join('');} else {oStyle.innerHTML=css.join('');}
		var oHead = this.$$('head',document)[0];oHead.insertBefore(oStyle,oHead.firstChild);
	},
	setting:function(par){
		if(window.attachEvent){(function(){try{myFocus.$(par.id).className=par.style;myFocus.initCSS(par);}catch(e){setTimeout(arguments.callee,0);}})();window.attachEvent('onload',function(){myFocus[par.style](par)});}
　　		else{document.addEventListener("DOMContentLoaded",function(){myFocus.$(par.id).className=par.style;myFocus.initCSS(par);},false);window.addEventListener('load',function(){myFocus[par.style](par)},false);}
	},
	addList:function(obj,cla){//生成HMTL,cla为生成列表的class,其中封装有:cla='txt'(生成alt文字),cla='num'(生成按钮数字),cla='thumb'(生成小图)
		var s=[],n=this.$li(obj,0).length,num=cla.length;
		for(var j=0;j<num;j++){
			s.push('<ul class='+cla[j]+'>');
			for(var i=0;i<n;i++){s.push('<li>'+(cla[j]=='num'?('<a>'+(i+1)+'</a>'):(cla[j]=='txt'?this.$li(obj,0)[i].innerHTML.replace(/\>(.|\n|\r)*?(\<\/a\>)/i,'>'+(this.$$('img',obj)[i]?this.$$('img',obj)[i].alt:'')+'</a>'):(cla[j]=='thumb'?'<img src='+(this.$$('img',obj)[i].getAttribute("thumb")||this.$$('img',obj)[i].src)+' />':'')))+'<span></span></li>')};
			s.push('</ul>');
		}; obj.innerHTML+=s.join('');
	},
	switchMF:function(fn1,fn2,auto){
		return "box.removeChild(this.$$('div',box)[0]);var run=function(idx){("+fn1+")();if (index == n - 1) index = -1;var next = idx != undefined ? idx: index + 1;("+fn2+")();index=next;};run(index);if("+auto+"!==false) var auto=setInterval(function(){run()},t);box.onmouseover=function(){if(auto) clearInterval(auto);};box.onmouseout=function(){if(auto) auto=setInterval(function(){run()},t);}"
	},
	bind:function(arrStr,type,delay){
		return "for (var j=0;j<n;j++){"+arrStr+"[j].index=j;if("+type+"=='click'){"+arrStr+"[j].onmouseover=function(){if(this.className!='current') this.className='hover'};"+arrStr+"[j].onmouseout=function(){if(this.className=='hover') this.className=''};"+arrStr+"[j].onclick=function(){if(this.index!=index) run(this.index)};}else if("+type+"=='mouseover'){"+arrStr+"[j].onmouseover=function(){var self=this;if("+delay+"==0){if(!self.className) run(self.index)}else "+arrStr+".d=setTimeout(function(){if(!self.className) run(self.index)},"+(delay==undefined?100:delay)+")};"+arrStr+"[j].onmouseout=function(){clearTimeout("+arrStr+".d)};}else{alert('myFocus 不支持这样的事件 \"'+"+type+"+'\"');break;}}"
	},
	extend:function(fnObj){for(var p in fnObj) this[p]=fnObj[p];}
}
/*
 * myFocus焦点图基本库代码结束
 * 下面是各款基于myFocus库制作的焦点图风格皮肤，可自行按需选择
 * myFocus焦点图库及皮肤可自由使用，保留作者相关信息即可，谢谢支持！^^
 */
myFocus.extend({
	mF_classicHC:function(par){//*************经典怀旧系列一--慧聪风格*********
		var box=this.$(par.id);//定义焦点图盒子
		this.addList(box,['txt','num-bg','num']);//添加ul列表
		var pic=this.$li(box,0),txt=this.$li(box,1),num=this.$li(box,3);//定义焦点图元素
		var index=0,n=pic.length,t=par.time*1000;//运行时相关参数
		//CSS
		var txtH=par.txtHeight;
		box.style.width=par.width+2+'px';box.style.height=par.height+txtH+2+'px';
		this.$$('ul',box)[2].style.bottom=this.$$('ul',box)[3].style.bottom=txtH+1+'px';
		for(var i=0;i<n;i++){
			pic[i].style.display='none';txt[i].style.display='none';
			txt[i].style.top=par.height+2+'px';txt[i].style.width=par.width+2+'px';
		}
		//PLAY
		eval(this.switchMF(function(){
			pic[index].style.display='none';
			txt[index].style.display='none';
			num[index].className='';
		},function(){
			myFocus.fadeIn(pic[next]);
			txt[next].style.display='';
			num[next].className='current';
		}))
		eval(this.bind('num','par.trigger',par.delay));
	}
})

function scroll(obj, direction, oWidth, oHeight, drag, zoom, speed)
{
    var scrollDiv        = document.getElementById(obj);
    var scrollContent    = document.createElement("div")
    scrollContent.style.position = "absolute"
    scrollDiv.applyElement(scrollContent, "inside")
    var displayWidth    = (oWidth  != "auto" && oWidth ) ? oWidth  : scrollContent.offsetWidth  + parseInt(scrollDiv.currentStyle.borderRightWidth)
    var displayHeight    = (oHeight != "auto" && oHeight) ? oHeight : scrollContent.offsetHeight + parseInt(scrollDiv.currentStyle.borderBottomWidth)
    var contentWidth    = scrollContent.offsetWidth
    var contentHeight    = scrollContent.offsetHeight
    var scrollXItems    = Math.ceil(displayWidth  / contentWidth)  + 1
    var scrollYItems    = Math.ceil(displayHeight / contentHeight) + 1
    scrollDiv.style.width     = displayWidth
    scrollDiv.style.height     = displayHeight
    scrollDiv.style.overflow = "hidden"
    scrollDiv.setAttribute("state", "stop")
    scrollDiv.setAttribute("drag", drag ? drag : "horizontal")
    scrollDiv.setAttribute("direction", direction ? direction : "left")
    scrollDiv.setAttribute("zoom", zoom ? zoom : 1)
    scrollContent.style.zoom = scrollDiv.zoom
    var scroll_script =    "var scrollDiv = " + scrollDiv.uniqueID                                        +"\n"+
                "var scrollObj = " + scrollContent.uniqueID                                    +"\n"+
                "var contentWidth = " + contentWidth + " * (scrollObj.runtimeStyle.zoom ? scrollObj.runtimeStyle.zoom : 1)"    +"\n"+
                "var contentHeight = " + contentHeight + " * (scrollObj.runtimeStyle.zoom ? scrollObj.runtimeStyle.zoom : 1)"    +"\n"+
                "var scrollx = scrollObj.runtimeStyle.pixelLeft"                                +"\n"+
                "var scrolly = scrollObj.runtimeStyle.pixelTop"                                    +"\n"+
                "switch (scrollDiv.state.toLowerCase())"                                +"\n"+
                "{"                                                    +"\n"+
                    "case ('scroll')    :"                                    +"\n"+
                        "switch (scrollDiv.direction)"                                +"\n"+
                        "{"                                            +"\n"+
                            "case ('left')        :"                            +"\n"+
                                "scrollx = (--scrollx) % contentWidth"                    +"\n"+
                                "break"                                    +"\n"+
                            "case ('right')    :"                                +"\n"+
                                "scrollx = -contentWidth + (++scrollx) % contentWidth"            +"\n"+
                                "break"                                    +"\n"+
                            "case ('up')    :"                                +"\n"+
                                "scrolly = (--scrolly) % contentHeight"                    +"\n"+
                                "break"                                    +"\n"+
                            "case ('down')    :"                                +"\n"+
                                "scrolly = -contentHeight + (++scrolly) % contentHeight"        +"\n"+
                                "break"                                    +"\n"+
                            "case ('left_up')    :"                            +"\n"+
                                "scrollx = (--scrollx) % contentWidth"                    +"\n"+
                                "scrolly = (--scrolly) % contentHeight"                    +"\n"+
                                "break"                                    +"\n"+
                            "case ('left_down')    :"                            +"\n"+
                                "scrollx = (--scrollx) % contentWidth"                    +"\n"+
                                "scrolly = -contentHeight + (++scrolly) % contentHeight"        +"\n"+
                                "break"                                    +"\n"+
                            "case ('right_up')    :"                            +"\n"+
                                "scrollx = -contentWidth + (++scrollx) % contentWidth"            +"\n"+
                                "scrolly = (--scrolly) % contentHeight"                    +"\n"+
                                "break"                                    +"\n"+
                            "case ('right_down')    :"                            +"\n"+
                                "scrollx = -contentWidth + (++scrollx) % contentWidth"            +"\n"+
                                "scrolly = -contentHeight + (++scrolly) % contentHeight"        +"\n"+
                                "break"                                    +"\n"+
                            "default        :"                            +"\n"+
                                "return"                                +"\n"+
                        "}"                                            +"\n"+
                        "scrollObj.runtimeStyle.left = scrollx"                            +"\n"+
                        "scrollObj.runtimeStyle.top = scrolly"                            +"\n"+
                        "break"                                            +"\n"+
                    "case ('stop')    :"                                        +"\n"+
                    "case ('drag')    :"                                        +"\n"+
                    "default    :"                                        +"\n"+
                        "return"                                        +"\n"+
                "}"
    var contentNode = document.createElement("span")
    contentNode.runtimeStyle.position = "absolute"
    contentNode.runtimeStyle.width = contentWidth
    scrollContent.applyElement(contentNode, "inside")
    for (var i=0; i <= scrollXItems; i++)
    {
        for (var j=0; j <= scrollYItems ; j++)
        {
            if (i+j == 0)    continue
            var tempNode = contentNode.cloneNode(true)
            var contentLeft, contentTop
            scrollContent.insertBefore(tempNode)
            contentLeft = contentWidth * i
            contentTop = contentHeight * j
            tempNode.runtimeStyle.left = contentLeft
            tempNode.runtimeStyle.top  = contentTop
        }
    }
    scrollDiv.onpropertychange = function()
    {
        var propertyName = window.event.propertyName
        var propertyValue = eval("this." + propertyName)
        switch(propertyName)
        {
            case "zoom"        :
                var scrollObj = this.children[0]
                scrollObj.runtimeStyle.zoom = propertyValue
                var content_width  = scrollObj.children[0].offsetWidth  * propertyValue
                var content_height = scrollObj.children[0].offsetHeight * propertyValue
                scrollObj.runtimeStyle.left = -content_width  + (scrollObj.runtimeStyle.pixelLeft % content_width)
                scrollObj.runtimeStyle.top  = -content_height + (scrollObj.runtimeStyle.pixelTop  % content_height)
                break
        }
    }
    scrollDiv.onlosecapture = function()
    {
        this.state = this.tempState ? this.tempState : this.state
        this.runtimeStyle.cursor = ""
        this.removeAttribute("tempState")
        this.removeAttribute("start_x")
        this.removeAttribute("start_y")
        this.removeAttribute("default_left")
        this.removeAttribute("default_top")
    }
    scrollDiv.onmousedown = function()
    {
        if (this.state != "drag")    this.setAttribute("tempState", this.state)
        this.state = "drag"
        this.runtimeStyle.cursor = "default"
        this.setAttribute("start_x", event.clientX)
        this.setAttribute("start_y", event.clientY)
        this.setAttribute("default_left", this.children[0].style.pixelLeft)
        this.setAttribute("default_top", this.children[0].style.pixelTop)
        this.setCapture()
    }
    scrollDiv.onmousemove = function()
    {
        if (this.state != "drag")    return
        var scrollx = scrolly = 0
        var zoomValue = this.children[0].style.zoom ? this.children[0].style.zoom : 1
        var content_width = this.children[0].children[0].offsetWidth * zoomValue
        var content_Height = this.children[0].children[0].offsetHeight * zoomValue
        if (this.drag == "horizontal" || this.drag == "both")
        {
            scrollx = this.default_left + event.clientX - this.start_x
            scrollx = -content_width + scrollx % content_width
            this.children[0].runtimeStyle.left = scrollx
        }
        if (this.drag == "vertical" || this.drag == "both")
        {
            scrolly = this.default_top + event.clientY - this.start_y
            scrolly = -content_Height + scrolly % content_Height
            this.children[0].runtimeStyle.top = scrolly
        }
    }
    scrollDiv.onmouseup = function()
    {
        this.releaseCapture()
    }
    scrollDiv.state = "scroll"
    setInterval(scroll_script, speed ? speed : 20)
} 

function Marquee()
{
	this.ID = document.getElementById(arguments[0]);
	if(!this.ID)
	{
		alert("您要设置的\"" + arguments[0] + "\"初始化错误\r\n请检查标签ID设置是否正确!");
		this.ID = -1;
		return;
	}
	this.Direction = this.Width = this.Height = this.DelayTime = this.WaitTime = this.CTL = this.StartID = this.Stop = this.MouseOver = 0;
	this.Step = 1;
	this.Timer = 30;
	this.DirectionArray = {"top":0 , "up":0 , "bottom":1 , "down":1 , "left":2 , "right":3};
	if(typeof arguments[1] == "number" || typeof arguments[1] == "string")this.Direction = arguments[1];
	if(typeof arguments[2] == "number")this.Step = arguments[2];
	if(typeof arguments[3] == "number")this.Width = arguments[3];
	if(typeof arguments[4] == "number")this.Height = arguments[4];
	if(typeof arguments[5] == "number")this.Timer = arguments[5];
	if(typeof arguments[6] == "number")this.DelayTime = arguments[6];
	if(typeof arguments[7] == "number")this.WaitTime = arguments[7];
	if(typeof arguments[8] == "number")this.ScrollStep = arguments[8];
	this.ID.style.overflow = this.ID.style.overflowX = this.ID.style.overflowY = "hidden";
	this.ID.noWrap = true;
	this.IsNotOpera = (navigator.userAgent.toLowerCase().indexOf("opera") == -1);
	if(arguments.length >= 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 = "<table cellspacing='0' cellpadding='0' style='border-collapse:collapse;display:inline;'><tr><td noWrap=true style='white-space: nowrap;word-break:keep-all;'>MSCLASS_TEMP_HTML</td><td noWrap=true style='white-space: nowrap;word-break:keep-all;'>MSCLASS_TEMP_HTML</td></tr></table>";
	var templateTop = "<table cellspacing='0' cellpadding='0' style='border-collapse:collapse;'><tr><td>MSCLASS_TEMP_HTML</td></tr><tr><td>MSCLASS_TEMP_HTML</td></tr></table>";
	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.Direction > 1 ? msobj.ID.scrollLeft = 0 : msobj.ID.scrollTop = 0;
			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;
	}
}
