/* * jquery ui */ if(dwr==null){var dwr={}}if(dwr.engine==null){dwr.engine={}}if(dwrengine==null){var dwrengine=dwr.engine}dwr.engine.seterrorhandler=function(a){dwr.engine._errorhandler=a};dwr.engine.setwarninghandler=function(a){dwr.engine._warninghandler=a};dwr.engine.settexthtmlhandler=function(a){dwr.engine._texthtmlhandler=a};dwr.engine.settimeout=function(a){dwr.engine._timeout=a};dwr.engine.setprehook=function(a){dwr.engine._prehook=a};dwr.engine.setposthook=function(a){dwr.engine._posthook=a};dwr.engine.setheaders=function(a){dwr.engine._headers=a};dwr.engine.setparameters=function(a){dwr.engine._parameters=a};dwr.engine.xmlhttprequest=1;dwr.engine.iframe=2;dwr.engine.scripttag=3;dwr.engine.setrpctype=function(a){if(a!=dwr.engine.xmlhttprequest&&a!=dwr.engine.iframe&&a!=dwr.engine.scripttag){dwr.engine._handleerror(null,{name:"dwr.engine.invalidrpctype",message:"rpctype must be one of dwr.engine.xmlhttprequest or dwr.engine.iframe or dwr.engine.scripttag"});return}dwr.engine._rpctype=a};dwr.engine.sethttpmethod=function(a){if(a!="get"&&a!="post"){dwr.engine._handleerror(null,{name:"dwr.engine.invalidhttpmethod",message:"remoting method must be one of get or post"});return}dwr.engine._httpmethod=a};dwr.engine.setordered=function(a){dwr.engine._ordered=a};dwr.engine.setasync=function(a){dwr.engine._async=a};dwr.engine.setactivereverseajax=function(a){if(a){if(dwr.engine._activereverseajax){return}dwr.engine._activereverseajax=true;dwr.engine._poll()}else{if(dwr.engine._activereverseajax&&dwr.engine._pollreq){dwr.engine._pollreq.abort()}dwr.engine._activereverseajax=false}};dwr.engine.defaulterrorhandler=function(b,a){dwr.engine._debug("error: "+a.name+", "+a.message,true);if(b==null||b==""){alert("a server error has occured.")}else{if(b.indexof("0x80040111")!=-1){dwr.engine._debug(b)}else{alert(b)}}};dwr.engine.defaultwarninghandler=function(b,a){dwr.engine._debug(b)};dwr.engine.beginbatch=function(){if(dwr.engine._batch){dwr.engine._handleerror(null,{name:"dwr.engine.batchbegun",message:"batch already begun"});return}dwr.engine._batch=dwr.engine._createbatch()};dwr.engine.endbatch=function(a){var b=dwr.engine._batch;if(b==null){dwr.engine._handleerror(null,{name:"dwr.engine.batchnotbegun",message:"no batch in progress"});return}dwr.engine._batch=null;if(b.map.callcount==0){return}if(a){dwr.engine._mergebatch(b,a)}if(dwr.engine._ordered&&dwr.engine._batcheslength!=0){dwr.engine._batchqueue[dwr.engine._batchqueue.length]=b}else{dwr.engine._senddata(b)}};dwr.engine.setpollmethod=function(a){dwr.engine.setpolltype(a)};dwr.engine.setmethod=function(a){dwr.engine.setrpctype(a)};dwr.engine.setverb=function(a){dwr.engine.sethttpmethod(a)};dwr.engine.setpolltype=function(){dwr.engine._debug("manually setting the poll type is not supported")};dwr.engine._origscriptsessionid="a048479dfeccd65b6386bfb3e3aec0b9";dwr.engine._sessioncookiename="jsessionid";dwr.engine._allowgetforsafaributmakeforgeryeasier="true";dwr.engine._scripttagprotection="throw 'allowscripttagremoting is false.';";dwr.engine._defaultpath="/dwr";dwr.engine._pollwithxhr="false";dwr.engine._scriptsessionid=null;dwr.engine._getscriptsessionid=function(){if(dwr.engine._scriptsessionid==null){dwr.engine._scriptsessionid=dwr.engine._origscriptsessionid+math.floor(math.random()*1000)}return dwr.engine._scriptsessionid};dwr.engine._errorhandler=dwr.engine.defaulterrorhandler;dwr.engine._warninghandler=dwr.engine.defaultwarninghandler;dwr.engine._prehook=null;dwr.engine._posthook=null;dwr.engine._batches={};dwr.engine._batcheslength=0;dwr.engine._batchqueue=[];dwr.engine._rpctype=dwr.engine.xmlhttprequest;dwr.engine._httpmethod="post";dwr.engine._ordered=false;dwr.engine._async=true;dwr.engine._batch=null;dwr.engine._timeout=0;dwr.engine._domdocument=["msxml2.domdocument.6.0","msxml2.domdocument.5.0","msxml2.domdocument.4.0","msxml2.domdocument.3.0","msxml2.domdocument","msxml.domdocument","microsoft.xmldom"];dwr.engine._xmlhttp=["msxml2.xmlhttp.6.0","msxml2.xmlhttp.5.0","msxml2.xmlhttp.4.0","msxml2.xmlhttp.3.0","msxml2.xmlhttp","microsoft.xmlhttp"];dwr.engine._activereverseajax=false;dwr.engine._outstandingiframes=[];dwr.engine._pollreq=null;dwr.engine._pollcometinterval=200;dwr.engine._pollretries=0;dwr.engine._maxpollretries=0;dwr.engine._texthtmlhandler=null;dwr.engine._headers=null;dwr.engine._parameters=null;dwr.engine._postseperator="\n";dwr.engine._defaultinterceptor=function(a){return a};dwr.engine._urlrewritehandler=dwr.engine._defaultinterceptor;dwr.engine._contentrewritehandler=dwr.engine._defaultinterceptor;dwr.engine._replyrewritehandler=dwr.engine._defaultinterceptor;dwr.engine._nextbatchid=0;dwr.engine._propnames=["rpctype","httpmethod","async","timeout","errorhandler","warninghandler","texthtmlhandler"];dwr.engine._partialresponseno=0;dwr.engine._partialresponseyes=1;dwr.engine._partialresponseflush=2;dwr.engine._unloading=false;dwr.engine._execute=function(i,d,j,a){var e=false;if(dwr.engine._batch==null){dwr.engine.beginbatch();e=true}var g=dwr.engine._batch;var b=[];for(var f=0;f0||dwr.engine._pollreq){settimeout(dwr.engine._checkcometpoll,dwr.engine._pollcometinterval)}};dwr.engine._gettextfromcometiframe=function(c){var a=c.contentwindow.document.body;if(a==null){return""}var b=a.innerhtml;if(b.indexof("
")==0||b.indexof("
")==0){b=b.substring(5,b.length-7)}return b};dwr.engine._processcometresponse=function(e,b){if(b.charsprocessed==e.length){return}if(e.length==0){b.charsprocessed=0;return}var a=e.indexof("//#dwr-start#",b.charsprocessed);if(a==-1){b.charsprocessed=e.length;return}var d=e.lastindexof("//#dwr-end#");if(d==-1){return}if(e.charcodeat(d+11)==13&&e.charcodeat(d+12)==10){b.charsprocessed=d+13}else{b.charsprocessed=d+11}var c=e.substring(a+13,d);dwr.engine._receivedbatch=b;dwr.engine._eval(c);dwr.engine._receivedbatch=null};dwr.engine._senddata=function(i){i.map.batchid=dwr.engine._nextbatchid;dwr.engine._nextbatchid++;dwr.engine._batches[i.map.batchid]=i;dwr.engine._batcheslength++;i.completed=false;for(var h=0;h=0&&navigator.useragent.indexof("msie")>=0)){i.req=dwr.engine._newactivexobject(dwr.engine._xmlhttp)}}}var c,b;if(i.req){if(i.async){i.req.onreadystatechange=function(){if(typeof dwr!="undefined"){dwr.engine._statechange(i)}}}if(i.ispoll){dwr.engine._pollreq=i.req;if(!(document.all&&!window.opera)){i.req.batch=i}}var a=navigator.useragent.indexof("safari/");if(a>=0){var f=navigator.useragent.substring(a+7);if(parseint(f,10)<400){if(dwr.engine._allowgetforsafaributmakeforgeryeasier=="true"){i.httpmethod="get"}else{dwr.engine._handlewarning(i,{name:"dwr.engine.oldsafari",message:"safari get support disabled. see getahead.org/dwr/server/servlet and allowgetforsafaributmakeforgeryeasier."})}}}i.mode=i.ispoll?dwr.engine._modeplainpoll:dwr.engine._modeplaincall;b=dwr.engine._constructrequest(i);try{i.req.open(i.httpmethod,b.url,i.async);try{for(c in i.headers){var g=i.headers[c];if(typeof g=="string"){i.req.setrequestheader(c,g)}}if(!i.headers["content-type"]){i.req.setrequestheader("content-type","text/plain")}}catch(j){dwr.engine._handlewarning(i,j)}i.req.send(b.body);if(!i.async){dwr.engine._statechange(i)}}catch(j){dwr.engine._handleerror(i,j)}}else{if(i.rpctype!=dwr.engine.scripttag){var e=i.ispoll?"dwr-if-poll-"+i.map.batchid:"dwr-if-"+i.map.batchid;i.div=document.createelement("div");document.body.appendchild(i.div);i.div.innerhtml="";i.document=document;i.iframe=i.document.getelementbyid(e);i.iframe.batch=i;i.mode=i.ispoll?dwr.engine._modehtmlpoll:dwr.engine._modehtmlcall;if(i.ispoll){dwr.engine._outstandingiframes.push(i.iframe)}b=dwr.engine._constructrequest(i);if(i.httpmethod=="get"){i.iframe.setattribute("src",b.url)}else{i.form=i.document.createelement("form");i.form.setattribute("id","dwr-form");i.form.setattribute("action",b.url);i.form.setattribute("style","display:none;");i.form.setattribute("target",e);i.form.target=e;i.form.setattribute("method",i.httpmethod);for(c in i.map){var g=i.map[c];if(typeof g!="function"){var d=i.document.createelement("input");d.setattribute("type","hidden");d.setattribute("name",c);d.setattribute("value",g);i.form.appendchild(d)}}i.document.body.appendchild(i.form);i.form.submit()}}else{i.httpmethod="get";i.mode=i.ispoll?dwr.engine._modeplainpoll:dwr.engine._modeplaincall;b=dwr.engine._constructrequest(i);i.script=document.createelement("script");i.script.id="dwr-st-"+i.map["c0-id"];i.script.src=b.url;document.body.appendchild(i.script)}}};dwr.engine._modeplaincall="/call/plaincall/";dwr.engine._modehtmlcall="/call/htmlcall/";dwr.engine._modeplainpoll="/call/plainpoll/";dwr.engine._modehtmlpoll="/call/htmlpoll/";dwr.engine._constructrequest=function(d){var a={url:d.path+d.mode,body:null};if(d.ispoll==true){a.url+="reverseajax.dwr"}else{if(d.map.callcount==1){a.url+=d.map["c0-scriptname"]+"."+d.map["c0-methodname"]+".dwr"}else{a.url+="multiple."+d.map.callcount+".dwr"}}var e=location.href.match(/jsessionid=([^?]+)/);if(e!=null){a.url+=";jsessionid="+e[1]}var b;if(d.httpmethod=="get"){d.map.callcount=""+d.map.callcount;a.url+="?";for(b in d.map){if(typeof d.map[b]!="function"){a.url+=encodeuricomponent(b)+"="+encodeuricomponent(d.map[b])+"&"}}a.url=a.url.substring(0,a.url.length-1)}else{a.body="";if(document.all&&!window.opera){var c=[];for(b in d.map){if(typeof d.map[b]!="function"){c.push(b+"="+d.map[b]+dwr.engine._postseperator)}}a.body=c.join("")}else{for(b in d.map){if(typeof d.map[b]!="function"){a.body+=b+"="+d.map[b]+dwr.engine._postseperator}}}a.body=dwr.engine._contentrewritehandler(a.body)}a.url=dwr.engine._urlrewritehandler(a.url);return a};dwr.engine._statechange=function(f){var e;if(f.completed){dwr.engine._debug("error: _statechange() with batch.completed");return}var c=f.req;try{if(c.readystate!=4){return}}catch(d){dwr.engine._handlewarning(f,d);dwr.engine._clearup(f);return}if(dwr.engine._unloading){dwr.engine._debug("ignoring reply from server as page is unloading.");return}try{var a=c.responsetext;a=dwr.engine._replyrewritehandler(a);var g=c.status;if(a==null||a==""){dwr.engine._handlewarning(f,{name:"dwr.engine.missingdata",message:"no data received from server"})}else{if(g!=200){dwr.engine._handleerror(f,{name:"dwr.engine.http."+g,message:c.statustext})}else{var b=c.getresponseheader("content-type");if(!b.match(/^text\/plain/)&&!b.match(/^text\/javascript/)){if(b.match(/^text\/html/)&&typeof f.texthtmlhandler=="function"){f.texthtmlhandler({status:g,responsetext:a,contenttype:b})}else{dwr.engine._handlewarning(f,{name:"dwr.engine.invalidmimetype",message:"invalid content type: '"+b+"'"})}}else{if(f.ispoll&&f.map.partialresponse==dwr.engine._partialresponseyes){dwr.engine._processcometresponse(a,f)}else{if(a.search("//#dwr")==-1){dwr.engine._handlewarning(f,{name:"dwr.engine.invalidreply",message:"invalid reply from server"})}else{e=a}}}}}}catch(d){dwr.engine._handlewarning(f,d)}dwr.engine._callposthooks(f);dwr.engine._receivedbatch=f;if(e!=null){e=e.replace(dwr.engine._scripttagprotection,"")}dwr.engine._eval(e);dwr.engine._receivedbatch=null;dwr.engine._validatebatch(f);if(!f.completed){dwr.engine._clearup(f)}};dwr.engine._validatebatch=function(b){if(!b.completed){for(var a=0;a"+b.innerhtml;if(e.length>2048){e=e.substring(0,2048)}b.innerhtml=e}}};if(dwr==null){var dwr={}}if(dwr.util==null){dwr.util={}}if(dwrutil==null){var dwrutil=dwr.util}dwr.util._escapehtml=true;dwr.util.setescapehtml=function(a){dwr.util._escapehtml=a};dwr.util._shouldescapehtml=function(a){if(a&&a.escapehtml!=null){return a.escapehtml}return dwr.util._escapehtml};dwr.util.escapehtml=function(a){return a.replace(/&/g,"&").replace(//g,">")};dwr.util.unescapehtml=function(a){return a.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")};dwr.util.replacexmlcharacters=function(a){a=a.replace("&","+");a=a.replace("<","\u2039");a=a.replace(">","\u203a");a=a.replace("'","\u2018");a=a.replace('"',"\u201c");return a};dwr.util.containsxssriskycharacters=function(a){return(a.indexof("&")!=-1||a.indexof("<")!=-1||a.indexof(">")!=-1||a.indexof("'")!=-1||a.indexof('"')!=-1)};dwr.util.onreturn=function(b,a){if(!b){b=window.event}if(b&&b.keycode&&b.keycode==13){a()}};dwr.util.selectrange=function(d,c,b){d=dwr.util._getelementbyid(d,"selectrange()");if(d==null){return}if(d.setselectionrange){d.setselectionrange(c,b)}else{if(d.createtextrange){var a=d.createtextrange();a.movestart("character",c);a.moveend("character",b-d.value.length);a.select()}}d.focus()};if(document.getelementbyid){dwr.util.byid=function(){var b=new array();for(var a=0;as.shortstringmaxlength){p=p.substring(0,s.shortstringmaxlength-3)+"..."}if(s.escapehtml){var o=p.split("\n");for(var r=0;r0){k="[...]"}else{k="[]"}}else{var x=[];x.push("[");var m=0;for(var r=0;r0){x.push(", ")}if(v==1){if(m==s.onelinemaxitems){x.push("...");break}}else{x.push(s.lineterminator+g(l+1,s))}if(r!=m){x.push(r);x.push(":")}x.push(h(t,v-1,l+1,s));m++}if(v>1){x.push(s.lineterminator+g(l,s))}x.push("]");k=x.join("")}}else{if(dwr.util._isobject(n)&&!dwr.util._isdate(n)){if(v==0){k=dwr.util._detailedtypeof(n)}else{var x=[];if(dwr.util._detailedtypeof(n)!="object"){x.push(dwr.util._detailedtypeof(n));if(typeof n.valueof()!="object"){x.push(":");x.push(h(n.valueof(),1,l,s))}x.push(" ")}x.push("{");var u=dwr.util._ishtmlelement(n);var m=0;for(var j in n){var w=n[j];if(u){if(!w){continue}if(typeof w=="function"){continue}if(e[j]){continue}if(j.touppercase()==j){continue}}if(m>0){x.push(", ")}if(v==1){if(m==s.onelinemaxitems){x.push("...");break}}else{x.push(s.lineterminator+g(l+1,s))}x.push(j.length>s.propertynamemaxlength?j.substring(0,s.propertynamemaxlength-3)+"...":j);x.push(":");x.push(h(w,v-1,l+1,s));m++}if(v>1&&m>0){x.push(s.lineterminator+g(l,s))}x.push("}");k=x.join("")}}else{k=""+n}}}}return k}catch(q){return(q.message?q.message:""+q)}}function g(k,m){var l=[];l.push(m.baseindent);for(var j=0;j=1){h=e.item(0)}}if(h==null){dwr.util._debug("setvalue() can't find an element with id/name: "+g+".");return}dwr.util.highlight(h,c);if(dwr.util._ishtmlelement(h,"select")){if(h.type=="select-multiple"&&dwr.util._isarray(b)){dwr.util._selectlistitems(h,b)}else{dwr.util._selectlistitem(h,b)}return}if(dwr.util._ishtmlelement(h,"input")){if(h.type=="radio"||h.type=="checkbox"){if(e&&e.length>=1){for(var f=0;f=1){j=h.item(0)}}if(j==null){dwr.util._debug("getvalue() can't find an element with id/name: "+i+".");return""}if(dwr.util._ishtmlelement(j,"select")){if(j.type=="select-multiple"){var a=new array();for(var d=0;d=1){for(var d=0;d=1){var a=[];for(var d=0;d0&&dwr.util._isobject(g[0])){for(var a=0;a0&&dwr.util._isobject(g[d][0])){dwr.util._setvaluesrecursive(g[d],e,b-1,c)}else{if(typeof g[d]=="function"){}else{if(dwr.util.byid(e)!=null||document.getelementsbyname(e).length>=1){dwr.util.setvalue(e,g[d],c)}}}}}}};dwr.util.getvalues=function(d,c){if(typeof d=="string"||dwr.util._ishtmlelement(d)){return dwr.util.getformvalues(d)}else{var a="";var b=100;if(c!=null&&c.prefix){a=c.prefix}if(c!=null&&c.idprefix){a=c.idprefix}if(c!=null&&"depth" in c){b=c.depth}dwr.util._getvaluesrecursive(d,a,b,c);return d}};dwr.util.getformvalues=function(a){var f=null;if(typeof a=="string"){f=document.forms[a];if(f==null){f=dwr.util.byid(a)}}else{if(dwr.util._ishtmlelement(a)){f=a}}if(f!=null){if(f.elements==null){alert("getformvalues() requires an object or reference to a form element.");return null}var e={};var c;var d;for(var b=0;b0&&dwr.util._isobject(g[0])){for(var a=0;a0&&dwr.util._isobject(g[d][0])){dwr.util._getvaluesrecursive(g[d],e,b-1,c)}else{if(typeof g[d]=="function"){}else{if(dwr.util.byid(e)!=null||document.getelementsbyname(e).length>=1){g[d]=dwr.util.getvalue(e)}}}}}}};dwr.util.addoptions=function(o,e){o=dwr.util._getelementbyid(o,"addoptions()");if(o==null){return}var i=dwr.util._ishtmlelement(o,"select");var h=dwr.util._ishtmlelement(o,["ul","ol"]);if(!i&&!h){dwr.util._debug("addoptions() can only be used with select/ul/ol elements. attempt to use: "+dwr.util._detailedtypeof(o));return}if(e==null){return}var l=arguments.length;var m={};var j=arguments[l-1];if(l>2&&dwr.util._isobject(j)){m=j;l--}var d=null;if(l>=3){d=arguments[2]}var b=null;if(l>=4){b=arguments[3]}if(!m.optioncreator&&i){m.optioncreator=dwr.util._defaultoptioncreator}if(!m.optioncreator&&h){m.optioncreator=dwr.util._defaultlistitemcreator}m.document=o.ownerdocument;var c,g,f;if(dwr.util._isarray(e)){for(var k=0;k0){c.removechild(c.firstchild)}}};dwr.util.addrows=function(g,b,a,d){g=dwr.util._getelementbyid(g,"addrows()");if(g==null){return}if(!dwr.util._ishtmlelement(g,["table","tbody","thead","tfoot"])){dwr.util._debug("addrows() can only be used with table, tbody, thead and tfoot elements. attempt to use: "+dwr.util._detailedtypeof(g));return}if(!d){d={}}if(!d.rowcreator){d.rowcreator=dwr.util._defaultrowcreator}if(!d.cellcreator){d.cellcreator=dwr.util._defaultcellcreator}d.document=g.ownerdocument;var c,f;if(dwr.util._isarray(b)){for(f=0;fe.length){if(h.id.substr(0,e.length)==e){var b=h.id.charat(e.length);if(b=="."||b=="["){g=a+h.id.substr(e.length)}}}}if(g){h.setattribute("id",g)}else{h.removeattribute("id")}}var c=h.childnodes;for(var d=0;d0&&dwr.util._isobject(d[0])){var b=e+"."+prop;var a=dwr.util.byid(b);if(a!=null){dwr.util._clonenodeforvaluesrecursive(a,d,b,c)}}}else{if(dwr.util._isobject(d)){dwr.util._clonesubarrays(d,e+"."+prop,c)}}}};dwr.util._getelementbyid=function(c,b){var a=c;c=dwr.util.byid(c);if(c==null){dwr.util._debug(b+" can't find an element with id: "+a+".")}return c};dwr.util._ishtmlelement=function(e,d){if(e==null||typeof e!="object"||e.nodename==null){return false}if(d!=null){var a=e.nodename.tolowercase();if(typeof d=="string"){return a==d.tolowercase()}if(dwr.util._isarray(d)){var c=false;for(var b=0;b"+b.innerhtml;if(e.length>2048){e=e.substring(0,2048)}b.innerhtml=e}}};function isint(d,c){d=trim(d);if(d==null||trim(d)==""){return c}if(trim(d)=="0"){return false}var e=d.substring(0,1);if(e=="0"&&trim(d)!="0"){return false}for(var a=0;a="0"&&b<="9")){return false}}return true}function isfloat(i,a,h){if(i==null||trim(i)==""){return a}var b=trim(i);if(b.substring(0,1)=="."){return false}var d=0;for(var f=0;f="0"&&c<="9")||c==".")){return false}if(c=="."){d++}if(d>1){return false}}if(h!=null&&h>0){if(b.indexof(".")!=-1&&b.length-(b.indexof(".")+1)>h){return false}}var e=i.substring(0,1);var g=i.substring(1,2);if(e==0&&g!="."){for(var f=0;f="0"&&b<="9")){return false}}return true}function isnull(a){if(a==null||trim(a)==""){return true}return false}function isdate(h,a){if(h==null){return a}if(trim(h).length!=10){return false}var c=h.substring(0,4);if(parseint(c)<1900){return false}tempstr=h;var d=tempstr.indexof("-");if(d>-1){var b=tempstr.substring(0,d)}tempstr=tempstr.substring(d+1,tempstr.length);d=tempstr.indexof("-");if(d>-1){var f=tempstr.substring(0,d)}strday=tempstr.substring(d+1,tempstr.length);if(parseint(f)>12&&parseint(f)<1){return false}if((parseint(f)==4||parseint(f)==6||parseint(f)==9||parseint(f)==11)&&parseint(strday)==31){return false}if(parseint(f)==2){var e=(parseint(b)%4==0&&(parseint(b)%100!=0||parseint(b)%400==0));if(strday>29||(strday==29&&!e)){return false}}var g=/^[0-9]{4}\-(([0][1-9])||([1][012]))\-(([0][1-9])||([12][0-9])||([3][01]))$/;if(!h.match(g)){return false}return true}function isemail(c,b){if(c==null||trim(c)==""){return b}var a=/^[-a-za-z0-9_\.]+\@([0-9a-za-z_-]+)+(\.[0-9a-za-z_-]{1,})+$/;if(c.match(a)){return true}return false}function istelno(c,b){if(c==null||trim(c)==""){return b}var c=trim(c);var a=/^[\-0-9+()\/]{1,32}$/;if(a.test(c)){return true}return false}function isascii(c,b){if(c==null||trim(c)==""){return b}var c=trim(c);for(var a=0;a="a"&&d<="z")||(d>="0"&&d<="9"))){return false}}return true}function hasspecsymbol(a){return !/^[a-za-z0-90-9\u4e00-\u9fa5#\/\-&@\(\)\.$\*· ]*$/.test(a)}function specialcharacterscheck(a){return !/^[^\\&*^%<>/]*$/.test(a)}function validateobject(b){var c=new array("&","/","*","^","'","%","<",">","\\","\\\\",'"');for(var a=0;a=0){return false}}return true}function fullspace(c){var a=/\ /;var b=a.test(c);if(b==true){return false}return true}function trim(a,b){a=""+a;if(b=="l"||b=="l"){regularexp=/^\s+/gi;return a.replace(regularexp,"")}else{if(b=="r"||b=="r"){regularexp=/\s+$/gi;return a.replace(regularexp,"")}else{regularexp=/^\s+|\s+$/gi;return a.replace(regularexp,"")}}}function strlen(b){b=trim(b);var a=/\r\n/g;var c=b.replace(a,"");return c.length}function concatdate(g,c,f){if(g==null||trim(g=="")){return false}if(c==null||trim(c=="")){return false}if(f==null||trim(f=="")){return false}var i=trim(g);var h=trim(c);var k=trim(f);var e="";var d=parseint(i);var b=parseint(h);var a=parseint(k);if(b<10){var j="0"+d}else{var j=""+d}if(a<10){var j="0"+d}else{var j=""+d}e+=d;e+=month1;e+=day1;return e}function equals(c,a,b){if(c==null&&a==null){return true}if(c==a){return true}return false}function equals(d,b,c,a){if(d.lengtha){return false}if(d==b){return true}return false}function comparefloat(d,a){d=trim(d);a=trim(a);var c=parsefloat(d);var b=parsefloat(a);if(cb){return -1}else{if(c==c){return 0}}}}function keyenter(d,e){var c=window.event.srcelement;var b=window.event.keycode;if(b!=d){return true}if(e==null){var a=0;while(c!=c.form.elements[a]){a++}if(!c.form.elements[a+1].disabled){c.form.elements[a+1].focus()}if(c.form.elements[a+1].type=="text"||c.form.elements[a+1].type=="textarea"||c.form.elements[a+1].type=="checkbox"){c.form.elements[a+1].select()}else{do{a++}while(c.form.elements[a+1].disabled);c.form.elements[a+1].focus();if(c.form.elements[a+1].type=="text"||c.form.elements[a+1].type=="textarea"||c.form.elements[a+1].type=="checkbox"){c.form.elements[a+1].select()}}}else{e.focus();if(e.type=="text"||e.type=="textarea"||e.type=="checkbox"){e.select()}}return false}function test_name(a){var b=/^[_\-a-za-z0-9]{6,20}$/;if(b.test(a)){return true}return false}function getstrlen(d){if(d==null){return 0}d=trim(d);var c=/\r\n/g;var f=d.replace(c,"");var a=0;for(var b=0;b0){b=b+getlinenum(g,a)}if(b==0){b=1}return b}function getlinenum(c,h){if(c==null){return 0}var f=1;var a=0;var d=1;for(var i=0;ih*f){if(d==2){a++}}if(a==h*f&&c.charat(i+1)<="\x7f"&&c.charat(i+1)!=""){var b="false";for(var g=h*(f-1);g<(h*f-1);g++){if(c.charat(g)>"\x80"){b="true";break}}if(b=="true"){var k=a;for(var j=i;c.charat(j-1)<="\x7f"&&k>(h*(f-1));j--){k--}a=a+(h*f-k)+1}}f=math.ceil(a/h)}return f}function covertdate(b){tempstr=b;var a=tempstr.indexof("-");if(a>-1){var c=tempstr.substring(0,a)}tempstr=tempstr.substring(a+1,tempstr.length);a=tempstr.indexof("-");if(a>-1){var d=tempstr.substring(0,a)}strday=tempstr.substring(a+1,tempstr.length);tempstr=tempstr.substring(a+1,tempstr.length);var e=new date(c,d,strday);return e}function comparedate(c,d){if(trim(c)==""||trim(d)==""){return true}var b=covertdate(c);var a=covertdate(d);if(b.gettime()>a.gettime()){return false}else{return true}}function getlocation(d){var c=new date();var b=d+"";var a=b.indexof("?");if(a>-1){d=d+"&time="+c.gettime()}else{d=d+"?time="+c.gettime()}return d}var formid;function openscriphtml(a){formid=a;if(navigator.appname!="microsoft internet explorer"){alert("此功能仅支持ie用户")}else{newwin=window.open("../htmleditor/html/editor.html","","width=640,height=450,status=1");newwin.focus()}}function printparttextinlongtext(h,a){var e=h.value;var d=/<[a-z]*[a-z]*(\s[a-z]*[a-z]*\=((\"{0,1}([a-za-z\-\=\:\;\{\}\/\.\!\@\_\^\%\&\*\$\#\?\'\"\,\[\]]|[0-9]|[\u4e00-\u9fa5]|[\ufe30-\uffa0]|[\uff0c\u3002])\"{0,1})*|(\"{0,1}\#\w{6}\"{0,1})*))*\/?>|<\/[a-z]*[a-z]*>/g;var b=/\s/g;var j=/ /g;var i=e.replace(d,"");var f=i.replace(b,"");var g=f.replace(j,"");if(g.length>a){var c=g.substr(0,a)+"...";document.write(c)}else{document.write(g)}}function printparttext(f,a){var d=f;var c=/<[a-z]*[a-z]*(\s[a-z]*[a-z]*\=((\"{0,1}([a-za-z]|[0-9]|[\u4e00-\u9fa5]|[\ufe30-\uffa0]|[\uff0c\u3002])\"{0,1})*|(\"{0,1}\#\w{6}\"{0,1})*))*\/?>|<\/[a-z]*[a-z]*>/g;var h=/\s/g;var j=/ /g;var i=d.replace(c,"");var b=i.replace(h,"");var e=b.replace(j,"");if(e.length>a){var g=e.substr(0,a)+"...";document.write(g)}else{document.write(e)}}function sethome(){var a=new string(window.location);var c=a.indexof("?");var b;if(c==-1){b=a}else{b=a.substring(0,c)}document.all.sethomea.style.behavior="url(#default#homepage)";document.all.sethomea.sethomepage(b);return false}var num;var objreceiveimgpath;var objreceiveimgname;var objreceivetextname;function openscripupload(d,b,c,a){num=d;objreceiveimgname=c;objreceiveimgpath=b;objreceivetextname=a;if(navigator.appname!="microsoft internet explorer"){alert("此功能仅支持ie用户")}else{newwin=window.open("/newebiz1/ebizportalfg/portal/html/imagerepositorymaint.html","","width=550,height=450,status=1,scrollbars=yes");newwin.focus()}}var num;var objreceiveimgpath;var objreceivetextname;function openscripuploadflash(c,b,a){num=c;objreceivetextname=a;objreceiveimgpath=b;if(navigator.appname!="microsoft internet explorer"){alert("此功能仅支持ie用户")}else{newwin=window.open("/newebiz1/ebizportalfg/portal/html/flashrepositorymaint.html","","width=550,height=450,status=1,scrollbars=yes");newwin.focus()}}function compare(a,c){var b="^"+c;if(a.match(b)){return true}return false}function ischinesecharacters(a){var b=/^([\u4e00-\u9fa5])*$/;if(b.test(a)){return true}else{return false}}function ischinese(a){var b=/^([\u4e00-\u9fa5]|[\ufe30-\uffa0])*$/;if(b.test(a)){return true}else{return false}}function iscnandenandnumber(a){var b=/^([\u4e00-\u9fa5]|[\ufe30-\uffa0]|[_\-a-za-z0-9])*$/;if(b.test(a)){return true}else{return false}}function ismobilenumber(a){var b=/^([0-9]|[-]|[+]){11,22}$/;if(b.test(a)){return true}else{return false}}function ismobile(a){var b=/^1[0-9]{2}[0-9]{8}$/;if(!b.test(a)){return false}else{return true}}function hasspecialchar(a){return !/^[\u4e00-\u9fa5a-za-z\d\(\)\/#\-\.&%\*、 ]+$/.test(a)}function isfloat_8_2(b,a){b=trim(b);if(b==null||trim(b)==""){return a}return/^(0|[1-9]\d{0,7})(\.\d{1,2})?$/.test(b)}function exactdiv(arg1,arg2){var t1=0,t2=0,r1,r2;try{t1=arg1.tostring().split(".")[1].length}catch(e){}try{t2=arg2.tostring().split(".")[1].length}catch(e){}with(math){r1=number(arg1.tostring().replace(".",""));r2=number(arg2.tostring().replace(".",""));return(r1/r2)*pow(10,t2-t1)}}function exactmul(c,f){var d=0,a=c.tostring(),b=f.tostring();try{d+=a.split(".")[1].length}catch(e){}try{d+=b.split(".")[1].length}catch(e){}return number(a.replace(".",""))*number(b.replace(".",""))/math.pow(10,d)}function exactadd(c,d){var a,e,f;try{a=c.tostring().split(".")[1].length}catch(b){a=0}try{e=d.tostring().split(".")[1].length}catch(b){e=0}f=math.pow(10,math.max(a,e));return(c*f+d*f)/f}function getround(d,e){var b=math.pow(10,e);d*=b;d=math.round(d);var a=d/b;var c=""+a;for(var f=0;f=0;a--){if(b.indexof(c.charat(a))===-1){c=c.substring(0,a+1);break}}return b.indexof(c.charat(0))===-1?c:""};function css(a,c){for(var b in c){a.style[b]=c[b]}}function combobox(a){if(typeof a=="string"){a=document.getelementbyid(a)}if(!a){return}var b=document.createelement("div");var d=document.createelement("input");var c=document.createelement("ul");d.type="text";d.readonly="true";css(b,{width:a.offsetwidth+"px",display:"inline",position:"relative",height:a.offsetheight});css(d,{width:a.offsetwidth+"px",lineheight:"18px",background:"url(/public/images/common/combobox.bmp) no-repeat top right"});css(c,{width:a.offsetwidth+"px",display:"none",background:"#fff",position:"absolute",top:a.offsetheight+"px",left:"0px",padding:"0px",margin:"0px",border:"1px solid"});a.style.display="none";a.parentnode.insertbefore(b,a);b.appendchild(d);b.appendchild(c);buildcombobox(c,a,d);d.onfocus=function(e){c.style.display=""};d.onclick=function(e){if(e){e.stoppropagation();e.preventdefault()}else{window.event.cancelbubble=true,window.event.returnvalue=false}};document.body.onclick=window.onclick=function(){for(var e=0,f;f=(window.dymcombox||[])[e];e++){f.style.display="none"}}}function buildcombobox(f,g,a){(window.dymcombox=window.dymcombox||[]).push(f);var b=true;for(var c=0,d;d=g.options[c];c++){var e=document.createelement("li");e.innerhtml=d.text;e.title=d.title||d.text;e.selectedindex=c;e.nowrap=true;css(e,{"liststyle":"none","width":"100%","fontsize":"12px","height":"16px","lineheight":"16px"});e.onclick=function(){g.selectedindex=this.selectedindex;a.value=this.innerhtml;a.title=this.title;f.style.display="none"};e.onmouseover=function(){css(this,{background:"#006",color:"white"})};e.onmouseout=function(){css(this,{background:"#fff",color:"black"})};f.appendchild(e);if(b||d.selected){b=false;a.value=d.text;a.title=d.title}}}function _getelementbyid(c,d,f){var b=document.getelementbyid(c);var a=null;function e(i,k,l){if(i==null||k==null||l==null){return null}for(var h=0;h1){u=c(r.items,l)}function s(w){var x=c(w);return r.globalnav?x:l.parent().find(w)}l.data("finder",s);var q=s(r.prev),n=s(r.next),o=s(r.prevpage),d=s(r.nextpage);j.bind("onstart",function(x,w){var z=q.add(o);var y=n.add(d)});j.bind("onbeforeseek",function(w,a,x,d,b){if(x===undefined||c.isfunction(x)){x=r.speed}function y(){if(b){b.call(v,a)}j.trigger("onseek",[a])}if(t){if(r.effect=="fade"){var c=-d.position().left;u.fadeout(function(){u.css({left:c});u.fadein(y)})}else{u.animate({left:-d.position().left},x,r.easing,y)}}else{if(r.effect=="fade"){var z=-d.position().top;u.fadeout(function(){u.css({top:z});u.fadein(y)})}else{u.animate({top:-d.position().top},x,r.easing,y)}}b=v;f=a;j.trigger("onstart",[a])});c.extend(v,{getindex:function(){return f},getclickindex:function(){var w=v.getitems();return w.index(w.filter("."+r.activeclass))},getconf:function(){return r},getsize:function(){var x=v.getitems();var w=x.filter(r.line);if(k){if(!r.vertical){return x.index(w[0])}else{return w.size()}}return x.size()},getpageamount:function(){return math.ceil(this.getsize()/r.size)},getpageindex:function(){return math.ceil(f/r.size)},getnavibuttons:function(){return q.add(n).add(o).add(d)},getroot:function(){return l},getitemwrap:function(){return u},getitems:function(){return u.children(r.item)},getvisibleitems:function(){return v.getitems().slice(f,f+r.size)},seekto:function(a,w,b){if(a<0){a=0}if(x===a){return v}if(c.isfunction(w)){b=w}var z=v.getsize();var c,y;if(k){c=v.getitems();y=c.filter(r.line);if(!r.vertical){z=c.index(y[0])}else{z=y.size()}}if(a>z-r.size){return r.loop?v.begin():this.end()}var d;if(k&&r.vertical){var x=c.index(y[a-1])+1;d=v.getitems().eq(x)}else{d=v.getitems().eq(a)}if(!d.length){return v}j.trigger("onbeforeseek",[a,w,d,b]);return v},move:function(w,y,x){g=w>0;return this.seekto(f+w,y,x)},next:function(x,w){return this.move(1,x,w)},prev:function(x,w){return this.move(-1,x,w)},movepage:function(w,z,y){g=w>0;var a=r.size*w;var x=f%r.size;if(x>0){a+=(w>0?-x:r.size-x)}return this.move(a,z,y)},prevpage:function(x,w){return this.movepage(-1,x,w)},nextpage:function(x,w){return this.movepage(1,x,w)},setpage:function(y,x,w){return this.seekto(y*r.size,x,w)},begin:function(x,w){g=false;return this.seekto(0,x,w)},end:function(y,x){g=true;var w=this.getsize()-r.size;return w>0?this.seekto(w,y,x):v},reload:function(){j.trigger("onreload");return v},focus:function(){b=v;return v},click:function(x){var a=v.getitems().eq(x),b=r.activeclass,w=r.size;if(x<0||x>=v.getsize()){return v}if(w==1){if(r.loop){return v.next()}if(x===0||x==v.getsize()-1){g=(g===undefined)?true:!g}return g===false?v.prev():v.next()}if(w==2){if(x==f){x--}v.getitems().removeclass(b);a.addclass(b);return v.seekto(x,time,fn)}if(!a.hasclass(b)){v.getitems().removeclass(b);a.addclass(b);var y=math.floor(w/2);var z=x-y;if(z>v.getsize()-w){z=v.getsize()-w}if(z!==x){return v.seekto(z)}}return v},bind:function(x,w){j.bind(x,w);return v},unbind:function(w){j.unbind(w);return v},isebiz:function(){return k},getlines:function(){return m}});c.each("onbeforeseek,onstart,onseek,onreload".split(","),function(w,x){v[x]=function(y){if(y){return v.bind(x,y)}}});q.addclass(r.disabledclass).click(function(){v.prev()});n.click(function(){v.next()});d.click(function(){v.nextpage()});if(v.getsize()0){var x=u.index(q[w-1]);if(y-x-1o.getsize()-t.size;if(x<=0||c){var b=h+t.size+(c?-o.getlength():o.getlength());l(b);x=b+w}if(z){s.removeclass(t.activeclass).eq(x+math.floor(t.size/2)).addclass(t.activeclass)}if(x===h+t.size){return self}return o.seekto(x,a,y)},begin:function(x,w){return this.seekto(t.size,x,w)},end:function(x,w){return this.seekto(u.length,x,w)},click:function(w,z,y){if(!t.clickable){return self}if(t.size==1){return this.next()}var x=w-h,a=t.activeclass;x-=math.floor(t.size/2);return this.move(x,z,y,true)},getindex:function(){return h},setpage:function(y,x,w){return this.seekto(y*t.size+t.size,x,w)},getpageamount:function(){return math.ceil(o.getlength()/t.size)},getpageindex:function(){if(h<0){return this.getpageamount()-1}if(h>=o.getlength()){return 0}var w=(h+t.size)/t.size-1;return w},getvisibleitems:function(){var w=h+t.size;return s.slice(w,w+t.size)},getlength:function(){var w;if(v){if(!t.vertical){w=g}else{w=p}}else{w=u.length}return w}});o.onstart(function(x,w){h=w-t.size;return false});o.getnavibuttons().removeclass(t.disabledclass)});return d.api?e:this}})(jquery);(function(b){var a=b.tools.scrollable;a.plugins=a.plugins||{};a.plugins.autoscroll={version:"1.0.1",conf:{autoplay:true,interval:3000,autopause:true,steps:1,api:false}};b.fn.autoscroll=function(d){if(typeof d=="number"){d={interval:d}}var c=b.extend({},a.plugins.autoscroll.conf),e;b.extend(c,d);this.each(function(){var h=b(this).scrollable();if(h){e=h}var f,g,i=true;h.play=function(){if(f){return}i=false;f=setinterval(function(){h.move(c.steps)},c.interval);h.move(c.steps)};h.pause=function(){f=clearinterval(f)};h.stop=function(){h.pause();i=true};if(c.autopause){h.getroot().add(h.getnavibuttons()).hover(function(){h.pause();clearinterval(g)},function(){if(!i){g=settimeout(h.play,c.interval)}})}if(c.autoplay){settimeout(h.play,c.interval)}});return c.api?e:this}})(jquery);(function(a){var b=a.tools.scrollable;b.plugins=b.plugins||{};b.plugins.navigator={version:"1.0.2",conf:{navi:".scrollnavi",naviitem:null,activeclass:"active",indexed:false,api:false,idprefix:null}};a.fn.navigator=function(c){var d=a.extend({},b.plugins.navigator.conf),e;if(typeof c=="string"){c={navi:c}}c=a.extend(d,c);this.each(function(){var g=a(this).scrollable(),l=g.getroot(),j=l.data("finder").call(null,c.navi),f=null,h=g.getnavibuttons();if(g){e=g}g.getnavibuttons=function(){return h.add(j)};function k(){if(!j.children().length||j.data("navi")==g){j.empty();j.data("navi",g);for(var m=0;m"))}f=j.children().each(function(n){var o=a(this);o.click(function(p){g.setpage(n);return p.preventdefault()});if(c.indexed){o.text(n)}if(c.idprefix){o.attr("id",c.idprefix+n)}})}else{f=c.naviitem?j.find(c.naviitem):j.children();f.each(function(n){var o=a(this);o.click(function(p){g.setpage(n);return p.preventdefault()})})}f.eq(0).addclass(c.activeclass)}g.onstart(function(n,m){var o=c.activeclass;f.removeclass(o).eq(g.getpageindex()).addclass(o)});g.onreload(function(){k()});k();var i=f.filter("[href="+location.hash+"]");if(i.length){g.move(f.index(i))}});return c.api?e:this}})(jquery);(function(b){b.fn.wheel=function(e){return this[e?"bind":"trigger"]("wheel",e)};b.event.special.wheel={setup:function(){b.event.add(this,a,c,{})},teardown:function(){b.event.remove(this,a,c)}};var a=!b.browser.mozilla?"mousewheel":"dommousescroll"+(b.browser.version<"1.9"?" mousemove":"");function c(e){switch(e.type){case"mousemove":return b.extend(e.data,{clientx:e.clientx,clienty:e.clienty,pagex:e.pagex,pagey:e.pagey});case"dommousescroll":b.extend(e,e.data);e.delta=-e.detail/3;break;case"mousewheel":e.delta=e.wheeldelta/120;break}e.type="wheel";return b.event.handle.call(this,e,e.delta)}var d=b.tools.scrollable;d.plugins=d.plugins||{};d.plugins.mousewheel={version:"1.0.1",conf:{api:false,speed:50}};b.fn.mousewheel=function(g){var e=b.extend({},d.plugins.mousewheel.conf),f;if(typeof g=="number"){g={speed:g}}g=b.extend(e,g);this.each(function(){var h=b(this).scrollable();if(h){f=h}h.getroot().wheel(function(i,j){h.move(j<0?1:-1,g.speed||50);return false})});return g.api?f:this}})(jquery);(function(b){var a=b.tools.scrollable;a.plugins=a.plugins||{};a.plugins.liner={version:"1.0.0",conf:{api:false}};b.fn.liner=function(d){var c=b.extend({},a.plugins.liner.conf),e;b.extend(c,d);this.each(function(){var o=b(this).scrollable();var z=b(this).parents(":not(:visible)");z.css({"display":"block","filter":"alpha(opacity=0)","-moz-opacity":"0","opacity":"0","position":"absolute"});var x=o.getitemwrap();var u=o.getitems();if(!u||u.size()<=0){return}var p=b(this).position();var t=false;if(d.scrolldirection=="up"||d.scrolldirection=="down"){t=true}var n=0;var q=u.not(".cloned");if(q&&q.size()>0){var f=b(q[0]).position();if(!t){n=-(f.left-p.left)}else{n=-(f.top-p.top)}}var j;var y=u.filter(".clearboth");if(y&&y.length){var h;if(d.scrolldirection=="left"){var s=q.filter(".clearboth");var i=q.index(s[0])-1;i=u.index(q[i])+1;h=b(u[i]).position()}else{if(d.scrolldirection=="up"){h=q.filter(":last");var i=u.index(h)+1;h=b(u[i]).position()}else{h=b(u[0]).position()}}if(!t){j=-(h.left-p.left)}else{j=-(h.top-p.top)}}else{var h=b(u).children(":last");if(!t){j=-h.position().left}else{j=-h.position().top}}var g=true;if(d.scrolldirection=="right"||d.scrolldirection=="down"){g=false}var k=d.speed||10;n=math.abs(n).tofixed(0);j=math.abs(j).tofixed(0);if(g){var w=math.min(n,j);var m=math.max(n,j);n=w;j=m}else{var w=math.max(n,j);var m=math.min(n,j);n=w;j=m}var r=this;!t?r.scrollleft=n:r.scrolltop=n;z.removeattr("style");function l(){var a=!t?r.scrollleft:r.scrolltop;if(a==j){!t?r.scrollleft=n:r.scrolltop=n}else{g?a++:a--;!t?r.scrollleft=a:r.scrolltop=a}}var v=setinterval(l,k);b(r).mouseover(function(){clearinterval(v)});b(r).mouseout(function(){v=setinterval(l,k)})});return c.api?e:this}})(jquery);jquery(document).ready(function(){jquery("div.pages-flip a").click(function(){var a=jquery(this).parent("div.pages-flip");a.find("a.current").removeclass("current");jquery(this).toggleclass("current")})});(function(a){a.fn.jqueryzoom=function(c){var d={xzoom:200,yzoom:200,offset:10,position:"right",lens:1,preload:1};if(c){a.extend(d,c)}var b="";a(this).hover(function(){var f=a(this).offset().left;var h=a(this).offset().top;var j=a(this).children("img").get(0).offsetwidth;var e=a(this).children("img").get(0).offsetheight;var k=this.offsetwidth;var i=this.offsetheight;b=a(this).children("img").attr("alt");var g=a(this).children("img").attr("jqimg");a(this).children("img").attr("alt","");if(a("div.zoomdiv").get().length==0){a(this).after("
");a(this).append("
")}if(d.position=="right"){if(f+j+d.offset+d.xzoom>screen.width){leftpos=f-d.offset-d.xzoom}else{leftpos=f+j+d.offset}}else{leftpos=f-d.xzoom-d.offset;if(leftpos<0){leftpos=f+j+d.offset}}a("div.zoomdiv").width(d.xzoom);a("div.zoomdiv").height(d.yzoom);a("div.zoomdiv").show();if(!d.lens){a(this).css("cursor","crosshair")}a(document.body).mousemove(function(m){mouse=new mouseevent(m);var o=a(".bigimg").get(0).offsetwidth;var n=a(".bigimg").get(0).offsetheight;var p="x";var l="y";if(isnan(l)|isnan(p)){var l=(o/j);var p=(n/e);a("div.jqzoompup").width((d.xzoom)/l);a("div.jqzoompup").height((d.yzoom)/p);if((d.xzoom/o)>=1){a("div.jqzoompup").width(parseint(k))}if((d.yzoom/n)>=1){a("div.jqzoompup").height(parseint(i))}if(d.lens){a("div.jqzoompup").css("visibility","visible")}}xpos=mouse.x-a("div.jqzoompup").width()/2-f;ypos=mouse.y-a("div.jqzoompup").height()/2-h;if(d.lens){xpos=(mouse.x-a("div.jqzoompup").width()/2j+f)?(j-a("div.jqzoompup").width()-2):xpos;ypos=(mouse.y-a("div.jqzoompup").height()/2e+h)?(e-a("div.jqzoompup").height()-2):ypos}if(d.lens){a("div.jqzoompup").css({top:ypos,left:xpos})}scrolly=ypos;a("div.zoomdiv").get(0).scrolltop=scrolly*p;scrollx=xpos;a("div.zoomdiv").get(0).scrollleft=(scrollx)*l})},function(){a(this).children("img").attr("alt",b);a(document.body).unbind("mousemove");if(d.lens){a("div.jqzoompup").remove()}a("div.zoomdiv").remove()});count=0;if(d.preload){a("body").append("");a(this).each(function(){var e=a(this).children("img").attr("jqimg");var f=jquery("div.jqpreload"+count+"").html();jquery("div.jqpreload"+count+"").html(f+'')})}}})(jquery);function mouseevent(a){this.x=a.pagex;this.y=a.pagey}function tab(f){var g="#"+f;var e=$(g);if(e.size()==0){return}var b=e.children("div[class=containercontent]");if(b.size()>0){g+=">div[class=containercontent]"}else{var j=e.children("div[class^=border_]");if(j.size()>0){g+=" div[class=containercontent]:first"}}var h="click";$tabhead=$(g+">ul>li");var a=e.attr("class");if(a&&a.indexof("_mouseover")!=-1){h="mouseover";$tabhead.click(function(k){k.preventdefault()})}$tabhead.bind(h,function(l){l.preventdefault();if(!$("#"+f).hasclass("tabboxid")){$("#"+f).addclass("tabboxid")}if(!$(this).parent().hasclass("tabhead")){$(this).parent().addclass("tabhead")}$(g+">ul>li").attr("class","multipagetab_link");$(this).attr("class","multipagetab_hover");var k=$(g+">ul>li").index($(this));$(g+">div[class!=clear]").attr("class","tabarea_b").eq(k).attr("class","tabarea_a")});var i="";var c=window.location.hash;if(c&&c.length>1){c=c.substring(1);if($("#"+f+" #"+c).length>0&&c.indexof(f)>=0){var d=c.indexof(f);i=c.substring(d+f.length+4)}}if(parseint(i)&&i>1){$(g+">ul>li").eq(parseint(i)-1).trigger(h)}else{$(g+">ul>li").eq(0).trigger(h)}}(function(m){var k=m.fn.remove,q=m.browser.mozilla&&(parsefloat(m.browser.version)<1.9);m.ui={version:"1.6",plugin:{add:function(a,c,b){var d=m.ui[a].prototype;for(var e in b){d.plugins[e]=d.plugins[e]||[];d.plugins[e].push([c,b[e]])}},call:function(e,c,a){var b=e.plugins[c];if(!b){return}for(var d=0;d').addclass(c).css({position:"absolute",top:"-5000px",left:"-5000px",display:"block"}).appendto("body");m.ui.csscache[c]=!!((!(/auto|default/).test(a.css("cursor"))||(/^[1-9]/).test(a.css("height"))||(/^[1-9]/).test(a.css("width"))||!(/none/).test(a.css("backgroundimage"))||!(/transparent|rgba\(0, 0, 0, 0\)/).test(a.css("backgroundcolor"))));try{m("body").get(0).removechild(a.get(0))}catch(b){}return m.ui.csscache[c]},hasscroll:function(c,a){if(m(c).css("overflow")=="hidden"){return false}var d=(a&&a=="left")?"scrollleft":"scrolltop",b=false;if(c[d]>0){return true}c[d]=1;b=(c[d]>0);c[d]=0;return b},isoveraxis:function(a,c,b){return(a>c)&&(a<(c+b))},isover:function(c,a,b,e,f,d){return m.ui.isoveraxis(c,b,f)&&m.ui.isoveraxis(a,e,d)},keycode:{backspace:8,caps_lock:20,comma:188,control:17,delete:46,down:40,end:35,enter:13,escape:27,home:36,insert:45,left:37,numpad_add:107,numpad_decimal:110,numpad_divide:111,numpad_enter:108,numpad_multiply:106,numpad_subtract:109,page_down:34,page_up:33,period:190,right:39,shift:16,space:32,tab:9,up:38}};if(q){var o=m.attr,r=m.fn.removeattr,j="http://www.w3.org/2005/07/aaa",n=/^aria-/,l=/^wairole:/;m.attr=function(a,d,b){var c=b!==undefined;return(d=="role"?(c?o.call(this,a,d,"wairole:"+b):(o.apply(this,arguments)||"").replace(l,"")):(n.test(d)?(c?a.setattributens(j,d.replace(n,"aaa:"),b):o.call(this,a,d.replace(n,"aaa:"))):o.apply(this,arguments)))};m.fn.removeattr=function(a){return(n.test(a)?this.each(function(){this.removeattributens(j,a.replace(n,""))}):r.call(this,a))}}m.fn.extend({remove:function(){m("*",this).add(this).each(function(){m(this).triggerhandler("remove")});return k.apply(this,arguments)},enableselection:function(){return this.attr("unselectable","off").css("mozuserselect","").unbind("selectstart.ui")},disableselection:function(){return this.attr("unselectable","on").css("mozuserselect","none").bind("selectstart.ui",function(){return false})},scrollparent:function(){var a;if((m.browser.msie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){a=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(m.curcss(this,"position",1))&&(/(auto|scroll)/).test(m.curcss(this,"overflow",1)+m.curcss(this,"overflow-y",1)+m.curcss(this,"overflow-x",1))}).eq(0)}else{a=this.parents().filter(function(){return(/(auto|scroll)/).test(m.curcss(this,"overflow",1)+m.curcss(this,"overflow-y",1)+m.curcss(this,"overflow-x",1))}).eq(0)}return(/fixed/).test(this.css("position"))||!a.length?m(document):a}});m.extend(m.expr[":"],{data:function(a,b,c){return m.data(a,c[3])},tabbable:function(c,d,a){var b=c.nodename.tolowercase();function e(f){return !(m(f).is(":hidden")||m(f).parents(":hidden").length)}return(c.tabindex>=0&&(("a"==b&&c.href)||(/input|select|textarea|button/.test(b)&&"hidden"!=c.type&&!c.disabled))&&e(c))}});function p(e,b,c,d){function a(h){var g=m[e][b][h]||[];return(typeof g=="string"?g.split(/,?\s+/):g)}var f=a("getter");if(d.length==1&&typeof d[0]=="string"){f=f.concat(a("gettersetter"))}return(m.inarray(c,f)!=-1)}m.widget=function(a,c){var b=a.split(".")[0];a=a.split(".")[1];m.fn[a]=function(f){var e=(typeof f=="string"),d=array.prototype.slice.call(arguments,1);if(e&&f.substring(0,1)=="_"){return this}if(e&&p(b,a,f,d)){var g=m.data(this[0],a);return(g?g[f].apply(g,d):undefined)}return this.each(function(){var h=m.data(this,a);(!h&&!e&&m.data(this,a,new m[b][a](this,f)));(h&&e&&m.isfunction(h[f])&&h[f].apply(h,d))})};m[b]=m[b]||{};m[b][a]=function(e,d){var f=this;this.widgetname=a;this.widgeteventprefix=m[b][a].eventprefix||a;this.widgetbaseclass=b+"-"+a;this.options=m.extend({},m.widget.defaults,m[b][a].defaults,m.metadata&&m.metadata.get(e)[a],d);this.element=m(e).bind("setdata."+a,function(i,h,g){return f._setdata(h,g)}).bind("getdata."+a,function(h,g){return f._getdata(g)}).bind("remove",function(){return f.destroy()});this._init()};m[b][a].prototype=m.extend({},m.widget.prototype,c);m[b][a].gettersetter="option"};m.widget.prototype={_init:function(){},destroy:function(){this.element.removedata(this.widgetname)},option:function(b,c){var a=b,d=this;if(typeof b=="string"){if(c===undefined){return this._getdata(b)}a={};a[b]=c}m.each(a,function(e,f){d._setdata(e,f)})},_getdata:function(a){return this.options[a]},_setdata:function(b,a){this.options[b]=a;if(b=="disabled"){this.element[a?"addclass":"removeclass"](this.widgetbaseclass+"-disabled")}},enable:function(){this._setdata("disabled",false)},disable:function(){this._setdata("disabled",true)},_trigger:function(a,b,c){var d=(a==this.widgeteventprefix?a:this.widgeteventprefix+a);b=b||m.event.fix({type:d,target:this.element[0]});return this.element.triggerhandler(d,[b,c],this.options[a])}};m.widget.defaults={disabled:false};m.ui.mouse={_mouseinit:function(){var a=this;this.element.bind("mousedown."+this.widgetname,function(b){return a._mousedown(b)}).bind("click."+this.widgetname,function(b){if(a._preventclickevent){a._preventclickevent=false;return false}});if(m.browser.msie){this._mouseunselectable=this.element.attr("unselectable");this.element.attr("unselectable","on")}this.started=false},_mousedestroy:function(){this.element.unbind("."+this.widgetname);(m.browser.msie&&this.element.attr("unselectable",this._mouseunselectable))},_mousedown:function(b){(this._mousestarted&&this._mouseup(b));this._mousedownevent=b;var a=this,c=(b.which==1),d=(typeof this.options.cancel=="string"?m(b.target).parents().add(b.target).filter(this.options.cancel).length:false);if(!c||d||!this._mousecapture(b)){return true}this.mousedelaymet=!this.options.delay;if(!this.mousedelaymet){this._mousedelaytimer=settimeout(function(){a.mousedelaymet=true},this.options.delay)}if(this._mousedistancemet(b)&&this._mousedelaymet(b)){this._mousestarted=(this._mousestart(b)!==false);if(!this._mousestarted){b.preventdefault();return true}}this._mousemovedelegate=function(e){return a._mousemove(e)};this._mouseupdelegate=function(e){return a._mouseup(e)};m(document).bind("mousemove."+this.widgetname,this._mousemovedelegate).bind("mouseup."+this.widgetname,this._mouseupdelegate);if(!m.browser.safari){b.preventdefault()}return true},_mousemove:function(a){if(m.browser.msie&&!a.button){return this._mouseup(a)}if(this._mousestarted){this._mousedrag(a);return a.preventdefault()}if(this._mousedistancemet(a)&&this._mousedelaymet(a)){this._mousestarted=(this._mousestart(this._mousedownevent,a)!==false);(this._mousestarted?this._mousedrag(a):this._mouseup(a))}return !this._mousestarted},_mouseup:function(a){m(document).unbind("mousemove."+this.widgetname,this._mousemovedelegate).unbind("mouseup."+this.widgetname,this._mouseupdelegate);if(this._mousestarted){this._mousestarted=false;this._preventclickevent=true;this._mousestop(a)}return false},_mousedistancemet:function(a){return(math.max(math.abs(this._mousedownevent.pagex-a.pagex),math.abs(this._mousedownevent.pagey-a.pagey))>=this.options.distance)},_mousedelaymet:function(a){return this.mousedelaymet},_mousestart:function(a){},_mousedrag:function(a){},_mousestop:function(a){},_mousecapture:function(a){return true}};m.ui.mouse.defaults={cancel:null,distance:1,delay:0}})(jquery);(function(b){b.widget("ui.draggable",b.extend({},b.ui.mouse,{_init:function(){if(this.options.helper=="original"&&!(/^(?:r|a|f)/).test(this.element.css("position"))){this.element[0].style.position="relative"}(this.options.cssnamespace&&this.element.addclass(this.options.cssnamespace+"-draggable"));(this.options.disabled&&this.element.addclass("ui-draggable-disabled"));this._mouseinit()},destroy:function(){if(!this.element.data("draggable")){return}this.element.removedata("draggable").unbind(".draggable").removeclass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mousedestroy()},_mousecapture:function(a){var d=this.options;if(this.helper||d.disabled||b(a.target).is(".ui-resizable-handle")){return false}this.handle=this._gethandle(a);if(!this.handle){return false}return true},_mousestart:function(a){var d=this.options;this.helper=this._createhelper(a);this._cachehelperproportions();if(b.ui.ddmanager){b.ui.ddmanager.current=this}this._cachemargins();this.cssposition=this.helper.css("position");this.scrollparent=this.helper.scrollparent();this.offset=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};b.extend(this.offset,{click:{left:a.pagex-this.offset.left,top:a.pagey-this.offset.top},parent:this._getparentoffset(),relative:this._getrelativeoffset()});if(d.cursorat){this._adjustoffsetfromhelper(d.cursorat)}this.originalposition=this._generateposition(a);if(d.containment){this._setcontainment()}this._propagate("start",a);this._cachehelperproportions();if(b.ui.ddmanager&&!d.dropbehaviour){b.ui.ddmanager.prepareoffsets(this,a)}this.helper.addclass("ui-draggable-dragging");this._mousedrag(a,true);return true},_mousedrag:function(a,d){this.position=this._generateposition(a);this.positionabs=this._convertpositionto("absolute");if(!d){this.position=this._propagate("drag",a)||this.position}if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}if(b.ui.ddmanager){b.ui.ddmanager.drag(this,a)}return false},_mousestop:function(f){var a=false;if(b.ui.ddmanager&&!this.options.dropbehaviour){var a=b.ui.ddmanager.drop(this,f)}if((this.options.revert=="invalid"&&!a)||(this.options.revert=="valid"&&a)||this.options.revert===true||(b.isfunction(this.options.revert)&&this.options.revert.call(this.element,a))){var e=this;b(this.helper).animate(this.originalposition,parseint(this.options.revertduration,10),function(){e._propagate("stop",f);e._clear()})}else{this._propagate("stop",f);this._clear()}return false},_gethandle:function(a){var d=!this.options.handle||!b(this.options.handle,this.element).length?true:false;b(this.options.handle,this.element).find("*").andself().each(function(){if(this==a.target){d=true}});return d},_createhelper:function(f){var a=this.options;var e=b.isfunction(a.helper)?b(a.helper.apply(this.element[0],[f])):(a.helper=="clone"?this.element.clone():this.element);if(!e.parents("body").length){e.appendto((a.appendto=="parent"?this.element[0].parentnode:a.appendto))}if(e[0]!=this.element[0]&&!(/(fixed|absolute)/).test(e.css("position"))){e.css("position","absolute")}return e},_adjustoffsetfromhelper:function(a){if(a.left!=undefined){this.offset.click.left=a.left+this.margins.left}if(a.right!=undefined){this.offset.click.left=this.helperproportions.width-a.right+this.margins.left}if(a.top!=undefined){this.offset.click.top=a.top+this.margins.top}if(a.bottom!=undefined){this.offset.click.top=this.helperproportions.height-a.bottom+this.margins.top}},_getparentoffset:function(){this.offsetparent=this.helper.offsetparent();var a=this.offsetparent.offset();if((this.offsetparent[0]==document.body&&b.browser.mozilla)||(this.offsetparent[0].tagname&&this.offsetparent[0].tagname.tolowercase()=="html"&&b.browser.msie)){a={top:0,left:0}}return{top:a.top+(parseint(this.offsetparent.css("bordertopwidth"),10)||0),left:a.left+(parseint(this.offsetparent.css("borderleftwidth"),10)||0)}},_getrelativeoffset:function(){if(this.cssposition=="relative"){var a=this.element.position();return{top:a.top-(parseint(this.helper.css("top"),10)||0)+this.scrollparent.scrolltop(),left:a.left-(parseint(this.helper.css("left"),10)||0)+this.scrollparent.scrollleft()}}else{return{top:0,left:0}}},_cachemargins:function(){this.margins={left:(parseint(this.element.css("marginleft"),10)||0),top:(parseint(this.element.css("margintop"),10)||0)}},_cachehelperproportions:function(){this.helperproportions={width:this.helper.outerwidth(),height:this.helper.outerheight()}},_setcontainment:function(){var f=this.options;if(f.containment=="parent"){f.containment=this.helper[0].parentnode}if(f.containment=="document"||f.containment=="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,b(f.containment=="document"?document:window).width()-this.offset.relative.left-this.offset.parent.left-this.helperproportions.width-this.margins.left-(parseint(this.element.css("marginright"),10)||0),(b(f.containment=="document"?document:window).height()||document.body.parentnode.scrollheight)-this.offset.relative.top-this.offset.parent.top-this.helperproportions.height-this.margins.top-(parseint(this.element.css("marginbottom"),10)||0)]}if(!(/^(document|window|parent)$/).test(f.containment)){var h=b(f.containment)[0];var a=b(f.containment).offset();var g=(b(h).css("overflow")!="hidden");this.containment=[a.left+(parseint(b(h).css("borderleftwidth"),10)||0)-this.offset.relative.left-this.offset.parent.left-this.margins.left,a.top+(parseint(b(h).css("bordertopwidth"),10)||0)-this.offset.relative.top-this.offset.parent.top-this.margins.top,a.left+(g?math.max(h.scrollwidth,h.offsetwidth):h.offsetwidth)-(parseint(b(h).css("borderleftwidth"),10)||0)-this.offset.relative.left-this.offset.parent.left-this.helperproportions.width-this.margins.left,a.top+(g?math.max(h.scrollheight,h.offsetheight):h.offsetheight)-(parseint(b(h).css("bordertopwidth"),10)||0)-this.offset.relative.top-this.offset.parent.top-this.helperproportions.height-this.margins.top]}},_convertpositionto:function(g,a){if(!a){a=this.position}var j=g=="absolute"?1:-1;var i=this[(this.cssposition=="absolute"?"offset":"scroll")+"parent"],h=(/(html|body)/i).test(i[0].tagname);return{top:(a.top+this.offset.relative.top*j+this.offset.parent.top*j+(this.cssposition=="fixed"?-this.scrollparent.scrolltop():(h?0:i.scrolltop()))*j+this.margins.top*j),left:(a.left+this.offset.relative.left*j+this.offset.parent.left*j+(this.cssposition=="fixed"?-this.scrollparent.scrollleft():(h?0:i.scrollleft()))*j+this.margins.left*j)}},_generateposition:function(j){var i=this.options,n=this[(this.cssposition=="absolute"?"offset":"scroll")+"parent"],a=(/(html|body)/i).test(n[0].tagname);var m={top:(j.pagey-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssposition=="fixed"?-this.scrollparent.scrolltop():(a?0:n.scrolltop()))),left:(j.pagex-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssposition=="fixed"?-this.scrollparent.scrollleft():a?0:n.scrollleft()))};if(!this.originalposition){return m}if(this.containment){if(m.leftthis.containment[2]){m.left=this.containment[2]}if(m.top>this.containment[3]){m.top=this.containment[3]}}if(i.grid){var k=this.originalposition.top+math.round((m.top-this.originalposition.top)/i.grid[1])*i.grid[1];m.top=this.containment?(!(kthis.containment[3])?k:(!(kthis.containment[2])?l:(!(l').css({width:this.offsetwidth+"px",height:this.offsetheight+"px",position:"absolute",opacity:"0.001",zindex:1000}).css(b(this).offset()).appendto("body")})},stop:function(a,d){b("div.ui-draggable-iframefix").each(function(){this.parentnode.removechild(this)})}});b.ui.plugin.add("draggable","opacity",{start:function(f,a){var e=b(a.helper);if(e.css("opacity")){a.options._opacity=e.css("opacity")}e.css("opacity",a.options.opacity)},stop:function(a,d){if(d.options._opacity){b(d.helper).css("opacity",d.options._opacity)}}});b.ui.plugin.add("draggable","scroll",{start:function(h,a){var f=a.options;var g=b(this).data("draggable");if(g.scrollparent[0]!=document&&g.scrollparent[0].tagname!="html"){g.overflowoffset=g.scrollparent.offset()}},drag:function(g,h){var a=h.options,i=false;var j=b(this).data("draggable");if(j.scrollparent[0]!=document&&j.scrollparent[0].tagname!="html"){if((j.overflowoffset.top+j.scrollparent[0].offsetheight)-g.pagey=0;a--){var c=j.snapelements[a].left,w=c+j.snapelements[a].width,z=j.snapelements[a].top,t=z+j.snapelements[a].height;if(!((c-v=r&&t<=b)||(a>=r&&a<=b)||(tb))&&((z>=x&&z<=v)||(w>=x&&w<=v)||(zv));break;default:return false;break}};b.ui.ddmanager={current:null,droppables:{"default":[]},prepareoffsets:function(k,i){var l=b.ui.ddmanager.droppables[k.options.scope];var a=i?i.type:null;var n=(k.currentitem||k.element).find(":data(droppable)").andself();droppablesloop:for(var j=0;j').css({position:h.css("position"),width:h.outerwidth(),height:h.outerheight(),top:h.css("top"),left:h.css("left")}));var a=this.element;this.element=this.element.parent();this.element.data("resizable",this);this.element.css({marginleft:a.css("marginleft"),margintop:a.css("margintop"),marginright:a.css("marginright"),marginbottom:a.css("marginbottom")});a.css({marginleft:0,margintop:0,marginright:0,marginbottom:0});if(c.browser.safari&&e.preventdefault){a.css("resize","none")}e.proportionallyresize=a.css({position:"static",zoom:1,display:"block"});this.element.css({margin:a.css("margin")});this._proportionallyresize()}if(!e.handles){e.handles=!c(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}}if(e.handles.constructor==string){e.zindex=e.zindex||1000;if(e.handles=="all"){e.handles="n,e,s,w,se,sw,ne,nw"}var v=e.handles.split(",");e.handles={};var b={handle:"position: absolute; display: none; overflow:hidden;",n:"top: 0pt; width:100%;",e:"right: 0pt; height:100%;",s:"bottom: 0pt; width:100%;",w:"left: 0pt; height:100%;",se:"bottom: 0pt; right: 0px;",sw:"bottom: 0pt; left: 0px;",ne:"top: 0pt; right: 0px;",nw:"top: 0pt; left: 0px;"};for(var b=0;b'].join("")).css(f);e.handles[x]=".ui-resizable-"+x;this.element.append(i.css(k?y:{}).css(e.knobhandles?l:{}).addclass(e.knobhandles?"ui-resizable-knob-handle":"").addclass(e.knobhandles))}if(e.knobhandles){this.element.addclass("ui-resizable-knob").css(!c.ui.css("ui-resizable-knob")?{}:{})}}this._renderaxis=function(f){f=f||this.element;for(var h in e.handles){if(e.handles[h].constructor==string){e.handles[h]=c(e.handles[h],this.element).show()}if(e.transparent){e.handles[h].css({opacity:0})}if(this.element.is(".ui-wrapper")&&e._nodename.match(/textarea|input|select|button/i)){var g=c(e.handles[h],this.element),i=0;i=/sw|ne|nw|se|n|s/.test(h)?g.outerheight():g.outerwidth();var e=["padding",/ne|nw|n/.test(h)?"top":/se|sw|s/.test(h)?"bottom":/^e$/.test(h)?"right":"left"].join("");if(!e.transparent){f.css(e,i)}this._proportionallyresize()}if(!c(e.handles[h]).length){continue}}};this._renderaxis(this.element);e._handles=c(".ui-resizable-handle",d.element);if(e.disableselection){e._handles.disableselection()}e._handles.mouseover(function(){if(!e.resizing){if(this.classname){var e=this.classname.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}d.axis=e.axis=e&&e[1]?e[1]:"se"}});if(e.autohide){e._handles.hide();c(d.element).addclass("ui-resizable-autohide").hover(function(){c(this).removeclass("ui-resizable-autohide");e._handles.show()},function(){if(!e.resizing){c(this).addclass("ui-resizable-autohide");e._handles.hide()}})}this._mouseinit()},destroy:function(){var b=this.element,a=b.children(".ui-resizable").get(0);this._mousedestroy();var f=function(e){c(e).removeclass("ui-resizable ui-resizable-disabled").removedata("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};f(b);if(b.is(".ui-wrapper")&&a){b.parent().append(c(a).css({position:b.css("position"),width:b.outerwidth(),height:b.outerheight(),top:b.css("top"),left:b.css("left")})).end().remove();f(a)}},_mousecapture:function(a){if(this.options.disabled){return false}var b=false;for(var f in this.options.handles){if(c(this.options.handles[f])[0]==a.target){b=true}}if(!b){return false}return true},_mousestart:function(t){var u=this.options,q=this.element.position(),r=this.element,n=c.browser.msie&&c.browser.version<7;u.resizing=true;u.documentscroll={top:c(document).scrolltop(),left:c(document).scrollleft()};if(r.is(".ui-draggable")||(/absolute/).test(r.css("position"))){var a=c.browser.msie&&!u.containment&&(/absolute/).test(r.css("position"))&&!(/relative/).test(r.parent().css("position"));var o=a?this.documentscroll.top:0,b=a?this.documentscroll.left:0;r.css({position:"absolute",top:(q.top+o),left:(q.left+b)})}if(c.browser.opera&&(/relative/).test(r.css("position"))){r.css({position:"relative",top:"auto",left:"auto"})}this._renderproxy();var p=d(this.helper.css("left")),s=d(this.helper.css("top"));if(u.containment){p+=c(u.containment).scrollleft()||0;s+=c(u.containment).scrolltop()||0}this.offset=this.helper.offset();this.position={left:p,top:s};this.size=u.helper||n?{width:r.outerwidth(),height:r.outerheight()}:{width:r.width(),height:r.height()};this.originalsize=u.helper||n?{width:r.outerwidth(),height:r.outerheight()}:{width:r.width(),height:r.height()};this.originalposition={left:p,top:s};this.sizediff={width:r.outerwidth()-r.width(),height:r.outerheight()-r.height()};this.originalmouseposition={left:t.pagex,top:t.pagey};u.aspectratio=(typeof u.aspectratio=="number")?u.aspectratio:((this.originalsize.width/this.originalsize.height)||1);if(u.preservecursor){var v=c(".ui-resizable-"+this.axis).css("cursor");c("body").css("cursor",v=="auto"?this.axis+"-resize":v)}this._propagate("start",t);return true},_mousedrag:function(u){var v=this.helper,y=this.options,a={},q=this,b=this.originalmouseposition,s=this.axis;var r=(u.pagex-b.left)||0,t=(u.pagey-b.top)||0;var w=this._change[s];if(!w){return false}var z=w.apply(this,[u,r,t]),p=c.browser.msie&&c.browser.version<7,x=this.sizediff;if(y._aspectratio||u.shiftkey){z=this._updateratio(z,u)}z=this._respectsize(z,u);this._propagate("resize",u);v.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});if(!y.helper&&y.proportionallyresize){this._proportionallyresize()}this._updatecache(z);this.element.triggerhandler("resize",[u,this.ui()],this.options["resize"]);return false},_mousestop:function(p){this.options.resizing=false;var q=this.options,a=this;if(q.helper){var s=q.proportionallyresize,o=s&&(/textarea/i).test(s.get(0).nodename),r=o&&c.ui.hasscroll(s.get(0),"left")?0:a.sizediff.height,m=o?0:a.sizediff.width;var n={width:(a.size.width-m),height:(a.size.height-r)},b=(parseint(a.element.css("left"),10)+(a.position.left-a.originalposition.left))||null,t=(parseint(a.element.css("top"),10)+(a.position.top-a.originalposition.top))||null;if(!q.animate){this.element.css(c.extend(n,{top:t,left:b}))}if(q.helper&&!q.animate){this._proportionallyresize()}}if(q.preservecursor){c("body").css("cursor","auto")}this._propagate("stop",p);if(q.helper){this.helper.remove()}return false},_updatecache:function(b){var a=this.options;this.offset=this.helper.offset();if(b.left){this.position.left=b.left}if(b.top){this.position.top=b.top}if(b.height){this.size.height=b.height}if(b.width){this.size.width=b.width}},_updateratio:function(a,j){var b=this.options,l=this.position,i=this.size,k=this.axis;if(a.height){a.width=(i.height*b.aspectratio)}else{if(a.width){a.height=(i.width/b.aspectratio)}}if(k=="sw"){a.left=l.left+(i.width-a.width);a.top=null}if(k=="nw"){a.top=l.top+(i.height-a.height);a.left=l.left+(i.width-a.width)}return a},_respectsize:function(d,a){var b=this.helper,y=this.options,t=y._aspectratio||a.shiftkey,s=this.axis,c=d.width&&y.maxwidth&&y.maxwidthd.width,b=d.height&&y.minheight&&y.minheight>d.height;if(x){d.width=y.minwidth}if(b){d.height=y.minheight}if(c){d.width=y.maxwidth}if(a){d.height=y.maxheight}var z=this.originalposition.left+this.originalsize.width,v=this.position.top+this.size.height;var r=/sw|nw|w/.test(s),w=/nw|ne|n/.test(s);if(x&&r){d.left=z-y.minwidth}if(c&&r){d.left=z-y.maxwidth}if(b&&w){d.top=v-y.minheight}if(a&&w){d.top=v-y.maxheight}var u=!d.width&&!d.height;if(u&&!d.left&&d.top){d.top=null}else{if(u&&!d.top&&d.left){d.left=null}}return d},_proportionallyresize:function(){var b=this.options;if(!b.proportionallyresize){return}var i=b.proportionallyresize,h=this.helper||this.element;if(!b.borderdif){var j=[i.css("bordertopwidth"),i.css("borderrightwidth"),i.css("borderbottomwidth"),i.css("borderleftwidth")],a=[i.css("paddingtop"),i.css("paddingright"),i.css("paddingbottom"),i.css("paddingleft")];b.borderdif=c.map(j,function(f,l){var g=parseint(f,10)||0,e=parseint(a[l],10)||0;return g+e})}i.css({height:(h.height()-b.borderdif[0]-b.borderdif[2])+"px",width:(h.width()-b.borderdif[1]-b.borderdif[3])+"px"})},_renderproxy:function(){var h=this.element,b=this.options;this.elementoffset=h.offset();if(b.helper){this.helper=this.helper||c('
');var j=c.browser.msie&&c.browser.version<7,i=(j?1:0),a=(j?2:-1);this.helper.addclass(b.helper).css({width:h.outerwidth()+a,height:h.outerheight()+a,position:"absolute",left:this.elementoffset.left-i+"px",top:this.elementoffset.top-i+"px",zindex:++b.zindex});this.helper.appendto("body");if(b.disableselection){this.helper.disableselection()}}else{this.helper=h}},_change:{e:function(b,a,f){return{width:this.originalsize.width+a}},w:function(a,i,l){var b=this.options,j=this.originalsize,k=this.originalposition;return{left:k.left+i,width:j.width-i}},n:function(a,i,l){var b=this.options,j=this.originalsize,k=this.originalposition;return{top:k.top+l,height:j.height-l}},s:function(b,a,f){return{height:this.originalsize.height+f}},se:function(b,a,f){return c.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,a,f]))},sw:function(b,a,f){return c.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,a,f]))},ne:function(b,a,f){return c.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,a,f]))},nw:function(b,a,f){return c.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,a,f]))}},_propagate:function(a,b){c.ui.plugin.call(this,a,[b,this.ui()]);if(a!="resize"){this.element.triggerhandler(["resize",a].join(""),[b,this.ui()],this.options[a])}},plugins:{},ui:function(){return{originalelement:this.originalelement,element:this.element,helper:this.helper,position:this.position,size:this.size,options:this.options,originalsize:this.originalsize,originalposition:this.originalposition}}}));c.extend(c.ui.resizable,{version:"1.6",defaults:{alsoresize:false,animate:false,animateduration:"slow",animateeasing:"swing",aspectratio:false,autohide:false,cancel:":input",containment:false,disableselection:true,distance:1,delay:0,ghost:false,grid:false,knobhandles:false,maxheight:null,maxwidth:null,minheight:10,minwidth:10,preservecursor:true,preventdefault:true,proportionallyresize:false,transparent:false}});c.ui.plugin.add("resizable","alsoresize",{start:function(h,i){var b=i.options,j=c(this).data("resizable"),a=function(e){c(e).each(function(){c(this).data("resizable-alsoresize",{width:parseint(c(this).width(),10),height:parseint(c(this).height(),10),left:parseint(c(this).css("left"),10),top:parseint(c(this).css("top"),10)})})};if(typeof(b.alsoresize)=="object"&&!b.alsoresize.parentnode){if(b.alsoresize.length){b.alsoresize=b.alsoresize[0];a(b.alsoresize)}else{c.each(b.alsoresize,function(e,f){a(e)})}}else{a(b.alsoresize)}},resize:function(o,m){var a=m.options,n=c(this).data("resizable"),l=n.originalsize,p=n.originalposition;var b={height:(n.size.height-l.height)||0,width:(n.size.width-l.width)||0,top:(n.position.top-p.top)||0,left:(n.position.left-p.left)||0},k=function(e,f){c(e).each(function(){var h=c(this).data("resizable-alsoresize"),g={},i=f&&f.length?f:["width","height","top","left"];c.each(i||["width","height","top","left"],function(s,j){var t=(h[j]||0)+(b[j]||0);if(t&&t>=0){g[j]=t||null}});c(this).css(g)})};if(typeof(a.alsoresize)=="object"&&!a.alsoresize.parentnode){c.each(a.alsoresize,function(e,f){k(e,f)})}else{k(a.alsoresize)}},stop:function(b,a){c(this).removedata("resizable-alsoresize-start")}});c.ui.plugin.add("resizable","animate",{stop:function(s,o){var b=o.options,p=c(this).data("resizable");var r=b.proportionallyresize,q=r&&(/textarea/i).test(r.get(0).nodename),t=q&&c.ui.hasscroll(r.get(0),"left")?0:p.sizediff.height,v=q?0:p.sizediff.width;var u={width:(p.size.width-v),height:(p.size.height-t)},n=(parseint(p.element.css("left"),10)+(p.position.left-p.originalposition.left))||null,a=(parseint(p.element.css("top"),10)+(p.position.top-p.originalposition.top))||null;p.element.animate(c.extend(u,a&&n?{top:a,left:n}:{}),{duration:b.animateduration,easing:b.animateeasing,step:function(){var e={width:parseint(p.element.css("width"),10),height:parseint(p.element.css("height"),10),top:parseint(p.element.css("top"),10),left:parseint(p.element.css("left"),10)};if(r){r.css({width:e.width,height:e.height})}p._updatecache(e);p._propagate("animate",s)}})}});c.ui.plugin.add("resizable","containment",{start:function(y,r){var b=r.options,a=c(this).data("resizable"),b=a.element;var z=b.containment,q=(z instanceof c)?z.get(0):(/parent/.test(z))?b.parent().get(0):z;if(!q){return}a.containerelement=c(q);if(/document/.test(z)||z==document){a.containeroffset={left:0,top:0};a.containerposition={left:0,top:0};a.parentdata={element:c(document),left:0,top:0,width:c(document).width(),height:c(document).height()||document.body.parentnode.scrollheight}}else{var t=c(q),x=[];c(["top","right","left","bottom"]).each(function(e,f){x[e]=d(t.css("padding"+f))});a.containeroffset=t.offset();a.containerposition=t.position();a.containersize={height:(t.innerheight()-x[3]),width:(t.innerwidth()-x[1])};var u=a.containeroffset,v=a.containersize.height,a=a.containersize.width,w=(c.ui.hasscroll(q,"left")?q.scrollwidth:a),s=(c.ui.hasscroll(q)?q.scrollheight:v);a.parentdata={element:q,left:u.left,top:u.top,width:w,height:s}}},resize:function(a,s){var y=s.options,c=c(this).data("resizable"),z=c.containersize,v=c.containeroffset,a=c.size,u=c.position,t=y._aspectratio||a.shiftkey,w={top:0,left:0},x=c.containerelement;if(x[0]!=document&&(/static/).test(x.css("position"))){w=v}if(u.left<(y.helper?v.left:0)){c.size.width=c.size.width+(y.helper?(c.position.left-v.left):(c.position.left-w.left));if(t){c.size.height=c.size.width/y.aspectratio}c.position.left=y.helper?v.left:0}if(u.top<(y.helper?v.top:0)){c.size.height=c.size.height+(y.helper?(c.position.top-v.top):c.position.top);if(t){c.size.width=c.size.height*y.aspectratio}c.position.top=y.helper?v.top:0}c.offset.left=c.parentdata.left+c.position.left;c.offset.top=c.parentdata.top+c.position.top;var d=math.abs((y.helper?c.offset.left-w.left:(c.offset.left-w.left))+c.sizediff.width),b=math.abs((y.helper?c.offset.top-w.top:(c.offset.top-v.top))+c.sizediff.height);var r=c.containerelement.get(0)==c.element.parent().get(0),b=/relative|absolute/.test(c.containerelement.css("position"));if(r&&b){d-=c.parentdata.left}if(d+c.size.width>=c.parentdata.width){c.size.width=c.parentdata.width-d;if(t){c.size.height=c.size.width/y.aspectratio}}if(b+c.size.height>=c.parentdata.height){c.size.height=c.parentdata.height-b;if(t){c.size.width=c.size.height*y.aspectratio}}},stop:function(v,a){var w=a.options,r=c(this).data("resizable"),o=r.position,x=r.containeroffset,s=r.containerposition,t=r.containerelement;var u=c(r.helper),p=u.offset(),q=u.outerwidth()-r.sizediff.width,b=u.outerheight()-r.sizediff.height;if(w.helper&&!w.animate&&(/relative/).test(t.css("position"))){c(this).css({left:p.left-s.left-x.left,width:q,height:b})}if(w.helper&&!w.animate&&(/static/).test(t.css("position"))){c(this).css({left:p.left-s.left-x.left,width:q,height:b})}}});c.ui.plugin.add("resizable","ghost",{start:function(j,a){var b=a.options,k=c(this).data("resizable"),l=b.proportionallyresize,i=k.size;if(!l){k.ghost=k.element.clone()}else{k.ghost=l.clone()}k.ghost.css({opacity:0.25,display:"block",position:"relative",height:i.height,width:i.width,margin:0,left:0,top:0}).addclass("ui-resizable-ghost").addclass(typeof b.ghost=="string"?b.ghost:"");k.ghost.appendto(k.helper)},resize:function(h,i){var a=i.options,j=c(this).data("resizable"),b=a.proportionallyresize;if(j.ghost){j.ghost.css({position:"relative",height:j.size.height,width:j.size.width})}},stop:function(h,i){var a=i.options,j=c(this).data("resizable"),b=a.proportionallyresize;if(j.ghost&&j.helper){j.helper.get(0).removechild(j.ghost.get(0))}}});c.ui.plugin.add("resizable","grid",{resize:function(q,a){var r=a.options,p=c(this).data("resizable"),n=p.size,s=p.originalsize,b=p.originalposition,o=p.axis,v=r._aspectratio||q.shiftkey;r.grid=typeof r.grid=="number"?[r.grid,r.grid]:r.grid;var u=math.round((n.width-s.width)/(r.grid[0]||1))*(r.grid[0]||1),t=math.round((n.height-s.height)/(r.grid[1]||1))*(r.grid[1]||1);if(/^(se|s|e)$/.test(o)){p.size.width=s.width+u;p.size.height=s.height+t}else{if(/^(ne)$/.test(o)){p.size.width=s.width+u;p.size.height=s.height+t;p.position.top=b.top-t}else{if(/^(sw)$/.test(o)){p.size.width=s.width+u;p.size.height=s.height+t;p.position.left=b.left-u}else{p.size.width=s.width+u;p.size.height=s.height+t;p.position.top=b.top-t;p.position.left=b.left-u}}}}});var d=function(a){return parseint(a,10)||0}})(jquery);(function(b){b.widget("ui.selectable",b.extend({},b.ui.mouse,{_init:function(){var a=this;this.element.addclass("ui-selectable");this.dragged=false;var d;this.refresh=function(){d=b(a.options.filter,a.element[0]);d.each(function(){var c=b(this);var f=c.offset();b.data(this,"selectable-item",{element:this,$element:c,left:f.left,top:f.top,right:f.left+c.width(),bottom:f.top+c.height(),startselected:false,selected:c.hasclass("ui-selected"),selecting:c.hasclass("ui-selecting"),unselecting:c.hasclass("ui-unselecting")})})};this.refresh();this.selectees=d.addclass("ui-selectee");this._mouseinit();this.helper=b(document.createelement("div")).css({border:"1px dotted black"}).addclass("ui-selectable-helper")},destroy:function(){this.element.removeclass("ui-selectable ui-selectable-disabled").removedata("selectable").unbind(".selectable");this._mousedestroy()},_mousestart:function(f){var h=this;this.opos=[f.pagex,f.pagey];if(this.options.disabled){return}var a=this.options;this.selectees=b(a.filter,this.element[0]);this.element.triggerhandler("selectablestart",[f,{"selectable":this.element[0],"options":a}],a.start);b("body").append(this.helper);this.helper.css({"z-index":100,"position":"absolute","left":f.clientx,"top":f.clienty,"width":0,"height":0});if(a.autorefresh){this.refresh()}this.selectees.filter(".ui-selected").each(function(){var c=b.data(this,"selectable-item");c.startselected=true;if(!f.metakey){c.$element.removeclass("ui-selected");c.selected=false;c.$element.addclass("ui-unselecting");c.unselecting=true;h.element.triggerhandler("selectableunselecting",[f,{selectable:h.element[0],unselecting:c.element,options:a}],a.unselecting)}});var g=false;b(f.target).parents().andself().each(function(){if(b.data(this,"selectable-item")){g=true}});return this.options.keyboard?!g:true},_mousedrag:function(j){var l=this;this.dragged=true;if(this.options.disabled){return}var p=this.options;var o=this.opos[0],a=this.opos[1],k=j.pagex,n=j.pagey;if(o>k){var m=k;k=o;o=m}if(a>n){var m=n;n=a;a=m}this.helper.css({left:o,top:a,width:k-o,height:n-a});this.selectees.each(function(){var d=b.data(this,"selectable-item");if(!d||d.element==l.element[0]){return}var c=false;if(p.tolerance=="touch"){c=(!(d.left>k||d.rightn||d.bottomo&&d.righta&&d.bottom=0;a--){this.items[a].item.removedata("sortable-item")}},_mousecapture:function(j,a){if(this.reverting){return false}if(this.options.disabled||this.options.type=="static"){return false}this._refreshitems(j);var i=null,l=this,k=b(j.target).parents().each(function(){if(b.data(this,"sortable-item")==l){i=b(this);return false}});if(b.data(j.target,"sortable-item")==l){i=b(j.target)}if(!i){return false}if(this.options.handle&&!a){var h=false;b(this.options.handle,i).find("*").andself().each(function(){if(this==j.target){h=true}});if(!h){return false}}this.currentitem=i;this._removecurrentsfromitems();return true},_mousestart:function(g,h,i){var a=this.options;this.currentcontainer=this;this.refreshpositions();this.helper=this._createhelper(g);this._cachehelperproportions();this._cachemargins();this.scrollparent=this.helper.scrollparent();this.offset=this.currentitem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssposition=this.helper.css("position");b.extend(this.offset,{click:{left:g.pagex-this.offset.left,top:g.pagey-this.offset.top},parent:this._getparentoffset(),relative:this._getrelativeoffset()});if(a.cursorat){this._adjustoffsetfromhelper(a.cursorat)}this.originalposition=this._generateposition(g);this.domposition={prev:this.currentitem.prev()[0],parent:this.currentitem.parent()[0]};if(this.helper[0]!=this.currentitem[0]){this.currentitem.hide()}this._createplaceholder();if(a.containment){this._setcontainment()}this._propagate("start",g);if(!this._preservehelperproportions){this._cachehelperproportions()}if(!i){for(var j=this.containers.length-1;j>=0;j--){this.containers[j]._propagate("activate",g,this)}}if(b.ui.ddmanager){b.ui.ddmanager.current=this}if(b.ui.ddmanager&&!a.dropbehaviour){b.ui.ddmanager.prepareoffsets(this,g)}this.dragging=true;this.helper.addclass("ui-sortable-helper");this._mousedrag(g);return true},_mousedrag:function(h){this.position=this._generateposition(h);this.positionabs=this._convertpositionto("absolute");if(!this.lastpositionabs){this.lastpositionabs=this.positionabs}b.ui.plugin.call(this,"sort",[h,this._ui()]);this.positionabs=this._convertpositionto("absolute");if(!this.options.axis||this.options.axis!="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!="x"){this.helper[0].style.top=this.position.top+"px"}for(var j=this.items.length-1;j>=0;j--){var g=this.items[j],i=g.item[0],a=this._intersectswithpointer(g);if(!a){continue}if(i!=this.currentitem[0]&&this.placeholder[a==1?"next":"prev"]()[0]!=i&&!b.ui.contains(this.placeholder[0],i)&&(this.options.type=="semi-dynamic"?!b.ui.contains(this.element[0],i):true)){this.direction=a==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectswithsides(g)){this.options.sortindicator.call(this,h,g)}else{break}this._propagate("change",h);break}}this._contactcontainers(h);if(b.ui.ddmanager){b.ui.ddmanager.drag(this,h)}this._trigger("sort",h,this._ui());this.lastpositionabs=this.positionabs;return false},_mousestop:function(h,a){if(!h){return}if(b.ui.ddmanager&&!this.options.dropbehaviour){b.ui.ddmanager.drop(this,h)}if(this.options.revert){var g=this;var f=g.placeholder.offset();g.reverting=true;b(this.helper).animate({left:f.left-this.offset.parent.left-g.margins.left+(this.offsetparent[0]==document.body?0:this.offsetparent[0].scrollleft),top:f.top-this.offset.parent.top-g.margins.top+(this.offsetparent[0]==document.body?0:this.offsetparent[0].scrolltop)},parseint(this.options.revert,10)||500,function(){g._clear(h)})}else{this._clear(h,a)}return false},cancel:function(){if(this.dragging){this._mouseup();if(this.options.helper=="original"){this.currentitem.css(this._storedcss).removeclass("ui-sortable-helper")}else{this.currentitem.show()}for(var a=this.containers.length-1;a>=0;a--){this.containers[a]._propagate("deactivate",null,this);if(this.containers[a].containercache.over){this.containers[a]._propagate("out",null,this);this.containers[a].containercache.over=0}}}if(this.placeholder[0].parentnode){this.placeholder[0].parentnode.removechild(this.placeholder[0])}if(this.options.helper!="original"&&this.helper&&this.helper[0].parentnode){this.helper.remove()}b.extend(this,{helper:null,dragging:false,reverting:false,_nofinalsort:null});if(this.domposition.prev){b(this.domposition.prev).after(this.currentitem)}else{b(this.domposition.parent).prepend(this.currentitem)}return true},serialize:function(a){var e=this._getitemsasjquery(a&&a.connected);var f=[];a=a||{};b(e).each(function(){var c=(b(a.item||this).attr(a.attribute||"id")||"").match(a.expression||(/(.+)[-=_](.+)/));if(c){f.push((a.key||c[1]+"[]")+"="+(a.key&&a.expression?c[1]:c[2]))}});return f.join("&")},toarray:function(a){var e=this._getitemsasjquery(a&&a.connected);var f=[];a=a||{};e.each(function(){f.push(b(a.item||this).attr(a.attribute||"id")||"")});return f},_intersectswith:function(a){var v=this.positionabs.left,s=v+this.helperproportions.width,x=this.positionabs.top,o=x+this.helperproportions.height;var w=a.left,r=w+a.width,p=a.top,n=p+a.height;var q=this.offset.click.top,u=this.offset.click.left;var t=(x+q)>p&&(x+q)w&&(v+u)a[this.floating?"width":"height"])){return t}else{return(w0?"down":"up")},_getdraghorizontaldirection:function(){var a=this.positionabs.left-this.lastpositionabs.left;return a!=0&&(a>0?"right":"left")},refresh:function(a){this._refreshitems(a);this.refreshpositions()},_getitemsasjquery:function(n){var l=this;var k=[];var p=[];if(this.options.connectwith&&n){for(var m=this.options.connectwith.length-1;m>=0;m--){var j=b(this.options.connectwith[m]);for(var o=j.length-1;o>=0;o--){var a=b.data(j[o],"sortable");if(a&&a!=this&&!a.options.disabled){p.push([b.isfunction(a.options.items)?a.options.items.call(a.element):b(a.options.items,a.element).not(".ui-sortable-helper"),a])}}}}p.push([b.isfunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentitem}):b(this.options.items,this.element).not(".ui-sortable-helper"),this]);for(var m=p.length-1;m>=0;m--){p[m][0].each(function(){k.push(this)})}return b(k)},_removecurrentsfromitems:function(){var a=this.currentitem.find(":data(sortable-item)");for(var f=0;f=0;w--){var x=b(this.options.connectwith[w]);for(var v=x.length-1;v>=0;v--){var u=b.data(x[v],"sortable");if(u&&u!=this&&!u.options.disabled){t.push([b.isfunction(u.options.items)?u.options.items.call(u.element[0],r,{item:this.currentitem}):b(u.options.items,u.element),u]);this.containers.push(u)}}}}for(var w=t.length-1;w>=0;w--){var o=t[w][1];var s=t[w][0];for(var v=0,a=s.length;v=0;g--){var h=this.items[g];if(h.instance!=this.currentcontainer&&this.currentcontainer&&h.item[0]!=this.currentitem[0]){continue}var j=this.options.toleranceelement?b(this.options.toleranceelement,h.item):h.item;if(!i){if(this.options.accurateintersection){h.width=j.outerwidth();h.height=j.outerheight()}else{h.width=j[0].offsetwidth;h.height=j[0].offsetheight}}var a=j.offset();h.left=a.left;h.top=a.top}if(this.options.custom&&this.options.custom.refreshcontainers){this.options.custom.refreshcontainers.call(this)}else{for(var g=this.containers.length-1;g>=0;g--){var a=this.containers[g].element.offset();this.containers[g].containercache.left=a.left;this.containers[g].containercache.top=a.top;this.containers[g].containercache.width=this.containers[g].element.outerwidth();this.containers[g].containercache.height=this.containers[g].element.outerheight()}}},_createplaceholder:function(a){var g=a||this,f=g.options;if(!f.placeholder||f.placeholder.constructor==string){var h=f.placeholder;f.placeholder={element:function(){var c=b(document.createelement(g.currentitem[0].nodename)).addclass(h||g.currentitem[0].classname+" ui-sortable-placeholder").removeclass("ui-sortable-helper")[0];if(!h){c.style.visibility="hidden";document.body.appendchild(c);c.innerhtml=g.currentitem[0].innerhtml.replace(/name\=\"[^\"\']+\"/g,"").replace(/jquery[0-9]+\=\"[^\"\']+\"/g,"");document.body.removechild(c)}return c},update:function(c,d){if(h&&!f.forceplaceholdersize){return}if(!d.height()){d.height(g.currentitem.innerheight()-parseint(g.currentitem.css("paddingtop")||0,10)-parseint(g.currentitem.css("paddingbottom")||0,10))}if(!d.width()){d.width(g.currentitem.innerwidth()-parseint(g.currentitem.css("paddingleft")||0,10)-parseint(g.currentitem.css("paddingright")||0,10))}}}}g.placeholder=b(f.placeholder.element.call(g.element,g.currentitem));g.currentitem.after(g.placeholder);f.placeholder.update(g,g.placeholder)},_contactcontainers:function(j){for(var n=this.containers.length-1;n>=0;n--){if(this._intersectswith(this.containers[n].containercache)){if(!this.containers[n].containercache.over){if(this.currentcontainer!=this.containers[n]){var i=10000;var k=null;var l=this.positionabs[this.containers[n].floating?"left":"top"];for(var m=this.items.length-1;m>=0;m--){if(!b.ui.contains(this.containers[n].element[0],this.items[m].item[0])){continue}var a=this.items[m][this.containers[n].floating?"left":"top"];if(math.abs(a-l)this.containment[2]){m.left=this.containment[2]-this.helperproportions.width}if(m.top+this.helperproportions.height>this.containment[3]){m.top=this.containment[3]-this.helperproportions.height}}if(i.grid){var k=this.originalposition.top+math.round((m.top-this.originalposition.top)/i.grid[1])*i.grid[1];m.top=this.containment?(!(kthis.containment[3])?k:(!(kthis.containment[2])?l:(!(l=0;e--){if(b.ui.contains(this.containers[e].element[0],this.currentitem[0])){this.containers[e]._propagate("update",f,this,a);this.containers[e]._propagate("receive",f,this,a)}}}for(var e=this.containers.length-1;e>=0;e--){this.containers[e]._propagate("deactivate",f,this,a);if(this.containers[e].containercache.over){this.containers[e]._propagate("out",f,this);this.containers[e].containercache.over=0}}this.dragging=false;if(this.cancelhelperremoval){this._propagate("beforestop",f,null,a);this._propagate("stop",f,null,a);return false}this._propagate("beforestop",f,null,a);this.placeholder[0].parentnode.removechild(this.placeholder[0]);if(this.options.helper!="original"){this.helper.remove()}this.helper=null;this._propagate("stop",f,null,a);return true},_propagate:function(a,i,j,g){b.ui.plugin.call(this,a,[i,this._ui(j)]);var h=!g?this.element.triggerhandler(a=="sort"?a:"sort"+a,[i,this._ui(j)],this.options[a]):true;if(h===false){this.cancel()}},plugins:{},_ui:function(d){var a=d||this;return{helper:a.helper,placeholder:a.placeholder||b([]),position:a.position,absoluteposition:a.positionabs,item:a.currentitem,sender:d?d.element:null}}}));b.extend(b.ui.sortable,{getter:"serialize toarray",version:"1.6",defaults:{accurateintersection:true,appendto:"parent",cancel:":input",delay:0,distance:1,droponempty:true,forceplaceholdersize:false,forcehelpersize:false,helper:"original",items:"> *",scope:"default",scroll:true,scrollsensitivity:20,scrollspeed:20,sortindicator:b.ui.sortable.prototype._rearrange,tolerance:"default",zindex:1000}});b.ui.plugin.add("sortable","cursor",{start:function(a,f){var h=b("body"),g=b(this).data("sortable");if(h.css("cursor")){g.options._cursor=h.css("cursor")}h.css("cursor",g.options.cursor)},beforestop:function(f,a){var e=b(this).data("sortable");if(e.options._cursor){b("body").css("cursor",e.options._cursor)}}});b.ui.plugin.add("sortable","opacity",{start:function(a,f){var h=f.helper,g=b(this).data("sortable");if(h.css("opacity")){g.options._opacity=h.css("opacity")}h.css("opacity",g.options.opacity)},beforestop:function(f,a){var e=b(this).data("sortable");if(e.options._opacity){b(a.helper).css("opacity",e.options._opacity)}}});b.ui.plugin.add("sortable","scroll",{start:function(h,a){var g=b(this).data("sortable"),f=g.options;if(g.scrollparent[0]!=document&&g.scrollparent[0].tagname!="html"){g.overflowoffset=g.scrollparent.offset()}},sort:function(g,h){var j=b(this).data("sortable"),a=j.options,i=false;if(j.scrollparent[0]!=document&&j.scrollparent[0].tagname!="html"){if((j.overflowoffset.top+j.scrollparent[0].offsetheight)-g.pagey').insertbefore(b.headers);i('').appendto(b.headers);b.headers.addclass("ui-accordion-header")}var e;if(b.fillspace){e=this.element.parent().height();b.headers.each(function(){e-=i(this).outerheight()});var c=0;b.headers.next().each(function(){c=math.max(c,i(this).innerheight()-i(this).height())}).height(e-c)}else{if(b.autoheight){e=0;b.headers.next().each(function(){e=math.max(e,i(this).outerheight())}).height(e)}}this.element.attr("role","tablist");var d=this;b.headers.attr("role","tab").bind("keydown",function(f){return d._keydown(f)}).next().attr("role","tabpanel");b.headers.not(b.active||"").attr("aria-expanded","false").attr("tabindex","-1").next().hide();if(!b.active.length){b.headers.eq(0).attr("tabindex","0")}else{b.active.attr("aria-expanded","true").attr("tabindex","0").parent().andself().addclass(b.selectedclass)}if(!i.browser.safari){b.headers.find("a").attr("tabindex","-1")}if(b.event){this.element.bind((b.event)+".accordion",g)}},destroy:function(){this.options.headers.parent().andself().removeclass(this.options.selectedclass);this.options.headers.prev(".ui-accordion-left").remove();this.options.headers.children(".ui-accordion-right").remove();this.options.headers.next().css("display","");if(this.options.fillspace||this.options.autoheight){this.options.headers.next().css("height","")}i.removedata(this.element[0],"accordion");this.element.removeclass("ui-accordion").unbind(".accordion")},_keydown:function(e){if(this.options.disabled||e.altkey||e.ctrlkey){return}var a=i.ui.keycode;var c=this.options.headers.length;var b=this.options.headers.index(e.target);var d=false;switch(e.keycode){case a.right:case a.down:d=this.options.headers[(b+1)%c];break;case a.left:case a.up:d=this.options.headers[(b-1+c)%c];break;case a.space:case a.enter:return g.call(this.element[0],{target:e.target})}if(d){i(e.target).attr("tabindex","-1");i(d).attr("tabindex","0");d.focus();return false}return true},activate:function(a){g.call(this.element[0],{target:k(this.options.headers,a)[0]})}});function j(a,b){return function(){return a.apply(b,arguments)}}function h(c){if(!i.data(this,"accordion")){return}var b=i.data(this,"accordion");var a=b.options;a.running=c?0:--a.running;if(a.running){return}if(a.clearstyle){a.toshow.add(a.tohide).css({height:"",overflow:""})}b._trigger("change",null,a.data)}function l(s,d,a,f,e){var u=i.data(this,"accordion").options;u.toshow=s;u.tohide=d;u.data=a;var b=j(h,this);i.data(this,"accordion")._trigger("changestart",null,u.data);u.running=d.size()===0?s.size():d.size();if(u.animated){var v={};if(!u.alwaysopen&&f){v={toshow:i([]),tohide:d,complete:b,down:e,autoheight:u.autoheight}}else{v={toshow:s,tohide:d,complete:b,down:e,autoheight:u.autoheight}}if(!u.proxied){u.proxied=u.animated}if(!u.proxiedduration){u.proxiedduration=u.duration}u.animated=i.isfunction(u.proxied)?u.proxied(v):u.proxied;u.duration=i.isfunction(u.proxiedduration)?u.proxiedduration(v):u.proxiedduration;var t=i.ui.accordion.animations,c=u.duration,r=u.animated;if(!t[r]){t[r]=function(m){this.slide(m,{easing:r,duration:c||700})}}t[r](v)}else{if(!u.alwaysopen&&f){s.toggle()}else{d.hide();s.show()}b(true)}d.prev().attr("aria-expanded","false").attr("tabindex","-1");s.prev().attr("aria-expanded","true").attr("tabindex","0").focus()}function g(e){var p=i.data(this,"accordion").options;if(p.disabled){return false}if(!e.target&&!p.alwaysopen){p.active.parent().andself().toggleclass(p.selectedclass);var c=p.active.next(),f={options:p,newheader:i([]),oldheader:p.active,newcontent:i([]),oldcontent:c},o=(p.active=i([]));l.call(this,o,c,f);return false}var a=i(e.target);a=i(a.parents(p.header)[0]||a);var b=a[0]==p.active[0];if(p.running||(p.alwaysopen&&b)){return false}if(!a.is(p.header)){return}p.active.parent().andself().toggleclass(p.selectedclass);if(!b){a.parent().andself().addclass(p.selectedclass)}var o=a.next(),c=p.active.next(),f={options:p,newheader:b&&!p.alwaysopen?i([]):a,oldheader:p.active,newcontent:b&&!p.alwaysopen?i([]):o,oldcontent:c},d=p.headers.index(p.active[0])>p.headers.index(a[0]);p.active=b?i([]):a;l.call(this,o,c,f,b,d);return false}function k(a,b){return b?typeof b=="number"?a.filter(":eq("+b+")"):a.not(a.not(b)):b===false?i([]):a.filter(":eq(0)")}i.extend(i.ui.accordion,{version:"1.6",defaults:{autoheight:true,alwaysopen:true,animated:"slide",event:"click",header:"a",navigationfilter:function(){return this.href.tolowercase()==location.href.tolowercase()},running:0,selectedclass:"selected"},animations:{slide:function(o,p){o=i.extend({easing:"swing",duration:300},o,p);if(!o.tohide.size()){o.toshow.animate({height:"show"},o);return}var c=o.tohide.height(),e=o.toshow.height(),d=e/c,a=o.toshow.outerheight()-o.toshow.height(),b=o.toshow.css("marginbottom"),f=o.toshow.css("overflow");tmargin=o.toshow.css("margintop");o.toshow.css({height:0,overflow:"hidden",margintop:0,marginbottom:-a}).show();o.tohide.filter(":hidden").each(o.complete).end().filter(":visible").animate({height:"hide"},{step:function(n){var m=(c-n)*d;if(i.browser.msie||i.browser.opera){m=math.ceil(m)}o.toshow.height(m)},duration:o.duration,easing:o.easing,complete:function(){if(!o.autoheight){o.toshow.css("height","auto")}o.toshow.css({margintop:tmargin,marginbottom:b,overflow:f});o.complete()}})},bounceslide:function(a){this.slide(a,{easing:a.down?"easeoutbounce":"swing",duration:a.down?1000:200})},easeslide:function(a){this.slide(a,{easing:"easeinout",duration:700})}}})})(jquery);(function(c){var d={dragstart:"start.draggable",drag:"drag.draggable",dragstop:"stop.draggable",maxheight:"maxheight.resizable",minheight:"minheight.resizable",maxwidth:"maxwidth.resizable",minwidth:"minwidth.resizable",resizestart:"start.resizable",resize:"drag.resizable",resizestop:"stop.resizable"};c.widget("ui.dialog",{_init:function(){this.originaltitle=this.element.attr("title");this.options.title=this.options.title||this.originaltitle;var r=this,p=this.options,t=this.element.removeattr("title").addclass("ui-dialog-content").wrap("
").wrap("
"),o=(this.uidialogcontainer=t.parent()).addclass("ui-dialog-container").css({position:"relative",width:"100%",height:"100%"}),w=(this.uidialogtitlebar=c("
")).addclass("ui-dialog-titlebar").mousedown(function(){r.movetotop()}).prependto(o),x=c('').addclass("ui-dialog-titlebar-close").attr("role","button").appendto(w),u=(this.uidialogtitlebarclosetext=c("")).text(p.closetext).appendto(x),q=p.title||" ",v=c.ui.dialog.gettitleid(this.element),s=c("").addclass("ui-dialog-title").attr("id",v).html(q).prependto(w),a=(this.uidialog=o.parent()).appendto(document.body).hide().addclass("ui-dialog").addclass(p.dialogclass).css({position:"absolute",width:p.width,height:p.height,overflow:"hidden",zindex:p.zindex}).attr("tabindex",-1).css("outline",0).keydown(function(e){(p.closeonescape&&e.keycode&&e.keycode==c.ui.keycode.escape&&r.close())}).attr({role:"dialog","aria-labelledby":v}).mouseup(function(){r.movetotop()}),b=(this.uidialogbuttonpane=c("
")).addclass("ui-dialog-buttonpane").css({position:"absolute",bottom:0}).appendto(a),x=c(".ui-dialog-titlebar-close",w).hover(function(){c(this).addclass("ui-dialog-titlebar-close-hover")},function(){c(this).removeclass("ui-dialog-titlebar-close-hover")}).mousedown(function(e){e.stoppropagation()}).click(function(){r.close();return false});w.find("*").add(w).disableselection();(p.draggable&&c.fn.draggable&&this._makedraggable());(p.resizable&&c.fn.resizable&&this._makeresizable());this._createbuttons(p.buttons);this._isopen=false;(p.bgiframe&&c.fn.bgiframe&&a.bgiframe());(p.autoopen&&this.open())},destroy:function(){(this.overlay&&this.overlay.destroy());this.uidialog.hide();this.element.unbind(".dialog").removedata("dialog").removeclass("ui-dialog-content").hide().appendto("body");this.uidialog.remove();(this.originaltitle&&this.element.attr("title",this.originaltitle))},close:function(){if(false===this._trigger("beforeclose",null,{options:this.options})){return}(this.overlay&&this.overlay.destroy());this.uidialog.hide(this.options.hide).unbind("keypress.ui-dialog");this._trigger("close",null,{options:this.options});c.ui.dialog.overlay.resize();this._isopen=false},isopen:function(){return this._isopen},movetotop:function(a){if((this.options.modal&&!a)||(!this.options.stack&&!this.options.modal)){return this._trigger("focus",null,{options:this.options})}var g=this.options.zindex,b=this.options;c(".ui-dialog:visible").each(function(){g=math.max(g,parseint(c(this).css("z-index"),10)||b.zindex)});(this.overlay&&this.overlay.$el.css("z-index",++g));var h={scrolltop:this.element.attr("scrolltop"),scrollleft:this.element.attr("scrollleft")};this.uidialog.css("z-index",++g);this.element.attr(h);this._trigger("focus",null,{options:this.options})},open:function(){if(this._isopen){return}this.overlay=this.options.modal?new c.ui.dialog.overlay(this):null;(this.uidialog.next().length&&this.uidialog.appendto("body"));this._position(this.options.position);this.uidialog.show(this.options.show);(this.options.autoresize&&this._size());this.movetotop(true);(this.options.modal&&this.uidialog.bind("keypress.ui-dialog",function(g){if(g.keycode!=c.ui.keycode.tab){return}var b=c(":tabbable",this),a=b.filter(":first")[0],h=b.filter(":last")[0];if(g.target==h&&!g.shiftkey){settimeout(function(){a.focus()},1)}else{if(g.target==a&&g.shiftkey){settimeout(function(){h.focus()},1)}}}));this.uidialog.find(":tabbable:first").focus();this._trigger("open",null,{options:this.options});this._isopen=true},_createbuttons:function(a){var g=this,h=false,b=this.uidialogbuttonpane;b.empty().hide();c.each(a,function(){return !(h=true)});if(h){b.show();c.each(a,function(f,e){c('').text(f).click(function(){e.apply(g.element[0],arguments)}).appendto(b)})}},_makedraggable:function(){var b=this,a=this.options;this.uidialog.draggable({cancel:".ui-dialog-content",helper:a.draghelper,handle:".ui-dialog-titlebar",start:function(){b.movetotop();(a.dragstart&&a.dragstart.apply(b.element[0],arguments))},drag:function(){(a.drag&&a.drag.apply(b.element[0],arguments))},stop:function(){(a.dragstop&&a.dragstop.apply(b.element[0],arguments));c.ui.dialog.overlay.resize()}})},_makeresizable:function(a){a=(a===undefined?this.options.resizable:a);var h=this,g=this.options,b=typeof a=="string"?a:"n,e,s,w,se,sw,ne,nw";this.uidialog.resizable({cancel:".ui-dialog-content",helper:g.resizehelper,maxwidth:g.maxwidth,maxheight:g.maxheight,minwidth:g.minwidth,minheight:g.minheight,start:function(){(g.resizestart&&g.resizestart.apply(h.element[0],arguments))},resize:function(){(g.autoresize&&h._size.apply(h));(g.resize&&g.resize.apply(h.element[0],arguments))},handles:b,stop:function(){(g.autoresize&&h._size.apply(h));(g.resizestop&&g.resizestop.apply(h.element[0],arguments));c.ui.dialog.overlay.resize()}})},_position:function(b){var i=c(window),j=c(document),a=j.scrolltop(),l=j.scrollleft(),k=a;if(c.inarray(b,["center","top","right","bottom","left"])>=0){b=[b=="right"||b=="left"?b:"center",b=="top"||b=="bottom"?b:"middle"]}if(b.constructor!=array){b=["center","middle"]}if(b[0].constructor==number){l+=b[0]}else{switch(b[0]){case"left":l+=0;break;case"right":l+=i.width()-this.uidialog.outerwidth();break;default:case"center":l+=(i.width()-this.uidialog.outerwidth())/2}}if(b[1].constructor==number){a+=b[1]}else{switch(b[1]){case"top":a+=0;break;case"bottom":a+=(c.browser.opera?window.innerheight:i.height())-this.uidialog.outerheight();break;default:case"middle":a+=((c.browser.opera?window.innerheight:i.height())-this.uidialog.outerheight())/2}}a=math.max(a,k);this.uidialog.css({top:a,left:l})},_setdata:function(b,g){(d[b]&&this.uidialog.data(d[b],g));switch(b){case"buttons":this._createbuttons(g);break;case"closetext":this.uidialogtitlebarclosetext.text(g);break;case"draggable":(g?this._makedraggable():this.uidialog.draggable("destroy"));break;case"height":this.uidialog.height(g);break;case"position":this._position(g);break;case"resizable":var h=this.uidialog,a=this.uidialog.is(":data(resizable)");(a&&!g&&h.resizable("destroy"));(a&&typeof g=="string"&&h.resizable("option","handles",g));(a||this._makeresizable(g));break;case"title":c(".ui-dialog-title",this.uidialogtitlebar).html(g||" ");break;case"width":this.uidialog.width(g);break}c.widget.prototype._setdata.apply(this,arguments)},_size:function(){var h=this.uidialogcontainer,b=this.uidialogtitlebar,i=this.element,a=(parseint(i.css("margin-top"),10)||0)+(parseint(i.css("margin-bottom"),10)||0),j=(parseint(i.css("margin-left"),10)||0)+(parseint(i.css("margin-right"),10)||0);i.height(h.height()-b.outerheight()-a);i.width(h.width()-j)}});c.extend(c.ui.dialog,{version:"1.6",defaults:{autoopen:true,autoresize:true,bgiframe:false,buttons:{},closeonescape:true,closetext:"close",draggable:true,height:200,minheight:100,minwidth:150,modal:false,overlay:{},position:"center",resizable:true,stack:true,width:300,zindex:1000},getter:"isopen",uuid:0,gettitleid:function(a){return"ui-dialog-title-"+(a.attr("id")||++this.uuid)},overlay:function(a){this.$el=c.ui.dialog.overlay.create(a)}});c.extend(c.ui.dialog.overlay,{instances:[],events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(a){return a+".dialog-overlay"}).join(" "),create:function(a){if(this.instances.length===0){settimeout(function(){c("a, :input").bind(c.ui.dialog.overlay.events,function(){var i=false;var j=c(this).parents(".ui-dialog");if(j.length){var l=c(".ui-dialog-overlay");if(l.length){var k=parseint(l.css("z-index"),10);l.each(function(){k=math.max(k,parseint(c(this).css("z-index"),10))});i=parseint(j.css("z-index"),10)>k}else{i=true}}return i})},1);c(document).bind("keydown.dialog-overlay",function(f){(a.options.closeonescape&&f.keycode&&f.keycode==c.ui.keycode.escape&&a.close())});c(window).bind("resize.dialog-overlay",c.ui.dialog.overlay.resize)}var b=c("
").appendto(document.body).addclass("ui-dialog-overlay").css(c.extend({borderwidth:0,margin:0,padding:0,position:"absolute",top:0,left:0,width:this.width(),height:this.height()},a.options.overlay));(a.options.bgiframe&&c.fn.bgiframe&&b.bgiframe());this.instances.push(b);return b},destroy:function(a){this.instances.splice(c.inarray(this.instances,a),1);if(this.instances.length===0){c("a, :input").add([document,window]).unbind(".dialog-overlay")}a.remove()},height:function(){if(c.browser.msie&&c.browser.version<7){var a=math.max(document.documentelement.scrollheight,document.body.scrollheight);var b=math.max(document.documentelement.offsetheight,document.body.offsetheight);if(a").addclass("ui-slider-handle").appendto(a.element);if(this.id){c.attr("id",this.id)}return c[0]})}var d=function(c){this.element=b(c);this.element.data("mouse",this);this.options=a.options;this.element.bind("mousedown",function(){if(a.currenthandle){this.blur(a.currenthandle)}a._focus(this,true)});this._mouseinit()};b.extend(d.prototype,b.ui.mouse,{_mousecapture:function(){return true},_mousestart:function(c){return a._start.call(a,c,this.element[0])},_mousedrag:function(c){return a._drag.call(a,c,this.element[0])},_mousestop:function(c){return a._stop.call(a,c,this.element[0])},trigger:function(c){this._mousedown(c)}});b(this.handle).each(function(){new d(this)}).wrap('
').parent().bind("click",function(){return false}).bind("focus",function(c){a._focus(this.firstchild)}).bind("blur",function(c){a._blur(this.firstchild)}).bind("keydown",function(c){if(!a.options.nokeyboard){return a._keydown(c.keycode,this.firstchild)}});this.element.bind("mousedown.slider",function(c){if(b(c.target).is(".ui-slider-handle")){return}a._click.apply(a,[c]);a.currenthandle.data("mouse").trigger(c);a.firstvalue=a.firstvalue+1});b.each(this.options.handles||[],function(c,f){a.moveto(f.start,c,true)});if(!isnan(this.options.startvalue)){this.moveto(this.options.startvalue,0,true)}this.previoushandle=b(this.handle[0]);if(this.handle.length==2&&this.options.range){this._createrange()}},destroy:function(){this.element.removeclass("ui-slider ui-slider-disabled").removedata("slider").unbind(".slider");if(this.handle&&this.handle.length){this.handle.unwrap("a");this.handle.each(function(){var a=b(this).data("mouse");a&&a._mousedestroy()})}this.generated&&this.generated.remove()},_start:function(e,f){var a=this.options;if(a.disabled){return false}this.actualsize={width:this.element.outerwidth(),height:this.element.outerheight()};if(!this.currenthandle){this._focus(this.previoushandle,true)}this.offset=this.element.offset();this.handleoffset=this.currenthandle.offset();this.clickoffset={top:e.pagey-this.handleoffset.top,left:e.pagex-this.handleoffset.left};this.firstvalue=this.value();this._propagate("start",e);this._drag(e,f);return true},_drag:function(j,h){var a=this.options;var i={top:j.pagey-this.offset.top-this.clickoffset.top,left:j.pagex-this.offset.left-this.clickoffset.left};if(!this.currenthandle){this._focus(this.previoushandle,true)}i.left=this._translatelimits(i.left,"x");i.top=this._translatelimits(i.top,"y");if(a.stepping.x){var g=this._convertvalue(i.left,"x");g=this._round(g/a.stepping.x)*a.stepping.x;i.left=this._translatevalue(g,"x")}if(a.stepping.y){var g=this._convertvalue(i.top,"y");g=this._round(g/a.stepping.y)*a.stepping.y;i.top=this._translatevalue(g,"y")}i.left=this._translaterange(i.left,"x");i.top=this._translaterange(i.top,"y");if(a.axis!="vertical"){this.currenthandle.css({left:i.left})}if(a.axis!="horizontal"){this.currenthandle.css({top:i.top})}this.currenthandle.data("mouse").slidervalue={x:this._round(this._convertvalue(i.left,"x"))||0,y:this._round(this._convertvalue(i.top,"y"))||0};if(this.rangeelement){this._updaterange()}this._propagate("slide",j);return false},_stop:function(a){this._propagate("stop",a);if(this.firstvalue!=this.value()){this._propagate("change",a)}this._focus(this.currenthandle,true);return false},_round:function(a){return this.options.round?parseint(a,10):parsefloat(a)},_setdata:function(a,d){b.widget.prototype._setdata.apply(this,arguments);if(/min|max|steps/.test(a)){this._initboundaries()}if(a=="range"){d?this.handle.length==2&&this._createrange():this._removerange()}},_initboundaries:function(){var a=this.element[0],d=this.options;this.actualsize={width:this.element.outerwidth(),height:this.element.outerheight()};b.extend(d,{axis:d.axis||(a.offsetwidth").addclass("ui-slider-range").css({position:"absolute"}).appendto(this.element);this._updaterange()},_removerange:function(){this.rangeelement.remove();this.rangeelement=null},_updaterange:function(){var d=this.options.axis=="vertical"?"top":"left";var a=this.options.axis=="vertical"?"height":"width";this.rangeelement.css(d,(this._round(b(this.handle[0]).css(d))||0)+this._handlesize(0,this.options.axis=="vertical"?"y":"x")/2);this.rangeelement.css(a,(this._round(b(this.handle[1]).css(d))||0)-(this._round(b(this.handle[0]).css(d))||0))},_getrange:function(){return this.rangeelement?this._convertvalue(this._round(this.rangeelement.css(this.options.axis=="vertical"?"height":"width")),this.options.axis=="vertical"?"y":"x"):null},_handleindex:function(){return this.handle.index(this.currenthandle[0])},value:function(a,e){if(this.handle.length==1){this.currenthandle=this.handle}if(!e){e=this.options.axis=="vertical"?"y":"x"}var f=b(a!=undefined&&a!==null?this.handle[a]||a:this.currenthandle);if(f.data("mouse").slidervalue){return this._round(f.data("mouse").slidervalue[e])}else{return this._round(((this._round(f.css(e=="x"?"left":"top"))/(this.actualsize[e=="x"?"width":"height"]-this._handlesize(a,e)))*this.options.realmax[e])+this.options.min[e])}},_convertvalue:function(d,a){return this.options.min[a]+(d/(this.actualsize[a=="x"?"width":"height"]-this._handlesize(null,a)))*this.options.realmax[a]},_translatevalue:function(d,a){return((d-this.options.min[a])/this.options.realmax[a])*(this.actualsize[a=="x"?"width":"height"]-this._handlesize(null,a))},_translaterange:function(a,e){if(this.rangeelement){if(this.currenthandle[0]==this.handle[0]&&a>=this._translatevalue(this.value(1),e)){a=this._translatevalue(this.value(1,e)-this._onestep(e),e)}if(this.currenthandle[0]==this.handle[1]&&a<=this._translatevalue(this.value(0),e)){a=this._translatevalue(this.value(0,e)+this._onestep(e),e)}}if(this.options.handles){var f=this.options.handles[this._handleindex()];if(athis._translatevalue(f.max,e)){a=this._translatevalue(f.max,e)}}}return a},_translatelimits:function(d,a){if(d>=this.actualsize[a=="x"?"width":"height"]-this._handlesize(null,a)){d=this.actualsize[a=="x"?"width":"height"]-this._handlesize(null,a)}if(d<=0){d=0}return d},_handlesize:function(d,a){return b(d!=undefined&&d!==null?this.handle[d]:this.currenthandle)[0]["offset"+(a=="x"?"width":"height")]},_onestep:function(a){return this.options.stepping[a]||1},_pagestep:function(a){return 10},moveto:function(m,p,n){var a=this.options;this.actualsize={width:this.element.outerwidth(),height:this.element.outerheight()};if(p==undefined&&!this.currenthandle&&this.handle.length!=1){return false}if(p==undefined&&!this.currenthandle){p=0}if(p!=undefined){this.currenthandle=this.previoushandle=b(this.handle[p]||p)}if(m.x!==undefined&&m.y!==undefined){var k=m.x,j=m.y}else{var k=m,j=m}if(k!==undefined&&k.constructor!=number){var o=/^\-\=/.test(k),l=/^\+\=/.test(k);if(o||l){k=this.value(null,"x")+this._round(k.replace(o?"=":"+=",""))}else{k=isnan(this._round(k))?undefined:this._round(k)}}if(j!==undefined&&j.constructor!=number){var o=/^\-\=/.test(j),l=/^\+\=/.test(j);if(o||l){j=this.value(null,"y")+this._round(j.replace(o?"=":"+=",""))}else{j=isnan(this._round(j))?undefined:this._round(j)}}if(a.axis!="vertical"&&k!==undefined){if(a.stepping.x){k=this._round(k/a.stepping.x)*a.stepping.x}k=this._translatevalue(k,"x");k=this._translatelimits(k,"x");k=this._translaterange(k,"x");a.animate?this.currenthandle.stop().animate({left:k},(math.abs(parseint(this.currenthandle.css("left"),10)-k))*(!isnan(parseint(a.animate,10))?a.animate:5)):this.currenthandle.css({left:k})}if(a.axis!="horizontal"&&j!==undefined){if(a.stepping.y){j=this._round(j/a.stepping.y)*a.stepping.y}j=this._translatevalue(j,"y");j=this._translatelimits(j,"y");j=this._translaterange(j,"y");a.animate?this.currenthandle.stop().animate({top:j},(math.abs(parseint(this.currenthandle.css("top"),10)-j))*(!isnan(parseint(a.animate,10))?a.animate:5)):this.currenthandle.css({top:j})}if(this.rangeelement){this._updaterange()}this.currenthandle.data("mouse").slidervalue={x:this._round(this._convertvalue(k,"x"))||0,y:this._round(this._convertvalue(j,"y"))||0};if(!n){this._propagate("start",null);this._propagate("slide",null);this._propagate("stop",null);this._propagate("change",null)}},_propagate:function(d,a){b.ui.plugin.call(this,d,[a,this.ui()]);this.element.triggerhandler(d=="slide"?d:"slide"+d,[a,this.ui()],this.options[d])},plugins:{},ui:function(a){return{options:this.options,handle:this.currenthandle,value:this.options.axis!="both"||!this.options.axis?this._round(this.value(null,this.options.axis=="vertical"?"y":"x")):{x:this._round(this.value(null,"x")),y:this._round(this.value(null,"y"))},range:this._getrange()}}});b.extend(b.ui.slider,{getter:"value",version:"1.6",defaults:{animate:false,distance:1,handle:".ui-slider-handle",round:true}})})(jquery);(function(b){b.widget("ui.tabs",{_init:function(){this._tabify(true)},destroy:function(){var a=this.options;this.element.unbind(".tabs").removeclass(a.navclass).removedata("tabs");this.$tabs.each(function(){var f=b.data(this,"href.tabs");if(f){this.href=f}var e=b(this).unbind(".tabs");b.each(["href","load","cache"],function(d,c){e.removedata(c+".tabs")})});this.$lis.add(this.$panels).each(function(){if(b.data(this,"destroy.tabs")){b(this).remove()}else{b(this).removeclass([a.selectedclass,a.deselectableclass,a.disabledclass,a.panelclass,a.hideclass].join(" "))}});if(a.cookie){this._cookie(null,a.cookie)}},_setdata:function(a,d){if((/^selected/).test(a)){this.select(d)}else{this.options[a]=d;this._tabify()}},length:function(){return this.$tabs.length},_tabid:function(a){return a.title&&a.title.replace(/\s/g,"_").replace(/[^a-za-z0-9\-_:\.]/g,"")||this.options.idprefix+b.data(a)},_sanitizeselector:function(a){return a.replace(/:/g,"\\:")},_cookie:function(){var a=this.cookie||(this.cookie="ui-tabs-"+b.data(this.element[0]));return b.cookie.apply(null,[a].concat(b.makearray(arguments)))},_tabify:function(r){this.$lis=b("li:has(a[href])",this.element);this.$tabs=this.$lis.map(function(){return b("a",this)[0]});this.$panels=b([]);var s=this,w=this.options;this.$tabs.each(function(f,e){if(e.hash&&e.hash.replace("#","")){s.$panels=s.$panels.add(s._sanitizeselector(e.hash))}else{if(b(e).attr("href")!="#"){b.data(e,"href.tabs",e.href);b.data(e,"load.tabs",e.href);var d=s._tabid(e);e.href="#"+d;var c=b("#"+d);if(!c.length){c=b(w.paneltemplate).attr("id",d).addclass(w.panelclass).insertafter(s.$panels[f-1]||s.element);c.data("destroy.tabs",true)}s.$panels=s.$panels.add(c)}else{w.disabled.push(f+1)}}});if(r){this.element.addclass(w.navclass);this.$panels.addclass(w.panelclass);if(w.selected===undefined){if(location.hash){this.$tabs.each(function(d,c){if(c.hash==location.hash){w.selected=d;return false}})}else{if(w.cookie){var q=parseint(s._cookie(),10);if(q&&s.$tabs[q]){w.selected=q}}else{if(s.$lis.filter("."+w.selectedclass).length){w.selected=s.$lis.index(s.$lis.filter("."+w.selectedclass)[0])}}}}w.selected=w.selected===null||w.selected!==undefined?w.selected:0;w.disabled=b.unique(w.disabled.concat(b.map(this.$lis.filter("."+w.disabledclass),function(d,c){return s.$lis.index(d)}))).sort();if(b.inarray(w.selected,w.disabled)!=-1){w.disabled.splice(b.inarray(w.selected,w.disabled),1)}this.$panels.addclass(w.hideclass);this.$lis.removeclass(w.selectedclass);if(w.selected!==null){this.$panels.eq(w.selected).removeclass(w.hideclass);var a=[w.selectedclass];if(w.deselectable){a.push(w.deselectableclass)}this.$lis.eq(w.selected).addclass(a.join(" "));var b=function(){s._trigger("show",null,s.ui(s.$tabs[w.selected],s.$panels[w.selected]))};if(b.data(this.$tabs[w.selected],"load.tabs")){this.load(w.selected,b)}else{b()}}b(window).bind("unload",function(){s.$tabs.unbind(".tabs");s.$lis=s.$tabs=s.$panels=null})}else{w.selected=this.$lis.index(this.$lis.filter("."+w.selectedclass)[0])}if(w.cookie){this._cookie(w.selected,w.cookie)}for(var y=0,u;u=this.$lis[y];y++){b(u)[b.inarray(y,w.disabled)!=-1&&!b(u).hasclass(w.selectedclass)?"addclass":"removeclass"](w.disabledclass)}if(w.cache===false){this.$tabs.removedata("cache.tabs")}var v,p;if(w.fx){if(w.fx.constructor==array){v=w.fx[0];p=w.fx[1]}else{v=p=w.fx}}function z(c,d){c.css({display:""});if(b.browser.msie&&d.opacity){c[0].style.removeattribute("filter")}}var a=p?function(c,d){d.animate(p,p.duration||"normal",function(){d.removeclass(w.hideclass);z(d,p);s._trigger("show",null,s.ui(c,d[0]))})}:function(c,d){d.removeclass(w.hideclass);s._trigger("show",null,s.ui(c,d[0]))};var t=v?function(e,d,c){d.animate(v,v.duration||"normal",function(){d.addclass(w.hideclass);z(d,v);if(c){a(e,c,d)}})}:function(e,d,c){d.addclass(w.hideclass);if(c){a(e,c)}};function x(c,g,e,d){var f=[w.selectedclass];if(w.deselectable){f.push(w.deselectableclass)}g.addclass(f.join(" ")).siblings().removeclass(f.join(" "));t(c,e,d)}this.$tabs.unbind(".tabs").bind(w.event+".tabs",function(){var d=b(this).parents("li:eq(0)"),e=s.$panels.filter(":visible"),c=b(s._sanitizeselector(this.hash));if((d.hasclass(w.selectedclass)&&!w.deselectable)||d.hasclass(w.disabledclass)||b(this).hasclass(w.loadingclass)||s._trigger("select",null,s.ui(this,c[0]))===false){this.blur();return false}w.selected=s.$tabs.index(this);if(w.deselectable){if(d.hasclass(w.selectedclass)){s.options.selected=null;d.removeclass([w.selectedclass,w.deselectableclass].join(" "));s.$panels.stop();t(this,e);this.blur();return false}else{if(!e.length){s.$panels.stop();var f=this;s.load(s.$tabs.index(this),function(){d.addclass([w.selectedclass,w.deselectableclass].join(" "));a(f,c)});this.blur();return false}}}if(w.cookie){s._cookie(w.selected,w.cookie)}s.$panels.stop();if(c.length){var f=this;s.load(s.$tabs.index(this),e.length?function(){x(f,d,e,c)}:function(){d.addclass(w.selectedclass);a(f,c)})}else{throw"jquery ui tabs: mismatching fragment identifier."}if(b.browser.msie){this.blur()}return false});if(w.event!="click"){this.$tabs.bind("click.tabs",function(){return false})}},add:function(p,o,l){if(l==undefined){l=this.$tabs.length}var n=this.options;var j=b(n.tabtemplate.replace(/#\{href\}/g,p).replace(/#\{label\}/g,o));j.data("destroy.tabs",true);var a=p.indexof("#")==0?p.replace("#",""):this._tabid(b("a:first-child",j)[0]);var m=b("#"+a);if(!m.length){m=b(n.paneltemplate).attr("id",a).addclass(n.hideclass).data("destroy.tabs",true)}m.addclass(n.panelclass);if(l>=this.$lis.length){j.appendto(this.element);m.appendto(this.element[0].parentnode)}else{j.insertbefore(this.$lis[l]);m.insertbefore(this.$panels[l])}n.disabled=b.map(n.disabled,function(c,d){return c>=l?++c:c});this._tabify();if(this.$tabs.length==1){j.addclass(n.selectedclass);m.removeclass(n.hideclass);var k=b.data(this.$tabs[0],"load.tabs");if(k){this.load(l,k)}}this._trigger("add",null,this.ui(this.$tabs[l],this.$panels[l]))},remove:function(g){var a=this.options,f=this.$lis.eq(g).remove(),h=this.$panels.eq(g).remove();if(f.hasclass(a.selectedclass)&&this.$tabs.length>1){this.select(g+(g+1=g?--d:d});this._tabify();this._trigger("remove",null,this.ui(f.find("a")[0],h[0]))},enable:function(e){var f=this.options;if(b.inarray(e,f.disabled)==-1){return}var a=this.$lis.eq(e).removeclass(f.disabledclass);if(b.browser.safari){a.css("display","inline-block");settimeout(function(){a.css("display","block")},0)}f.disabled=b.grep(f.disabled,function(c,d){return c!=e});this._trigger("enable",null,this.ui(this.$tabs[e],this.$panels[e]))},disable:function(f){var e=this,a=this.options;if(f!=a.selected){this.$lis.eq(f).addclass(a.disabledclass);a.disabled.push(f);a.disabled.sort();this._trigger("disable",null,this.ui(this.$tabs[f],this.$panels[f]))}},select:function(a){if(typeof a=="string"){a=this.$tabs.index(this.$tabs.filter("[href$="+a+"]")[0])}this.$tabs.eq(a).trigger(this.options.event+".tabs")},load:function(u,a){var p=this,v=this.options,w=this.$tabs.eq(u),x=w[0],n=a==undefined||a===false,r=w.data("load.tabs");a=a||function(){};if(!r||!n&&b.data(x,"cache.tabs")){a();return}var q=function(d){var e=b(d),c=e.find("*:last");return c.length&&c.is(":not(img)")&&c||e};var s=function(){p.$tabs.filter("."+v.loadingclass).removeclass(v.loadingclass).each(function(){if(v.spinner){q(this).parent().html(q(this).data("label.tabs"))}});p.xhr=null};if(v.spinner){var o=q(x).html();q(x).wrapinner("").find("em").data("label.tabs",o).html(v.spinner)}var t=b.extend({},v.ajaxoptions,{url:r,success:function(e,d){b(p._sanitizeselector(x.hash)).html(e);s();if(v.cache){b.data(x,"cache.tabs",true)}p._trigger("load",null,p.ui(p.$tabs[u],p.$panels[u]));try{v.ajaxoptions.success(e,d)}catch(c){}a()}});if(this.xhr){this.xhr.abort();s()}w.addclass(v.loadingclass);p.xhr=b.ajax(t)},url:function(d,a){this.$tabs.eq(d).removedata("cache.tabs").data("load.tabs",a)},ui:function(d,a){return{options:this.options,tab:d,panel:a,index:this.$tabs.index(d)}}});b.extend(b.ui.tabs,{version:"1.6",getter:"length",defaults:{ajaxoptions:null,cache:false,cookie:null,deselectable:false,deselectableclass:"ui-tabs-deselectable",disabled:[],disabledclass:"ui-tabs-disabled",event:"click",fx:null,hideclass:"ui-tabs-hide",idprefix:"ui-tabs-",loadingclass:"ui-tabs-loading",navclass:"ui-tabs-nav",panelclass:"ui-tabs-panel",paneltemplate:"
",selectedclass:"ui-tabs-selected",spinner:"loading…",tabtemplate:'
  • #{label}
  • '}});b.extend(b.ui.tabs.prototype,{rotation:null,rotate:function(l,a){a=a||false;var k=this,j=this.options.selected;function h(){k.rotation=setinterval(function(){j=++j