PageSourceSearch

https://lining.com/other/script/my_lab.js

js lining.com collected 2026-10-02 04:09:24 UTC 61,379 bytes, 1,975 lines download raw bytes

1// JavaScript Document
2
3/*----兼容随记-----*/
4/*
5 innerHTML是符合W3C标准的属性,而innerText只适用于IE浏览器,因此,尽可能地去使用innerHTML,而少用innerText,如果要输出不含HTML标签的内容,可以使用innerHTML取得包含HTML标签的内容后,再用正则表达式去除HTML标签,下面是一个简单的符合W3C标准的示例:
6 <a href="javascript:alert(document.getElementById('test').innerHTML.replace(/<.+?>/gim,''))">无HTML,符合W3C标准</a>
7*/
8
9
10//---------------------------------------------------------------清单
11/*DOM操作
12  <1>.hasClass(obj, sClassName);
13  <2>.addClass(obj, newClass);
14  <3>.removeClass(obj,delClass);
15  <4>.getByClass(oParent,sClass,tagName);
16  <5>.getStyle(obj,attr);  获取样式
17  	  css(obj,option,val); 设置样式
18  <6>.css3(obj,attr,val);
19  <7>.getChildAttr( oParent, tagName, attr ); 获取元素属性
20  <8>.图片加载:
21      1. loadImgArr( loadImgSrcArr, loadingFn, callBack );
22	  2. loadImg( obj, src, callBack, error );
23  	  3. loadScript(src,callback,target,error);
24  <9>.myDelegate(oP,tar,evt,fn)  
25  	
26*/
27
28/*BOM操作
29  <1>.----browerMaster.than2(name,num,MoL);	[ name : msie,firefox,opera,chrome,safari ]  [ num ]  [ MoL : gt,gte,lt,lte,eq ]
30      ----browerMaster.desMes()  浏览器的基本信息
31  
32  <2>.获取元素距离屏幕左侧和顶部的真实距离
33      getOffsetPos(obj)
34	  
35  <3>.scrollH();
36      offsetH();
37	  scrollT();
38	  getMax([myLab.viewH(),myLab.scrollH(),myLab.offsetH()])  获取遮罩层的最大高度
39 
40  <4>.视窗的宽度,高度
41       viewH();
42	   viewW();
43	   
44  <5>.get方式传参
45	 GetRequest();
46	 例子:whichIndex是参数的名字  
47	 URL: http://www.baidu.com?whichIndex=1
48	 var Request = new Object();
49	 Request = GetRequest();
50	 var actionIndex = Request['whichIndex'];
51	 if(actionIndex){
52		setTimeout(function(){
53			aBtns.eq(actionIndex).trigger('click');
54		},500);
55	 }	
56	 
57  <6>.PC端判断 返回布尔值
58      isPc();   
59  	  
60*/
61
62/*UI
63  <1>.自定义滚动条 scrollNorm.scrollMoveTo(val); 移动到某处
64                 scrollNorm.resizeFn();  滚动条resize				 
65  		 				   				   
66*/
67
68/*基础层
69  <1>.getMax(arr);
70  <2>.bindEvent(obj,evt,fn);
71  <3>.delEvent(obj,evt,fn);
72  <4>.date_getTime();  获取时间 ms
73
74*/
75
76/*运动
77   <0>.scrollToTar(tar,fn); //滑动到某个区域
78   <1>.oldStartMove(obj, json, fn);   
79   <2>.startMove(obj,json,times,fx,fn,fnMove);   
80   <3>.shake(obj,attr,callBack);
81   <4>.getClose(obj,target);
82*/
83
84/*移动端开发
85  
86  <1> function touch( json, toLeftFn, toRightFn, toMoveFn )	
87  //json: {  obj:'', dirType:'pageX'/'pageY', moveObj:'', endObj:'' }
88  //toLeftFn : 左/上
89  //toRightFn : 右/下
90  //toMoveFn: 移动中回调 ( 移动的新坐标,移动的距离 )
91*/
92
93/*移动端自定义滚动条
94  phoneScrollNorm(json) json见下面demo
95*/
96
97//摇一摇
98//shakeMobile(fn)
99
100/*
101	正则常用
102	var str=str.replace(/<\/?[^>]*>/gim,"");//去掉所有的html标记
103	var result=str.replace(/(^\s+)|(\s+$)/g,"");//去掉前后空格
104	return  result.replace(/\s/g,"");//去除文章中间空格
105
106	//手机操作
107	禁止弹出选择菜单:
108	document.documentElement.style.webkitTouchCallout = "none"; 
109*/
110
111//-----------------------------------------------------------【 myLab 】
112;(function( window, document, undefined ){
113	
114	var myLab = {
115		
116		//---------------【 DOM 】
117		firstSonEle : function(oParent){
118			return oParent.firstElementChild || oParent.firstChild;	
119		},
120		
121		lastSonEle : function(oParent){
122			return oParent.lastElementChild || oParent.lastChild;	
123		},
124		
125		prevEle : function(obj){
126			return obj.previousElementSibling || obj.previousSibling;
127		},
128		
129		nextEle : function(obj){
130			return obj.nextElementSibling || obj.nextSibling;
131		},
132		
133		addClass : function(obj,newClass){
134			var oldClass = obj.className;
135			var oldClassArr = [];
136			
137			if(oldClass=='' || oldClass==null){
138				obj.className = newClass;	
139			}else{
140				oldClassArr = oldClass.split(' ');	
141				for(var i=0; i<oldClassArr.length; i++){
142					if(oldClassArr[i]!=' '&& oldClassArr[i]==newClass){
143						break;	
144					}	
145				}
146				obj.className = oldClass+' '+newClass;
147			} 	
148		},
149		
150		removeClass : function(obj,delClass){
151			var oldClass = obj.className;
152			var oldClassArr = [];
153			var newClassArr = [];
154			
155			if(oldClass=='' || oldClass==null){
156				return;
157			}else{
158				oldClassArr = oldClass.split(' ');	
159				for(var i=0; i<oldClassArr.length; i++){
160					if(oldClassArr[i]!=' '&& oldClassArr[i]!=delClass){
161						newClassArr.push(oldClassArr[i]);
162					}	
163				}
164				obj.className = newClassArr.join(' ');
165			} 	
166		},
167		
168		getById : function(tagId){
169			return document.getElementById(tagId);
170		},
171		
172		getByClass : function(oParent,sClass,tagName){
173			var aEle = [],result = [];
174			if( tagName && typeof tagName == 'string'){
175				aEle = oParent.getElementsByTagName(tagName);	
176			}else{
177				aEle = oParent.getElementsByTagName('*');
178			}
179			
180			if(!tagName && oParent.getElementsByClassName){
181				return oParent.getElementsByClassName(sClass); //性能考虑
182			}else{
183				var re = new RegExp('(^|\\s)' + sClass + '($|\\s)', 'i');
184				for(var i = 0; i < aEle.length; i++){
185					if(re.test(aEle[i].className)){
186						result.push(aEle[i]);
187					}
188				}
189				return result;
190			}
191		},
192		
193		hasClass : function(obj, sClassName){
194			var hasBtn = false;
195			var sClass =  obj.className;                  
196			if (sClass == '') {							  
197				hasBtn = false;
198			} else {									  
199				var aClass = sClass.split(' ');				
200				for (var i=0; i<aClass.length; i++) {	  
201					if (aClass[i] == sClassName) {
202						hasBtn = true;                          
203					}
204				}
205			}
206			return hasBtn;
207		},
208		
209		/*function css(obj,attr,val){
210			if(!val){
211				return obj.currentStyle ? obj.currentStyle[attr] : getComputedStyle(obj,false)[attr];
212			}else{
213				obj.style[attr] = val;
214			}
215		}*/
216		
217		getStyle : function( obj, attr ){
218			function getResult( rAttr ){
219				return obj.currentStyle ? obj.currentStyle[rAttr] : getComputedStyle( obj )[rAttr]
220			};
221			
222			var result = getResult( attr );
223			if( attr === "opacity" && typeof result === "undefined" ) return 1;
224			if( result === "auto" ){
225				
226				if( attr !== "width" && attr !== "height" && attr.indexOf("margin") === -1 && attr !== "left" && attr !== "right" && attr !== "top" && attr !== "bottom" ) return result;
227				var sPosition = myLab.getStyle(obj, "position");
228				
229				if( sPosition !== "absolute" && sPosition !== "fixed" ){
230					switch( attr ){
231						case "marginLeft"  : return myLab.getOffsetPos(obj).l - myLab.getOffsetPos(obj.parentNode).l + "px";
232						case "marginRight" : return obj.parentNode.offsetWidth - obj.offsetWidth - ( myLab.getOffsetPos(obj).l - myLab.getOffsetPos(obj.parentNode).l ) + "px";
233						case "marginBottom": return obj.parentNode.offsetHeight - obj.offsetHeight - ( myLab.getOffsetPos(obj).t - myLab.getOffsetPos(obj.parentNode).t ) + "px";
234						case "width"       : return obj.parentNode.offsetWidth + "px";
235					};
236				};
237				
238				if( attr === "width" || attr === "height" || attr.indexOf("margin") !== -1 || attr === "left" || attr === "right" || attr === "top" || attr === "bottom" && sPosition === "absolute" || sPosition === "fixed" ){
239					return 0 + "px";
240				};
241			};
242			return result;
243		},
244		
245		css : function( obj, option, val ){
246			if( myLab.isJson( option ) ){
247				for( var attr in option ){
248					if( attr !== "opacity" ){
249						var temp = Number(option[attr]);
250						var newVal = typeof option[attr] === "number" && temp === temp ? option[attr] + "px" : option[attr];
251						obj.style[attr] = newVal;
252					} else {
253						obj.style[attr] = option[attr];
254						obj.style.filter = 'alpha(opacity='+ option[attr]*100 +')';
255					};
256				};
257			}else{
258				if(!val){
259					return myLab.getStyle(obj,option);
260				}else{
261					obj.style[option] = val;
262				};
263			};
264		},
265		
266		css3 : function(obj,attr,val){
267			var str = attr.charAt(0).toUpperCase() + attr.substring(1);
268			
269			obj.style['Webkit'+str] = val;
270			obj.style['Moz'+str] = val;
271			obj.style['ms'+str] = val;
272			obj.style['O'+str] = val;
273			obj.style[attr] = val;
274		},
275		
276		getChildAttr : function( oParent, tagName, attr ){
277			var aEle = oParent.getElementsByTagName(tagName);
278			var arr = [];
279			attr = attr === "class" && aEle[0].getAttribute("className") !== null ? "className" : attr;
280			
281			for(var i = 0; i < aEle.length; i++){
282				var attrVal = attr === "style" ? aEle[i].style.cssText : aEle[i].getAttribute(attr);
283				
284				if( attrVal === "" || typeof attrVal !== "string" ){
285					continue;
286				} else {
287					arr.push( attrVal );
288				};
289			};
290			return arr;
291		},
292		
293		loadImgArr : function( loadImgSrcArr, loadingFn, callBack ){
294			var loadI = 0;//初始化的进度数
295			var totalImg = loadImgSrcArr.length;//统计页面图片总数
296			//载入loading数据
297			for (var i = 0; i < totalImg; i++) {
298				var image = new Image();//创建一个图片对象
299				
300				myLab.loadImg( image, loadImgSrcArr[i], function(){
301					
302					loadI ++;
303					var Scale = loadI / totalImg;
304					var percent = Math.floor(Scale * 100);
305					//设置进度数
306					typeof loadingFn == "function" && loadingFn(percent);
307					//当所有图片加载完毕时
308					if(loadI == totalImg){
309						setTimeout(function() {
310							typeof callBack == "function" && callBack();
311						}, 300);
312					};
313					
314				},function(){
315					this.src = '';
316					loadI ++;
317					var Scale = loadI / totalImg;
318					var percent = Math.floor(Scale * 100);
319					//设置进度数
320					typeof loadingFn == "function" && loadingFn(percent);
321					//当所有图片加载完毕时
322					if(loadI == totalImg){
323						setTimeout(function() {
324							typeof callBack == "function" && callBack();
325						}, 300);
326					};	
327				});
328			};
329		},
330		
331		//判断单张图片加载完成方法
332		loadImg : function( obj, src, callBack, error ) {
333			
334			if ( obj.readyState ) { //IE
335				obj.onreadystatechange = function() {
336					if( obj.readyState == "loaded" || obj.readyState == "complete" ) {
337						obj.onreadystatechange = null;
338						typeof callBack == "function" && callBack();
339					}
340				};
341			} else { //Others: Firefox, Safari, Chrome, and Opera
342				obj.onload = function() {
343					typeof callBack == "function" && callBack();
344				};
345			};
346			
347			obj.onerror = function(){ typeof error === "function" && error.call(obj) };
348			
349			obj.src = src;
350		},
351		
352		loadScript : function( src, callBack, target, error ){
353			var script = document.createElement("script");
354			target = typeof target === "undefined" || target === "" || target === null ? "head" : target;
355			document.getElementsByTagName(target)[0].appendChild( script );
356			myLab.loadImg( script, src, callBack, error );
357		},
358		
359		//JSON类型判断
360		isJson : function(obj){
361			var result = typeof(obj) == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length;
362			return result;
363		},
364		
365		//-------------------【 BOM 】
366		viewW : function(){
367			return document.documentElement.clientWidth;		
368		},
369		
370		viewH : function(){
371			return document.documentElement.clientHeight;	
372		},
373		
374		scrollH : function(){
375			return document.body.scrollHeight;	
376		},
377		
378		offsetH : function(){
379			return document.body.offsetHeight;	
380		},
381		
382		scrollT : function(){
383			return document.body.scrollTop || document.documentElement.scrollTop;	
384		},
385		
386		getOffsetPos : function(obj){
387			var result = {'l':0,'t':0};
388			while(obj){
389				result.l += obj.offsetLeft;	
390				result.t += obj.offsetTop;	
391				obj = obj.offsetParent;
392			}
393			return result;	
394		},
395		
396		//get方式传参
397		GetRequest : function() {
398		   var url = location.search; //获取url中"?"符后的字串
399		   var theRequest = new Object();
400		   if (url.indexOf("?") != -1) {
401			  var str = url.substr(1);
402			  strs = str.split("&");
403			  for(var i = 0; i < strs.length; i ++) {
404				 theRequest[strs[i].split("=")[0]]=unescape(strs[i].split("=")[1]);
405			  }
406		   }
407		   return theRequest;
408		},
409		
410		//PC端判断
411		isPc : function() {
412			var userAgentInfo = navigator.userAgent;
413			var agents = new Array("Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod");
414			var flag = true;
415			for (var v = 0; v < agents.length; v++) {
416				if (userAgentInfo.indexOf(agents[v]) > 0) { flag = false; break; }
417			}
418			return flag;
419		},
420		
421		isPad : function() {
422			var userAgentInfo = navigator.userAgent.toLowerCase();
423			var flag = false;
424			if (userAgentInfo.indexOf('ipad')!=-1){ flag = true;}
425			return flag;
426		},
427		
428		isWinphone : function() {
429			var userAgentInfo = navigator.userAgent.toLowerCase();
430			var flag = false;
431			if (userAgentInfo.indexOf('windows phone')!=-1){ flag = true;}
432			return flag;
433		},
434		
435		//微信与否
436		isWechat : function(){
437			return navigator.userAgent.indexOf("MicroMessenger");
438		},
439		
440		//----------------------【 Base 】
441		//绑定事件
442		bindEvent : function(obj,evt,fn){
443			if(obj.addEventListener){
444			   obj.addEventListener(evt,fn,false);
445			}else{
446				obj.attachEvent('on'+evt,function(){
447					fn.call(obj);	
448				})	
449			}	
450		},
451		
452		//删除事件
453		delEvent : function(obj,events,fn){
454			if( obj.removeEventListener ){
455				obj.removeEventListener(events,fn,false);
456			}
457			else{
458				obj.detachEvent('on'+events,fn);
459			}
460		},
461		
462		getMax : function(arr){ 
463			var iMin = -999999; 
464			var iMinIndex = -999999;	
465			for(var i=0; i<arr.length; i++){	
466			   if(arr[i]>=iMin){		
467				  iMin = arr[i];
468				  iMinIndex = i;			
469			   }			
470			}	
471			return {
472				val : iMin,
473				index : iMinIndex
474			};	
475		},
476		
477		date_getTime : function(){
478			var time = new Date();
479			var now = time.getTime();
480			return now;	
481		},
482		
483		//弧度转换角度
484		a2d : function(n){
485			return n*180/Math.PI;
486		},
487		
488		//两个范围内找值
489		rnd : function(n,m){
490			return parseInt(Math.random()*(m-n))+n;
491		},
492		
493		//保留小数点几位
494		floorNum : function(num,pointNum)
495		{	
496			var pointNum = pointNum || 2;
497			if(isNaN(Number(num))){
498				alert('填写的数字格式错误');	
499			}else{
500				num = num + '';	
501				return Number(num.substring(0,num.indexOf('.')+pointNum));
502			}
503			
504			//return( Math.round(num*100)/100);
505		},
506		
507		//è¡¥0
508		addZero : function(num){
509			if(num<10){
510				return "0" + num;
511			}else{
512				return "" + num;
513			}	
514		},
515		
516		/*我的事件委托
517		  tar 可以是委托对象的标签名,或者是类名
518		  支持多事件绑定操作
519		*/
520		myDelegate : function(oP,tar,evt,fn){
521			myLab.bindEvent(oP,evt,function(ev){
522				var oEv = ev || window.event;
523				var oTar = oEv.target || oEv.srcElement;
524				if(oTar.nodeName.toLowerCase()==tar.toLowerCase() || myLab.hasClass(oTar,tar)){
525					fn.call(oTar);
526				}		
527			});
528		},
529		
530		/*字符串加密*/
531		EnEight : function(arr){
532			var resultArr = [];
533			for(var i=0; i<arr.length; i++){
534				var nowVal = arr[i].replace(/(^\s+)|(\s+$)/g,"");
535				if(nowVal!='' || nowVal!=null){
536					nowVal = nowVal+'';
537					var letterArr = [];
538					letterArr = nowVal.split('');
539					
540					for(var j=0; j<letterArr.length; j++){
541						resultArr.push(letterArr[j].charCodeAt(0));
542					}
543				} 
544			}
545			return resultArr;
546		},
547		
548		/*字符串解密*/
549		DeEight : function(arr){
550			var resultStr = '';
551			arr = eval(arr);
552			for(var i=0; i<arr.length; i++){
553				var nowVal = arr[i];
554				if(nowVal!='' || nowVal!=null){
555					resultStr+=String.fromCharCode(Number(nowVal)); 
556				}
557			}
558			return resultStr;
559		},
560		
561		//摇一摇
562		shakeMobile : function(fn){
563			if ( window.DeviceMotionEvent ) {
564				var speed = 25;
565				var x = y = z = lastX = lastY = lastZ = 0;
566				
567				window.addEventListener('devicemotion', function(){
568					var acceleration = event.accelerationIncludingGravity;
569					x = acceleration.x;
570					y = acceleration.y;
571					if (Math.abs(x-lastX) > speed || Math.abs(y-lastY) > speed) {
572						//摇一摇结束后
573						fn && fn();
574					};
575					lastX = x;
576					lastY = y;
577				}, false);
578			} else {
579				alert("亲!您的手机暂不支持摇一摇(*^__^*)");
580			};
581		},
582		
583		
584		//***********===//***ajax*异*步*请*求*数*据***\\===**********\\
585		/*
586		type: 请求的方法 "get" 或 "post", 默认: "get"; (注:jsonp模式下为 "get")
587		url: 发送请求的地址。
588		data: 发送到服务器的数据,url后的传参 'foo=bar1&foo2=bar2'
589		dataType: 服务器返回的数据类型 默认: text
590					"json": 返回 JSON 数据
591					"jsonp": 跨域传输
592					"text": 返回纯文本字符串
593		processData: 是否对 返回结果的数据 自动转换数据格式, 默认: true; (注:jsonp模式下此参数不参与)
594		async: 是否异步加载,默认: true (注:jsonp模式下此参数不参与)
595		cache: 默认: true,设置为 false 将不缓存此页面。 (注:jsonp模式下 默认: false)
596		success: 请求成功时调用此函数,如带参数 data,可获得返回的数据
597		error: 请求失败时调用此函数, 如带参数 data, 则抛出错误信息
598		*/
599		ajax : function( json ){
600			
601			var type = json.type !== "post" || json.dataType === "jsonp" ? "get" : "post";
602			
603			var url = null;
604			if( typeof json.url !== "undefined" &&  json.url && json.url.length > 0 ){
605				url = json.url;
606			} else {
607				alert( "发送请求的地址url必须是字符串且不能为空!" );
608				return;
609			};
610			
611			var data = json.data;
612			//处理发送数据格式
613			if(myLab.isJson( data )){
614				var arr = [];
615				for(var i in data){
616					arr.push(i+'='+data[i]);
617				}
618				data = arr.join('&'); 
619				//alert(data);
620			}
621			
622			var dataType = json.dataType !== undefined && typeof json.dataType === "string" ? json.dataType : "text";
623			var processData = json.processData !== undefined && typeof json.processData === "boolean" ? json.processData : true;
624			var async = json.async !== undefined && typeof json.async === "boolean" ? json.async : true;
625			var cache = json.cache !== undefined && typeof json.cache === "boolean" ? json.cache : true;
626			var jsonpcache = json.cache !== undefined && typeof json.cache === "boolean" && dataType === "jsonp" ? json.cache : false;
627			var success = json.success;
628			var error = json.error;
629			
630			if( !cache ){ data += '&' + this.now(); };
631		
632			if( type === 'get' && data ) { url += '?' + data; };
633			
634			if( dataType === "jsonp" ){ this.jsonp( {"url":url, "cache":jsonpcache, "jsonp": json.jsonp, "success": success, "error": error} ); return; };//调用跨域传输。。。 不执行以下语句!
635			
636			var xhr = null;
637			try {
638				xhr = new XMLHttpRequest();
639			} catch (e) {
640				xhr = new ActiveXObject('Microsoft.XMLHTTP');
641			};
642			
643			xhr.open( type, url, async );
644			//alert(type+','+url)
645			if( type === 'get' ) {
646				xhr.send();
647			} else {
648				xhr.setRequestHeader('content-type', 'application/x-www-form-urlencoded');
649				xhr.send(data);
650			};
651			
652			xhr.onreadystatechange = function() {
653				
654				if ( xhr.readyState == 4 ) {
655					if ( xhr.status == 200 ) {
656						var result = dataType === "json" && processData ? parseTxt( xhr.responseText ) : xhr.responseText;
657						typeof success === "function" && success( result );
658					} else {
659						//出错了。。。
660						typeof error === "function" && error( xhr.status );
661					};
662				};
663				
664			};
665			
666		},
667		
668		parseTxt : function(text) {
669			try {
670				return eval('[' + text + ']')[0];
671			} catch (err) {
672				throw new ReferenceError("转换失败!该字符串不符合转换成对象的格式。");
673			};
674		},
675		
676		//------------------------【 UI 】
677				
678		//自定义滚动条
679		scrollNorm : function(obj,fn){
680			
681			if(!document.getElementById(obj)){return false;}
682			var oBox = document.getElementById(obj);
683			
684			var inColor = '#999';
685			var outColor = '#666';
686			var iT = 0;	
687			var clickT = 0;
688			var person = 0;
689			var iBtnTime = null;
690			var sSpeed = 2;
691			var scrollBarW = 15;
692			
693			//左侧容器
694			var oldcontent = oBox.children[0];
695			var contentOffsetH = document.createElement('div');
696			contentOffsetH.style.cssText = '\
697			position:absolute;\
698				 top:0px;\
699				 left:0px;\
700			  z-index:999;\
701			   width:100%'; 
702			contentOffsetH.innerHTML = oldcontent.innerHTML;	
703			oBox.removeChild(oldcontent);   
704			
705			var contentWindow = document.createElement('div');
706			contentWindow.style.cssText = 'position:absolute;\
707				  top:0px;\
708				 left:0px;\
709			  z-index:999;\
710				width:'+(oBox.clientWidth-scrollBarW-5)+'px;\
711			   height:100%;\
712			   overflow:hidden;';
713			oBox.appendChild(contentWindow);
714			contentWindow.appendChild(contentOffsetH);
715			
716			//滚动条按钮
717			var scrollBtnBox = document.createElement('div');
718			scrollBtnBox.style.cssText = 'position:absolute;\
719				 top:20px;\
720				 right:0px;\
721			  z-index:999;\
722			   height:'+(oBox.clientHeight-40)+'px;\
723			   width:'+scrollBarW+'px;\
724			   background:#222';
725			oBox.appendChild(scrollBtnBox);
726			
727			var scrollBtn = document.createElement('div');
728			scrollBtn.style.cssText = 'position:absolute;\
729				 top:0;\
730				left:0;\
731			  z-index:999;\
732			   width:'+scrollBarW+'px;\
733			   height:0;\
734			   background-color:'+outColor+';\
735			   font-size:0;\
736			   line-height:0;\
737			   overflow:hidden;\
738			   cursor:pointer;';
739			scrollBtnBox.appendChild(scrollBtn);   
740			
741			//上下按钮
742			var topBtn = document.createElement('div');
743			topBtn.style.cssText = '\
744			position:absolute;\
745				 top:0;\
746				right:0px;\
747			  z-index:999;\
748			   width:'+scrollBarW+'px;\
749			   height:15px;\
750			   background-color:'+outColor+';\
751			   font-size:0;\
752			   line-height:0;\
753			   overflow:hidden;\
754			   cursor:pointer;';
755			oBox.appendChild(topBtn);
756			
757			var btmBtn = document.createElement('div');
758			btmBtn.style.cssText = '\
759			position:absolute;\
760			  bottom:0;\
761				right:0px;\
762			  z-index:999;\
763			   width:'+scrollBarW+'px;\
764			   height:15px;\
765			   background-color:'+outColor+';\
766			   font-size:0;\
767			   line-height:0;\
768			   overflow:hidden;\
769			   cursor:pointer;';
770			oBox.appendChild(btmBtn);
771			
772			if(scrollBtn&&scrollBtnBox&&contentWindow&&contentOffsetH){			
773				
774				//运动比例
775				function upAndBtm(){
776					if(iT<0){
777						iT = 0;	
778					}else if(iT>(scrollBtnBox.offsetHeight-scrollBtn.offsetHeight)){
779						iT = scrollBtnBox.offsetHeight-scrollBtn.offsetHeight;	
780					}
781					person = iT/(scrollBtnBox.offsetHeight-scrollBtn.offsetHeight);
782							
783					if(contentOffsetH.offsetHeight > contentWindow.offsetHeight){
784						//contentOffsetH.style.top = -person*(contentOffsetH.offsetHeight - contentWindow.offsetHeight)+"px";	
785						var theTop = -person*(contentOffsetH.offsetHeight - contentWindow.offsetHeight);	
786						myLab.oldStartMove(contentOffsetH,{top:Math.floor(theTop)});
787					}
788					fn && fn(person);
789					scrollBtn.style.top = iT + 'px';
790					//oldStartMove(scrollBtn,{top:iT});
791				}
792				
793				//调整滚动条状态
794				function resizeIt(){
795					contentWindow.style.width = oBox.clientWidth-scrollBarW-5+'px';
796					scrollBtnBox.style.height = oBox.clientHeight-40+'px';
797					
798					
799					//右侧滚动条高度以及显示与否
800					if(contentOffsetH.offsetHeight < contentWindow.offsetHeight){
801						//alert('移除滚动条');
802						scrollBtnBox.style.display = 'none';
803						if(topBtn&&btmBtn){
804							 topBtn.style.display = btmBtn.style.display = 'none';
805						}
806						iT = 0;
807						myLab.oldStartMove(contentOffsetH,{top:0});
808						scrollBtn.style.top = '0';
809					}else{
810						//alert('添加滚动条');
811						scrollBtnBox.style.display = 'block';
812						scrollBtnBox.style.visibility = 'visible';
813						if(topBtn&&btmBtn){
814							 topBtn.style.display = btmBtn.style.display = 'block';
815							 topBtn.style.visibility = btmBtn.style.visibility = 'visible';
816						}
817						
818						//scrollBtn's height				
819						//scrollBtn.style.height = Math.floor(scrollBtnBox.offsetHeight*contentWindow.offsetHeight/contentOffsetH.offsetHeight)+'px';
820						myLab.oldStartMove(scrollBtn,{height:(Math.floor(scrollBtnBox.offsetHeight*contentWindow.offsetHeight/contentOffsetH.offsetHeight))});
821						setTimeout(function(){
822							upAndBtm();
823						},300);
824					};	
825				}
826				resizeIt();
827				
828				//点击滚动条某一位置,动作
829				scrollBtnBox.onclick = function(ev){
830					var oEv = ev || window.event;	
831					var oT = oEv.clientY + myLab.scrollT() - myLab.getOffsetPos(scrollBtnBox).t - clickT; 
832					iT = oT;
833					upAndBtm();
834					oEv.cancelBubble = true;
835				}
836				
837				//滑到某一位置
838				function scrollMoveTo(val){
839					myLab.oldStartMove(contentOffsetH,{top:val});
840					person = -val/(contentOffsetH.offsetHeight - contentWindow.offsetHeight);
841					iT = Math.floor(person*(scrollBtnBox.offsetHeight-scrollBtn.offsetHeight));
842					myLab.oldStartMove(scrollBtn,{top:iT});
843					fn && fn(person);
844				}
845				
846				//按钮滑入滑出效果
847				if(scrollBtn){
848					scrollBtn.onmouseover = function(){ this.style.backgroundColor = inColor;};
849					scrollBtn.onmouseout = function(){ this.style.backgroundColor = outColor;};
850				}
851				if(topBtn){
852					topBtn.onmouseover = function(){ this.style.backgroundColor = inColor;};
853					topBtn.onmouseout = function(){ this.style.backgroundColor = outColor;};
854				}
855				if(btmBtn){
856					btmBtn.onmouseover = function(){ this.style.backgroundColor = inColor;};
857					btmBtn.onmouseout = function(){ this.style.backgroundColor = outColor;};
858				}
859				
860				//上下按钮 函数
861				function btnUpDown(obj,num){
862					obj.onmousedown = function(){
863						clearInterval(iBtnTime);
864						iBtnTime = setInterval(function(){
865							iT = scrollBtn.offsetTop - num;				
866							upAndBtm();	
867						},40);
868					}
869					obj.onmouseup = function(){
870						clearInterval(iBtnTime);	
871					}	
872				}
873				if(topBtn){
874					btnUpDown(topBtn,sSpeed);
875				}
876				if(btmBtn){
877					btnUpDown(btmBtn,-sSpeed);
878				}
879				
880				//拖拽按钮
881				scrollBtn.onmousedown = function(ev){
882					//clearTimer
883					clearInterval(iBtnTime);	
884					var ev = ev || event; 
885					var disY = ev.clientY - scrollBtn.offsetTop;
886					if(scrollBtn.setCapture){
887						scrollBtn.setCapture();	
888					}
889					document.onmousemove = function(ev){
890						var ev = ev || event;
891						iT = ev.clientY - disY;
892						upAndBtm();	
893						clickT = ev.clientY + myLab.scrollT() - myLab.getOffsetPos(scrollBtn).t;
894					}
895					document.onmouseup = function(){
896						document.onmousemove = null;
897						document.onmouseup = null;
898						if(scrollBtn.releaseCapture){
899							scrollBtn.releaseCapture();	
900						}	
901					}
902					return false;	
903				}
904				
905				//鼠标滚动函数
906				var myScrollBtn = '';
907				function myScroll(ev){
908					var ev = ev || event;
909					ev.cancelBubble = true;
910					if(ev.detail){
911						if(ev.detail>0){
912							myScrollBtn = false;
913						}else{
914							myScrollBtn = true;
915						}	
916					}
917					if(ev.wheelDelta){
918						if(ev.wheelDelta>0){
919							myScrollBtn = true;
920						}else{
921							myScrollBtn = false;
922						}	
923					}	
924				
925					if(!myScrollBtn){
926						iT = scrollBtn.offsetTop + sSpeed;	
927					}else{
928						iT = scrollBtn.offsetTop - sSpeed;
929					}
930					
931					upAndBtm();
932					
933					if(ev.preventDefault){
934						ev.preventDefault();	
935					}else{
936						return false;	
937					}
938				}
939				
940				//绑定滚动事件
941				if(scrollBtnBox.addEventListener){
942					scrollBtnBox.removeEventListener("DOMMouseScroll",myScroll,false);
943					contentWindow.removeEventListener("DOMMouseScroll",myScroll,false);
944					scrollBtnBox.addEventListener("DOMMouseScroll",myScroll,false);	
945					contentWindow.addEventListener("DOMMouseScroll",myScroll,false);
946				}
947				scrollBtnBox.onmousewheel = null;
948				contentWindow.onmousewheel = null;
949				scrollBtnBox.onmousewheel = myScroll;
950				contentWindow.onmousewheel = myScroll;
951				
952				return {
953					resizeFn : resizeIt,
954					scrollMoveFn : scrollMoveTo	
955				}
956				
957			}
958		},
959		
960		//-------------------------【 运动 】
961		//不能规定时间的运动
962		oldStartMove : function(obj, json, fn){
963			clearInterval(obj.iTimer);
964			var iSpeed = 0;
965			var iCur = 0;
966			obj.iTimer = setInterval(function(){
967				var iBtn = true;
968				for(var attr in json){
969					
970					if(attr == 'opacity'){
971						iCur = Math.round(parseFloat(myLab.getStyle(obj, 'opacity')) * 100);
972					}else{
973						iCur = parseInt(myLab.getStyle(obj, attr));
974					}
975					
976					iSpeed = (json[attr] - iCur)/4;
977					iSpeed = iSpeed > 0 ? Math.ceil(iSpeed) : Math.floor(iSpeed);
978					
979					if(iCur != json[attr]){
980						iBtn = false;
981					}
982					
983					if(attr == 'opacity'){
984						obj.style.opacity = (iCur + iSpeed) / 100;
985						obj.style.filter = 'alpha(opacity='+ (iCur + iSpeed) +')';
986					}else{
987						obj.style[attr] = iCur + iSpeed + 'px';
988					}
989					
990				}
991				if(iBtn){
992					clearInterval(obj.iTimer);
993					fn && fn();
994				}
995			}, 30);
996		}, 
997		
998		//新的运动
999		startMove : function( obj, json, times, fx, fn, fnMove ){
1000			var isCallBack = true;
1001			var iCur = {};
1002			var type = {};
1003			var timer = null;
1004			for(var attr in json){
1005				if(attr == 'opacity'){
1006					iCur[attr] = Math.round(myLab.getStyle(obj,attr)*100);
1007				} else {
1008					iCur[attr] = parseInt(myLab.getStyle(obj,attr));
1009					type[attr] = typeof json[attr] === "string" && json[attr].indexOf("%") !== -1 ? "%" : "px";
1010					json[attr] = parseInt( json[attr] );
1011				};
1012			};
1013			var startTime = myLab.date_getTime();
1014			clearInterval(timer);
1015			timer = setInterval(function(){
1016				var changeTime = myLab.date_getTime();
1017				var scale = 1 - Math.max(0,(startTime - changeTime + times)/times);
1018				//运动过程中的函数
1019				if(fnMove){
1020					fnMove(scale);
1021				};
1022				
1023				for(var attr in json){
1024					var value = 0;
1025					fx = typeof fx == "undefined" || fx == "" ? "def" : fx;
1026					
1027					value = Tween[fx](scale*times, iCur[attr] , json[attr] - iCur[attr] , times );
1028					if(attr == 'opacity'){
1029						obj.style.filter = 'alpha(opacity='+ value +')';
1030						obj.style.opacity = value/100;
1031					} else {
1032						//百分比情况
1033						obj.style[attr] = value + type[attr];
1034					};
1035					
1036					if(scale == 1){
1037						clearInterval(timer);
1038						if(fn && isCallBack){
1039							fn.call(obj);
1040							isCallBack = false;
1041						};
1042					};
1043					
1044				};
1045				
1046			},13);
1047			
1048			var Tween = {
1049					def: function (t, b, c, d) {
1050						return this["easeOutQuad"](t, b, c, d);
1051					},
1052					easeInQuad: function (t, b, c, d) {
1053						return c*(t/=d)*t + b;
1054					},
1055					easeOutQuad: function (t, b, c, d) {
1056						return -c *(t/=d)*(t-2) + b;
1057					},
1058					easeInOutQuad: function (t, b, c, d) {
1059						if ((t/=d/2) < 1) return c/2*t*t + b;
1060						return -c/2 * ((--t)*(t-2) - 1) + b;
1061					},
1062					easeInCubic: function (t, b, c, d) {
vendor: 4,563 bytes, lines 1063-1180
1063						return c*(t/=d)*t*t + b;
1064					},
1065					easeOutCubic: function (t, b, c, d) {
1066						return c*((t=t/d-1)*t*t + 1) + b;
1067					},
1068					easeInOutCubic: function (t, b, c, d) {
1069						if ((t/=d/2) < 1) return c/2*t*t*t + b;
1070						return c/2*((t-=2)*t*t + 2) + b;
1071					},
1072					easeInQuart: function (t, b, c, d) {
1073						return c*(t/=d)*t*t*t + b;
1074					},
1075					easeOutQuart: function (t, b, c, d) {
1076						return -c * ((t=t/d-1)*t*t*t - 1) + b;
1077					},
1078					easeInOutQuart: function (t, b, c, d) {
1079						if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
1080						return -c/2 * ((t-=2)*t*t*t - 2) + b;
1081					},
1082					easeInQuint: function (t, b, c, d) {
1083						return c*(t/=d)*t*t*t*t + b;
1084					},
1085					easeOutQuint: function (t, b, c, d) {
1086						return c*((t=t/d-1)*t*t*t*t + 1) + b;
1087					},
1088					easeInOutQuint: function (t, b, c, d) {
1089						if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
1090						return c/2*((t-=2)*t*t*t*t + 2) + b;
1091					},
1092					easeInSine: function (t, b, c, d) {
1093						return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
1094					},
1095					easeOutSine: function (t, b, c, d) {
1096						return c * Math.sin(t/d * (Math.PI/2)) + b;
1097					},
1098					easeInOutSine: function (t, b, c, d) {
1099						return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
1100					},
1101					easeInExpo: function (t, b, c, d) {
1102						return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
1103					},
1104					easeOutExpo: function (t, b, c, d) {
1105						return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
1106					},
1107					easeInOutExpo: function (t, b, c, d) {
1108						if (t==0) return b;
1109						if (t==d) return b+c;
1110						if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
1111						return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
1112					},
1113					easeInCirc: function (t, b, c, d) {
1114						return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
1115					},
1116					easeOutCirc: function (t, b, c, d) {
1117						return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
1118					},
1119					easeInOutCirc: function (t, b, c, d) {
1120						if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
1121						return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
1122					},
1123					easeInElastic: function (t, b, c, d) {
1124						var s=1.70158;var p=0;var a=c;
1125						if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
1126						if (a < Math.abs(c)) { a=c; var s=p/4; }
1127						else var s = p/(2*Math.PI) * Math.asin (c/a);
1128						return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
1129					},
1130					easeOutElastic: function (t, b, c, d) {
1131						var s=1.70158;var p=0;var a=c;
1132						if (t==0) return b;  if ((t/=d)==1) return b+c;  if (!p) p=d*.3;
1133						if (a < Math.abs(c)) { a=c; var s=p/4; }
1134						else var s = p/(2*Math.PI) * Math.asin (c/a);
1135						return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
1136					},
1137					easeInOutElastic: function (t, b, c, d) {
1138						var s=1.70158;var p=0;var a=c;
1139						if (t==0) return b;  if ((t/=d/2)==2) return b+c;  if (!p) p=d*(.3*1.5);
1140						if (a < Math.abs(c)) { a=c; var s=p/4; }
1141						else var s = p/(2*Math.PI) * Math.asin (c/a);
1142						if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
1143						return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
1144					},
1145					easeInBack: function (t, b, c, d, s) {
1146						if (s == undefined) s = 1.70158;
1147						return c*(t/=d)*t*((s+1)*t - s) + b;
1148					},
1149					easeOutBack: function (t, b, c, d, s) {
1150						if (s == undefined) s = 1.70158;
1151						return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
1152					},
1153					easeInOutBack: function (t, b, c, d, s) {
1154						if (s == undefined) s = 1.70158; 
1155						if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
1156						return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
1157					},
1158					easeInBounce: function (t, b, c, d) {
1159						return c - this["easeOutBounce"] (d-t, 0, c, d) + b;
1160					},
1161					easeOutBounce: function (t, b, c, d) {
1162						if ((t/=d) < (1/2.75)) {
1163							return c*(7.5625*t*t) + b;
1164						} else if (t < (2/2.75)) {
1165							return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
1166						} else if (t < (2.5/2.75)) {
1167							return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
1168						} else {
1169							return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
1170						}
1171					},
1172					easeInOutBounce: function (t, b, c, d) {
1173						if (t < d/2) return this["easeInBounce"] (t*2, 0, c, d) * .5 + b;
1174						return this["easeOutBounce"] (t*2-d, 0, c, d) * .5 + c*.5 + b;
1175					}
1176				}
1177		},
1178		
1179		//震荡
1180		shake : function( obj, attr, callBack ){
1181			if ( obj.onOff ) return;
1182			obj.onOff = true;
1183			
1184			var pos = parseInt(myLab.getStyle(obj, attr));	
1185			var arr = [];			// 20, -20, 18, -18 ..... 0
1186			var num = 0;
1187			var timer = null;
1188				
1189			for ( var i=20; i>0; i-=2 ) {
1190				arr.push( i, -i );
1191			}
1192			arr.push(0);
1193				
1194			clearInterval( obj.shake );
1195			obj.shake = setInterval(function (){
1196				obj.style[attr] = pos + arr[num] + 'px';
1197				num++;
1198				if ( num === arr.length ) {
1199					clearInterval( obj.shake );
1200					callBack && callBack();
1201					obj.onOff = false;
1202				}
1203			}, 50);
1204		},
1205		
1206		//碰撞
1207		getClose : function(obj,target){
1208			var L1 = obj.offsetLeft;
1209			var T1 = obj.offsetTop;
1210			var W1 = obj.offsetWidth;
1211			var H1 = obj.offsetHeight;
1212			
1213			var L2 = target.offsetLeft;
1214			var T2 = target.offsetTop;
1215			var W2 = target.offsetWidth;
1216			var H2 = target.offsetHeight;
1217		
1218			if( (W1+L1)<L2 || L1>(W2+L2) || (H1+T1)<T2 || T1>(H2+T2) ){
1219				return false;
1220			}else{
1221				return true;
1222			}
1223		},
1224		
1225		//slideDown
1226		mySlideUp : function(obj,num,fn){
1227			if(obj){
1228				var iSpeed = num || 350;
1229				myLab.startMove(obj,{height:0,opacity:0},iSpeed,'def',function(){
1230					this.style.display = 'none';
1231					fn && fn();		
1232				});	
1233			}
1234		},
1235		
1236		//slideUp
1237		mySlideDown : function(obj,num,fn){
1238			if(obj){
1239				var iSpeed = num || 350;
1240				obj.style.opacity = 0;
1241				obj.style.filter = 'aplha(opacity=0)';
1242				obj.style.display = 'block';
1243				obj.style.height = 'auto';
1244				var _tarH = obj.offsetHeight;
1245				obj.style.height = 0;
1246				myLab.startMove(obj,{height:_tarH,opacity:100},iSpeed,'def',function(){
1247					fn && fn();	
1248				});	
1249			}
1250		},
1251		
1252		//-------------------------【 移动端开发 】
1253		//json: {  obj:'', dirType:'pageX'/'pageY', moveObj:'', endObj:'' }
1254		//toLeftFn : 左/上
1255		//toRightFn : 右/下
1256		//toMoveFn: 移动中回调 ( 移动的新坐标,移动的距离 )
1257		touch : function( json, toLeftFn, toRightFn, toMoveFn ){
1258			var obj = null;
1259			if( typeof json.obj !== "undefined" ){
1260				obj = json.obj;
1261			} else {
1262				return;
1263			};
1264			var startObj = typeof json.startObj === "object" ? json.startObj : obj;
1265			var endObj = typeof json.endObj === "object" ? json.endObj : obj;
1266			var moveObj = typeof json.moveObj === "object" ? json.moveObj : obj;
1267			
1268			var dirStr = json.dirType !== "pageY" ? "pageX" : json.dirType;
1269			var dirJson = {
1270				"page"    : dirStr,
1271				"offsetLT": dirStr === "pageX" ? "offsetLeft" : "offsetTop",
1272				"offsetWH": dirStr === "pageX" ? "offsetWidth" : "offsetHeight"
1273			};
1274			
1275			var downVal = 0;
1276			var downLT = 0;
1277			var downTime = 0;
1278			var allowMove = false;
1279			
1280			function startFn(ev){
1281				
1282				var ev = ev || event;
1283				var touchs = typeof ev.changedTouches === "undefined" ? ev : ev.changedTouches[0];
1284				
1285				downVal = touchs[dirJson.page];
1286				downLT = obj[dirJson.offsetLT];
1287				downTime = myLab.date_getTime();
1288				allowMove = true;
1289				
1290			};
1291			
1292			function moveFn(ev){
1293				
1294				if( typeof toMoveFn !== "function" || !allowMove )return;
1295				
1296				var ev = ev || event;
1297				var touchs = typeof ev.changedTouches === "undefined" ? ev : ev.changedTouches[0];
1298				
1299				var touchDistance = touchs[dirJson.page] - downVal;
1300				var moveVal = touchDistance + downLT;
1301				
1302				//移动中...
1303				toMoveFn.call( obj, moveVal, touchDistance );
1304				
1305			};
1306			
1307			function endFn(ev){
1308				if ( !allowMove ) return false;
1309				allowMove = false;
1310				
1311				var ev = ev || event;
1312				var touchs = typeof ev.changedTouches === "undefined" ? ev : ev.changedTouches[0];
1313				
1314				var endX = touchs[dirJson.page] - downVal;
1315				if( endX < 0 ){//←
1316					if( (Math.abs(endX) > obj[dirJson.offsetWH]/3 || (myLab.date_getTime() - downTime < 300 && Math.abs(endX) > 30 )) ){
1317						//dirJson.page = "pageX"向左运动; dirJson.page = "pageY"向上运动
1318						typeof toLeftFn === "function" ? toLeftFn.call( obj ) : "";
1319						
1320					}
1321				} else {//→
1322					if( (Math.abs(endX) > obj[dirJson.offsetWH]/3 || (myLab.date_getTime() - downTime < 300 && Math.abs(endX) > 30 )) ){
1323						//dirJson.page = "pageX"向右运动; dirJson.page = "pageY"向下运动
1324						typeof toRightFn === "function" ? toRightFn.call( obj ) : "";
1325						
1326					}
1327				};
1328			};
1329			
1330			//事件绑定
1331			if(myLab.isPc()){
1332				myLab.bindEvent( moveObj, "mousedown", function(ev){
1333					if(ev.preventDefault){
1334						ev.preventDefault();	
1335					}else{
1336						return false;	
1337					}
1338				});
1339				myLab.bindEvent( startObj, "mousedown", startFn );
1340				myLab.bindEvent( moveObj, "mousemove", moveFn );
1341				myLab.bindEvent( endObj, "mouseup", endFn );
1342			}else if(myLab.isWinphone()){
1343				myLab.bindEvent( moveObj, "MSPointerMove", function(ev){
1344					ev.preventDefault();
1345				});
1346				myLab.bindEvent( startObj, "MSPointerOver", startFn );
1347				myLab.bindEvent( moveObj, "MSPointerMove", moveFn );
1348				myLab.bindEvent( endObj, "MSPointerOut", endFn );	
1349			}else{
1350				myLab.bindEvent( moveObj, "touchmove", function(ev){
1351					ev.preventDefault();
1352				});
1353				myLab.bindEvent( startObj, "touchstart", startFn );
1354				myLab.bindEvent( moveObj, "touchmove", moveFn );
1355				myLab.bindEvent( endObj, "touchend", endFn );		
1356			};
1357			
1358		},
1359		
1360		//手机屏幕方向的检测
1361		addListenScreen : function(){
1362			function listenScreen(){
1363				switch(window.orientation){
1364					case 0 :  alert(1);
1365							   break;
1366					case 90 : alert(2);
1367							   break;
1368					case 180 : alert(3);
1369							   break;
1370					case -90 : alert(4);
1371							   break;		   		   		   	
1372				}
1373			};
1374			listenScreen();
1375			window.addEventListener("onorientationchange" in window ? "orientationchange" : "resize", listenScreen, false);
1376		},
1377		
1378		//移动端,滚动条
1379		/*var kjScroll = phoneScrollNorm({
1380			scrollBtn: oScrollBtn,
1381			scrollBtnBox: oScrollBox,
1382			contentWindow: oSportWin,
1383			contentOffsetH: oSportBox,
1384			fn: '',
1385			topBtn: oScrollTopBtn,
1386			btmBtn: oScrollBtmBtn
1387		});
1388		bindEvent(window, 'resize', function () {
1389			kjScroll.resizeFn();
1390		});
1391		*/
1392		phoneScrollNorm : function(json) {
1393		
1394			var scrollBtn = json.scrollBtn;
1395			var scrollBtnBox = json.scrollBtnBox;
1396			var contentWindow = json.contentWindow;
1397			var contentOffsetH = json.contentOffsetH;
1398			var spBox = contentOffsetH;
1399			var oBox = contentWindow;
1400			var fn = json.fn || null;
1401			var topBtn = json.topBtn || null;
1402			var btmBtn = json.btmBtn || null;
1403			var iT = 0;
1404			var person = 0;
1405			var iBtnTime = null;
1406			var sSpeed = 15;
1407			var iNow = 0;
1408		
1409			if (scrollBtn && scrollBtnBox && contentWindow && contentOffsetH) {
1410		
1411				//运动比例
1412				function upAndBtm() {
1413					if (iT < 0) {
1414						iT = 0;
1415					} else if (iT > (scrollBtnBox.offsetHeight - scrollBtn.offsetHeight)) {
1416						iT = scrollBtnBox.offsetHeight - scrollBtn.offsetHeight;
1417					}
1418					person = iT / (scrollBtnBox.offsetHeight - scrollBtn.offsetHeight);
1419		
1420					if (contentOffsetH.offsetHeight > contentWindow.offsetHeight) {
1421						//contentOffsetH.style.top = -person * (contentOffsetH.offsetHeight - contentWindow.offsetHeight) + "px";
1422						theTop = -person*(contentOffsetH.offsetHeight - contentWindow.offsetHeight);	
1423						myLab.oldStartMove(contentOffsetH,{top:Math.floor(theTop)});
1424					}
1425					fn && fn();
1426					scrollBtn.style.top = iT + 'px';
1427				}
1428		
1429				//调整滚动条状态
1430				function resizeIt() {
1431					//右侧滚动条高度以及显示与否
1432					if (contentOffsetH.offsetHeight < contentWindow.offsetHeight) {
1433						//alert(contentOffsetH.offsetHeight + ',' + contentWindow.offsetHeight);//342 403
1434						//alert('移除滚动条');
1435						scrollBtnBox.style.display = 'none';
1436						if (topBtn && btmBtn) {
1437							topBtn.style.display = btmBtn.style.display = 'none';
1438						}
1439						iT = 0;
1440						myLab.oldStartMove(contentOffsetH, { top: 0 });
1441						scrollBtn.style.top = '0';
1442					} else {
1443						//alert('添加滚动条');
1444						scrollBtnBox.style.display = 'block';
1445						scrollBtnBox.style.visibility = 'visible';
1446						if (topBtn && btmBtn) {
1447							topBtn.style.display = btmBtn.style.display = 'block';
1448							topBtn.style.visibility = btmBtn.style.visibility = 'visible';
1449						}
1450		
1451						//scrollBtn's height				
1452						scrollBtn.style.height = parseInt(scrollBtnBox.offsetHeight * contentWindow.offsetHeight / contentOffsetH.offsetHeight) + 'px';
1453						if (browerMaster.than2('msie', 10, 'lt')) {
1454							setTimeout(function () {
1455								upAndBtm();
1456							}, 300)
1457						} else {
1458							myLab.addClass(scrollBtn, 'ts3'); myLab.addClass(contentOffsetH, 'ts3');
1459							setTimeout(function () {
1460								upAndBtm();
1461								setTimeout(function () {
1462									myLab.removeClass(scrollBtn, 'ts3'); myLab.removeClass(contentOffsetH, 'ts3');
1463								}, 300)
1464							}, 300);
1465						}
1466		
1467					};
1468				}
1469				//setInterval(function () {
1470					resizeIt();
1471				//}, 3000);
1472		
1473				//上下按钮 函数
1474				function btnUpDown(obj, num) {
1475					function startFn() {
1476						clearInterval(iBtnTime);
1477						iBtnTime = setInterval(function () {
1478							iT = scrollBtn.offsetTop - num;
1479							upAndBtm();
1480						}, 40);
1481					}
1482					function endFn() {
1483						clearInterval(iBtnTime);
1484					}
1485					myLab.bindEvent(obj, "touchstart", startFn);
1486					myLab.bindEvent(obj, "touchend", endFn);
1487				}
1488				if (topBtn) {
1489					btnUpDown(topBtn, sSpeed);
1490				}
1491				if (btmBtn) {
1492					btnUpDown(btmBtn, -sSpeed);
1493				}
1494		
1495				var disY
1496				//touch拖拽滚动按钮
1497				function scrollBtnStart(ev) {
1498					clearInterval(iBtnTime);
1499					var ev = ev || event;
1500					disY = ev.changedTouches[0].pageY - scrollBtn.offsetTop;
1501					myLab.bindEvent(scrollBtn, "touchmove", scrollBtnMove);
1502					myLab.bindEvent(scrollBtn, "touchend", scrollBtnEnd);
1503					//css(this, { opacity: 70 });
1504					ev.cancelBubble = true;
1505					ev.preventDefault();
1506				}
1507				function scrollBtnMove(ev) {
1508					var ev = ev || event;
1509					iT = ev.changedTouches[0].pageY - disY;
1510					upAndBtm();
1511				}
1512				function scrollBtnEnd() {
1513					//css(this, { opacity: 100 });
1514					myLab.delEvent(scrollBtn, "touchmove", scrollBtnMove);
1515					myLab.delEvent(scrollBtn, "touchend", scrollBtnMove);
1516				}
1517				myLab.bindEvent(scrollBtn, 'touchstart', scrollBtnStart);
1518		
1519				//主体区域拖拽
1520				var downY = 0;
1521				var bBtn = false;
1522				function startFn(ev) {
1523					if (scrollBtnBox.style.display == 'none') { return false;}
1524					var ev = ev || event;
1525					var touchs = typeof ev.changedTouches === "undefined" ? ev : ev.changedTouches[0];
1526					bBtn = true;
1527					downY = touchs.pageY;
1528					downTop = spBox.offsetTop;            
1529					downTime = myLab.date_getTime();
1530					myLab.bindEvent(contentOffsetH, "touchmove", moveFn);
1531					myLab.bindEvent(contentOffsetH, "touchend", endFn);
1532					ev.cancelBubble = true;
1533				};
1534				//moveFn
1535				function moveFn(ev) {
1536					var ev = ev || event;
1537					var touchs = typeof ev.changedTouches === "undefined" ? ev : ev.changedTouches[0];
1538					if (spBox.offsetTop >= 0) {
1539						if (bBtn) {
1540							bBtn = false;
1541							downY = touchs.pageY;
1542						}
1543						spBox.style.top = (touchs.pageY - downY) / 5 + 'px';
1544					}
1545					else if (spBox.offsetTop <= oBox.offsetHeight - spBox.offsetHeight) {
1546						if (bBtn) {
1547							bBtn = false;
1548							downY = touchs.pageY;
1549						}
1550						spBox.style.top = (touchs.pageY - downY) / 5 + (oBox.offsetHeight - spBox.offsetHeight) + 'px';
1551					}
1552					else {
1553						spBox.style.top = touchs.pageY - downY + downTop + 'px';
1554						//oldStartMove(spBox, { top: (touchs.pageY - downY + downTop) });
1555					}
1556					iT = -spBox.offsetTop / (contentOffsetH.offsetHeight - contentWindow.offsetHeight)*(scrollBtnBox.offsetHeight - scrollBtn.offsetHeight);
1557					if (iT < 0) {
1558						iT = 0;
1559					} else if (iT > scrollBtnBox.offsetHeight - scrollBtn.offsetHeight) {
1560						iT = scrollBtnBox.offsetHeight - scrollBtn.offsetHeight;
1561					}
1562					//scrollBtn.style.top = iT + 'px';
1563					myLab.oldStartMove(scrollBtn, { top: Math.floor(iT) });
1564					fn && fn();
1565					ev.preventDefault();
1566				};
1567				//endFn
1568				function endFn(ev) {
1569					var des = spBox.offsetTop;
1570					if (spBox.offsetTop >= 0) {
1571						des = 0;
1572					} else if (spBox.offsetTop <= oBox.offsetHeight - spBox.offsetHeight) {
1573						des = oBox.offsetHeight - spBox.offsetHeight;
1574					}
1575					myLab.startMove(spBox, { top: des }, 400, 'def');
1576					myLab.delEvent(contentOffsetH, "touchmove", moveFn);
1577					myLab.delEvent(contentOffsetH, "touchend", endFn);
1578				};
1579		
1580				//主体拖拽bind
1581				myLab.bindEvent(contentOffsetH, "touchstart", startFn);
1582				
1583				//组织滚动条默认事件
1584				function prevD(ev){
1585					ev.cancelBubble = true;
1586				}
1587				
1588				/*var oS = $('.my_select');
1589				for(var i=0; i<oS.length; i++){
1590					bindEvent(oS[i], "touchstart", prevD);
1591				}*/
1592		
1593				//滑到某一位置
1594				function scrollMoveTo(val) {
1595					myLab.addClass(contentOffsetH, 'ts3'); myLab.addClass(scrollBtn, 'ts3');
1596					person = -val / (contentOffsetH.offsetHeight - contentWindow.offsetHeight);
1597					iT = person * (scrollBtnBox.offsetHeight - scrollBtn.offsetHeight);
1598					scrollBtn.style.top = iT + 'px';
1599					
1600					setTimeout(function () {
1601						myLab.removeClass(contentOffsetH, 'ts3'); myLab.removeClass(scrollBtn, 'ts3');
1602						//contentOffsetH.style.top = val + 'px';
1603						myLab.oldStartMove(contentOffsetH, { top: val });
1604						fn && fn();
1605					}, 500);
1606		
1607				}
1608		
1609				return {
1610					resizeFn: resizeIt,
1611					scrollMoveFn: scrollMoveTo
1612				}
1613		
1614			}
1615		},
1616		
1617		/*屏幕方向检测  横屏 fn2  竖屏 fn1 */
1618		screenOrientation : function(fn1,fn2){
1619			
1620			//事件兼容
1621			var supportsOrientationChange = "onorientationchange" in window,
1622			orientationEvent = supportsOrientationChange ? "orientationchange" : "resize";
1623			
1624			// 监听事件  
1625			window.addEventListener(orientationEvent, function () {
1626				var ua = navigator.userAgent;
1627				//判断设备类型   
1628				if (ua.indexOf("iPad") > 0) {
1629					deviceType = "isIpad";
1630				} else if (ua.indexOf("Android") > 0) {
1631					deviceType = "isAndroid";
1632				} else {
1633					return;
1634				}
1635			
1636				// 判断横竖屏   
1637				if ("isIpad" === deviceType) {
1638					if (Math.abs(window.orientation) === 90) {
1639						//"iPad横屏";
1640						fn2 && fn2();
1641						return;
1642					} else {
1643						//"iPad竖屏";
1644						fn1 && fn1();
1645					}
1646				} else if ("isAndroid" === deviceType) {
1647					if (Math.abs(window.orientation) !== 90) {
1648						//"android竖屏";
1649						fn1 && fn1();
1650					} else {
1651						//"android横屏";
1652						fn2 && fn2();
1653						return;
1654					}
1655				}
1656			
1657			}, false);
1658		},
1659		
1660		/*  addMyShareSkill(json)
1661			opation{
1662				SetMenuId : 'shareMenuSkill',
1663				SetTitle : "大众进口汽车electric up!",
1664				SetContents : '车流喧嚣取代了鸟啼虫鸣,雾霾中的叹息遮蔽了阳光下的欢笑,对环境的抱怨成了生活主旋律,你是否希望城市多一些美好?你是否已经脑洞大开,按捺不住对城市的畅想?@大众进口汽车 electric up! 帮你实现!www.upfamily.cn为城市发声,更有限量星空投影灯/云朵花盆等你赢!',
1665				Seturl : 'http://www.upfamily.cn',
1666				SetPic : 'http://www.upfamily.cn/swf/images/s.jpg',
1667				SetAppKey : ''	
1668			}
1669			分享btn类名 -- 【 mySinaBtn , myDoubanBtn , myRenrenBtn , myTxwbBtn , myQzonebBtn , myWxBtn 】
1670		*/
1671		addMyShareSkill : function(opation){
1672			if(!myLab.isJson(opation)){
1673				return false;	
1674			}
1675			
1676			//-----------------------[ 整站 设置基本分享信息  start]
1677			var setMes = {
1678				SiteMenuId : opation.SetMenuId,
1679				SiteTitle : opation.SetTitle || document.title,
1680				SiteContents : opation.SetContents || document.title,
1681				Siteurl : opation.Seturl,
1682				SitePic : opation.SetPic,
1683				SiteAppKey : opation.SetAppKey
1684			}
1685			
1686			var _t = encodeURIComponent(setMes.SiteTitle);
1687			var _appkey = encodeURI(setMes.SiteAppKey);
1688			var _url = encodeURIComponent(setMes.Siteurl);
1689			var _site = encodeURIComponent(setMes.SiteContents);
1690			var _pic = encodeURI(setMes.SitePic);
1691			
1692			//---------------------设置新窗口的样式
1693			var newWindow = {
1694				width : 600, //新窗口的宽度
1695				height : 600, //新窗口的高度
1696				top : 75, //新窗口的left
1697				left : 20, //新窗口的top
1698				status : 'no', //窗口的信息
1699				scrollbars : 'no', //新窗口内是否允许出现滚动条
1700				resizable : 'yes' //新窗口是否可以调整大小
1701			}
1702			
1703			//-----------------------[ 整站 设置基本分享信息  end]
1704			
1705			//添加整站基本分享事件
1706			if(document.getElementById(setMes.SiteMenuId)){
1707				shareBtnBox = document.getElementById(setMes.SiteMenuId);
1708				var aA = shareBtnBox.getElementsByTagName('a');
1709				if(aA.length>0){
1710					for(var i=0; i<aA.length; i++){
1711						aA[i].onclick = function(){
1712							if(myLab.hasClass(this,'mySinaBtn')){
1713								P_share('sina');
1714							}else if(myLab.hasClass(this,'myDoubanBtn')){
1715								P_share('douban');	
1716							}else if(myLab.hasClass(this,'myRenrenBtn')){
1717								P_share('renren');	
1718							}else if(myLab.hasClass(this,'myTxwbBtn')){
1719								P_share('txwb');	
1720							}else if(myLab.hasClass(this,'myQzonebBtn')){
1721								P_share('q_zone');	
1722							}else if(myLab.hasClass(this,'myWxBtn')){
1723								
1724								var sh = window.open("http://www.jiathis.com/send/?webid=weixin&url=" + setMes.Siteurl + "&title="+encodeURIComponent(setMes.SiteContents));
1725								sh.focus()
1726								
1727							}
1728						}
1729					 }
1730				 }	
1731			}
1732			
1733			/*分享的平台*/
1734			function P_share(shareWhere){
1735				if(shareWhere == 'sina'){
1736					//分享新浪
1737					shareTSina();
1738				}else if(shareWhere == 'q_zone'){
1739					//分享QQ空间
1740					shareQzone();
1741				}else if(shareWhere == 'kaixin'){
1742					//分享开心网
1743					shareKx();
1744				}else if(shareWhere == 'txwb'){
1745					//分享到腾讯微博
1746					shareTxwb();
1747				}else if(shareWhere == 'renren'){
1748					//分享人人网
1749					shareRenren();
1750				}else if(shareWhere == 'douban'){
1751					//分享人人网
1752					shareDouBan();
1753				}
1754			}
1755			
1756			//新浪微博
1757			function shareTSina(){
1758				var wordLink = 'http://service.weibo.com/share/share.php?title='+ _site +'&url='+ _url +'&pic='+ _pic +'&appkey='+ _appkey;
1759				window.open( wordLink,'_blank','scrollbars='+newWindow.scrollbars+',width='+newWindow.width+',height='+newWindow.height+',left='+newWindow.left+',top='+newWindow.top+',status='+newWindow.status+',resizable='+newWindow.resizable);
1760			}
1761			
1762			//开心网
1763			function shareKx(){
1764			   var wordLink = 'http://www.kaixin001.com/repaste/bshare.php?rtitle='+ _t +'&rurl='+ _url +'&rcontent='+_site+'&pic='+ _pic;	
1765			   window.open( wordLink,'_blank','scrollbars='+newWindow.scrollbars+',width='+newWindow.width+',height='+newWindow.height+',left='+newWindow.left+',top='+newWindow.top+',status=no,resizable='+newWindow.resizable );
1766			}
1767			
1768			//人人网
1769			function shareRenren() {
1770				var wordLink = 'http://widget.renren.com/dialog/share?resourceUrl='+ _url +'&srcUrl='+ _url +'&title='+ _t +'&pic='+ _pic +'&description='+ _site;
1771				window.open(wordLink,'_blank','scrollbars='+newWindow.scrollbars+',width='+newWindow.width+',height='+newWindow.height+',left='+newWindow.left+',top='+newWindow.top+',status='+newWindow.status+',resizable='+newWindow.resizable);
1772			}
1773			
1774			//QQ空间
1775			function shareQzone(){
1776				//http//sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url=&title=&pics=&summary=	
1777				var wordLink = 'http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?url='+ _url +'&title='+ _t +'&pic='+ _pic +'&summary='+_site;
1778				window.open(wordLink,'_blank','scrollbars='+newWindow.scrollbars+',width='+newWindow.width+',height='+newWindow.height+',left='+newWindow.left+',top='+newWindow.top+',status='+newWindow.status+',resizable='+newWindow.resizable);
1779			}
1780			
1781			
1782			//腾讯微博
1783			function shareTxwb() {
1784				var wordLink = 'http://v.t.qq.com/share/share.php?url=' + _url + '&appkey=' + _appkey + '&site=' + _site + '&pic=' + _pic + '&title=' + _site;
1785				window.open(wordLink,'_blank','scrollbars='+newWindow.scrollbars+',width='+newWindow.width+',height='+newWindow.height+',left='+newWindow.left+',top='+newWindow.top+',status='+newWindow.status+',resizable='+newWindow.resizable);
1786			}
1787			
1788			//豆瓣
1789			function shareDouBan(){
1790				var wordLink = 'http://www.douban.com/share/service?image='+ _pic +'&href='+ _url +'&name='+ _t +'&text='+_site;
1791				window.open(wordLink,'_blank','scrollbars='+newWindow.scrollbars+',width='+newWindow.width+',height='+newWindow.height+',left='+newWindow.left+',top='+newWindow.top+',status='+newWindow.status+',resizable='+newWindow.resizable);	
1792			}	
1793		},
1794		
1795		//自定义ready事件
1796		ready: function( f ){
1797			var ie = !!(window.attachEvent && !window.opera);
1798			var wk = /webkit\/(\d+)/i.test(navigator.userAgent) && (RegExp.$1 < 525); 
1799			var fn = []; 
1800			var run = function () { for (var i = 0; i < fn.length; i++) fn[i](); }; 
1801			var d = document; 
1802			 
1803			if (!ie && !wk && d.addEventListener) 
1804				return d.addEventListener('DOMContentLoaded', f, false); 
1805			if (fn.push(f) > 1) return; 
1806			if (ie) 
1807				(function () { 
1808					try { d.documentElement.doScroll('left'); run(); } 
1809					catch (err) { setTimeout(arguments.callee, 0); } 
1810				})(); 
1811			else if (wk) 
1812				var t = setInterval(function () { 
1813				if (/^(loaded|complete)$/.test(d.readyState)) 
1814				clearInterval(t), run(); 
1815				}, 0);
1816		}
1817		
1818	}
1819	window.myLab = myLab;
1820	
1821	//滚动到某个区域
1822	var scrollToTar = (function(){
1823		var tar = 0;
1824		var canScroll = 0;
1825		var iTimer = null;
1826		
1827		setTimeout(function(){
1828			canScroll = myLab.getMax([myLab.viewH(),myLab.scrollH(),myLab.offsetH()]).val - myLab.viewH();	
1829		},400)		
1830		
1831		function toTar(tar,fn,moveFn){
1832			tar = tar || 0;
1833			canScroll = myLab.getMax([myLab.viewH(),myLab.scrollH(),myLab.offsetH()]).val - myLab.viewH();		
1834			if(tar>canScroll){ tar = canScroll;}
1835			
1836			//console.log(tar+' , '+canScroll);
1837			clearInterval(iTimer);
1838			var iSpeed = 0;
1839			var iCur = 0;
1840			iTimer = setInterval(function(){
1841				var iBtn = true;
1842				
1843				iCur = myLab.scrollT();
1844				iSpeed = (tar - iCur)/4;
1845				iSpeed = iSpeed > 0 ? Math.ceil(iSpeed) : Math.floor(iSpeed);
1846				if(iCur != tar){
1847					iBtn = false;
1848				}
1849				//运动中回调
1850				moveFn && moveFn((iCur + iSpeed));
1851				document.body.scrollTop = document.documentElement.scrollTop = iCur + iSpeed;
1852				
1853				if(iBtn){
1854					clearInterval(iTimer);
1855					fn && fn();
1856				}
1857			}, 30);
1858		}
1859		
1860		function toTop(fn,moveFn){
1861			tar = 0;
1862			toTar(tar,fn,moveFn);	
1863		}
1864		
1865		function toBtm(fn,moveFn){
1866			tar = canScroll;
1867			toTar(tar,fn,moveFn);	
1868		}
1869		
1870		myLab.bindEvent(document,'click',function(){
1871			clearInterval(iTimer);
1872		});
1873		
1874		return {
1875			toTop : toTop,
1876			toBtm : toBtm,
1877			toTar : toTar	
1878		}
1879	})();
1880	window.scrollToTar = scrollToTar;
1881	
1882	//浏览器版本
1883	var browerMaster = (function(){
1884		var Sys = {};
1885		var ua = navigator.userAgent.toLowerCase();
1886		var s;
1887		(s = ua.match(/msie ([\d.]+)/)) ? Sys.ie = s[1] :
1888		(s = ua.match(/firefox\/([\d.]+)/)) ? Sys.firefox = s[1] :
1889		(s = ua.match(/chrome\/([\d.]+)/)) ? Sys.chrome = s[1] :
1890		(s = ua.match(/opera.([\d.]+)/)) ? Sys.opera = s[1] :
1891		(s = ua.match(/version\/([\d.]+).*safari/)) ? Sys.safari = s[1] : 0;
1892	
1893		//浏览器版本信息
1894		//Opera浏览器用的是Chrome的内核
1895		function fn(){
1896			if(Sys.ie){
1897				return 'IE: ' + Sys.ie;
1898			} 
1899			if(Sys.firefox){
1900				return  'Firefox: ' + Sys.firefox;
1901			} 
1902			if(Sys.chrome){
1903				return  'Chrome: ' + Sys.chrome;
1904			} 
1905			if(Sys.opera){
1906				return  'Opera: ' + Sys.opera;
1907			} 
1908			if(Sys.safari){
1909				return  'Safari: ' + Sys.safari;
1910			}
1911			if(ua.match(/trident/) && ua.match(/rv/) && ua.match(/11/)){
1912				return 'IE: ' + 11;
1913			}	
1914		}
1915		
1916		//浏览器类型( name : msie,firefox,opera,chrome,safari )  //浏览器版本号 (num)  //对比的关系 ( MoL : gt,gte,lt,lte,eq )
1917		function fn2(name,num,MoL){
1918			//比对版本
1919			if(isNaN(Number(num))){
1920				return false;	
1921			}else{
1922				var num = Number(num);	
1923			}
1924			//符号
1925			switch(MoL){
1926				case 'gt' : MoL = '>';
1927						  break;
1928				case 'gte' : MoL = '>=';
1929						   break;
1930				case 'lt' : MoL = '<';
1931						  break;
1932				case 'lte' : MoL = '<=';
1933						   break;
1934				case 'eq' : MoL = '==';	
1935						  break;		   		  		  		  	
1936			}
1937			//浏览器
1938			switch(name){
1939				case 'msie' : return eval(Number(parseInt(Sys.ie))+MoL+num) ? true : false;
1940							  break;
1941				case 'firefox' : return eval(Number(parseInt(Sys.firefox))+MoL+num) ? true : false;
1942							   break;
1943				case 'opera' :  return eval(Number(parseInt(Sys.chrome))+MoL+num) ? true : false;
1944							 break;
1945				case 'chrome' : return eval(Number(parseInt(Sys.chrome))+MoL+num) ? true : false;
1946							  break;
1947				case 'safari' : return eval(Number(parseInt(Sys.safari))+MoL+num) ? true : false;
1948							  break;		  		  	  	
1949			}	
1950		}	
1951		
1952		return {
1953			desMes : fn,
1954			than2 : fn2
1955		}	
1956	})();
1957	window.browerMaster = browerMaster;
1958	
1959})( window, document, undefined );
1960
1961//----------------------【 原型拓展 】
1962//数组-删除
1963Array.prototype.remove = Array.prototype.remove || function (n){
1964	for(var i=0;i<this.length;i++)
1965	{
1966		if(this[i]==n)
1967		{
1968			this.splice(i, 1);
1969			i--;
1970		}
1971	}
1972};
1973
1974
1975

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.