﻿var mf=myFocus;

var html=mf.$('myFocus-wrap').innerHTML;

function getParam(){

	return {

		id:'myFocus',                            //����id

		path:'/templates/cn/js/pattern/',                  //���Ŀ¼        

		pattern:'mF_expo2010',                   //����ͼ���

		time:3,                                  //�����ٶ�

		trigger:'mouseover',                     //��ť�¼�

		width:258,                              //���

		height:240,                              //�߶�

		txtHeight:0,                             //�������߶� 0����

		auto:true,                               //�Զ�����

		autoZoom:false,                          //�ȱ�����

		wrap:false,                              //�߿�

		index:0,                                 //��ʼͼƬ

		delay:'50',                             //��ť�ӳ�

		//�������

		duration:'',                             //�˶��ٶ� 400,600,1000

		direction:'left',                        //�˶����� left,right,top,bottom

		easing:'linear',                         //�˶���ʽ  linear����

		less:1,                                  //�Ƿ��޷�

		chip:'',                                 //ͼ��Ƭ����

		type:4,                                  //��ƬЧ�� 4���

		pad:'',                                  //ͼƬ��߿��

		txtWidth:'',                             //���ֶο��

		gray:1,                                  //�ǵ�ǰͼƬ�Ƿ���

		direct:'one',                         //�г����� random���  one����

		turn:'random',                           //���Ʒ���

		waiting:false

	};

}



myFocus.set(getParam(),true,function(){

	displayParam();

});

window.onerror=function(){return true};







var stopscroll = false; 

var scrollElem = document.getElementById("andyscroll"); 

var marqueesHeight = scrollElem.style.height; 

scrollElem.onmouseover = new Function('stopscroll = true'); 

scrollElem.onmouseout = new Function('stopscroll = false'); 

var preTop = 0; 

var currentTop = 0; 

var stoptime = 0; 

var leftElem = document.getElementById("scrollmessage");  

scrollElem.appendChild(leftElem.cloneNode(true)); 

init_srolltext(); 



function init_srolltext(){ 

 scrollElem.scrollTop = 0; 

 setInterval('scrollUp()', 50);//������������25, ��ȷ�������ٶȵ�, ��ֵԽС, �ٶ�Խ�� 

} 

function scrollUp(){ 

 if(stopscroll) return; 

 currentTop += 2; //��Ϊ1, ����ʵ�ּ�Ъʽ�Ĺ���; ��Ϊ2, ������������ 

 if(currentTop == 23) {   // ��Ъ��һ�θ߶�

 stoptime += 1; 

 currentTop -= 1; 

 if(stoptime == 50) {  //ͣ��ʱ��

 currentTop = 0; 

 stoptime = 0; 

 } 

 }else{ 

 preTop = scrollElem.scrollTop; 

 scrollElem.scrollTop += 1; 

 if(preTop == scrollElem.scrollTop){ 

 scrollElem.scrollTop = 0; 

 scrollElem.scrollTop += 1; 

 } 

 } 

} 