<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">/*
    Copyright (c) 2011-2015, 1272408710@qq.com. All rights reserved.
    鍏ㄥ眬绫伙細甯哥敤鏂规硶
*/

var C={
    /*
      鍗婇€忔槑鎻愮ず灞�
      鏀寔锛�1锛夌洿鎺ュ垱寤烘彁绀猴紱2锛夐〉闈㈠唴闅愯棌灞傚彉鍗婇€忔槑鏄剧ず
      width 鎻愮ず灞傚搴�
      height 鎻愮ず灞傞珮搴�
      title 鎻愮ず灞傛爣棰樺唴瀹�
      content 鎻愮ず灞� 鎻愮ず鍐呭
      timeout 鍙嬫儏鎻愮ず 锛堥敊璇彁绀猴級 鏄剧ず鏃堕棿锛� top 鍙嬫儏鎻愮ず 涓婅竟璺�
      alert_style 璁剧疆 閿欒娑堟伅鎻愮ず鏍峰紡
      border 璁剧疆寮圭獥灞傝竟妗嗙矖缁�
      border_radius 璁剧疆杈规鍦嗚骞呭害
    */
    "alert":{
        "params":{
          "width":"300","height":"100","title":"娓╅Θ鎻愮ず","content":"","timeout":"1500","top":"9","alert_style":{'border':'1px solid #ddd','color':'#fff'},'border':'8','border_radius':'5',
            //濡傛灉鏄彇鏌愪釜闅愯棌灞傚唴瀹规樉绀哄埌杩欓噷锛屽垯浼犲叆姝ゆ爣绛�
            "div_tag":""
        },
        "init":function(){
            C.alert.params={
              "width": "300", "height": "100", "title": "娓╅Θ鎻愮ず", "content": "", "timeout": "1500", "top": "9", "alert_style": { 'border': '1px solid #ddd', 'color': '#fff' }, 'border': '8', 'border_radius': '5',
            //濡傛灉鏄彇鏌愪釜闅愯棌灞傚唴瀹规樉绀哄埌杩欓噷锛屽垯浼犲叆姝ゆ爣绛�
            "div_tag":""};
        },
        //璁剧疆鍙傛暟
        "set_params":function(params){
            for(var param in params){
                C.alert.params[param]=params[param];
            }
        },
        /*
            鎻愮ず灞傦紝content 鎻愮ず鍐呭锛屾敮鎸丠TML锛泃op 椤惰竟璺� ;timeout 寤惰繜鍏抽棴鏃堕棿;
            蹇呭～锛欳.alert.tips({'content':'鍒犻櫎鎴愬姛'});
            閫夊～锛欳.alert.tips({'content':'鍒犻櫎鎴愬姛','width':100,'top':100,'timeout':3000,'alert_style':{'border':'1px solid #000','color':'blue'}}); 鍙傝€僀.alert.params 鍐呴儴鍙傛暟
        */
        "tips":function(params){
            if($('#tips_20130528').length&gt;0) {return;}//瀛樺湪鍒欒繑鍥�
            if(arguments[0]){C.alert.set_params(params);}
            var height=C.alert.params.height;//楂樺害
            var content=C.alert.params.content;//鍐呭
            var top=C.alert.params.top;//椤惰竟璺�
            var timeout=C.alert.params.timeout;//寤惰繜鏃堕棿锛屾绉�
            var alert_style=C.alert.params.alert_style;//璁剧疆娑堟伅鎻愮ず鏍峰紡
            var tips_div_opacity='&lt;div id="tips_20130528_opacity" style="width:100%;height:100%;position:fixed;background:#000;left:0;top:0;z-index:19000;filter:Alpha(opacity=30);opacity:0.3;"&gt;&lt;/div&gt;';
            var ntop=parseInt($(document).scrollTop())+parseInt(top);//alert(ntop);
            var tips_div='&lt;div id="tips_20130528" style="-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;background:rgba(0,0,0,0.7);padding:12px 50px 12px 50px;position:fixed;z-index:20000;top:48%;'+'"&gt;'+content+'&lt;/div&gt;';
            $('body').append(tips_div_opacity+tips_div);//鍔ㄦ€佸垱寤哄眰
            parseInt(params.width) &gt; 0 ? $('#tips_20130528').css('width',params.width+'px') : $('#tips_20130528').css('width','auto'); //璁剧疆瀹藉害
            params.alert_style==undefined ? $('#tips_20130528').css(alert_style) : $('#tips_20130528').css(params.alert_style) ;//璁剧疆娑堟伅鎻愮ず鏍峰紡
            $('#tips_20130528').css({'left':(($(document).width()-$('#tips_20130528').width())/2-40)+'px'});//璁剧疆灞傛樉绀哄乏鍙冲眳涓�
            setTimeout(function(){$('#tips_20130528_opacity').remove();$('#tips_20130528').remove();},timeout);//寤舵椂绉婚櫎灞�
            C.alert.init();
        },

        //鏄剧ず閫忔槑灞傛彁绀�
        "opacty":function(params){
            if(arguments[0]){
                C.alert.set_params(params);
            }
            //鍐呴儴鍙傛暟
            var width=C.alert.params.width;
            var height=C.alert.params.height;
            var title=C.alert.params.title;
            var content=C.alert.params.content;
            var div_tag=C.alert.params.div_tag;
            var border = C.alert.params.border;
            var border_radius = C.alert.params.border_radius;
            var border_style = params.border != undefined ? params.border : border; //鍒ゆ柇鏄惁浼犲叆 border
            var border_radius_style = params.border_radius != undefined ? params.border_radius : border_radius; //鍒ゆ柇鏄惁浼犲叆 border_radius
            //璁＄畻浣嶇疆
            var w=$(document).width();
            var h=$(window).height();
            var h_doc=$(document).height();
            var h_scroll = $(document).scrollTop();
            var opacty_width = $(window).width();
          //鏍峰紡
            class_opacty={'display':'block','position':'absolute','width': opacty_width +'px','height':h_doc - 4+'px','background':'#000','top':'0px','left':'0px','filter':'Alpha(opacity=20)','opacity':'0.3'};//閫忔槑灞�
            class_tips = { 'position': 'absolute', 'left': ((w - width) / 2 - 8) + 'px', 'top': ((h - height) / 2 + h_scroll - 8) + 'px', 'background': '#fff', 'width': width + 'px', 'height': height + 'px', border: '' + border_style + 'px solid #555' };//鎻愮ず灞�
            class_tit = { 'cursor': 'move', 'height': '30px', 'background': '#ddd' };//鏍囬鏍�
            class_tit_left={'font-weight':'bold','float':'left','margin-left':'8px','_margin-right':'3px','line-height':'30px'};//鏍囬鏍忓乏渚�
            class_tit_right={'float':'right','cursor':'pointer'};//鏍囬鏍忓彸渚�
            //閫忔槑灞侶TML
            var div_opacty='&lt;div class="opacty" style="z-index:9999;"&gt;&lt;/div&gt;';
            //鎻愮ず灞傛爣棰樻爮HTML
            var tips_tit = '&lt;div class="tips_tit"&gt;&lt;div class="drag-tit"&gt;&lt;span class="tit_left"&gt;' + title + '&lt;/span&gt;&lt;/div&gt;&lt;span class="tit_right" onclick="C.alert.opacty_close(\'' + div_tag + '\');"&gt;&lt;a style="font-size:18px;color:#888;font-weight:600;display:inline-block;width:40px; height30px; line-height:28px; text-align:center;" class="close_a" title="鍏抽棴"&gt;x&lt;/a&gt;&lt;/span&gt;&lt;span style="clear:both;"&gt;&lt;/span&gt;&lt;/div&gt;';
			if ($(".opacty").length &gt; 0) { return false; }

             //1)濡傛灉浼犲叆URL
            if(params.url != undefined ){
                $('body').append(div_opacty);//鎻掑叆閫忔槑灞�
                $('.opacty').css(class_opacty);
                var div_tips = '&lt;div class="div_tips" style="overflow:hidden;-moz-border-radius:' + border_radius_style + 'px;-webkit-border-radius:' + border_radius_style + 'px;border-radius:' + border_radius_style + 'px;"&gt;' + tips_tit + '&lt;iframe name="iframe_info" scrolling="no" class="iframe_info" src="' + params.url + '" &gt;&lt;/iframe&gt;&lt;/div&gt;'; //鍐呭
                $('body').append(div_tips);
                var iframe_style = {'overflow':'hidden','margin':'0','padding':'0','border':'0','width':'100%','height':height - $('.tips_tit').height() - 16 + 'px'};//iframe 鍏冪礌鏍峰紡
                var opacty_zindex=10001;
                $('.div_tips').css({'z-index':(opacty_zindex+3),'overflow':'hidden'});
                $('.tips_tit').css(class_tit);$('.tit_left').css(class_tit_left);$('.tit_right').css(class_tit_right);
                $('.div_tips').css(class_tips);//鍐呭灞� 鎻掑叆鏍峰紡
                $('.div_tips').css('z-index','10099'); //鍐呭鏄剧ず娣卞害
                $('.iframe_info').css(iframe_style); //iframe 鎻掑叆鏍峰紡
                drag_disCenter();
                return false;
            }
            //2锛夊鏋滀紶鍏ョ殑鏄眰鏍囩
            if(div_tag!=''){
                //灞傚閮ㄥ墠闈㈡彃鍏ラ€忔槑灞�
                $(div_opacty).insertBefore(div_tag);
                var opacty_zindex=10000;
                //灞傚唴瀹规彃鍏ユ爣棰樻爮
                $(div_tag).prepend(tips_tit);
                $('.opacty').css(class_opacty);
                $('.tips_tit').css(class_tit);$('.tit_left').css(class_tit_left);$('.tit_right').css(class_tit_right);
                //閲嶅畾涔夊眰浣嶇疆鍜屾牱寮�
                $(div_tag).css({ 'display': 'block', 'z-index': (opacty_zindex + 10), 'position': 'absolute', 'left': ((w - width) / 2 - 8) + 'px', 'top': ((h - height) / 2 + h_scroll - 8) + 'px', 'background': '#fff', 'width': width + 'px', 'height': height + 'px', border: '' + border_style + 'px solid #555', '-moz-border-radius': +border_radius_style + 'px', '-webkit-border-radius': +border_radius_style + 'px', 'border-radius': +border_radius_style + 'px' });
                $(".close_a").hover(function () { $(this).css({ 'color': '#e2041b', 'text-decoration': 'none' }) }, function () { $(this).css({ 'color': '#888' }) }); //璁剧疆A 杩炴帴鏍峰紡
                if ($('#addrecommend_html').length &gt; 0) { $('#addrecommend_html').css({'overflow-x':'hidden'}); } //璋冪敤 缂栬緫鍣ㄦ椂鍐呭婧㈠嚭锛屽幓闄ゅ唴瀹规孩鍑�
                drag_disCenter(div_tag);
                return false;
            }
            //3锛夊鏋滃彧鏄樉绀轰紶鍏ョ殑鍐呭
            //鍒涘缓閫忔槑灞�
            if(params.content != undefined){
                $('body').append(div_opacty);
                $('.opacty').css(class_opacty);
                //鍒涘缓鎻愮ず灞�
                var div_tips = '&lt;div class="div_tips" style="-moz-border-radius:' + border_radius_style + 'px;-webkit-border-radius:' + border_radius_style + 'px;border-radius:' + border_radius_style + 'px;"&gt;' + tips_tit + '&lt;div class="tips_content"&gt;&lt;table cellspacing="0" cellpadding="0" width="100%" height="60%" border="0"&gt;&lt;tr&gt;&lt;td align="center"&gt;' + content + '&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div&gt;&lt;/div&gt;';
                $('body').append(div_tips);
                var opacty_zindex=10001;
                $('.div_tips').css(class_tips);
                $('.div_tips').css({'z-index':(opacty_zindex+3)});
                $('.tips_tit').css(class_tit);$('.tit_left').css(class_tit_left);$('.tit_right').css(class_tit_right);
                $('.tips_content').css({ 'line-height': '170%', 'text-align': 'center' });
                drag_disCenter();
            }

            //璋冪敤 鎷栨嫿鍙婂脊鍑哄眰灞呬腑鏄剧ず鏂规硶
            function drag_disCenter(div_tag){
              if(!arguments[0]) div_tag='.div_tips';
              C.alert.display_center(div_tag); //寮瑰嚭灞傜缉鏀炬粴鍔ㄥ悓姝�
              C.alert.display_opacty('.op');//閫忔槑灞傝嚜澧為暱
			  $('.drag-tit').css({'width': $('.tips_tit').width() - $('.tit_right').width() ,'height': $('.tips_tit').height(),'float':'left'}); //鎷栨嫿鏉℃牱寮�
              C.alert.draw_alert(div_tag, '.drag-tit'); //鎷栨嫿
              $(".close_a").hover(function () { $(this).css({ 'color': '#e2041b', 'text-decoration': 'none' }) }, function () { $(this).css({ 'color': '#888' }) }); //璁剧疆A 杩炴帴鏍峰紡
              $('.tb3').css({'margin':'5px 0 0 10px'});
              //瀹炵幇ESC閿叧闂脊鍑哄眰
			  $(window).on('keydown',function(event){
				 if(event.keyCode== 27 &amp;&amp; $('.opacty').is(':visible')){C.alert.opacty_close(C.alert.params.div_tag);}
			  });
           }
        },
        /*
         鎷栨嫿
         obj 绉诲姩瀹瑰櫒锛宼itle 鏍囬浣嶇疆涓烘嫋鍔ㄤ綅缃�
        */
        "draw_alert": function (Drag, Title) {
            if(!arguments[1]) Title='.drag-tit';
            var objDarg = $(Drag);
            var objTitle = $(Title);
            var posX = posY = 0;
            var _move = false; //绉诲姩鐘舵€�
            var opacity;
            objTitle.mousedown(function (e) {
              _move = true;
              opacity = 0.2;
              posX = e.pageX - $(this).offset().left; //鑾峰彇榧犳爣鍧愭爣
              posY = e.pageY - $(this).offset().top;
            });
          $(document).mousemove(function (e) {
              var e = e || window.event;
              var maxW = $(window).width() - objDarg.get(0).offsetWidth; //鍙Щ鍔ㄦ渶澶у搴�
              var maxH = $(window).height() - objDarg.get(0).offsetHeight - 10;
              if (_move) {
                var _x = e.pageX - posX;
                var _y = e.pageY - posY;
                if (_x &lt; 0) _x = 0; else if (_x &gt; maxW) _x = maxW;
                if (_y &lt; 0) _y = 0; else if (_y &gt; maxH) _y = maxH;
              }
              objDarg.css({ left: _x, top: _y, 'opacity': opacity });
            }).mouseup(function () {
              _move = false;
              opacity = 1;
            });
          },
        /*
         濮嬬粓鏄剧ず鍦ㄥ睆骞曚腑闂� obj:濮嬬粓灞呬腑鐨勫脊鍑哄眰瀵硅薄
        */
          "display_center": function (obj) {
            if (arguments[0]) alert_obj = '.div_tips';
            //寮瑰嚭灞傚眳涓�
            function setMask() {
              var top = parseInt(($(window).scrollTop() + ($(window).height() - $(obj).height()) / 2)) + "px";
              var left = parseInt(($(window).scrollLeft() + ($(window).width() - $(obj).width()) / 2)) + "px";
              $(obj).css({ top: top, left: left });
            }
            //缂╂斁婊氬姩鍚屾
            $(window).bind('resize', setMask);
            $(window).bind('scroll', setMask);
          }
          ,
          /*
            opacty_obj 閫忔槑灞傝嚜澧為暱锛堥珮搴︼級
          */
          "display_opacty":function (opacty_obj) {
            if (arguments[0]) opacty_obj = '.opacty';
            //閫忔槑灞� 鑷闀块珮搴�
            function set_opacty_mask() {
              var opacty_height = $(window).height() + $(window).scrollTop();
              $(opacty_obj).height(opacty_height);
            }
            //閫忔槑灞傜缉鏀炬粴鍔ㄥ悓姝�
            $(window).bind('resize', set_opacty_mask);
            $(window).bind('scroll', set_opacty_mask);
         }
        ,
        //鍏抽棴閫忔槑灞傛彁绀�
        "opacty_close":function(div_tag){
			if(!arguments[0]) div_tag = '';
            //鍒犻櫎閫忔槑灞�
            $('.opacty').remove();
            if(div_tag==''){
                //鍒犻櫎鎻愮ず灞�
                $('.div_tips').remove();
            }else{
                //闅愯棌鎻愮ず灞�
                $('.tips_tit').remove();
                $(div_tag).css({'display':'none'});
            }
            C.alert.init();
        }
    },
    //cookie璇诲啓
    "cookie":{
        //璁剧疆Cookie
        "set":function(name,value,hours){
            var __hours=1;
            if(arguments[2]){__hours=hours;}
            var exp = new Date();exp.setTime(exp.getTime() + __hours*60*60*1000);
            document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString();
        },
        //璇诲彇Cookie
        "get":function(name){
            var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");
            if(arr=document.cookie.match(reg)){return decodeURIComponent(arr[2]);}else{return null;}
        }
    },
    //鍔犲叆鏀惰棌澶�
    "fav":function(sTitle,sURL){		
		try
		{
			window.external.addFavorite(sURL, sTitle);
		}
		catch (e)
		{
			try
			{
				window.sidebar.addPanel(sTitle, sURL, "");
			}
			catch (e)
			{
				alert("鍔犲叆鏀惰棌澶辫触锛岃浣跨敤Ctrl+D杩涜娣诲姞");
			}
		}
    },
    //璁句负棣栭〉
    "sethome":function(url){
		
		// var url = this.href;
		try {
			this.style.behavior = "url(#default#homepage)";
			this.setHomePage(url);
		} catch (e) {
		if (document.all) {
				document.body.style.behavior="url(#default#homepage)";
				document.body.setHomePage(url);
		}else if (window.sidebar)
		{
			if (window.netscape) {
				try {
					netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
				} catch (e) {
					alert("姝ゆ搷浣滆娴忚鍣ㄦ嫆缁濓紒\n璇峰湪娴忚鍣ㄥ湴鍧€鏍忚緭鍏モ€渁bout:config鈥濆苟鍥炶溅\n鐒跺悗灏� [signed.applets.codebase_principal_support]鐨勫€艰缃负'true',鍙屽嚮鍗冲彲銆�");
					return false;
				}
		}
				var prefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
				prefs.setCharPref('browser.startup.homepage',url);
			} else {
				alert('鎮ㄧ殑娴忚鍣ㄤ笉鏀寔鑷姩璁剧疆棣栭〉锛岃鎵嬪姩璁剧疆锛�');
				//$("#sethomepage").href();
			}
		}
		return false;
    },
    //鏃ユ湡鏃堕棿
    "date":{
        "localtime":function(nS){
            var dstr=new Date(parseInt(nS) * 1000).toLocaleString().replace(/:\d{1,2}$/,' ');
            dstr=dstr.replace('骞�','-').replace('鏈�','-').replace('鏃�','');
            return dstr;
        }
        ,"new_date":function(str){
            str=str.replace(/(\/)|(骞�)|(鏈�)/g,'-');
            str=str.replace(/(鏃�)/g,'');str=str.split(' ')[0];
            var newstr = str.split('-');
            var date = new Date();
            date.setUTCFullYear(newstr[0], newstr[1] - 1, newstr[2]);
            date.setUTCHours(0, 0, 0, 0);
            return date;
        }
    },
    //瀛楃涓插鐞�
    "string":{
        //瀛楃涓叉崲琛屾竻闄�
        "clear_line":function(str){
            return str.replace(/\n/g,'').replace(/\r/g,'').replace(/\t/g,'');
        }
        //杞ЩSQL涓殑鍗曟拠鍙�
        ,"sql_filter":function(str){
            return str.replace(/(\')/g,"''");
        }
        //鍒ゆ柇瀛楃涓查暱搴�
        ,"length":function(s){
            var char_length = 0;
            for (var i = 0; i &lt; s.length; i++){
                var son_char = s.charAt(i);
                if(encodeURI(son_char).length &gt; 3){
                    char_length += 2;
                }else{
                    char_length += 1;
                }
            }
            return char_length;
        }
        //鍒ゆ柇鏄惁鏍囩偣绗﹀彿
        ,"bd_char":function(str){
            if(str.indexOf(',')&gt;=0) return 1;
            if(str.indexOf('锛�')&gt;=0) return 1;
            return 0;
        }
        //鏇挎崲閫楀彿
        ,"repair_char":function(m){
            var str=$(m).val();
            $(m).val(str.replace(/(锛�)|(\|)/g,','));
        }
        //鍏ㄨ鏁板瓧杞崐瑙�
        ,"dsbc":function(str,flag) {
            var i;
            var result='';
            if (str.length&lt;=0) {return '';}
            for(i=0;i&lt;str.length;i++)
            { str1=str.charCodeAt(i);
            if(str1&lt;125&amp;&amp;!flag)
            result+=String.fromCharCode(str.charCodeAt(i)+65248);
            else
            result+=String.fromCharCode(str.charCodeAt(i)-65248);
            }
            return result;
        }
    },
    /*TAB鎸夐挳椤碉紝鍙閲嶅祵濂楁棤闄愪娇鐢�
        tabs 鏂规硶鍙傛暟璇存槑锛欽SON鏍煎紡
        {
            "selected":"#n3" // 閫変腑鐨勯€夐」鍗★紝娌℃湁姝ゅ弬鏁伴粯璁ら€変腑绗竴涓�
            ,"event":"mouseover" //鍒囨崲瑙﹀彂鍔ㄤ綔 click锛宮ouseover
            ,"style":{        //閫夐」鍗℃牱寮�
                "sclass":"selected"    //閫変腑
                ,"nclass":"noselected" //鏈€変腑
            }
            ,"params": //閫夐」鍗＄粍
            [
                {"nav":"#n1","con":"#c1","sclass":"selected2","nclass":"noselecte2"}, //nav锛氶€夐」鍗D锛宑on锛氶€夐」鍗″搴斿唴瀹瑰眰ID锛宻class,nclass锛岃嚜瀹氫箟鏍锋牱寮忥紝娌℃湁鍒欓粯璁や负涓婄骇鐨� style鍙傛暟涓畾涔�
                {"nav":"#n2","con":"#c2"},
                {"nav":"#n3","con":"#c3"}
            ]
        }
        绠€鍐欐柟寮忥細C.tabs({"params":[{"nav":"#n1","con":"#c1"},{"nav":"#n2","con":"#c2"},{"nav":"#n3","con":"#c3"}]});
    */
    "tabs":function(__params){
        //榛樿閫変腑
        var selected=__params.selected;
        if(__params.selected){selected=__params.selected}else{selected=__params.params[0].nav;}
        //鍒囨崲鍔ㄤ綔
        var event=__params.event;
        if(__params.event){event=__params.event}else{event='click';}
        //榛樿鏍峰紡閫変腑鍜屼笉閫変腑
        if(!__params.style) __params.style={"sclass":"selected","nclass":"selected_no"};
        //鍒囨崲鍗″弬鏁�
        var params=__params.params;
        //閬嶅巻鍒囨崲鍗″弬鏁�
        for(var i=0;i&lt;params.length;i++){
            var tab=params[i];
            //閫夐」鍗¤嚜瀹氫箟浜嗘牱寮�
            var sclass=__params.style.sclass;if(tab.sclass) sclass=tab.sclass;
            var nclass=__params.style.nclass;if(tab.nclass) nclass=tab.nclass;
            //鍒ゆ柇閫変腑閫夐」鍗�
            if(selected==tab.nav){
                $(tab.nav).removeClass(nclass);
                $(tab.nav).addClass(sclass);
                $(tab.con).css({'display':''});
            }else{
                $(tab.nav).removeClass(sclass);
                $(tab.nav).addClass(nclass);
                $(tab.con).css({'display':'none'});
            }//alert(event);
            //缁戝畾浜嬩欢
            $(tab.nav).unbind(event);
            $(tab.nav).bind(event,function(){
                C.tabs({"selected":"#"+$(this).attr('id'),"event":event,"style":__params.style,"params":params});
            });
        }
    },    
    
    /*琛ㄥ崟鎿嶄綔鏂规硶
        params=["#a",".b",["#abc","abc"]] 鏁扮粍涓湁涓ょ绫诲瀷锛屽瓧绗︿覆鍜屽璞�
        瀛楃涓茬粺涓€璧嬬┖鍊兼垨鑰呴粯璁ょ涓€涓殑鍊硷紙select,checkbox,radio锛�
        瀵硅薄鍒欒祴鎸囧畾鐨勫€�
    */
    "form": {
      //鏂拌〃鍗曞垵濮嬪寲鎴栬€呯粰琛ㄥ崟璧嬮粯璁ゅ€�
      "init": function (params) {
        //閬嶅巻闇€瑕佸垵濮嬪寲鐨勮〃鍗�
        for (var i = 0; i &lt; params.length; i++) {
          var pname = params[i];
          //鍒ゆ柇鏂囨湰杩樻槸瀵硅薄
          if (typeof (pname) == 'string') {
            //绫诲垵濮嬪寲
            if (pname.substr(0, 1) == '.') {
              $(pname).each(function (index) {
                C.form.setval($(this));
              });
            }
            //id鍒濆鍖�
            if (pname.substr(0, 1) == '#') {
              C.form.setval($(pname));
            }
          } else if (typeof (pname) == 'object') {
            //绗﹀悎鏁扮粍鏍煎紡
            if (pname.length == 2) {//alert(pname[0]);
              //绫诲垵濮嬪寲
              if (pname[0].substr(0, 1) == '.') {
                $(pname[0]).each(function (index) {
                  C.form.setval($(this), pname[1]);
                });
              }
              //id鍒濆鍖�
              if (pname[0].substr(0, 1) == '#') {
                C.form.setval($(pname[0]), pname[1]);
              }
            }
          }
        }
      },
      /*
       *鑾峰彇琛ㄥ崟 鍏冪礌鍊�
       *閫氳繃formID 鑾峰彇璇orm 涓嬫墍鏈夎〃鍗曞厓绱犲€�
       */
      "get_form": function (formID) {
        var value = [];
        formID = formID.indexOf('#') &gt;= 0 ? formID : '#' + formID + ''; //鍒ゆ柇鍙傛暟鏄惁甯︽湁#
        //alert($(formID).find('input[type=checkbox]').length);
        $(formID).find('input').each(function (index) {
          var inp_type = this.type;
          if (inp_type == 'text' || inp_type == 'hidden' || inp_type == 'password') {
            value.push('"' + this.id + '":"' + encodeURIComponent(this.value) + '"');
          }
          if (inp_type == 'radio' || inp_type == 'checkbox') {
            if ($(this).prop('checked')) {
                value.push('"' + this.name + '":"' + encodeURIComponent($("input[name='"+this.name+"']:checked").val()) + '"');
            }

			//checkbox鐗规畩澶勭悊
			var sel_name = this.name.substr(9);
			if(inp_type == 'checkbox' &amp;&amp; $(".sel_more_"+sel_name).length &gt; 0) {
				//閬嶅巻鎵€鏈塩heckbox鍊�
				var params = [];
				$(".sel_more_"+sel_name).each(function (){
					if ($(this).attr('checked') == 'checked') {
						params.push($(this).val());

					}
				});
				if (params.length == 0) {
					var params_str = ''
				} else {
					var params_str = params.join(',');
				}
				value.push('"' + this.name + '":"' + encodeURIComponent(params_str) + '"');
			}
          }
        });

        $(formID).find('select').each(function () {//涓嬫媺
          value.push('"' + this.id + '":"' + encodeURIComponent($(this).find("option:selected").val()) + '"');
        });
        $(formID).find('textarea').each(function () {//澶氳鏂囨湰
          value.push('"' + this.id + '":"' + encodeURIComponent($(this).val()) + '"');
        });
        //alert("{" + value.join(',') + "}");
        return $.evalJSON("{" + value.join(',') + "}");//杞崲json鏍煎紡
      },
      /*
       *閫氳繃formID 璧嬪€� 缁欒form 涓婭D瀵瑰簲鐨勮〃鍗曞厓绱�
       *data 鏁版嵁婧�
       */
      "set_form": function (formID, data) {
        formID = formID.indexOf('#') &gt;= 0 ? formID : '#' + formID + ''; //鍒ゆ柇鍙傛暟鏄惁甯︽湁#
        var value = [];
        for (var getID in data) {
          value.push(['#' + getID, data[getID]]);
        }
        C.form.init(value);
      },
      //缁欒〃鍗曡鍊硷紝鑷姩鍒ゆ柇绫诲瀷
      "setval": function (obj, str) {
        if (!arguments[1]) var str = '';
        //鏂囨湰妗嗭紝瀵嗙爜妗嗭紝鐩存帴璧嬪€�
        if (obj.is('input') &amp;&amp; (obj.attr('type') == 'text' || obj.attr('type') == 'password' || obj.attr('type') == 'hidden')) {
          obj.val(str);
        }



        //鍗曢€夋锛屽閫夋
        if (obj.is('input') &amp;&amp; (obj.attr('type') == 'radio' || obj.attr('type') == 'checkbox')) {
            $("input[name="+obj.attr('name')+"][value="+str+"]").attr("checked",'checked');
            //if (obj.attr('value') == str) obj.attr('checked', true);
			//澶嶉€夋鐗规畩澶勭悊
			var select_name = obj.attr("name").substr(9);
			//alert(select_name);
			if(obj.attr('type') == 'checkbox' &amp;&amp; $(".sel_more_"+select_name).length &gt; 0) {
				var arr = new Array();
				if(str.indexOf(',')&gt;=0) {
					var arr = str.split(',');
				} else {
					arr[0] = str;
				}
			  $(".sel_more_"+select_name).each(function () {
					if($.inArray($(this).val(),arr)&gt;=0){
						$(this).attr('checked',true);
					} else {
						$(this).attr('checked',false);
					}
				});
			}
        }



        //涓嬫媺妗嗭紝澶氳鏂囨湰妗�
        if (obj.is('select') || obj.is('textarea')) {
          obj.val(str);
        }

      },
      /* 鏍规嵁涓婚敭鍊间慨鏀规煇涓€肩殑鍏敤鏂规硶
          url 澶勭悊鍦板潃
          tag_class input 鐨刢lass绫�
          tag_id  input 鐨勮〃鐨勪富閿�
          order_update('/admin_user.php','order','pid');
          input 鏍煎紡 &lt;input type="text" class="order" pid="&lt;?php echo();?&gt;"&gt;
      */
      "update_field": function (url, tag_class, tag_id) {
        if (!arguments[0]) { C.alert.tips({ "content": "閿欒锛氭病鏈夊鐞嗙▼搴忓湴鍧€" }); return; }
        if (!arguments[1]) tag_class = '.order';
        if (!arguments[2]) tag_id = 'pid';
        var params = [];
        //閬嶅巻鎵€鏈塱nput 鍊�
        $(tag_class).each(function () {
          var id = $(this).attr(tag_id);
          var val = $(this).val();
          params.push({ "id": id, "val": val });
        });
        if (params.length == 0) { C.alert.tips({ "content": "娌℃湁闇€瑕佷慨鏀规帓搴忕殑鏁版嵁" }); return; }
        //杞崲涓哄瓧绗︿覆骞禪RL缂栫爜
        var params_str = $.toJSON(params);
        //params_str=encodeURI(params_str);

        //鎻愪氦鏁版嵁澶勭悊
        $.post(url, { params: params_str }, function (result) {
          try {
            var ret = $.evalJSON(result);
            if (ret.code == 0) {
              C.alert.tips({ "content": "" + ret.msg + "" });
              setTimeout(function () { window.location.reload(); }, 1200);
            } else {
              C.alert.tips({ "content": "" + ret.msg + "" });
            }
          } catch (e) {
            alert(result + e);
          }
        });
      },
      /* 鏍规嵁涓婚敭鍊煎垹闄ゆ壒閲忔暟鎹紝鎴栬€呮壒閲忎慨鏀规煇涓瓧娈典负鍚屼竴涓€硷紝鏍规嵁CHECKBOX閫変腑 鍏敤鏂规硶
          url 澶勭悊鍦板潃
          tag_class checkbox 鐨刢lass绫�
          checkbox_value('/admin_user.php','.pid');
          checkbox 鏍煎紡 &lt;input type="checkbox" id="a61" class="ipt" value="1"&gt;
      */
      "batch_modify": function (url, tag_class) {
        if (!arguments[0]) { C.alert.tips({ "content": "閿欒锛氭病鏈夊鐞嗙▼搴忓湴鍧€" }); return; }
        if (!arguments[1]) { tag_class = '.ipt' }
        var params = [];
        //閬嶅巻鎵€鏈塩heckbox鍊�
        $(tag_class).each(function () {
          if ($(this).attr('checked') == 'checked') {
            params.push($(this).val());
          }
        });
        if (params.length == 0) { C.alert.tips({ "content": "娌℃湁閫変腑椤癸紝鏃犳硶鎿嶄綔" }); return; }
        var params_str = params.join(',');
        var url = url.replace('[@]', params_str);

        //鎻愪氦鏁版嵁澶勭悊
        $.post(url, { params: params_str }, function (result) {
          try {
            var ret = $.evalJSON(result);
            if (ret.code == 0) {
              C.alert.tips({ "content": "" + ret.msg + "" });
              setTimeout(function () { window.location.reload(); }, 1200);
            } else {
              C.alert.tips({ "content": "" + ret.msg + "" });
            }
          } catch (e) {
            alert(result + e);
          }
        });
      },
      /*鑾峰彇椤甸潰涓璫heckbox閫変腑鍊�
        inp_class checkbox class 鍚嶇О
      */
      "get_checkbox_val":function (inp_class) {
        if ($(inp_class).length &lt; 0) return;
        var value='';
        $(inp_class).each(function () {
          var inp_type = this.type;
          if (inp_type == "checkbox") {
            if ($(this).prop('checked')) {
              value += $(this).val()+',';
            }
          }
        });
        value = value.substring(0, value.lastIndexOf(','));
        return value;//杞崲json鏍煎紡
      },
      //鍏ㄩ€夊拰鍙嶉€�,div_tag 锛屽彲浠ユ槸 #a,.a杩欐牱鐨�
      "check_all": function (div_tag) {
        $(div_tag).each(function () {
          if ($(this).attr('checked') == 'checked') { $(this).attr({ 'checked': false }); } else { $(this).attr({ 'checked': true }); }
        });
      },
      //杈撳叆妗嗛粯璁ゆ枃鏈�
      "input_default": function (input, value) {
        if ($(input).val() == '') $(input).val(value);
        $(input).mousedown(function () {
          if ($(this).val() == value) $(this).val('');
        }).blur(function () {
          if ($(this).val() == '') $(this).val(value);
        });
      },
      //tips ={"id":"content","id":"content","id":"content",...} //{"#id1":"璇疯緭鍏ュ€�","#id2":"璇疯緭鍏ュ€�"}
      "text_tips": function (tips) {
        if (tips.length &lt; 0) return;
        for (var inp_id in tips) { //寰幆鍙栧€�

          if (inp_id.indexOf('#') &gt;= 0)  //鍒ゆ柇浼犲叆ID 鏄惁甯︽湁 #
            inp_id = inp_id.substring(inp_id.indexOf('#') + 1);

          var html = $('&lt;label class="labRemind" for=' + inp_id + '&gt;' + tips['#' + inp_id] + '&lt;/label&gt;'); //鏍囩鍒濆鍖�
          if (inp_id.indexOf('#') &lt; 0) inp_id = '#' + inp_id + '';
          $(inp_id).parent().prepend(html); //鎻掑叆鏍囩
          var font_size = $(inp_id).css('font-size') == undefined ? 12 + 'px' : $(inp_id).css('font-size'); //鑾峰彇 鏂囨湰妗嗗瓧浣撳ぇ灏�
          $(inp_id).parent().css('position', 'relative'); //澧炲姞鐖跺厓绱� 鐩稿瀹氫綅
          $('.labRemind').css({ 'font-size': font_size, 'color': '#ccc', 'position': 'absolute', 'height': $(inp_id).parent().height() + 'px', 'line-height': $(inp_id).parent().height() + 'px', 'float': 'left', 'cursor': 'text', 'text-indent': '6px' }); //鏍囩鏍峰紡
        }

        $('input').each(function () {//閬嶅巻褰撳墠椤甸潰鎵€鏈塱nput
          var lab = $(this).siblings('.labRemind');
          if (lab.length &gt; 0) { //鍒ゆ柇鏂囨湰妗嗗悓杈堝厓绱犳槸鍚﹀瓨鍦ㄦ秷鎭彁绀�
            $(this).val() == '' ? lab.show() : lab.hide(); //鍒ゆ柇鏂囨湰妗嗘槸鍚︽湁鍊硷紝鏃犲垯鏄剧ず鎻愮ず锛屽弽涔�
            $(this).focus(function () { lab.hide(); })//鑾峰彇鐒︾偣
              .blur(function () { //澶卞幓鐒︾偣
                $(this).val() != "" ? lab.hide() : lab.show();
              });
          }
        });
      },
      /*
       * 甯﹁鍙风殑澶氳鏂囨湰妗�
       */
      "textarea":{
        "params":{"name":"txt1","id":"txt1","width":"500px","height":"200px","content":"","line_height":"20"},
        "init":function(){
            C.form.textarea.params={"name":"txt1","id":"txt1","width":"500px","height":"200px","content":"","line_height":"20"};
        },
        //璁剧疆鍙傛暟
        "set_params":function(params){
            for(var param in params){
                C.form.textarea.params[param]=params[param];
            }
        },
        "create_line":function(params){
            if(arguments[0]){C.form.textarea.set_params(params);}else{C.form.textarea.init();}
            var content=C.form.textarea.params.content;
            content=content.replace(/\+/g,' ');
            content=decodeURIComponent(content);
            var width=C.form.textarea.params.width;
            var height=C.form.textarea.params.height;
            var line_height=C.form.textarea.params.line_height;
            var name=C.form.textarea.params.name;
            var id=C.form.textarea.params.id;

            var css_textarea_con={"width":width,"height":height,"overflow-x":"hidden","overflow-y":"scroll","margin-top":"10px","border":"1px solid #ccc","border-width":"1px 0 1px 1px"};
            var css_textarea={"word-wrap":"normal","margin":"0","padding":"0","resize": "none","border":"0px","float":"left","overflow":"hidden","line-height":line_height+"px","font-size":"12px"};
            var css_txt_left={"word-wrap":"normal","margin":"0","padding":"0","resize": "none","width":"40px","background":"#ccc","height":height,'text-align':'center'};
            var html='';
            html+='&lt;div class="textarea_con"&gt;';
            html+='&lt;textarea class="txt_left"&gt;&lt;/textarea&gt;';
            html+='&lt;textarea name="'+name+'" id="'+id+'" class="txt_right"&gt;'+content+'&lt;/textarea&gt;';
            html+='&lt;div style="clear:both;height:5px;"&gt;&lt;/div&gt;';
            html+='&lt;/div&gt;';
            document.write(html);
            var obj_m=$('.textarea_con');
            var obj_l=$('.textarea_con &gt; textarea.txt_left');
            var obj_r=$('.textarea_con &gt; textarea.txt_right');
            obj_m.css(css_textarea_con);//瀹瑰櫒鏍峰紡
            $('.textarea_con &gt; textarea').css(css_textarea);//瀹瑰櫒涓璽extarea缁熶竴鏍峰紡
            obj_l.css(css_txt_left);//宸︿晶瀹藉害楂�
            obj_r.css({"width":(obj_m.width()-obj_l.width()-37)+'px',"height":height});//鍙充晶瀹介珮

            //鍒濆鍖�
            C.form.textarea.draw($(obj_r).val(),obj_m,obj_l,obj_r);
            //闄勫姞浜嬩欢
            $(obj_r).keyup(function(){
                C.form.textarea.draw($(obj_r).val(),obj_m,obj_l,obj_r);
            });
        },
        "draw":function(content,obj_m,obj_l,obj_r){
            var line_height=C.form.textarea.params.line_height;
            var con_arr=content.split('\n');
            var con_l='';
            for(var i=0;i&lt;con_arr.length;i++){
                con_l+=(i+1)+'\n';
            }
            obj_l.val(con_l);
            var con_height=line_height*con_arr.length;
            if(con_height&lt;obj_m.height()){con_height=obj_m.height();}
            obj_l.css({"height":con_height+"px"});
            obj_r.css({"height":con_height+"px"});
        }
      }
    }
};

/**

 * 澧炲姞鎮诞绐楀彛鎻掍欢
 * Powered By Mr Zhou
 * QQ 627266138
 * E-mail 627266138qq.com
 * Date 2013-06-04
 * Dependence jquery-1.7.2.min.js
 **/

(function ($) {
  //璋冪敤鏂规硶 $('.xxx').showLevel({levelTitle:"1111",levelContent:"333333333333"});
  $.fn.LevelDefaults = { //榛樿鍙傛暟
      levelTitle: '123123',//娴姩鏍囬
      levelContent:'123123', //鍐呭
      top: 0,//涓婃诞鍔ㄨ窛绂�
      left:0,//宸︽诞鍔ㄨ窛绂�
      margin:'0 0;', //杈硅窛
      wrapWidth: 'auto', //娴姩灞傚搴�
      isBorder: true, //娴姩灞傝竟妗� true 涓哄瓨鍦紝
      borderColor:'ccc',// 杈规棰滆壊
      color: '000', //瀛椾綋棰滆壊
	  isshowtitle:true //鏄惁鏄剧ず澶撮儴 true 鏄剧ず澶撮儴 锛宖alse 涓嶆樉绀哄ご
  };
  $.extendLevel = function (level,opt) { //obj 鍏冪礌瀵硅薄锛宱pt 鍙傛暟瀵硅薄
    var g = {  //鍏叡鏂规硶锛� 澶栭儴鍙皟鐢�
      //鍒濆鍖�
      init: function () {
        var html; //鍒濆鍖栨诞鍔ㄥ眰
		var title_html ="";
		//g.level.css({"position": "relative"}); //缁欏綋鍓嶅璞℃坊鍔犵浉瀵瑰畾浣�
		if(opt.isshowtitle){ //鍒ゆ柇鏄惁鏄剧ず澶撮儴
			title_html = '&lt;a class="level_title"&gt;' + opt.levelTitle + '&lt;br /&gt;&lt;/a&gt;';
		}
        html =  $('&lt;div class="level" style="display:none; background:#fff;"&gt;'
					+ title_html
                    + '&lt;div class="level_content"&gt;' + opt.levelContent + '&lt;/div&gt;'
                + '&lt;/div&gt;');
        $(g.level).append(html); //灏嗗厓绱犲姞鍏ュ埌g.level瀵硅薄涓�
        var border = opt.isBorder ? '1px' : '0'; //鍒ゆ柇杈规鏄惁瀛樺湪
        if (opt.top != 0) $('.level', g.level).css({ 'top': opt.top }); //鍒ゆ柇鏄惁涓婃诞
        if (opt.left != 0) $('.level', g.level).css({ 'left': opt.left });   //鍒ゆ柇鏄惁宸︽诞

        $('.level',g.level).css({'margin': opt.margin, 'text-align': 'center', 'width': opt.wrapWidth, 'border': '' + border + ' solid  #' + opt.borderColor + '', color: '#' + opt.color + '', 'position': 'absolute','display':'block' });
        $('.level_title', g.level).css({ 'padding': '4px 6px', 'text-align':'center','width':opt.wrapWidth });
        $('.level_content', g.level).css({'word-wrap': 'break-word','word-break': 'normal','word-break':'break-all','padding':'10px','width': opt.wrapWidth == 'auto' ? 'auto' : opt.wrapWidth - 4, 'display':'block'});
        g.level.hover(//榧犳爣鎮诞
            function () {
			  //g.init();
              g.level.children('.level').css({ 'display': 'block' });},
            function () {
              g.level.children('.level').css({ 'display': 'none' });
			  //g.level.children('.level').remove();
            });
      }
    };
    g.level = $(level);
    g.init();
    return g;
  }
  $.fn.showLevel = function (options) {
    if (this.length == 0) return; //鍒ゆ柇瀵硅薄鏄惁瀛樺湪
    this.each(function () {
      if (this.usedLevel) return;
      var opt = $.extend({}, $.fn.LevelDefaults, options); //鍚堝苟宸茶祴鍊煎弬鏁�
      this.usedLevel = $.extendLevel(this, opt);
    });
  }
})(jQuery);

function checkMsg(){
	var vp = $('#phone').val();
	if(vp=='' || vp==null){
		C.alert.tips({'content':'璇峰～鍐欒仈绯荤數璇�'});
		return false;
	}
	
	if(vp.length&lt;8){
		C.alert.tips({'content':'璇峰～鍐欐纭殑鑱旂郴鐢佃瘽'});
		return false;
	}
}</pre></body></html>