mapUrlTxt="/web/entries/maplocation?TXT={0}";mapUrlPoint="/web/entries/maplocation?W={0}&J={1}";mapUrlGeocoder="http://mo.amap.com/?q={0},{1}";ipURL="http://www.ip.cn/index.php?ip=";testUser="test@jsform.com";currencys={yen:"¥ ",dollars:"$ ",pounds:"£ ",euros:"€ "};Date.defAbbrDayNames=["星期日","星期一","星期二","星期三","星期四","星期五","星期六"];Date.defDayNames=["日","一","二","三","四","五","六"];Date.defMonthNames=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"];Date.defAbbrMonthNames=["一","二","三","四","五","六","七","八","九","十","十一","十二"];Date.fromString=function(q){var l="yyyy-mm-dd";var n=new Date("01/01/1970");if(q==""){return n}q=q.toLowerCase();var k="";var b=[];var a=/(dd?d?|mm?m?|yy?yy?)+([^(m|d|y)])?/g;var g;while((g=a.exec(l))!=null){switch(g[1]){case"d":case"dd":case"m":case"mm":case"yy":case"yyyy":k+="(\\d+\\d?\\d?\\d?)+";b.push(g[1].substr(0,1));break;case"mmm":k+="([a-z]{3})";b.push("M");break}if(g[2]){k+=g[2]}}var h=new RegExp(k);var p=q.match(h);for(var e=0;e)[^>]*$|\{\{\! /,U={},Q={},R,G={key:0,data:{}},N=0,T=0,K=[];function P(b,i,a,f){var j={data:f||(f===0||f===false)?f:i?i.data:{},_wrap:i?i._wrap:null,tmpl:null,parent:i||null,nodes:[],calls:B,nest:z,wrap:y,html:A,update:C};b&&V.extend(j,b,{nodes:[],parent:i});if(a){j.tmpl=a;j._ctnt=j._ctnt||j.tmpl(V,j);j.key=++N;(K.length?Q:U)[N]=j}return j}V.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){V.fn[a]=function(s){var r=[],p=V(s),e,q,c,d,f=this.length===1&&this[0].parentNode;R=U||{};if(f&&f.nodeType===11&&f.childNodes.length===1&&p.length===1){p[b](this[0]);r=this}else{for(q=0,c=p.length;q0?this.clone(true):this).get();V(p[q])[b](e);r=r.concat(e)}T=0;r=this.pushStack(r,a,p.selector)}d=R;R=null;V.tmpl.complete(d);return r}});V.fn.extend({tmpl:function(e,f,a){return V.tmpl(this[0],e,f,a)},tmplItem:function(){return V.tmplItem(this[0])},template:function(a){return V.template(a,this[0])},domManip:function(q,a,b){if(q[0]&&V.isArray(q[0])){var n=V.makeArray(arguments),l=q[0],c=l.length,e=0,p;while(e").join(">").split('"').join(""").split("'").join("'")}});V.extend(V.tmpl,{tag:{tmpl:{_default:{$2:"null"},open:"if($notnull_1){__=__.concat($item.nest($1,$2));}"},wrap:{_default:{$2:"null"},open:"$item.calls(__,$1,$2);__=[];",close:"call=$item.calls();__=call._.concat($item.wrap(call,__));"},each:{_default:{$2:"$index, $value"},open:"if($notnull_1){$.each($1a,function($2){with(this){",close:"}});}"},"if":{open:"if(($notnull_1) && $1a){",close:"}"},"else":{_default:{$1:"true"},open:"}else if(($notnull_1) && $1a){"},html:{open:"if($notnull_1){__.push($1a);}"},"=":{_default:{$1:"$data"},open:"if($notnull_1){__.push($.encode($1a));}"},"!":{open:""}},complete:function(){U={}},afterManip:function(c,a,h){var g=a.nodeType===11?V.makeArray(a.childNodes):a.nodeType===1?[a]:[];h.call(c,a);J(g);T++}});function M(i,d,h){var a,j=h?V.map(h,function(b){return typeof b==="string"?i.key?b.replace(/(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g,"$1 "+S+'="'+i.key+'" $2'):b:M(b,i,b._ctnt)}):i;if(d){return j}j=j.join("");j.replace(/^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*$/,function(b,l,g,k){a=V(g).get();J(a);if(l){a=L(l).concat(a)}if(k){a=a.concat(L(k))}});return a?a:L(j)}function L(d){var a=document.createElement("div");a.innerHTML=d;return V.makeArray(a.childNodes)}function H(a){return new Function("jQuery","$item","var $=jQuery,call,__=[],$data=$item.data;with($data){__.push('"+V.trim(a).replace(/([\\'])/g,"\\$1").replace(/[\r\t\n]/g," ").replace(/\$\{([^\}]*)\}/g,"{{= $1}}").replace(/\{\{(\/?)(\w+|.)(?:\(((?:[^\}]|\}(?!\}))*?)?\))?(?:\s+(.*?)?)?(\(((?:[^\}]|\}(?!\}))*?)\))?\s*\}\}/g,function(h,n,p,s,x,w,v){var q=V.tmpl.tag[p],r,u,t;if(!q){throw"Unknown template tag: "+p}r=q._default||[];if(w&&!/\w$/.test(x)){x+=w;w=""}if(x){x=O(x);v=v?","+O(v)+")":w?")":"";u=w?x.indexOf(".")>-1?x+O(w):"("+x+").call($item"+v:x;t=w?u:"(typeof("+x+")==='function'?("+x+").call($item):("+x+"))"}else{t=u=r.$1||"null"}s=O(s);return"');"+q[n?"close":"open"].split("$notnull_1").join(x?"typeof("+x+")!=='undefined' && ("+x+")!=null":"true").split("$1a").join(t).split("$1").join(u).split("$2").join(s||r.$2||"")+"__.push('"})+"');}return __;")}function I(d,a){d._wrap=M(d,true,V.isArray(a)?a:[F.test(a)?a:V(a).html()]).join("")}function O(b){return b?b.replace(/\\'/g,"'").replace(/\\\\/g,"\\"):null}function D(c){var d=document.createElement("div");d.appendChild(c.cloneNode(true));return d.innerHTML}function J(b){var c="_"+T,g,i,f={},r,a,q;for(r=0,a=b.length;r=0;q--){d(i[q])}d(g)}function d(s){var v,t=s,n,u,l;if(l=s.getAttribute(S)){while(t.parentNode&&(t=t.parentNode).nodeType===1&&!(v=t.getAttribute(S))){}if(v!==l){t=t.parentNode?t.nodeType===11?0:t.getAttribute(S)||0:0;if(!(u=U[l])){u=Q[l];u=P(u,U[t]||Q[t]);u.key=++N;U[N]=u}T&&w(l)}s.removeAttribute(S)}else{if(T&&(u=V.data(s,"tmplItem"))){w(u.key);U[u.key]=u;t=V.data(s.parentNode,"tmplItem");t=t?t.key:0}}if(u){n=u;while(n&&n.key!=t){n.nodes.push(s);n=n.parent}delete u._ctnt;delete u._wrap;V.data(s,"tmplItem",u)}function w(e){e=e+c;u=f[e]=f[e]||P(u,U[u.parent.key+c]||u.parent)}}}function B(f,g,h,e){if(!f){return K.pop()}K.push({_:f,tmpl:g,item:this,data:h,options:e})}function z(e,f,a){return V.tmpl(V.template(e),f,a,this)}function y(a,e){var f=a.options||{};f.wrapped=e;return V.tmpl(V.template(a.tmpl),a.data,f,a.item)}function A(e,f){var a=this._wrap;return V.map(V(V.isArray(a)?a.join(""):a).filter(e||"*"),function(b){return f?b.innerText||b.textContent:b.outerHTML||D(b)})}function C(){var a=this.nodes;V.tmpl(null,null,null,this).insertBefore(a[0]);V(a).remove()}})(jQuery);(function(b){b.getUUID=function(c,f){var h="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");var e=[],d;f=f||h.length;if(c){for(d=0;d").attr("action",e).attr("method",(h||"post"));b.each(g,function(j,i){d=b("");d.attr("name",j).attr("value",i);f.append(d)});f.appendTo("body").submit().remove()}};b.format=function(){if(arguments.length==0){return null}var e=arguments[0];for(var c=1;c=1024*1024){return new Number(c/(1024*1024)).toFixed(1)+" MB"}else{if(c>=1024){return new Number(c/1024).toFixed(1)+" KB"}else{return c+" B"}}};b.isDateTimeField=function(c){return/(DATE)|(TIME)/.test(c)};b.formatDateTime=function(c){if(typeof c==="string"){return c}else{var c=new Date(c);return b.format("{0}-{1}-{2} {3}:{4}",c.getFullYear(),b.formatHH(c.getMonth()+1),b.formatHH(c.getDate()),b.formatHH(c.getHours()),b.formatHH(c.getMinutes()))}};b.formatDate=function(c){if(typeof c==="string"){return c.split(" ")[0]}else{var c=new Date(c);return b.format("{0}-{1}-{2}",c.getFullYear(),b.formatHH(c.getMonth()+1),b.formatHH(c.getDate()))}};b.formatTime=function(c){if(typeof c==="string"){return c.split(" ")[1]}else{var c=new Date(c);return b.format("{0}:{1}",b.formatHH(c.getHours()),b.formatHH(c.getMinutes()))}};b.formatHTMLValue=function(c){return c};b.getDateFromStr=function(d){if(!d){return null}var c=d.split("-");if(c.length==3){return new Date(c[0],c[1]-1,c[2])}else{return null}};b.getDate=function(g){var f=g.find(".yyyy").val(),e=g.find(".mm").val(),d=g.find(".dd").val();if(f||e||d){return f+"-"+b.formatHH(e)+"-"+b.formatHH(d)}else{return""}};b.setDate=function(k,f){if(f&&(f+"").indexOf("-")>0){var g=f.split("-");k.find(".yyyy").val(g[0]);k.find(".mm").val(g[1]);k.find(".dd").val(g[2])}else{if(f&&b.isNumber(f)){var i=new Date(f);var j=i.getFullYear();var e=i.getMonth()+1;var h=i.getDate();if(e>=1&&e<=9){e="0"+e}if(h>=0&&h<=9){h="0"+h}k.find(".yyyy").val(j);k.find(".mm").val(e);k.find(".dd").val(h)}}};b.setGrade=function(f,d){var e=f.find("span i");e.each(function(c,g){if(c10){l=new Decimal(l).toFixed(10)}return l};b.closeLightBox=function(){var e=b("#lightBox"),c=b("#overlay"),d=b("#lbContent");if(e.data("opts")){url=e.data("opts").url;if(url.indexOf("#")==0){var f=d.find(">div,>form");b("#divtmp").append(f)}e.addClass("hide");c.addClass("hide");b("#sIframe").hide()}};b.lightBox=function(n){var f={url:"",size:"",overlay:"#overlay",content:"#lbContent",lightBox:"#lightBox",btnConfirm:"#btnConfirm",btnCancel:"#btnCancel",showclose:"1",cache:"1",overflowY:"auto",loaded:function(){},confirm:function(){},cancel:function(){}},c=b.extend(f,n),h=b(c.overlay),g=b(c.lightBox),i=b(c.content),e=function(){if(c.url.indexOf("#")==0){var p=i.find(">div,>form");b("#divtmp").append(p)}i.removeAttr("restore");g.addClass("hide");h.addClass("hide");b("#sIframe").show();if(b("#lbContent").find("video.media")){b("#lbContent").find("video.media").attr("src","")}},k=function(){b(c.btnConfirm).unbind().click(function(){if(c.confirm()!==false){e();return false}});b(c.btnCancel).unbind().click(function(){c.cancel();e();return false});i.find("a.close").unbind().click(function(){c.cancel();e();return false})},m=function(){var p=function(){g.removeClass("ss s l xl cus cus1 cus2 cus3");if(c.size){g.addClass(c.size)}var s=g.height(),r=b(window).height(),q=(sr){i.css({height:q-50,overflowY:"auto"});i.find(".close-holder").css({right:10})}if(c.overflowY!=="auto"){i.css({overflowY:c.overflowY})}g.css({marginTop:-q/2})};g.removeClass("ss s l xl cus cus1 cus2 cus3 cus4");i.css({height:"",overflowY:""});g.css({top:"50%",left:"50%"});if(g.find("img").length>0){g.find("img").load(function(){p()})}p();if(g.draggable){g.draggable({handle:("div.close-holder")})}};g.data("opts",c);h.removeClass("hide");g.removeClass("hide").addClass("bounceIn").one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){b(this).removeClass("bounceIn")});if(c.url){var j=i.attr("restore");if(j=="1"){var d=i.find(">div,>form");b("#divtmp").append(d)}i.removeAttr("restore");if(b.data(document,c.url)&&c.cache=="1"){b(c.content).html(b.data(document,c.url));k();setTimeout(function(){c.loaded();m()},20)}else{if(c.url.indexOf("#")==0){i.html("");if(c.showclose=="1"){i.append('')}i.append(b(c.url).show());i.attr("restore","1");k();c.loaded();m()}else{b.get(c.url,function(p){var p=''+p;i.html(p);b.data(document,c.url,p);k();c.loaded();m()})}}}if(b.browser.msie&&b.browser.version==="6.0"){h.height(b(document).height());if(b("#sIframe").length===0){b("body").append("")}var l=b("#sIframe");l.width(h.width());l.height(h.height());l.show().css({position:"absolute",left:"0px",top:"0px"})}};b.confirm=function(e){var d={title:"确认",msg:"是否确认删除?",btntext:"删除",showyes:false,del:true,confirm:function(){},cancel:function(){}};var c=b("#overlay"),f=b("#deleteBox");if(e){b.extend(d,e)}d.confirm=function(){if(d.showyes){var g=f.find("#txtConfirmYes");if(g.val()!="yes"){g.setErrorFlag("确认删除请输入yes");return false}}if(e.confirm){e.confirm()}c.addClass("hide");f.addClass("hide");return false};d.cancel=function(){if(e.cancel){e.cancel()}c.addClass("hide");f.addClass("hide");return false};if(c.length==0){c=b('
');b("body").append(c)}if(f.length==0){f=b('

'+d.title+'

'+d.msg+'

确认删除请输入"yes"(不含引号)
");if(!d.del){f.find(".btnconfirm").removeClass("red").addClass("blue")}else{f.find(".btnconfirm").removeClass("blue").addClass("red")}b("body").append(f)}else{f.find(".title").text(d.title);f.find(".msg").html(d.msg);f.find(".btnconfirm").text(d.btntext);if(!d.del){f.find(".btnconfirm").removeClass("red").addClass("blue")}else{f.find(".btnconfirm").removeClass("blue").addClass("red")}}f.find("#txtConfirmYes").val("").clearErrorFlag();if(d.showyes){f.find(".yes").removeClass("hide")}else{f.find(".yes").addClass("hide")}c.removeClass("hide");f.removeClass("hide").addClass("bounceIn").one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){b(this).removeClass("bounceIn")});f.find(".btnconfirm").unbind().bind({click:d.confirm});f.find(".btncancel").unbind().bind({click:d.cancel});if(f.draggable){f.draggable({handle:f.find("h4.title")})}};b.alert=function(e,f){var d=b("#overlay"),c=b("#alertBox");if(d.length==0){d=b('
');b("body").append(d)}if(c.length==0){c=b('

提示

'+e+'

');b("body").append(c)}d.removeClass("hide");c.removeClass("hide").addClass("bounceIn").one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend",function(){b(this).removeClass("bounceIn")});c.find("p.msg").html(e);c.find(".btnconfirm").unbind().bind({click:function(){if(f){f()}d.addClass("hide");c.addClass("hide");return false}});if(c.draggable){c.draggable({handle:c.find("h4.title")})}};b.malert=function(c,g){var e=b("#divErrorParent"),d=b("#divErrMsgMobile");if(e.length==0){e=b("
");d=b("
");d.appendTo(e);e.appendTo("body")}d.text(c).animate({opacity:"1"},"500");setTimeout(f,2000);function f(){b("#divErrMsgMobile").animate({opacity:"0"},"500",function(){e.remove();if(g){g()}})}};b.getCookie=function(c){if(!c){return""}if(document.cookie.length>0){c_start=document.cookie.indexOf(c+"=");if(c_start!==-1){c_start=c_start+c.length+1;c_end=document.cookie.indexOf(";",c_start);if(c_end===-1){c_end=document.cookie.length}return unescape(document.cookie.substring(c_start,c_end))}}return""};b.setCookie=function(d,e,c){var f=new Date();f.setDate(f.getDate()+c);document.cookie=d+"="+escape(e)+((c==null)?"":";expires="+f.toGMTString())};b.delCookie=function a(c){b.setCookie(c,"",-1)};b.isWeixin=function(){var c=window.navigator.userAgent.toLowerCase();if(c.match(/MicroMessenger/i)=="micromessenger"){return true}else{return false}};b.isYzjApp=function(){return navigator.userAgent.match(/Qing\/.*;(iPhone|Android).*/)?true:false};b.isHide=function(c){return(b(c).is(":hidden")&&!b(c).is("input:hidden"))};b.mergJSON=function(d,c){if(d===undefined){return}b.each(c,function(f,e){if(d[f]!==undefined){c[f]=d[f]}});return c};b.encHTML=function(c){if(!("string"==typeof(c))){return c}return c.replace(/&/g,"&").replace(//g,">")};b.decHTML=function(c){if(!("string"==typeof(c))){return c}return c.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")};b.enterToBr=function(c){if(!("string"==typeof(c))){return c}return c.replace(/\n/g,"
").replace(/