﻿//**************************************************************
//*** 前台效果代码：兼容IE6,IE7,FF；各效果不冲突；兼容有无DOCTYPE定义；
//*** 但建议使用标准DOCTYPE定义。       by Peace(XieYS) 2009-03-28
//***************************************************************/


//****************** 选项切换代码 */
function SwhChang(xDiv)
{
  for(var i=1;i<5;i++){ 
    ItemID = getElmID("SwhItem0"+i+"");
	IDivID = getElmID("SwhIDiv0"+i+"");
	if (xDiv==i){
	  IDivID.style.display='';
	  IDivID.style.visibility='visible';
      ItemID.className="SwhItmB";
	}else{
	  IDivID.style.display='none';
	  IDivID.style.visibility='hidden';
	  ItemID.className="SwhItmA";
  } }
}
//SwhChang(1);



//****************** 左滚动代码 */
function mLeftMar(){
  if(getElmID("mLeftDiv2").offsetWidth-getElmID("mLeftDiv0").scrollLeft<=0)
    getElmID("mLeftDiv0").scrollLeft-=getElmID("mLeftDiv1").offsetWidth;
  else {getElmID("mLeftDiv0").scrollLeft++;}
}
var mLeftSpeed = 29;//速度数值越大速度越慢
getElmID("mLeftDiv2").innerHTML=getElmID("mLeftDiv1").innerHTML;
var mLeftObj=setInterval(mLeftMar,mLeftSpeed);
getElmID("mLeftDiv0").onmouseover=function() {clearInterval(mLeftObj);}
getElmID("mLeftDiv0").onmouseout=function() {mLeftObj=setInterval(mLeftMar,mLeftSpeed);}


//****************** 右滚动代码 */
function mRightMar(){
  if( getElmID("mRightDiv2").offsetWidth-getElmID("mRightDiv0").scrollLeft>=0)
    getElmID("mRightDiv0").scrollLeft+=getElmID("mRightDiv1").offsetWidth;
  else {getElmID("mRightDiv0").scrollLeft--;}
}
//var mRightSpeed = 31;//速度数值越大速度越慢
//getElmID("mRightDiv2").innerHTML=getElmID("mRightDiv1").innerHTML;
//var mRightObj=setInterval(mRightMar,mRightSpeed);
//getElmID("mRightDiv0").onmouseover=function() {clearInterval(mRightObj);}
//getElmID("mRightDiv0").onmouseout=function() {mRightObj=setInterval(mRightMar,mRightSpeed);}


