/*bK Js Tools v.2.1.0 LastTime:2010-6-15*/
var userAgent=navigator.userAgent.toLowerCase();
var is_opera=userAgent.indexOf('opera')!=-1&&opera.version();
var is_moz=(navigator.product == 'Gecko')&&userAgent.substr(userAgent.indexOf('firefox')+8,3);
var is_ie=(userAgent.indexOf('msie')!=-1&&!is_opera)&&userAgent.substr(userAgent.indexOf('msie')+5,1);

function _$(s){return document.getElementById(s);}
function trim(str){return (str+'').replace(/(\s+)$/g,'').replace(/^\s+/g,'');}
function stripscript(s){return s.replace(/<script.*?>.*?<\/script>/ig,'');}
function c_trim(string) {var temp="";string=''+string;splitstring=string.split(" ");for(i=0;i<splitstring.length;i++){temp+=splitstring[i];}return temp;}
function f_trim(inputString){if(typeof inputString!='string'){return inputString;}var retValue=inputString;var ch=retValue.substring(0,1);while(ch==' '||ch=='\r'||ch=='\n'){retValue=retValue.substring(1,retValue.length);ch=retValue.substring(0,1);}ch=retValue.substring(retValue.length-1,retValue.length);while(ch==' '||ch=='\r'||ch=='\n'){retValue=retValue.substring(0,retValue.length-1);ch=retValue.substring(retValue.length-1,retValue.length);}return retValue;}
function isEmail(s){return /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/.test(s);}
function is_num(str){var strSource ="0123456789";var ch;var i;var temp;for(i=0;i<=(str.length-1);i++){ch=str.charAt(i);temp=strSource.indexOf(ch);if(temp==-1){return 0;}}if(strSource.indexOf(ch)==-1){return 0;}else{return 1;} }
function is_domain(str){var strSource ="0123456789abcdefghijklmnopqrstuvwxyz_";var ch;var i;var temp;for(i=0;i<=(str.length-1);i++){ch=str.charAt(i);temp=strSource.indexOf(ch);if(temp==-1){return 0;}}if(strSource.indexOf(ch)==-1){return 0;}else{return 1;}}
function isUndefined(variable){return typeof variable=='undefined'?true:false;}
function strlen(str){return (is_ie&&str.indexOf('\n')!= -1)?str.replace(/\r?\n/g,'_').length:str.length;}
function setcopy(s,a){if(is_ie){window.clipboardData.setData('text',''+s);}else if(prompt('Press Ctrl+C Copy to Clipboard',s));if(a){alert(a);}}
/*阻止冒泡的兼容函数*/
function stopBubble(e) {
    if (e.stopPropagation) e.stopPropagation();
    else e.cancelBubble = true;
}
//Cookies
function Ajax_SetCookie(n,v,e){var t=new Date();t.setTime(t.getTime());if(!e)e=365;e=e*1000*60*60*24;var e_date=new Date(t.getTime()+e);document.cookie=n+'='+encodeURIComponent(v)+';expires='+e_date.toGMTString()+';path=/;domain='+WW_domain+'';}
function Ajax_GetCookie(n){var c=document.cookie.split("; "); for(var i=0; i<c.length; i++) { var p=c[i].split("="); if(n == p[0]) try{return decodeURIComponent(p[1])}catch(e){return null} } return null;}

function Ajax_Loading(str){
	$("#Ajax_WebDI").css({"opacity":"0.6"});
	if(str!=null){//定义了方法的:show:页面没有在加载完成就执行;read:只显示黑色背景,不显示正在加载;Hide:隐藏;this:通用方法;
		if(str=="show"){Ajax_LoadAPI("d");Ajax_Load_App();}
		else if(str=="read"){Ajax_LoadAPI("f");}
		else if(str=="hide"){Ajax_LoadAPI("close");return false;}
		else if(str=="w"){Ajax_LoadAPI("d");$("#Ajax_WebDom").css({"top":20,"left":50});}
		else if(str=="c"){Ajax_LoadAPI("d");Ajax_Load_App();}
	}
	if(is_ie=="6"){$("select").hide();}$("#Ajax_WebDI").show();
}
function Ajax_LoadAPI(act){
if(act=="a"){//关闭所有Ajax提示
$("#Ajax_WebDI").hide();$("#Ajax_WebDom").hide();$("#UserTipDiv").hide();$("#UserCardDom").hide();$("#App_Ajax_Win").hide();$("#App_Ajax_Win_Bg").hide();if(is_ie=="6"){$("select").show();}$(document).unbind("mousemove").unbind("selectstart");}
else if(act=="close"){$("#Ajax_WebDI").hide();$("#Ajax_WebDom").hide();if(is_ie=="6"){$("select").show();}}
//else if(act=="c"){var z="<div id=\"Ajax_WebDI\"></div><div id=\"Ajax_WebDom\"></div>";$("body").append(z);}//创建Load../
else if(act=="d"){$("#Ajax_WebDom").html("<div id=\"Ajax_CloseLoad\"><a href=\"javascript:void(0);\" onclick=\"Ajax_LoadAPI('close');\"><img src=\"/commin/images/close.gif\" alt='关闭Loading' /></a></div><div id=\"Ajax_Loadcns\"><span class=\"newSpanT\">数据正在加载..</span></div>");$("#Ajax_WebDom").show();}//显示Load..
//else if(act=="e"){Ajax_Load_App();}一开始就显示AjaxL..("show")/
else if(act=="f"){if(is_ie=="6"){$("#Ajax_WebDI").css({"height":$("body").height()+"px"});}}//点击后显示
}
function Ajax_Load_App(){
var w=$("body").width();var wH=$(window).height();
var nTop=((wH-100)/2);var nLeft=((w-100)/2);
if(is_ie=="6"){var sT=$(this).scrollTop();var h=$("body").height();var d=Math.floor(sT/wH);nTop=(nTop+(d*wH))+(wH/2)-100;if(h<wH){h=wH;}$("#Ajax_WebDI").css("height",h)}
$("#Ajax_WebDom").css({"top":nTop+"px","left":nLeft+"px"});
}

function Ajax_Win(url){
if($("#App_Ajax_Win").length>0&&url&&url!=""){
Ajax_Loading("read");var w=$("body").width();var h=$("body").height();var sT=$(this).scrollTop();var wH=$(window).height();
var nTop=((wH-385)/2);var nLeft=((w-525)/2);
if(is_ie=="6"){var d=Math.floor(sT/wH);nTop=nTop+(d*wH);}
$("#App_Ajax_Win").css({"top":nTop+"px","left":nLeft+"px"});
$("#App_Ajax_Win_Bg").css({"top":nTop+"px","left":nLeft+"px","width":525,"height":385,"opacity":"0.5"});
$("#App_Ajax_Win").show(150);$("#App_Ajax_IFR").attr("src",url);Ajax_WinMove("ready");
}}

//ajax_win/
var Win_Moving=false;
var down_x,down_y,cx,cy;
function Ajax_WinMove(act){
if(act=="ready"){
$("#App_Ajax_Win_Bg").bind("mouseup",function(e){WinMouseUp(e)});
$("#App_Ajax_Win").bind("mousedown",function(e){WinMouseDown(e)});
}}
function WinMouseDown(e){
var evt=e||event;
down_x=evt.clientX;
down_y=evt.clientY;
cx=(parseInt($("#App_Ajax_Win").css('left'))|0);
cy=(parseInt($("#App_Ajax_Win").css('top'))|0);
Win_Moving=true;
$(document).bind("mousemove",function(e){WinMouseMove(e)}).bind("selectstart",function(){return false;});
$("#App_Ajax_Win").css({"opacity":"0.8"});
$("#App_Ajax_Win_Bg").show();
}
function WinMouseMove(e){
var left,top,doo=BK.Doc.wh();
if(Win_Moving){
var evt=e||event;
left=evt.clientX+cx-down_x;top=evt.clientY+cy-down_y;
if(left+525>doo.width){left=(doo.width-10-525);}
if(is_ie!="6"){
if(top+385>doo.height){top=(doo.height-10-385);}
}else{if(top>$("body").height()){top=$("body").height()-10-385;}}
if(left<10){left=10;}
if(top<10){top=10;}
$("#App_Ajax_Win_Bg").css({"left":left+'px',"top":top+'px'});
}}
function WinMouseUp(e){
if(Win_Moving){
var left=$("#App_Ajax_Win_Bg").css("left")
var top=$("#App_Ajax_Win_Bg").css("top")
$("#App_Ajax_Win").css({"left":left,"top":top,"opacity":"1"});
}
Win_Moving=false;
$(document).unbind("mousemove").unbind("selectstart");
$("#App_Ajax_Win_Bg").hide();
}
function Ajax_WinCreat(){var obj="<div id='App_Ajax_Win_Bg'></div><div id='App_Ajax_Win'><iframe  id='App_Ajax_IFR' height='385' width='525' frameborder='0' scrolling='no' border='0' frameborder='0' style='z-index:30001;'></iframe></div>";$("body").append(obj);$(document).keypress(function(e){if((e.keyCode==27)&&($("#Ajax_WebDI:visible").length>0)){if(confirm("确认要关闭所有的行为窗口吗?")){Ajax_LoadAPI("a");}}});
}
//关闭显示ajax窗口/
function Ajax_Win_Clo(){$("#Ajax_WebDI").hide(180);$("#App_Ajax_Win").hide(180);$("#App_Ajax_Win_Bg").hide(180);$("#App_Ajax_IFR").attr("src","about:blank");if(is_ie=="6"){$("select").show();}}
///For AjaxWinLoading
function Ajax_Win_Loading(str){
	if(str==null){
		$("#Ajax_Win_LoadDOM").css({"width":525+"px","height":385+"px","opacity":0.5,"top":0,"left":0,"padding":20+"px"});
		$("#Ajax_Win_LoadDOM").html('正在加载..');
	}else{$("#Ajax_Win_LoadDOM").hide();}
}

/*new_AjaxXml o:obj,u:url,z:type,t:maxtime,c:cache,d:request_type*/
function Ajax_Api_Load(o,u,z,t,c,d){
	if(u){
		if(!c)c=false;
		if(!t)t=8000;
		if(!d)d="html";
		if(!z)z="get";
			$.ajax({
				type:z,url:u,cache:c,dataType:d,
				error: function(msg){
					//if(o){$(o).html('<div class="pd10 txt_c">E<br/><br/><a href=\"javascript:this.location.reload();\">点击这里重新加载</a></div>');}
					//else{alert("程序加载失败");}
				},
				success: function(msg){
					if(o){$(o).html(msg);}else{$("#Ajax_WebDom").after(msg);}
				}
			});
	}
}
/***************************
************Libary**********
***************************/
var BK = window.BK || {};
BK = {
    /**
    * 序列化对象的函数
    * @method BK
    * @param {object} 要序列化的对象
    * @return {string}
    * @public
    */
    obj2str: function(o) {
        var r = [];
        if (typeof o == "string") return quote(o); //"\"" + o.replace(/(['"\\])/g, "\$1").replace(/(\n)/g, "\\n").replace(/(\r)/g, "\\r").replace(/(\t)/g, "\\t") + "\"";
        if (typeof o == "undefined") return "undefined";
        if (typeof o == "object") {
            if (o === null) return "null";
            else if (!o.sort) {
                for (var i in o)
                    r.push(this.obj2str(i) + ":" + this.obj2str(o[i]));
                r = "{" + r.join() + "}";
            } else {
                for (var i = 0; i < o.length; i++)
                    r.push(this.obj2str(o[i]));
                r = "[" + r.join() + "]";
            }
            return r;
        }
        return o.toString();

        function quote(string) {//参考 www.json.org
            var escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
            var meta = {    // 要替换的字符列表
                '\b': '\\b',
                '\t': '\\t',
                '\n': '\\n',
                '\f': '\\f',
                '\r': '\\r',
                '"': '\\"',
                '\\': '\\\\'
            };
            // If the string contains no control characters, no quote characters, and no
            // backslash characters, then we can safely slap some quotes around it.
            // Otherwise we must also replace the offending characters with safe escape
            // sequences.

            escapable.lastIndex = 0;
            return escapable.test(string) ?
            '"' + string.replace(escapable, function(a) {
                var c = meta[a];
                return typeof c === 'string' ? c :
                    '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
            }) + '"' :
            '"' + string + '"';
        }

    },
    /**
    * 将JSON字符串转换为JSON对象
    * @method BK
    * @param {string} str JSON形式字符串
    * @return {json}
    * @public
    */
    str2obj: function(str) {
        try {
            if (str) {
                return eval('(' + str + ')');
            }
        } catch (ex) {
        }
        return null;
    },
    /**
    * 获取对象所属类的小写名称。与typeof不同，typeof是获取类型系统的名字，getType获取对象系统的名字。
    * @modify 增加null类型检测, 兼容浏览器对RegExp类型解析差异
    */
    getType: function(o) {
        var s = Object.prototype.toString, t =
		{
		    'undefined': 'undefined',
		    'number': 'number',
		    'boolean': 'boolean',
		    'string': 'string',
		    "[object Function]": "function",
		    "[object RegExp]": "regexp",
		    "[object Array]": "array",
		    "[object Date]": "date",
		    "[object Error]": "error"
		};
        return t[typeof o] || t[s.call(o)] || (o ? 'object' : 'null');
    },
    /**
    * 去掉数组的重复项
    * @method unique
    * @param {array} array
    * @return {array}
    * @public
    * @modify 改用hash
    * @modify 定义一个局部变量代表array.length，加快for循环
    */
    unique: function(array) {
        var l = array.length;
        if (l < 2) return [array[0]] || [];
        var o = {};
        for (var i = 0, j = 0; i < l; i++) {
            if (typeof o[array[i]] === 'undefined') {
                o[array[i]] = j++;
            }
        }
        array.length = 0;
        for (var k in o) {
            array[o[k]] = k;
        }
        return array;
    },
    /**
    * 数字数组排序 
    * @method sortNum
    * @param {array} array
    * @param {bool} f 升序=0或降序=1
    * @return {array}
    * @public
    */
    sortNum: function(array, f) {
        if (!f) f = 0;
        if (f == 1) return array.sort(function(a, b) { return b - a; });
        return array.sort(function(a, b) { return a - b; });
    },
    /**
    * 获得数字数组的最大项 
    * @method getMax
    * @return {array}
    * @public
    */
    getMax: function(array) {
        return this.sortNum(array, 1)[0];
    },
    /**
    * 按字节截短字符串 
    * @method getMax
    * @param {string} s
    * @param {int} length 字节数，最好为偶数，1中文字符=2个字节长度
    * @param {string} postfix 附加的后缀
    * @return {string}
    * @public
    */
    cutStr: function(s, length, postfix) {//中abc国 = xxabcxx
        if (typeof (s) != "string") return s;
        postfix = postfix ? postfix : "";
        if (!s || !length) { return ""; }
        var len = 0, temp = "";
        //双字节
        for (var i = 0; i < s.length; i++) {
            if (s.charCodeAt(i) > 255) {
                len += 2;
            } else {
                len++;
            }
            if (len > length) {
                return temp + postfix;
            }
            temp += s.charAt(i);
        }
        //单字节
        if (s.length > length) {
            return s.substr(0, length) + postfix;
        } else {
            return s;
        }
    },
    /**
    * 取随机数
    * @method getRandom
    * @return {float}
    * @public
    */
    getRandom: function(a, b) {
        var a = parseFloat(a);
        var b = parseFloat(b);
        return Math.random() * (a - b) + b;
    },
    /**
    * 删除数组某一个元素
    * @param {array} array
    * @param {int} dx 索引
    * @modify liangchao(2010-03-16) 据测试代码效率几乎相近.但可以节省字节,并可以返回删除的元素.
    */
    removeArrayItem: function(array, dx) {
        if (isNaN(dx) || dx > array.length || dx < 0) { return false; }
        return array.splice(dx, 1);
    }
};


/**
* 各种小功能函数。封装DOM、BOM等与浏览器环境有关的js函数
* @namespace BK
* @class Util
* @static
*/
BK.Util = {
    /**
    * 加载js文件。实际上是<script src="xxx.js?v=zzz"></script>形式加载。
    * @param {object} 形如{src:"",version:""},{src:"",version:""}...
    * @param {function} 回调函数，只能有一个,且只能处于最后
    * 注意 : 在param中,如果最后一参数为function, 则此参数为所有js加载完毕的回调函数
    */
    _import: function() {
        var h = document.getElementsByTagName("head")[0], self = arguments.callee, T = arguments.length, n = 0, fnback;
        BK.getType(arguments[arguments.length - 1]) == "function" ? (fnback = arguments[arguments.length - 1], T--) : null;
        for (var i = 0; i < T; i++) {
            var arg = arguments[i];
            var sp = arg["src"].indexOf("?") == -1 ? "?" : "&";
            var _src = arg["src"] + sp + "v=" + arg["version"];
            if (!self[_src]) {
                var s = document.createElement("SCRIPT");
                s.src = _src;
                // Use insertBefore instead of appendChild  to circumvent an IE6 bug.
                // This arises when a <base> tag is used.
                h.insertBefore(s, h.firstChild);
                s.onload = s.onreadystatechange = function() {
                    if (s.readyState) {
                        if (s.readyState == 'loaded'||s.readyState == 'complete') {
                            ++n == T && fnback();
                        }
                    } else {
                        ++n == T && fnback();
                    }
                };
                self[_src] = s;
            } else {
                ++n == T && fnback();
            }
        }
    },
    /**
    * 用于检验页面加载的插件
    * @method _checkImport
    * @param {string,string} "control_dialog.js", version:"1.0.0"
    */
    _checkImport: function(src, version) {
        return !!this._import[src + "?v=" + version];
    },
    /**
    * 基于firebug环境控制台函数。
    * @method console
    * @param {string} type 函数类型，参见http://getfirebug.com/console.html
    * @public
    */
    console: function(type, message) {
        if (window.console)
            window.console[type](message);
    },
    /**
    * 设置cookie。setCookie(name, value, expires, path, domain, secure)
    * @method setCookie
    * @param {string} n cookie字段的名字
    * @param {string} v cookie字段的值
    * @param {number} e expires,保存天数
    * @param {string} p cookie的path
    * @param {string} d cookie的domain
    * @param {boolean} s cookie的secure
    * @return void
    * @public
    */
    setCookie: function(n, v, e, p, /*string*/d, /*boolean*/s) {
        if (!e) e = 365; if (!p) p = '/';
        e = e * 1000 * 60 * 60 * 24;
        var e_date = new Date(new Date().getTime() + (e));
        document.cookie = n + '=' + encodeURIComponent(v) + ((e) ? ';expires=' + e_date.toGMTString() : '') +
                        ((p) ? ';path=' + p : '') + ((d) ? ';domain=' + d : '') + ((s) ? ';secure' : '');
    },
    /**
    * 获取cookie
    * @method getCookie
    * @param {string} name cookie字段的名字
    * @return {string}
    * @public
    */
    getCookie: function(/*string*/n) {
        var c = document.cookie.split("; ");
        for (var i = 0; i < c.length; i++) {
            var p = c[i].split("=");
            if (n == p[0]) try { return decodeURIComponent(p[1]) } catch (e) { return null }
        }
        return null;
    },
    /**
    * --删除cookie
    * @method deleteCookie
    * @param {string} name
    * @param {string} path
    * @param {string} domain
    * @public */
    deleteCookie: function(name, path, domain) {
        if (this.getCookie(name)) document.cookie = name + "=" + encodeURIComponent(this.getCookie(name)) + ((path) ? ";path=" + path : "") + ((domain) ? ";domain=" + domain : "") + ";expires=Thu, 01-Jan-1970 00:00:01 GMT";
    },
    /**
    * 获取cookie用的domain。
    */
    getDomain: function() {
        return "." + location.hostname.split(".").slice(-2).join(".");
    },
    /**
    * 图片预载器
    * @method loadImage
    * @param {array} srcs 图片路径字符串组成的数组
    * @public
    */
    loadImage: function(srcs, callback) {
        var loadedNum = 0;
        for (var key in srcs) {
            var imageLoader = new Image();
            imageLoader.onload = function() {
                loadedNum++;
                //document.title +=loadedNum+ " ";
                if (loadedNum == srcs.length && callback) callback();
            };
            imageLoader.src = srcs[key];
        }
    },
    /**
    * 设为首页
    * @method setHome
    * @public
    */
    setHome: function(o,r){
		o.target="_self";
		if(document.all&&!external.max_version){
			o.style.behavior='url(#default#homepage)';
			o.setHomePage(r?r:location.href);
		}else alert('暂不支持此浏览器');
	},
    /**
    * javascript获取URL指定参数及其对应的值
    * @method getQueryString
    * @public
    */
    getQueryString: function(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
        var r = window.location.search.substr(1).match(reg);
        if (r != null) return r[2]; return "";
    }
};

BK.Doc={
	wh:function(){
		var w,h,de=document.documentElement;
		w=self.innerWidth||(de&&de.clientWidth)||document.body.clientWidth;
		h=self.innerHeight||(de&&de.clientHeight)||document.body.clientHeight;
		return {height:h,width:w};
	},
	code:function(obj){
		var t=new Date;var e=t.getTime();
		$("#Ajax_Code").html("<a href=\"javascript:BK.Doc.code('"+obj+"');\"><img src=\"/commin/code/code.asp?e="+e+"\" alt='点击可刷新验证码' /></a>");$("#"+obj+"").unbind("focus");
	},
	/*焦点滚动*/
	scrollPic:function (e, LN, Width, Price, Speed){
		var T=this;
		id = e.id;
		if (LN == 'Last') {
			scrollNum = Width;
		}else if (LN == 'Next') {
			scrollNum = 0 - Width;
		}
		
		scrollStart = parseInt(e.style.marginLeft, 10);
		scrollEnd = parseInt(e.style.marginLeft, 10) + scrollNum;
		MaxIndex = (e.getElementsByTagName('li').length / Price).toFixed(0);
		sPicMaxScroll = 0 - Width * MaxIndex;
		if (scrollStart == 0 && scrollEnd == Width) {
			scrollEnd = -1806;
			e.style.marginLeft = parseInt(e.style.marginLeft, 10) - Speed + 'px';
		}
		else 
			if (scrollStart == sPicMaxScroll + Width && scrollEnd == sPicMaxScroll) {
				scrollEnd = 0;
				e.style.marginLeft = parseInt(e.style.marginLeft, 10) + Speed + 'px';
			}
		scrollShowPic = setInterval(scrollShow, 1);

		function scrollShow(){
			if (scrollStart > scrollEnd) {
				if (parseInt(e.style.marginLeft, 10) > scrollEnd) {
					_$(id + '_last').onclick = function(){
						return false;
					};
					_$(id + '_next').onclick = function(){
						return false;
					};
					e.style.marginLeft = parseInt(e.style.marginLeft, 10) - Speed + 'px';
				}
				else {
					clearInterval(scrollShowPic);
					_$(id + '_last').onclick = function(){
						T.scrollPic(e, 'Last', Width, Price, Speed);
						return false;
					};
					_$(id + '_next').onclick = function(){
						T.scrollPic(e, 'Next', Width, Price, Speed);
						return false;
					};
				}
			}
			else {
				if (parseInt(e.style.marginLeft, 10) < scrollEnd) {
					_$(id + '_last').onclick = function(){
						return false;
					};
					_$(id + '_next').onclick = function(){
						return false;
					};
					e.style.marginLeft = parseInt(e.style.marginLeft, 10) + Speed + 'px';
				}
				else {
					clearInterval(scrollShowPic);
					_$(id + '_last').onclick = function(){
						T.scrollPic(e, 'Last', Width, Price, Speed);
						return false;
					};
					_$(id + '_next').onclick = function(){
						T.scrollPic(e, 'Next', Width, Price, Speed);
						return false;
					};
				}
			}
		}
	},
	scrollUI:function(e, Width, Price, Speed){
		var T = this;
		id = e.id;
		_$(id + '_last').onclick = function(){
			T.scrollPic(e, 'Last', Width, Price, Speed);
			return false;
		};
		_$(id + '_next').onclick = function(){
			T.scrollPic(e, 'Next', Width, Price, Speed);
			return false;
		};
	}
};

BK.View={}

BK.View.Scoll = {
    __V: [1, 0, 0, 1],
    scoll: function(o, w, n, s, next, dot){
        var T = this;
        if (T.__V[0] == 1 || T.__V[0] > n) {
            $('#' + o + '').animate({
                "marginLeft": "0px"
            }, s);
        }
        else {
            $('#' + o + '').animate({
                "marginLeft": "-" + ((T.__V[2] && !next) ? (T.__V[0] - 2) : (T.__V[0] - 1)) * w + "px"
            }, s);
        }
        if (T.__V[2] && !next) {
            T.__V[2] = 0;
            T.__V[0]--;
        }
        if (dot) {
            var a = (!next) ? T.__V[0] : T.__V[0] - 1;
            BK.Util.console("info", a);
            $('#' + o + '_dot a').attr("class", false);
            $('#' + o + '_dot a:eq(' + a + ')').attr("class", "select")
        }
    },
    moveR: function(o, w, n, s, dot){
        var T = this;
        if (!T.__V[1]) {
            T.__V[1] = 1;
            T.__V[2] = 1;
            T.__V[0] = 2;
        }
        if (T.__V[0] > n) 
            T.__V[0] = 1;
        T.scoll(o, w, n, s, 1, dot);
        T.__V[0]++;
    },
    init: function(o, w, n, s, dot, auto){
        var T = this;
        $('#' + o + '_next').click(function(){
            T.moveR(o, w, n, s, dot)
            return false;
        });
        $('#' + o + '_pre').click(function(){
            if (T.__V[0] == 1) 
                T.__V[0] = n + 1;
            T.__V[0]--;
            T.scoll(o, w, n, s, 0, dot);
            return false;
        });
				if(dot){
					$('#'+o+'_dot a').click(function(){
						var _a=parseInt($(this).attr("_val"));
						var a=[0,272,544];
						$('#'+o+'').animate({"marginLeft":-a[_a]},s);
						$('#'+o+'_dot a').removeClass("select");
						$(this).attr("class","select");
						return false;
					});
				}
        if (auto[0]) {
            setInterval(function(){
				if (T.__V[3]) {
					T.moveR(o, w, n, s, dot);
				}
            }, auto[1]);
            $('#' + o).mouseover(function(){
				T.__V[3]=0;
			}).mouseout(function(){
				T.__V[3]=1;
			})
        }
    }
}

