//获取对象id
function $(id) {
	return document.getElementById(id);
}
//获取对象名
function $$(objName) {
	return document.getElementsByName(objName);
}
//添加事件
function addEvent(el,evType,fn){
	if (el=='document'){el =document;}else{
	el = $(el); if(!el) return;}
	if(el.addEventListener) return el.addEventListener(evType,fn,false);
	return el.attachEvent('on'+evType,fn);
}
//为数组添加事件
function arrAddEvent(obj,evType,fn)
{
	var obj = $$(obj+'[]');
	var len = obj.length;
	if (len>0){
		for(var i=0;i<len;i++){
			if(obj[i].addEventListener){
				obj[i].addEventListener(evType,fn,false);
			}else{
				obj[i].attachEvent('on'+evType,fn);
			}
		}
	}
}
//隐藏对象
function hideObj(objid){
	return $(objid).style.display="none";
}
//显示对象
function showObj(objid){
	return $(objid).style.display="block";
}
//去掉前后空格
function trim(str){
	return str.replace(/(^\s*)|(\s*$)/g,"");
}
//解析xml字符串
function loadXMLString(str){
	var xmlDoc;
	try {//Internet Explorer
		xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
		xmlDoc.async="false";
		xmlDoc.loadXML(str);
	}catch(e){
	  try {//Firefox, Mozilla, Opera, etc.
		parser=new DOMParser();
		xmlDoc=parser.parseFromString(str,"text/xml");
	  }catch(e) {}
	}
	return xmlDoc;
}
//判断字符串在n到n个之间或n个以上.
function checkStrLength(str,startLen,endlen){
	if (str == null) return false;
	var len = str.length;
	var sl = 0;
	for(i=0; i<len; i++) {
		if ((str.charCodeAt(i) & 0xff00)!= 0){
			sl++;
		}
		sl++;
	}
	if (startLen==0||startLen==null){//n个以上
		if (sl<endlen){return false;}		
	}else{//n到n个之间
		if (sl>endlen||sl<startLen){return false;}
	}
	return true;
}
//获取框架对象
function getIframeObj(IframeName,objName)
{
	var IframeName = $(IframeName);
    if (IframeName.contentDocument){
        iFrameDoc = IframeName.contentDocument;//NS6
    }else if (IframeName.contentWindow){
        iFrameDoc = IframeName.contentWindow.document;//IE5.5 and IE6
    }else if (IframeName.document){
        iFrameDoc = IframeName.document;//IE5
    }
    return iFrameDoc.getElementById(objName);
}
//获取对象左上坐标
function getOffsetLeft(objid){
  var obj=$(objid),
      left=0;
	  while(obj.offsetParent){
		 left+=obj.offsetLeft;
			 obj=obj.offsetParent;                
	  }
	  return left;
}
//获取对象左下坐标
function getOffsetTop(objid){
  var obj=$(objid),
      top=0;
	  while(obj.offsetParent){
		 top+=obj.offsetTop;
			 obj=obj.offsetParent;                
	  }
	  return top;
}
//获取滚动条的Top值
function getScrollTop(){
	var top;
	if(typeof window.pageYOffset != 'undefined'){ 
	   top = window.pageYOffset; 
	}else if(typeof document.compatMode != 'undefined' && document.compatMode != 'BackCompat'){ 
	   top = document.documentElement.scrollTop; 
	}else if(typeof document.body != 'undefined'){ 
	   top = document.body.scrollTop; 
	}
	return top;
}
//生成提示
function createNote(text,w,h){
	if (!w||w<1){w = 'auto';}else{w = w+'px';};
	if (!h||h<1){h = '20px';}else{h = h+'px';};
	return '<DIV style="BACKGROUND-IMAGE: url('+web_config.siteurl+'images/common/icon_error.gif); POSITION: relative; BACKGROUND-REPEAT: no-repeat; BACKGROUND-POSITION: 2px 2px;float:left;margin:5px 0px;BORDER: #ffcb99 1px solid; WIDTH: '+w+'; HEIGHT: '+h+'; line-height:20px; FONT-SIZE: 12px;">&nbsp;&nbsp;&nbsp;&nbsp;'+text+'</DIV>';
	//return '<DIV style="margin:5px;BORDER: #ffcb99 1px solid; WIDTH: '+w+'; HEIGHT: '+h+'; line-height:20px; FONT-SIZE: 12px;"><font color=red><strong>&nbsp;×&nbsp;</strong></font>'+text+'</DIV>';
}

//加载ajax
function loadAjaxData(url,pars,getAjaxName,backfunction){
	eval(getAjaxName+'=  new webAjax('+backfunction+');')
	eval(getAjaxName).post(url,pars);
}
//ajax修改信息
function ajaxEditInfo(fileName,pars){
	var xmlhttp = new webAjax('');
	var msg = xmlhttp.getXmlDoc(fileName,pars,'POST');
	if (msg=='succeed'){
		document.location.reload();
	}else{
		alert('Sorry,提交出错。');	
	}
}
//跳转页
function goto(url){
	document.location.href(url);
}
//分割字符串
function strSplit(str,separator){
	var string = $(str).value;
	return string.split(separator);
}
//判断是否是数组
function isArray(obj){ 
    return (typeof obj=='object')&&obj.constructor==Array; 
}
//获取url文件名
function GetUrlFileName(){
  var url = window.location.href,
      fileName = '';
  var s = url.lastIndexOf('/')+1;
  var lastStr = url.substr(s);
  
  if (lastStr.indexOf('?')!=-1){
  	fileName = lastStr.substr(0,lastStr.indexOf('?'))
  }else{
 	 fileName = url;
  }
  return fileName;
}
//接收地址栏参数
function getParameter(param)
{
var query = window.location.search;
var iLen = param.length;
var iStart = query.indexOf(param);
if (iStart == -1)
　return "";
iStart += iLen + 1;
var iEnd = query.indexOf("&", iStart);
if (iEnd == -1)
　return query.substring(iStart);
return query.substring(iStart, iEnd);
}
//检测IE浏览器版本
function getIEVer(){
	var iVerNo = 0;
	var sVer = navigator.userAgent;
	if(sVer.indexOf("MSIE")>-1){
		var sVerNo = sVer.split(";")[1];
		sVerNo = sVerNo.replace("MSIE","");
		iVerNo = parseFloat(sVerNo);
	}
	return iVerNo;
}
//添加收藏夹
function myAddPanel(title,url)
{
    if ((typeof window.sidebar == 'object') && (typeof window.sidebar.addPanel == 'function')){
        window.sidebar.addPanel(title,url,"");
    }else{
        window.external.AddFavorite(url,title);
    }
}
function redirect(url)
{
	if(url.lastIndexOf('/.') > 0) url = url.replace(/\/(\.[a-zA-Z]+)([0-9]+)$/g, "/$2$1");
	if(url.indexOf('://') == -1 && url.substr(0, 1) != '/' && url.substr(0, 1) != '?') url = $('base').attr('href')+url;
	location.href = url;
}
//加提示跳转地址
function confirmurl(url,message)
{
	if(confirm(message)) redirect(url);
}

function confirmform(form,message)
{
	if(confirm(message)) form.submit();
}
//图片上传
function openUploadFile(path,width,height)
{
	var gIsIE = document.all;
	var gIEVer = fGetIEVer();
	
	if (width!=""){
	var filewidth = width;
	}else{
	var filewidth = 410;
	}
	if (height!=""){
	var fileheight = height;
	}else{
	var fileheight = 140;
	}
	if (filepath!=""){
	var filepath=path;
	}else{
	var filepath = 'uploadimg.php?' + window.parent.document.getElementById('imgurl').value;
	}
	if(gIEVer>=4.0||(window.showModalDialog!=null&&window.showModalDialog!='')){

	var retval = window.showModalDialog(filepath, window, "dialogWidth:"+ filewidth +"px; dialogHeight:"+ fileheight +"px; center:yes; help: no; scroll: no; status:no; directories:yes;scrollbars:no;Resizable=yes;");
	
	if(retval!=null)
	return retval;
	
	}else{
	
	window.open(filepath,"","width="+ filewidth +",height="+ fileheight +",menubar=no,toolbar=no,location=no,scrollbars=no,status=no,modal=yes");

	return;
	
	}
}
//将html转换为javascript
function htmlToScript(html) 
{ 
 var value = html; 
 value  = value.replace(/\\/gi,"\\\\").replace(/"/gi,"\\\"").replace(/'/gi,"\\\'") 
 valArr = value.split("\r\n") 
 value="" 
  
 for (i=0; i<valArr.length; i++) 
 { 
  value += (i==0) ? "info =" : "" 
  value += "  \"" + valArr[i] 
  value += (i!=valArr.length-1) ? "\" +\"\\n\"+\n" : "\"\n"  
 } 
 //value+="\ndocument.write(info)" 
  
 //html.value = value;
 return info;
} 

//频道切换
function changeOver(objName,objId,num,contentid){
    for(i=0;i<num;i++){
		$(objName+i).className="h_bg2";
		$(contentid+i).style.display = "none";
	}
	$(objName+objId).className="h_bg1";
	$(contentid+objId).style.display = "";
}

//显示/隐藏
function SORH(objId,imgpath,objPrefix,imgPrefix){
	var obj = $(objPrefix+objId),
		obj_img = $(imgPrefix+objId);
	if (obj.style.display=="none"){
	  obj.style.display="block";
	  obj_img.src=imgpath+"-.gif";
	}else{
	  obj.style.display="none";
	  obj_img.src=imgpath+"+.gif";
	}
}
function showORhide(objId){
	var obj = $(objId);
	if (obj.style.display=="none"){
	  obj.style.display="block";
	}else{
	  obj.style.display="none";
	}
}

//显示一个，隐藏其它
function showOne(objName,objId,num){
    for(i=0;i<num;i++){
		$(objName+i).style.display = "none";
	}
	$(objName+objId).style.display = "block";
}

//获取redio选中的值
function getRedioSelectedValue(redioName)
{
	var obj = $$(redioName);
	var len = obj.length;
	var v = '';
	if (len>0){
		for(var i=0;i<len;i++){
			if (obj[i].checked){
				v = obj[i].value;
				break;
			}
		}
	}
	return v;
}
//判断redio是否选中
function isRedioChecked(redioName,iframeId)
{
	if (iframeId){
	var obj = getIframeObj(iframeId,redioName);
	}else{
	var obj = $$(redioName);
	}
	var len = obj.length;
	var r = false;
	if (len>0){
		for(var i=0;i<len;i++){
			if (obj[i].checked){
				r = true;
				break;
			}
		}
	}
	return r;
}
//判断复选框是否选中
function isCheckbox(boxName)
{
	var obj = $$(boxName+'[]');
	var len = obj.length;
	var r = false;
	if (len>0){
		for(var i=0;i<len;i++){
			if (obj[i].checked){
				r = true;
				break;
			}
		}
	}
	return r;
}

//获取某对象数组所有不为空的值
function getObjArrValue(objid,joinSign)
{
	var objs = $$(objid+'[]');
	var len = objs.length;
	var v = '';
	if (len>0){
		for(var i=0;i<len;i++){
			if (objs[i].value!=''){
				v += objs[i].value+joinSign;
			}
		}
		var joinLen = joinSign.length
  		v = v.substr(0,v.length-joinLen);
	}
	return v;
}

//动态添加select的option
function addSelectOption(arrData,selectName){
	var len = arrData.length;
	var addSelect = $(selectName);
	if (len>0){
		addSelect.style.display = "block";
		addSelect.options.length = 0;
		for (var i=0;i<len;i++){
			var text = arrData[i][1].replace(/:/g,' > ');
			addSelect.options.add(new Option(text,arrData[i][0]));
		}
	}	
}
//获取select下option所有值
function getSelectAllValue(selectName,joinSign){
	var sn = $(selectName),
	     ol = sn.options.length,
		 v = '';
	if (ol>0){
		for(var i=0;i<ol;i++){
			v += sn.options[i].value+joinSign;
		}
		var joinLen = joinSign.length
		v = v.substr(0,v.length-joinLen);
	}
	return v;
}

//图片轮换
function imgFocus(_w,_h,_th,_pics,_links,_texts,_focuspath){
	var focus_width=_w;
	var focus_height=_h;
	var text_height=_th;
	var swf_height = focus_height+text_height;

	var pics=_pics;
	var links=_links;
	var texts=_texts;
	var focuspath = _focuspath+'indexlogo/flash/focus.swf';
	var content = '';
	content +='<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">';
	content +='<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="'+focuspath+'"><param name="quality" value="high"><param name="bgcolor" value="#ffffff">';
	content +='<param name="menu" value="false"><param name=wmode value="opaque">';
	content +='<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">';
	content +='<embed src="'+focuspath+'" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#ffffff" quality="high" width="'+ focus_width +'" height="'+ focus_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';	
	content +='</object>';
	document.write(content);
}

/*
//title提示信息
function titleEffect(e)
{
ee = e || event;
var element = ee.srcElement || ee.target;
var body = document.body;
var tip = document.getElementById("tip-div");
if (!tip){
	tip = document.createElement("div");
	tip.id = "tip-div";
	with (tip.style){
		display = "none";
		color = "#000";
		backgroundColor = "#FFFFE1";
		border = "1px solid #000000";
		fontSize = "12px";
		padding = "2px";
		lineHeight = "16px";
		position = "absolute";
		left = "0px";
		top = "0px";
		zIndex = 2000;//保证层会处于最上层
	}
	body.appendChild(tip);
}
var title = element.getAttribute("title") || element.getAttribute("_title");
if (!title) return (tip.style.display=="block") && (tip.style.display="none") || true;
if (element.getAttribute("title")){
	element.setAttribute("title", "");
	element.setAttribute("_title", title);
}
tip.style.display = "block";
tip.innerHTML = title;
var left = body.scrollLeft + ee.clientX+15;
	left = (left>body.clientWidth-tip.clientWidth) ? (left-tip.clientWidth) : left;
var top = body.scrollTop + ee.clientY+21;
	top = (top>body.clientHeight-tip.clientHeight) ? (top-tip.clientHeight) : top;
tip.style.left = left + "px";
tip.style.top = top + "px";
return true;
}
setTimeout(function(){document.onmousemove = titleEffect;},2000);//延时1秒加载
*/

<!--
/*
	创建实例:
		//参数直接赋值法
		new Marquee("marquee")
		new Marquee("marquee","top")
		......
		new Marquee("marquee",0,1,760,52)
		new Marquee("marquee","top",1,760,52,50,5000)
		......
		new Marquee("marquee",0,1,760,104,50,5000,3000,52)
		new Marquee("marquee",null,null,760,104,null,5000,null,-1)

		//参数动态赋值法
		var marquee1 = new Marquee("marquee")	*此参数必选
		marquee1.Direction = "top";	或者	marquee1.Direction = 0;
		marquee1.Step = 1;
		marquee1.Width = 760;
		marquee1.Height = 52;
		marquee1.Timer = 50;
		marquee1.DelayTime = 5000;
		marquee1.WaitTime = 3000;
		marquee1.ScrollStep = 52;
		marquee1.Start();

	参数说明:
		ID		"marquee"	容器ID		(必选)
		Direction	(0)		滚动方向	(可选,默认为0向上滚动) 可设置的值包括:0,1,2,3,"top","bottom","left","right" (0向上 1向下 2向左 3向右)
		Step		(1)		滚动的步长	(可选,默认值为2,数值越大,滚动越快)
		Width		(760)		容器可视宽度	(可选,默认值为容器初始设置的宽度)
		Height		(52)		容器可视高度	(可选,默认值为容器初始设置的高度)
		Timer		(50)		定时器		(可选,默认值为30,数值越小,滚动的速度越快,1000=1秒,建议不小于20)
		DelayTime	(5000)		间歇停顿延迟时间(可选,默认为0不停顿,1000=1秒)
		WaitTime	(3000)		开始时的等待时间(可选,默认或0为不等待,1000=1秒)
		ScrollStep	(52)		间歇滚动间距	(可选,默认为翻屏宽/高度,该数值与延迟均为0则为鼠标悬停控制,-1禁止鼠标控制)

　使用建议:
		1、建议直接赋予容器的显示区域的宽度和高度，如(<div id="marquee" style="width:760px;height:52px;">......</div>)
		2、建议为容器添加样式overflow = auto，如(<div id="marquee" style="width:760px;height:52px;overflow:auto;">......</div>)
		3、为了更准确的获取滚动区域的宽度和高度，请尽可能将各滚动单位直接赋予正确宽高度
		4、对于TABLE标记的横向滚动，需要对TABLE添加样式display = inline，如(<div id="marquee" style="width:760px;height:52px;overflow:auto;"><table style="display:inline">......</table></div>)
		5、对于翻屏滚动或间歇滚动，要注意各滚动单位间的间距，同时需要对容器的可视高度和可视宽度做好准确的设置，对于各滚动单位间的间距可以通过设置行间距或者单元格的高宽度来进行调整
		6、对于LI自动换行的问题暂时没有更好的解决办法，建议将其转换成表格(TABLE)的形式来达到同等的效果
		7、针对横向滚动的文字段落，如果最末端是以空格" "结束的，请将空格" "转换成"&nbsp;"
		8、鼠标悬停滚动思想源自Flash，所以有一定的局限性（容器内仅允许用图片<img>或者带链接的图片<a><img></a>的形式，并需要禁止其自动换行）
		
		演示地址:http://www.popub.net/script/MSClass.html
　		下载地址:http://www.popub.net/script/MSClass.js

*/
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.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;
	}
}
//-->

//-- 滚动横幅-->
function slideBanner(ul, delay, speed, lh) {
var slideBox = (typeof ul == 'string')?document.getElementById(ul):ul;
var delay = delay||1000, speed=speed||20, lh = lh||20;
var tid = null, pause = false;
var start = function() {
tid=setInterval(slide, speed);
}
var slide = function() {
if (pause) return;
slideBox.scrollTop += 2;
if (slideBox.scrollTop % lh == 0) {
clearInterval(tid);
slideBox.appendChild(slideBox.getElementsByTagName('li')[0]);
slideBox.scrollTop = 0;
setTimeout(start, delay);
}
}
slideBox.onmouseover=function(){pause=true;}
slideBox.onmouseout=function(){pause=false;}
setTimeout(start, delay);
}
