rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
if (!opened && $(KEYS).index(key) >= 0) {
if (!opened && ($(KEYS).index(key) >= 0 || key == 32)) {
input.bind("focus click", self.show).keydown(function(e) { var key = e.keyCode; // open dateinput with navigation keys, or clear value on backspace or delete if (!opened && $(KEYS).index(key) >= 0) { self.show(e); return e.preventDefault(); } else if (key == 8 || key == 46) { input.val(""); } // allow tab return e.shiftKey || e.ctrlKey || e.altKey || key == 9 ? true : e.preventDefault(); });
function (count) { mail.selectMessage(function (msg) !msg.isRead, true, true, false, count); },
function (count) { mail.selectMessage(function (msg) true, false, true, false, count); },
function (count) { mail.selectMessage(function (msg) !msg.isRead, true, true, false, count); },
$.expr[':'].date = function(el) { var type = el.getAttribute("type"); return type && type == 'date' || !!$(el).data("dateinput"); };
input.bind("focus click", self.show).keypress(function(e) { var key = e.keyCode; if (root.is(":hidden") && $(KEYS).index(key) >= 0) { self.show(e); return e.preventDefault(); } return e.shiftKey || e.ctrlKey || e.altKey || key == 9 ? true : e.preventDefault(); });
$.expr[':'].date = function(el) { var type = el.getAttribute("type"); return type && type == 'date' || !!$(el).data("dateinput"); };
response.messages.each(function(item) {
var request = new ServerReq('room.php',function(response) { response.room.rid = response.room.rid.toInt(); room.set(response.room); response.messages.each(function(item) {
response.messages.each(function(item) { item.lid = item.lid.toInt(); item.rid = item.rid.toInt(); item.user.uid = item.user.uid.toInt(); if(!lastId) lastId = item.lid - 1; MBchat.updateables.processMessage(item); });
if(response.lastid) lastId = response.lastid.toInt(); MBchat.updateables.poller.setLastId(lastId); var el = new Element('h1') .set('text', room.name ) .inject('roomNameContainer'); if (room.type == 'M' && (me.mod == 'M' || me.role == 'H' || me.role == 'G' || me.role == 'S' )) { var whisperBoxes = $$('.whisperBox'); whisperBoxes.each ( function (whisperBox) { var privateBox = whisperBox.getElement('.private'); privateBox.removeClass('private'); privateBox.addClass('nonprivate'); privateBox.removeEvent('click',goPrivate); }); } MBchat.updateables.online.show(room.rid); $('messageText').focus(); }).transmit({'rid' : rid});
response.messages.each(function(item) { item.lid = item.lid.toInt(); item.rid = item.rid.toInt(); item.user.uid = item.user.uid.toInt(); if(!lastId) lastId = item.lid - 1; MBchat.updateables.processMessage(item); });
$('.icons, .fg-button').livequery(function() { $(this).each(function() { $(this).hover(function() { $(this).addClass('ui-state-hover'); }, function() { $(this).removeClass('ui-state-hover'); }); });
$('li.graph-image .ui-icon-star').live('click', function() { var section = $(this).parent().parent().next(); if ($(section).hasClass('selected')) { $(section).removeClass('selected'); } else { $(section).addClass('selected'); }
$('.icons, .fg-button').livequery(function() { $(this).each(function() { $(this).hover(function() { $(this).addClass('ui-state-hover'); }, function() { $(this).removeClass('ui-state-hover'); }); }); });
input.focus(self.show).keydown(function(e) { var key = e.keyCode; if (root.is(":hidden") && $([75, 76, 38, 39, 74, 72, 40, 37]).index(key) >= 0) { self.show(e); return e.preventDefault(); } return e.shiftKey || e.ctrlKey || e.altKey || key == 9 ? true : e.preventDefault(); });
$.expr[':'].date = function(el) { var type = el.getAttribute("type"); return type && type == 'date' || !!$(el).data("dateinput"); };
input.focus(self.show).keydown(function(e) { var key = e.keyCode; // open dateinput with navigation keyw if (root.is(":hidden") && $([75, 76, 38, 39, 74, 72, 40, 37]).index(key) >= 0) { self.show(e); return e.preventDefault(); } // allow tab return e.shiftKey || e.ctrlKey || e.altKey || key == 9 ? true : e.preventDefault(); });
var request = new ServerReq('room.php',function(response) { response.room.rid = response.room.rid.toInt(); room.set(response.room); response.messages.each(function(item) {
response.messages.each(function(item) {
var request = new ServerReq('room.php',function(response) { response.room.rid = response.room.rid.toInt(); room.set(response.room); response.messages.each(function(item) { item.lid = item.lid.toInt(); item.rid = item.rid.toInt(); item.user.uid = item.user.uid.toInt(); if(!lastId) lastId = item.lid - 1; MBchat.updateables.processMessage(item); }); if(response.lastid) lastId = response.lastid.toInt(); //Ensure we get all message from here on in MBchat.updateables.poller.setLastId(lastId); //Display room name at head of page var el = new Element('h1') .set('text', room.name ) .inject('roomNameContainer'); if (room.type == 'M' && (me.mod == 'M' || me.role == 'H' || me.role == 'G' || me.role == 'S' )) { //Can't go to private room here var whisperBoxes = $$('.whisperBox'); whisperBoxes.each ( function (whisperBox) { var privateBox = whisperBox.getElement('.private'); privateBox.removeClass('private'); privateBox.addClass('nonprivate'); privateBox.removeEvent('click',goPrivate); }); } MBchat.updateables.online.show(room.rid); //Show online list for room $('messageText').focus(); }).transmit({'rid' : rid});
if(response.lastid) lastId = response.lastid.toInt(); MBchat.updateables.poller.setLastId(lastId); var el = new Element('h1') .set('text', room.name ) .inject('roomNameContainer'); if (room.type == 'M' && (me.mod == 'M' || me.role == 'H' || me.role == 'G' || me.role == 'S' )) { var whisperBoxes = $$('.whisperBox'); whisperBoxes.each ( function (whisperBox) { var privateBox = whisperBox.getElement('.private'); privateBox.removeClass('private'); privateBox.addClass('nonprivate'); privateBox.removeEvent('click',goPrivate); }); } MBchat.updateables.online.show(room.rid); $('messageText').focus(); }).transmit({'rid' : rid});
var request = new ServerReq('room.php',function(response) { response.room.rid = response.room.rid.toInt(); room.set(response.room); response.messages.each(function(item) { item.lid = item.lid.toInt(); item.rid = item.rid.toInt(); item.user.uid = item.user.uid.toInt(); if(!lastId) lastId = item.lid - 1; MBchat.updateables.processMessage(item); }); if(response.lastid) lastId = response.lastid.toInt(); //Ensure we get all message from here on in MBchat.updateables.poller.setLastId(lastId); //Display room name at head of page var el = new Element('h1') .set('text', room.name ) .inject('roomNameContainer'); if (room.type == 'M' && (me.mod == 'M' || me.role == 'H' || me.role == 'G' || me.role == 'S' )) { //Can't go to private room here var whisperBoxes = $$('.whisperBox'); whisperBoxes.each ( function (whisperBox) { var privateBox = whisperBox.getElement('.private'); privateBox.removeClass('private'); privateBox.addClass('nonprivate'); privateBox.removeEvent('click',goPrivate); }); } MBchat.updateables.online.show(room.rid); //Show online list for room $('messageText').focus(); }).transmit({'rid' : rid});
return DONE(result);
return DONE();
function(result) { // return z.revert(r); result.y = z.revert(r);// BigInteger.log("stepping_modPow 3:result=" + result ); //return BREAK; return DONE(result); },
function (opt) template.map(buffer.pageInfo[opt][0](), util.identity, ", "),
setTimeout(function () { doc.body.removeChild(indicator); }, 500);
function (opt) template.map(buffer.pageInfo[opt][0](), util.identity, ", "),
function(result) {
function() {
function(result) { // return z.revert(r); result.y = z.revert(r);// BigInteger.log("stepping_modPow 3:result=" + result ); //return BREAK; return DONE(); },
result.y = z.revert(r);
var result = z.revert(r);
function(result) { // return z.revert(r); result.y = z.revert(r);// BigInteger.log("stepping_modPow 3:result=" + result ); //return BREAK; return DONE(); },
return DONE();
return DONE(result);
function(result) { // return z.revert(r); result.y = z.revert(r);// BigInteger.log("stepping_modPow 3:result=" + result ); //return BREAK; return DONE(); },
$.each(fns, function() {
els.each(function() { var msgs = [], el = $(this).unbind(event).data("messages", msgs); $.each(fns, function() {
$.each(fns, function() { var fn = this, match = fn[0]; // match found if (el.filter(match).length) { // execute a validator function var returnValue = fn[1].call(self, el, el.val()); // validation failed. multiple substitutions can be returned with an array if (returnValue !== true) { // onBeforeFail e.type = "onBeforeFail"; fire.trigger(e, [el, match]); if (e.isDefaultPrevented()) { return false; } // overridden custom message var msg = el.attr(conf.messageAttr); if (msg) { msgs = [msg]; return false; } else { pushMessage(msgs, match, returnValue); } } } });
if (msgs.length) { errs.push({input: el, messages: msgs}); el.trigger("oninvalid", [msgs]); if (conf.errorInputEvent) { el.bind(event, function(e) { self.checkValidity(el, e); }); } } if (conf.singleError && errs.length) { return false; } });
$.each(fns, function() { var fn = this, match = fn[0]; // match found if (el.filter(match).length) { // execute a validator function var returnValue = fn[1].call(self, el, el.val()); // validation failed. multiple substitutions can be returned with an array if (returnValue !== true) { // onBeforeFail e.type = "onBeforeFail"; fire.trigger(e, [el, match]); if (e.isDefaultPrevented()) { return false; } // overridden custom message var msg = el.attr(conf.messageAttr); if (msg) { msgs = [msg]; return false; } else { pushMessage(msgs, match, returnValue); } } } });
input.focus(self.show).keypress(function(e) {
input.bind("focus click", self.show).keydown(function(e) {
input.focus(self.show).keypress(function(e) { var key = e.keyCode; // open dateinput with navigation keyw if (root.is(":hidden") && $(KEYS).index(key) >= 0) { self.show(e); return e.preventDefault(); } // allow tab return e.shiftKey || e.ctrlKey || e.altKey || key == 9 ? true : e.preventDefault(); });
if (root.is(":hidden") && $(KEYS).index(key) >= 0) {
if (!opened && $(KEYS).index(key) >= 0) {
input.focus(self.show).keypress(function(e) { var key = e.keyCode; // open dateinput with navigation keyw if (root.is(":hidden") && $(KEYS).index(key) >= 0) { self.show(e); return e.preventDefault(); } // allow tab return e.shiftKey || e.ctrlKey || e.altKey || key == 9 ? true : e.preventDefault(); });
el.trigger("oninvalid", [msgs]);
el.trigger("OI", [msgs]);
els.each(function() { // field and it's error message container var msgs = [], el = $(this).unbind(event).data("messages", msgs); // loop all validator functions $.each(fns, function() { var fn = this, match = fn[0]; // match found if (el.filter(match).length) { // execute a validator function var returnValue = fn[1].call(self, el, el.val()); // validation failed. multiple substitutions can be returned with an array if (returnValue !== true) { // onBeforeFail e.type = "onBeforeFail"; fire.trigger(e, [el, match]); if (e.isDefaultPrevented()) { return false; } // overridden custom message var msg = el.attr(conf.messageAttr); if (msg) { msgs = [msg]; return false; } else { pushMessage(msgs, match, returnValue); } } } }); if (msgs.length) { errs.push({input: el, messages: msgs}); // trigger HTML5 ininvalid event el.trigger("oninvalid", [msgs]); // begin validating upon error event type (such as keyup) if (conf.errorInputEvent) { el.bind(event, function(e) { self.checkValidity(el, e); }); } } if (conf.singleError && errs.length) { return false; } });
function (opt) template.map(buffer.pageInfo[opt][0](), util.identity, ", "),
let list = template.map(option, function (option) { let opt = buffer.pageInfo[option]; return opt ? template.table(opt[1], opt[0](true)) : undefined; }, <br/>);
function (opt) template.map(buffer.pageInfo[opt][0](), util.identity, ", "),
}
} else if (key == 8 || key == 46) { input.val(""); }
input.bind("focus click", self.show).keydown(function(e) { var key = e.keyCode; // open dateinput with navigation keyw if (!opened && $(KEYS).index(key) >= 0) { self.show(e); return e.preventDefault(); } // allow tab return e.shiftKey || e.ctrlKey || e.altKey || key == 9 ? true : e.preventDefault(); });
i)};d.find=p;d.expr=p.selectors;d.expr[":"]=d.expr.filters;d.unique=p.uniqueSort;d.getText=a;d.isXMLDoc=P;d.contains=fa})();var Ba=/Until$/,Ca=/^(?:parents|prevUntil|prevAll)/,Da=/,/;I=Array.prototype.slice;var ha=function(a,b,e){if(d.isFunction(b))return d.grep(a,function(h,k){return!!b.call(h,k,h)===e});else if(b.nodeType)return d.grep(a,function(h){return h===b===e});else if(typeof b==="string"){var g=d.grep(a,function(h){return h.nodeType===1});if(va.test(b))return d.filter(b,g,!e);else b=d.filter(b,
function(h){return h===b===e});else if(typeof b==="string"){var f=c.grep(a,function(h){return h.nodeType===1});if(va.test(b))return c.filter(b,f,!e);else b=c.filter(b,a)}return c.grep(a,function(h){return c.inArray(h,b)>=0===e})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),e=0,f=0,h=this.length;f<h;f++){e=b.length;c.find(a,this[f],b);if(f>0)for(var k=e;k<b.length;k++)for(var l=0;l<e;l++)if(b[l]===b[k]){b.splice(k--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var e=
i)};d.find=p;d.expr=p.selectors;d.expr[":"]=d.expr.filters;d.unique=p.uniqueSort;d.getText=a;d.isXMLDoc=P;d.contains=fa})();var Ba=/Until$/,Ca=/^(?:parents|prevUntil|prevAll)/,Da=/,/;I=Array.prototype.slice;var ha=function(a,b,e){if(d.isFunction(b))return d.grep(a,function(h,k){return!!b.call(h,k,h)===e});else if(b.nodeType)return d.grep(a,function(h){return h===b===e});else if(typeof b==="string"){var g=d.grep(a,function(h){return h.nodeType===1});if(va.test(b))return d.filter(b,g,!e);else b=d.filter(b,
m.setData(m.config.newpage_html,function(){setTimeout(function(){m.fire('afterCommandExec',{name:n.name,command:n});},200);});m.focus();},async:true});l.ui.addButton('NewPage',{label:l.lang.newPage,command:'newpage'});}});i.newpage_html='';j.add('pagebreak',{init:function(l){l.addCommand('pagebreak',j.pagebreakCmd);l.ui.addButton('PageBreak',{label:l.lang.pagebreak,command:'pagebreak'});l.addCss('img.cke_pagebreak{background-image: url('+a.getUrl(this.path+'images/pagebreak.gif')+');'+'background-position: center center;'+'background-repeat: no-repeat;'+'clear: both;'+'display: block;'+'float: none;'+'width: 100%;'+'border-top: #999999 1px dotted;'+'border-bottom: #999999 1px dotted;'+'height: 5px;'+'page-break-after: always;'+'}');},afterInit:function(l){var m=l.dataProcessor,n=m&&m.dataFilter;if(n)n.addRules({elements:{div:function(o){var p=o.attributes,q=p&&p.style,r=q&&o.children.length==1&&o.children[0],s=r&&r.name=='span'&&r.attributes.style;if(s&&/page-break-after\s*:\s*always/i.test(q)&&/display\s*:\s*none/i.test(s))return l.createFakeParserElement(o,'cke_pagebreak','div');}}});},requires:['fakeobjects']});j.pagebreakCmd={exec:function(l){var m=h.createFromHtml('<div style="page-break-after: always;"><span style="display: none;">&nbsp;</span></div>');m=l.createFakeElement(m,'cke_pagebreak','div');var n=l.getSelection().getRanges();for(var o,p=0;p<n.length;p++){o=n[p];if(p>0)m=m.clone(true);o.splitBlock('p');o.insertNode(m);if(p==n.length-1){o.moveToPosition(m,4);o.select();}}}};(function(){j.add('pastefromword',{init:function(l){var m=0,n=function(){setTimeout(function(){m=0;},0);};l.addCommand('pastefromword',{canUndo:false,exec:function(){m=1;if(l.execCommand('paste')===false)l.on('dialogHide',function(o){o.removeListener();n();});}});l.ui.addButton('PasteFromWord',{label:l.lang.pastefromword.toolbar,command:'pastefromword'});l.on('paste',function(o){var p=o.data,q;if((q=p.html)&&(m||/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/.test(q))){var r=this.loadFilterRules(function(){if(r)l.fire('paste',p);else if(!l.config.pasteFromWordPromptCleanup||m||confirm(l.lang.pastefromword.confirmCleanup))p.html=a.cleanWord(q,l);});r&&o.cancel();}},this);},loadFilterRules:function(l){var m=a.cleanWord;if(m)l();else{var n=a.getUrl(i.pasteFromWordCleanupFile||this.path+'filter/default.js');a.scriptLoader.load(n,l,null,false,true);}return!m;}});})();(function(){var l={exec:function(o){var p=e.tryThese(function(){var q=window.clipboardData.getData('Text');if(!q)throw 0;
delete R.attributes.contenteditable;},style:function(R){var S=R.children[0];S&&S.value&&(S.value=e.trim(S.value));if(!R.attributes.type)R.attributes.type='text/css';},title:function(R){var S=R.children[0];S&&(S.value=R.attributes._cke_title||'');}},attributes:{'class':function(R,S){return e.ltrim(R.replace(/(?:^|\s+)cke_[^\s]*/g,''))||false;}},comment:function(R){if(R.substr(0,m.length)==m){if(R.substr(m.length,3)=='{C}')R=R.substr(m.length+3);else R=R.substr(m.length);return new a.htmlParser.cdata(decodeURIComponent(R));}return R;}},y={elements:{}};for(u in t)y.elements[u]=r;if(c)x.attributes.style=function(R,S){return R.toLowerCase();};function z(R){R.attributes.contenteditable='false';};function A(R){delete R.attributes.contenteditable;};for(u in {input:1,textarea:1}){v.elements[u]=z;x.elements[u]=A;}var B=/<((?:a|area|img|input)[\s\S]*?\s)((href|src|name)\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|(?:[^ "'>]+)))([^>]*)>/gi,C=/\s_cke_saved_src\s*=/,D=/(?:<style(?=[ >])[^>]*>[\s\S]*<\/style>)|(?:<(:?link|meta|base)[^>]*>)/gi,E=/<cke:encoded>([^<]*)<\/cke:encoded>/gi,F=/(<\/?)((?:object|embed|param|html|body|head|title)[^>]*>)/gi,G=/(<\/?)cke:((?:html|body|head|title)[^>]*>)/gi,H=/<cke:(param|embed)([^>]*?)\/?>(?!\s*<\/cke:\1)/gi;function I(R){return R.replace(B,function(S,T,U,V,W){if(V=='src'&&C.test(S))return S;else return '<'+T+U+' _cke_saved_'+U+W+'>';});};function J(R){return R.replace(D,function(S){return '<cke:encoded>'+encodeURIComponent(S)+'</cke:encoded>';});};function K(R){return R.replace(E,function(S,T){return decodeURIComponent(T);});};function L(R){return R.replace(F,'$1cke:$2');};function M(R){return R.replace(G,'$1$2');};function N(R){return R.replace(H,'<cke:$1$2></cke:$1>');};function O(R){return R.replace(/<!--(?!{cke_protected})[\s\S]+?-->/g,function(S){return '<!--'+m+'{C}'+encodeURIComponent(S).replace(/--/g,'%2D%2D')+'-->';});};function P(R){return R.replace(/<!--\{cke_protected\}\{C\}([\s\S]+?)-->/g,function(S,T){return decodeURIComponent(T);});};function Q(R,S){var T=[],U=/<\!--\{cke_temp(comment)?\}(\d*?)-->/g,V=[/<script[\s\S]*?<\/script>/gi,/<noscript[\s\S]*?<\/noscript>/gi].concat(S);R=R.replace(/<!--[\s\S]*?-->/g,function(X){return '<!--{cke_tempcomment}'+(T.push(X)-1)+'-->';});for(var W=0;W<V.length;W++)R=R.replace(V[W],function(X){X=X.replace(U,function(Y,Z,aa){return T[aa];});return '<!--{cke_temp}'+(T.push(X)-1)+'-->';});R=R.replace(U,function(X,Y,Z){return '<!--'+m+(Y?'{C}':'')+encodeURIComponent(T[Z]).replace(/--/g,'%2D%2D')+'-->'; });return R;};j.add('htmldataprocessor',{requires:['htmlwriter'],init:function(R){var S=R.dataProcessor=new a.htmlDataProcessor(R);S.writer.forceSimpleAmpersand=R.config.forceSimpleAmpersand;S.dataFilter.addRules(v);S.dataFilter.addRules(w);S.htmlFilter.addRules(x);S.htmlFilter.addRules(y);}});a.htmlDataProcessor=function(R){var S=this;S.editor=R;S.writer=new a.htmlWriter();S.dataFilter=new a.htmlParser.filter();S.htmlFilter=new a.htmlParser.filter();};a.htmlDataProcessor.prototype={toHtml:function(R,S){R=Q(R,this.editor.config.protectedSource);R=I(R);R=J(R);R=L(R);R=N(R);var T=new h('div');T.setHtml('a'+R);R=T.getHtml().substr(1);R=M(R);R=K(R);R=P(R);var U=a.htmlParser.fragment.fromHtml(R,S),V=new a.htmlParser.basicWriter();U.writeHtml(V,this.dataFilter);R=V.getHtml(true);R=O(R);return R;},toDataFormat:function(R,S){var T=this.writer,U=a.htmlParser.fragment.fromHtml(R,S);T.reset();U.writeHtml(T,this.htmlFilter);return T.getHtml(true);}};})();i.forceSimpleAmpersand=false;j.add('image',{init:function(l){var m='image';a.dialog.add(m,this.path+'dialogs/image.js');l.addCommand(m,new a.dialogCommand(m));l.ui.addButton('Image',{label:l.lang.common.image,command:m});l.on('doubleclick',function(n){var o=n.data.element;if(o.is('img')&&!o.getAttribute('_cke_realelement'))n.data.dialog='image';});if(l.addMenuItems)l.addMenuItems({image:{label:l.lang.image.menu,command:'image',group:'image'}});if(l.contextMenu)l.contextMenu.addListener(function(n,o){if(!n||!n.is('img')||n.getAttribute('_cke_realelement')||n.isReadOnly())return null;return{image:2};});}});i.image_removeLinkByEmptyURL=true;(function(){var l={ol:1,ul:1},m=d.walker.whitespaces(true),n=d.walker.bookmark(false,true);function o(t,u){t.getCommand(this.name).setState(u);};function p(t){var C=this;var u=t.editor,v=t.data.path,w=v&&v.contains(l);if(w)return o.call(C,u,2);if(!C.useIndentClasses&&C.name=='indent')return o.call(C,u,2);var x=t.data.path,y=x.block||x.blockLimit;if(!y)return o.call(C,u,0);if(C.useIndentClasses){var z=y.$.className.match(C.classNameRegex),A=0;if(z){z=z[1];A=C.indentClassMap[z];}if(C.name=='outdent'&&!A||C.name=='indent'&&A==u.config.indentClasses.length)return o.call(C,u,0);return o.call(C,u,2);}else{var B=parseInt(y.getStyle(r(y)),10);if(isNaN(B))B=0;if(B<=0)return o.call(C,u,0);return o.call(C,u,2);}};function q(t,u){var w=this;w.name=u;w.useIndentClasses=t.config.indentClasses&&t.config.indentClasses.length>0;if(w.useIndentClasses){w.classNameRegex=new RegExp('(?:^|\\s+)('+t.config.indentClasses.join('|')+')(?=$|\\s)');
m.setData(m.config.newpage_html,function(){setTimeout(function(){m.fire('afterCommandExec',{name:n.name,command:n});},200);});m.focus();},async:true});l.ui.addButton('NewPage',{label:l.lang.newPage,command:'newpage'});}});i.newpage_html='';j.add('pagebreak',{init:function(l){l.addCommand('pagebreak',j.pagebreakCmd);l.ui.addButton('PageBreak',{label:l.lang.pagebreak,command:'pagebreak'});l.addCss('img.cke_pagebreak{background-image: url('+a.getUrl(this.path+'images/pagebreak.gif')+');'+'background-position: center center;'+'background-repeat: no-repeat;'+'clear: both;'+'display: block;'+'float: none;'+'width: 100%;'+'border-top: #999999 1px dotted;'+'border-bottom: #999999 1px dotted;'+'height: 5px;'+'page-break-after: always;'+'}');},afterInit:function(l){var m=l.dataProcessor,n=m&&m.dataFilter;if(n)n.addRules({elements:{div:function(o){var p=o.attributes,q=p&&p.style,r=q&&o.children.length==1&&o.children[0],s=r&&r.name=='span'&&r.attributes.style;if(s&&/page-break-after\s*:\s*always/i.test(q)&&/display\s*:\s*none/i.test(s))return l.createFakeParserElement(o,'cke_pagebreak','div');}}});},requires:['fakeobjects']});j.pagebreakCmd={exec:function(l){var m=h.createFromHtml('<div style="page-break-after: always;"><span style="display: none;">&nbsp;</span></div>');m=l.createFakeElement(m,'cke_pagebreak','div');var n=l.getSelection().getRanges();for(var o,p=0;p<n.length;p++){o=n[p];if(p>0)m=m.clone(true);o.splitBlock('p');o.insertNode(m);if(p==n.length-1){o.moveToPosition(m,4);o.select();}}}};(function(){j.add('pastefromword',{init:function(l){var m=0,n=function(){setTimeout(function(){m=0;},0);};l.addCommand('pastefromword',{canUndo:false,exec:function(){m=1;if(l.execCommand('paste')===false)l.on('dialogHide',function(o){o.removeListener();n();});}});l.ui.addButton('PasteFromWord',{label:l.lang.pastefromword.toolbar,command:'pastefromword'});l.on('paste',function(o){var p=o.data,q;if((q=p.html)&&(m||/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/.test(q))){var r=this.loadFilterRules(function(){if(r)l.fire('paste',p);else if(!l.config.pasteFromWordPromptCleanup||m||confirm(l.lang.pastefromword.confirmCleanup))p.html=a.cleanWord(q,l);});r&&o.cancel();}},this);},loadFilterRules:function(l){var m=a.cleanWord;if(m)l();else{var n=a.getUrl(i.pasteFromWordCleanupFile||this.path+'filter/default.js');a.scriptLoader.load(n,l,null,false,true);}return!m;}});})();(function(){var l={exec:function(o){var p=e.tryThese(function(){var q=window.clipboardData.getData('Text');if(!q)throw 0;
m.setData(m.config.newpage_html,function(){setTimeout(function(){m.fire('afterCommandExec',{name:n.name,command:n});},200);});m.focus();},async:true});l.ui.addButton('NewPage',{label:l.lang.newPage,command:'newpage'});}});i.newpage_html='';j.add('pagebreak',{init:function(l){l.addCommand('pagebreak',j.pagebreakCmd);l.ui.addButton('PageBreak',{label:l.lang.pagebreak,command:'pagebreak'});l.addCss('img.cke_pagebreak{background-image: url('+a.getUrl(this.path+'images/pagebreak.gif')+');'+'background-position: center center;'+'background-repeat: no-repeat;'+'clear: both;'+'display: block;'+'float: none;'+'width: 100%;'+'border-top: #999999 1px dotted;'+'border-bottom: #999999 1px dotted;'+'height: 5px;'+'page-break-after: always;'+'}');},afterInit:function(l){var m=l.dataProcessor,n=m&&m.dataFilter;if(n)n.addRules({elements:{div:function(o){var p=o.attributes,q=p&&p.style,r=q&&o.children.length==1&&o.children[0],s=r&&r.name=='span'&&r.attributes.style;if(s&&/page-break-after\s*:\s*always/i.test(q)&&/display\s*:\s*none/i.test(s))return l.createFakeParserElement(o,'cke_pagebreak','div');}}});},requires:['fakeobjects']});j.pagebreakCmd={exec:function(l){var m=h.createFromHtml('<div style="page-break-after: always;"><span style="display: none;">&nbsp;</span></div>');m=l.createFakeElement(m,'cke_pagebreak','div');var n=l.getSelection().getRanges();for(var o,p=0;p<n.length;p++){o=n[p];if(p>0)m=m.clone(true);o.splitBlock('p');o.insertNode(m);if(p==n.length-1){o.moveToPosition(m,4);o.select();}}}};(function(){j.add('pastefromword',{init:function(l){var m=0,n=function(){setTimeout(function(){m=0;},0);};l.addCommand('pastefromword',{canUndo:false,exec:function(){m=1;if(l.execCommand('paste')===false)l.on('dialogHide',function(o){o.removeListener();n();});}});l.ui.addButton('PasteFromWord',{label:l.lang.pastefromword.toolbar,command:'pastefromword'});l.on('paste',function(o){var p=o.data,q;if((q=p.html)&&(m||/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/.test(q))){var r=this.loadFilterRules(function(){if(r)l.fire('paste',p);else if(!l.config.pasteFromWordPromptCleanup||m||confirm(l.lang.pastefromword.confirmCleanup))p.html=a.cleanWord(q,l);});r&&o.cancel();}},this);},loadFilterRules:function(l){var m=a.cleanWord;if(m)l();else{var n=a.getUrl(i.pasteFromWordCleanupFile||this.path+'filter/default.js');a.scriptLoader.load(n,l,null,false,true);}return!m;}});})();(function(){var l={exec:function(o){var p=e.tryThese(function(){var q=window.clipboardData.getData('Text');if(!q)throw 0;
});return R;};j.add('htmldataprocessor',{requires:['htmlwriter'],init:function(R){var S=R.dataProcessor=new a.htmlDataProcessor(R);S.writer.forceSimpleAmpersand=R.config.forceSimpleAmpersand;S.dataFilter.addRules(v);S.dataFilter.addRules(w);S.htmlFilter.addRules(x);S.htmlFilter.addRules(y);}});a.htmlDataProcessor=function(R){var S=this;S.editor=R;S.writer=new a.htmlWriter();S.dataFilter=new a.htmlParser.filter();S.htmlFilter=new a.htmlParser.filter();};a.htmlDataProcessor.prototype={toHtml:function(R,S){R=Q(R,this.editor.config.protectedSource);R=I(R);R=J(R);R=L(R);R=N(R);var T=new h('div');T.setHtml('a'+R);R=T.getHtml().substr(1);R=M(R);R=K(R);R=P(R);var U=a.htmlParser.fragment.fromHtml(R,S),V=new a.htmlParser.basicWriter();U.writeHtml(V,this.dataFilter);R=V.getHtml(true);R=O(R);return R;},toDataFormat:function(R,S){var T=this.writer,U=a.htmlParser.fragment.fromHtml(R,S);T.reset();U.writeHtml(T,this.htmlFilter);return T.getHtml(true);}};})();i.forceSimpleAmpersand=false;j.add('image',{init:function(l){var m='image';a.dialog.add(m,this.path+'dialogs/image.js');l.addCommand(m,new a.dialogCommand(m));l.ui.addButton('Image',{label:l.lang.common.image,command:m});l.on('doubleclick',function(n){var o=n.data.element;if(o.is('img')&&!o.getAttribute('_cke_realelement'))n.data.dialog='image';});if(l.addMenuItems)l.addMenuItems({image:{label:l.lang.image.menu,command:'image',group:'image'}});if(l.contextMenu)l.contextMenu.addListener(function(n,o){if(!n||!n.is('img')||n.getAttribute('_cke_realelement')||n.isReadOnly())return null;return{image:2};});}});i.image_removeLinkByEmptyURL=true;(function(){var l={ol:1,ul:1},m=d.walker.whitespaces(true),n=d.walker.bookmark(false,true);function o(t,u){t.getCommand(this.name).setState(u);};function p(t){var C=this;var u=t.editor,v=t.data.path,w=v&&v.contains(l);if(w)return o.call(C,u,2);if(!C.useIndentClasses&&C.name=='indent')return o.call(C,u,2);var x=t.data.path,y=x.block||x.blockLimit;if(!y)return o.call(C,u,0);if(C.useIndentClasses){var z=y.$.className.match(C.classNameRegex),A=0;if(z){z=z[1];A=C.indentClassMap[z];}if(C.name=='outdent'&&!A||C.name=='indent'&&A==u.config.indentClasses.length)return o.call(C,u,0);return o.call(C,u,2);}else{var B=parseInt(y.getStyle(r(y)),10);if(isNaN(B))B=0;if(B<=0)return o.call(C,u,0);return o.call(C,u,2);}};function q(t,u){var w=this;w.name=u;w.useIndentClasses=t.config.indentClasses&&t.config.indentClasses.length>0;if(w.useIndentClasses){w.classNameRegex=new RegExp('(?:^|\\s+)('+t.config.indentClasses.join('|')+')(?=$|\\s)');
m.setData(m.config.newpage_html,function(){setTimeout(function(){m.fire('afterCommandExec',{name:n.name,command:n});},200);});m.focus();},async:true});l.ui.addButton('NewPage',{label:l.lang.newPage,command:'newpage'});}});i.newpage_html='';j.add('pagebreak',{init:function(l){l.addCommand('pagebreak',j.pagebreakCmd);l.ui.addButton('PageBreak',{label:l.lang.pagebreak,command:'pagebreak'});l.addCss('img.cke_pagebreak{background-image: url('+a.getUrl(this.path+'images/pagebreak.gif')+');'+'background-position: center center;'+'background-repeat: no-repeat;'+'clear: both;'+'display: block;'+'float: none;'+'width: 100%;'+'border-top: #999999 1px dotted;'+'border-bottom: #999999 1px dotted;'+'height: 5px;'+'page-break-after: always;'+'}');},afterInit:function(l){var m=l.dataProcessor,n=m&&m.dataFilter;if(n)n.addRules({elements:{div:function(o){var p=o.attributes,q=p&&p.style,r=q&&o.children.length==1&&o.children[0],s=r&&r.name=='span'&&r.attributes.style;if(s&&/page-break-after\s*:\s*always/i.test(q)&&/display\s*:\s*none/i.test(s))return l.createFakeParserElement(o,'cke_pagebreak','div');}}});},requires:['fakeobjects']});j.pagebreakCmd={exec:function(l){var m=h.createFromHtml('<div style="page-break-after: always;"><span style="display: none;">&nbsp;</span></div>');m=l.createFakeElement(m,'cke_pagebreak','div');var n=l.getSelection().getRanges();for(var o,p=0;p<n.length;p++){o=n[p];if(p>0)m=m.clone(true);o.splitBlock('p');o.insertNode(m);if(p==n.length-1){o.moveToPosition(m,4);o.select();}}}};(function(){j.add('pastefromword',{init:function(l){var m=0,n=function(){setTimeout(function(){m=0;},0);};l.addCommand('pastefromword',{canUndo:false,exec:function(){m=1;if(l.execCommand('paste')===false)l.on('dialogHide',function(o){o.removeListener();n();});}});l.ui.addButton('PasteFromWord',{label:l.lang.pastefromword.toolbar,command:'pastefromword'});l.on('paste',function(o){var p=o.data,q;if((q=p.html)&&(m||/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/.test(q))){var r=this.loadFilterRules(function(){if(r)l.fire('paste',p);else if(!l.config.pasteFromWordPromptCleanup||m||confirm(l.lang.pastefromword.confirmCleanup))p.html=a.cleanWord(q,l);});r&&o.cancel();}},this);},loadFilterRules:function(l){var m=a.cleanWord;if(m)l();else{var n=a.getUrl(i.pasteFromWordCleanupFile||this.path+'filter/default.js');a.scriptLoader.load(n,l,null,false,true);}return!m;}});})();(function(){var l={exec:function(o){var p=e.tryThese(function(){var q=window.clipboardData.getData('Text');if(!q)throw 0;
m.setData(m.config.newpage_html,function(){setTimeout(function(){m.fire('afterCommandExec',{name:n.name,command:n});},200);});m.focus();},async:true});l.ui.addButton('NewPage',{label:l.lang.newPage,command:'newpage'});}});i.newpage_html='';j.add('pagebreak',{init:function(l){l.addCommand('pagebreak',j.pagebreakCmd);l.ui.addButton('PageBreak',{label:l.lang.pagebreak,command:'pagebreak'});l.addCss('img.cke_pagebreak{background-image: url('+a.getUrl(this.path+'images/pagebreak.gif')+');'+'background-position: center center;'+'background-repeat: no-repeat;'+'clear: both;'+'display: block;'+'float: none;'+'width: 100%;'+'border-top: #999999 1px dotted;'+'border-bottom: #999999 1px dotted;'+'height: 5px;'+'page-break-after: always;'+'}');},afterInit:function(l){var m=l.dataProcessor,n=m&&m.dataFilter;if(n)n.addRules({elements:{div:function(o){var p=o.attributes,q=p&&p.style,r=q&&o.children.length==1&&o.children[0],s=r&&r.name=='span'&&r.attributes.style;if(s&&/page-break-after\s*:\s*always/i.test(q)&&/display\s*:\s*none/i.test(s))return l.createFakeParserElement(o,'cke_pagebreak','div');}}});},requires:['fakeobjects']});j.pagebreakCmd={exec:function(l){var m=h.createFromHtml('<div style="page-break-after: always;"><span style="display: none;">&nbsp;</span></div>');m=l.createFakeElement(m,'cke_pagebreak','div');var n=l.getSelection().getRanges();for(var o,p=0;p<n.length;p++){o=n[p];if(p>0)m=m.clone(true);o.splitBlock('p');o.insertNode(m);if(p==n.length-1){o.moveToPosition(m,4);o.select();}}}};(function(){j.add('pastefromword',{init:function(l){var m=0,n=function(){setTimeout(function(){m=0;},0);};l.addCommand('pastefromword',{canUndo:false,exec:function(){m=1;if(l.execCommand('paste')===false)l.on('dialogHide',function(o){o.removeListener();n();});}});l.ui.addButton('PasteFromWord',{label:l.lang.pastefromword.toolbar,command:'pastefromword'});l.on('paste',function(o){var p=o.data,q;if((q=p.html)&&(m||/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/.test(q))){var r=this.loadFilterRules(function(){if(r)l.fire('paste',p);else if(!l.config.pasteFromWordPromptCleanup||m||confirm(l.lang.pastefromword.confirmCleanup))p.html=a.cleanWord(q,l);});r&&o.cancel();}},this);},loadFilterRules:function(l){var m=a.cleanWord;if(m)l();else{var n=a.getUrl(i.pasteFromWordCleanupFile||this.path+'filter/default.js');a.scriptLoader.load(n,l,null,false,true);}return!m;}});})();(function(){var l={exec:function(o){var p=e.tryThese(function(){var q=window.clipboardData.getData('Text');if(!q)throw 0; return q;},function(){window.netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');var q=window.Components.classes['@mozilla.org/widget/clipboard;1'].getService(window.Components.interfaces.nsIClipboard),r=window.Components.classes['@mozilla.org/widget/transferable;1'].createInstance(window.Components.interfaces.nsITransferable);r.addDataFlavor('text/unicode');q.getData(r,q.kGlobalClipboard);var s={},t={},u;r.getTransferData('text/unicode',s,t);s=s.value.QueryInterface(window.Components.interfaces.nsISupportsString);u=s.data.substring(0,t.value/2);return u;});if(!p){o.openDialog('pastetext');return false;}else o.fire('paste',{text:p});return true;}};function m(o,p){if(c){var q=o.selection;if(q.type=='Control')q.clear();q.createRange().pasteHTML(p);}else o.execCommand('inserthtml',false,p);};j.add('pastetext',{init:function(o){var p='pastetext',q=o.addCommand(p,l);o.ui.addButton('PasteText',{label:o.lang.pasteText.button,command:p});a.dialog.add(p,a.getUrl(this.path+'dialogs/pastetext.js'));if(o.config.forcePasteAsPlainText)o.on('beforeCommandExec',function(r){if(r.data.name=='paste'){o.execCommand('pastetext');r.cancel();}},null,null,0);},requires:['clipboard']});function n(o,p,q,r){while(q--)j.enterkey[p==2?'enterBr':'enterBlock'](o,p,null,r);};a.editor.prototype.insertText=function(o){this.focus();this.fire('saveSnapshot');var p=this.getSelection().getStartElement().hasAscendant('pre',true)?2:this.config.enterMode,q=p==2,r=this.document.$,s=this,t;o=e.htmlEncode(o.replace(/\r\n|\r/g,'\n'));var u=0;o.replace(/\n+/g,function(v,w){t=o.substring(u,w);u=w+v.length;t.length&&m(r,t);var x=v.length,y=q?0:Math.floor(x/2),z=q?x:x%2;n(s,p,y);n(s,2,z,q?false:true);});t=o.substring(u,o.length);t.length&&m(r,t);this.fire('saveSnapshot');};})();j.add('popup');e.extend(a.editor.prototype,{popup:function(l,m,n){m=m||'80%';n=n||'70%';if(typeof m=='string'&&m.length>1&&m.substr(m.length-1,1)=='%')m=parseInt(window.screen.width*parseInt(m,10)/100,10);if(typeof n=='string'&&n.length>1&&n.substr(n.length-1,1)=='%')n=parseInt(window.screen.height*parseInt(n,10)/100,10);if(m<640)m=640;if(n<420)n=420;var o=parseInt((window.screen.height-n)/2,10),p=parseInt((window.screen.width-m)/2,10),q='location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,width='+m+',height='+n+',top='+o+',left='+p,r=window.open('',null,q,true);if(!r)return false;try{r.moveTo(p,o);r.resizeTo(m,n);r.focus();r.location.href=l;}catch(s){r=window.open(l,null,q,true);
});return R;};j.add('htmldataprocessor',{requires:['htmlwriter'],init:function(R){var S=R.dataProcessor=new a.htmlDataProcessor(R);S.writer.forceSimpleAmpersand=R.config.forceSimpleAmpersand;S.dataFilter.addRules(v);S.dataFilter.addRules(w);S.htmlFilter.addRules(x);S.htmlFilter.addRules(y);}});a.htmlDataProcessor=function(R){var S=this;S.editor=R;S.writer=new a.htmlWriter();S.dataFilter=new a.htmlParser.filter();S.htmlFilter=new a.htmlParser.filter();};a.htmlDataProcessor.prototype={toHtml:function(R,S){R=Q(R,this.editor.config.protectedSource);R=I(R);R=J(R);R=L(R);R=N(R);var T=new h('div');T.setHtml('a'+R);R=T.getHtml().substr(1);R=M(R);R=K(R);R=P(R);var U=a.htmlParser.fragment.fromHtml(R,S),V=new a.htmlParser.basicWriter();U.writeHtml(V,this.dataFilter);R=V.getHtml(true);R=O(R);return R;},toDataFormat:function(R,S){var T=this.writer,U=a.htmlParser.fragment.fromHtml(R,S);T.reset();U.writeHtml(T,this.htmlFilter);return T.getHtml(true);}};})();i.forceSimpleAmpersand=false;j.add('image',{init:function(l){var m='image';a.dialog.add(m,this.path+'dialogs/image.js');l.addCommand(m,new a.dialogCommand(m));l.ui.addButton('Image',{label:l.lang.common.image,command:m});l.on('doubleclick',function(n){var o=n.data.element;if(o.is('img')&&!o.getAttribute('_cke_realelement'))n.data.dialog='image';});if(l.addMenuItems)l.addMenuItems({image:{label:l.lang.image.menu,command:'image',group:'image'}});if(l.contextMenu)l.contextMenu.addListener(function(n,o){if(!n||!n.is('img')||n.getAttribute('_cke_realelement')||n.isReadOnly())return null;return{image:2};});}});i.image_removeLinkByEmptyURL=true;(function(){var l={ol:1,ul:1},m=d.walker.whitespaces(true),n=d.walker.bookmark(false,true);function o(t,u){t.getCommand(this.name).setState(u);};function p(t){var C=this;var u=t.editor,v=t.data.path,w=v&&v.contains(l);if(w)return o.call(C,u,2);if(!C.useIndentClasses&&C.name=='indent')return o.call(C,u,2);var x=t.data.path,y=x.block||x.blockLimit;if(!y)return o.call(C,u,0);if(C.useIndentClasses){var z=y.$.className.match(C.classNameRegex),A=0;if(z){z=z[1];A=C.indentClassMap[z];}if(C.name=='outdent'&&!A||C.name=='indent'&&A==u.config.indentClasses.length)return o.call(C,u,0);return o.call(C,u,2);}else{var B=parseInt(y.getStyle(r(y)),10);if(isNaN(B))B=0;if(B<=0)return o.call(C,u,0);return o.call(C,u,2);}};function q(t,u){var w=this;w.name=u;w.useIndentClasses=t.config.indentClasses&&t.config.indentClasses.length>0;if(w.useIndentClasses){w.classNameRegex=new RegExp('(?:^|\\s+)('+t.config.indentClasses.join('|')+')(?=$|\\s)');
m.setData(m.config.newpage_html,function(){setTimeout(function(){m.fire('afterCommandExec',{name:n.name,command:n});},200);});m.focus();},async:true});l.ui.addButton('NewPage',{label:l.lang.newPage,command:'newpage'});}});i.newpage_html='';j.add('pagebreak',{init:function(l){l.addCommand('pagebreak',j.pagebreakCmd);l.ui.addButton('PageBreak',{label:l.lang.pagebreak,command:'pagebreak'});l.addCss('img.cke_pagebreak{background-image: url('+a.getUrl(this.path+'images/pagebreak.gif')+');'+'background-position: center center;'+'background-repeat: no-repeat;'+'clear: both;'+'display: block;'+'float: none;'+'width: 100%;'+'border-top: #999999 1px dotted;'+'border-bottom: #999999 1px dotted;'+'height: 5px;'+'page-break-after: always;'+'}');},afterInit:function(l){var m=l.dataProcessor,n=m&&m.dataFilter;if(n)n.addRules({elements:{div:function(o){var p=o.attributes,q=p&&p.style,r=q&&o.children.length==1&&o.children[0],s=r&&r.name=='span'&&r.attributes.style;if(s&&/page-break-after\s*:\s*always/i.test(q)&&/display\s*:\s*none/i.test(s))return l.createFakeParserElement(o,'cke_pagebreak','div');}}});},requires:['fakeobjects']});j.pagebreakCmd={exec:function(l){var m=h.createFromHtml('<div style="page-break-after: always;"><span style="display: none;">&nbsp;</span></div>');m=l.createFakeElement(m,'cke_pagebreak','div');var n=l.getSelection().getRanges();for(var o,p=0;p<n.length;p++){o=n[p];if(p>0)m=m.clone(true);o.splitBlock('p');o.insertNode(m);if(p==n.length-1){o.moveToPosition(m,4);o.select();}}}};(function(){j.add('pastefromword',{init:function(l){var m=0,n=function(){setTimeout(function(){m=0;},0);};l.addCommand('pastefromword',{canUndo:false,exec:function(){m=1;if(l.execCommand('paste')===false)l.on('dialogHide',function(o){o.removeListener();n();});}});l.ui.addButton('PasteFromWord',{label:l.lang.pastefromword.toolbar,command:'pastefromword'});l.on('paste',function(o){var p=o.data,q;if((q=p.html)&&(m||/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/.test(q))){var r=this.loadFilterRules(function(){if(r)l.fire('paste',p);else if(!l.config.pasteFromWordPromptCleanup||m||confirm(l.lang.pastefromword.confirmCleanup))p.html=a.cleanWord(q,l);});r&&o.cancel();}},this);},loadFilterRules:function(l){var m=a.cleanWord;if(m)l();else{var n=a.getUrl(i.pasteFromWordCleanupFile||this.path+'filter/default.js');a.scriptLoader.load(n,l,null,false,true);}return!m;}});})();(function(){var l={exec:function(o){var p=e.tryThese(function(){var q=window.clipboardData.getData('Text');if(!q)throw 0;return q;},function(){window.netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');var q=window.Components.classes['@mozilla.org/widget/clipboard;1'].getService(window.Components.interfaces.nsIClipboard),r=window.Components.classes['@mozilla.org/widget/transferable;1'].createInstance(window.Components.interfaces.nsITransferable);r.addDataFlavor('text/unicode');q.getData(r,q.kGlobalClipboard);var s={},t={},u;r.getTransferData('text/unicode',s,t);s=s.value.QueryInterface(window.Components.interfaces.nsISupportsString);u=s.data.substring(0,t.value/2);return u;});if(!p){o.openDialog('pastetext');return false;}else o.fire('paste',{text:p});return true;}};function m(o,p){if(c){var q=o.selection;if(q.type=='Control')q.clear();q.createRange().pasteHTML(p);}else o.execCommand('inserthtml',false,p);};j.add('pastetext',{init:function(o){var p='pastetext',q=o.addCommand(p,l);o.ui.addButton('PasteText',{label:o.lang.pasteText.button,command:p});a.dialog.add(p,a.getUrl(this.path+'dialogs/pastetext.js'));if(o.config.forcePasteAsPlainText)o.on('beforeCommandExec',function(r){if(r.data.name=='paste'){o.execCommand('pastetext');r.cancel();}},null,null,0);},requires:['clipboard']});function n(o,p,q,r){while(q--)j.enterkey[p==2?'enterBr':'enterBlock'](o,p,null,r);};a.editor.prototype.insertText=function(o){this.focus();this.fire('saveSnapshot');var p=this.getSelection().getStartElement().hasAscendant('pre',true)?2:this.config.enterMode,q=p==2,r=this.document.$,s=this,t;o=e.htmlEncode(o.replace(/\r\n|\r/g,'\n'));var u=0;o.replace(/\n+/g,function(v,w){t=o.substring(u,w);u=w+v.length;t.length&&m(r,t);var x=v.length,y=q?0:Math.floor(x/2),z=q?x:x%2;n(s,p,y);n(s,2,z,q?false:true);});t=o.substring(u,o.length);t.length&&m(r,t);this.fire('saveSnapshot');};})();j.add('popup');e.extend(a.editor.prototype,{popup:function(l,m,n){m=m||'80%';n=n||'70%';if(typeof m=='string'&&m.length>1&&m.substr(m.length-1,1)=='%')m=parseInt(window.screen.width*parseInt(m,10)/100,10);if(typeof n=='string'&&n.length>1&&n.substr(n.length-1,1)=='%')n=parseInt(window.screen.height*parseInt(n,10)/100,10);if(m<640)m=640;if(n<420)n=420;var o=parseInt((window.screen.height-n)/2,10),p=parseInt((window.screen.width-m)/2,10),q='location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,width='+m+',height='+n+',top='+o+',left='+p,r=window.open('',null,q,true);if(!r)return false;try{r.moveTo(p,o);r.resizeTo(m,n);r.focus();r.location.href=l;}catch(s){r=window.open(l,null,q,true);
m.setData(m.config.newpage_html,function(){setTimeout(function(){m.fire('afterCommandExec',{name:n.name,command:n});},200);});m.focus();},async:true});l.ui.addButton('NewPage',{label:l.lang.newPage,command:'newpage'});}});i.newpage_html='';j.add('pagebreak',{init:function(l){l.addCommand('pagebreak',j.pagebreakCmd);l.ui.addButton('PageBreak',{label:l.lang.pagebreak,command:'pagebreak'});l.addCss('img.cke_pagebreak{background-image: url('+a.getUrl(this.path+'images/pagebreak.gif')+');'+'background-position: center center;'+'background-repeat: no-repeat;'+'clear: both;'+'display: block;'+'float: none;'+'width: 100%;'+'border-top: #999999 1px dotted;'+'border-bottom: #999999 1px dotted;'+'height: 5px;'+'page-break-after: always;'+'}');},afterInit:function(l){var m=l.dataProcessor,n=m&&m.dataFilter;if(n)n.addRules({elements:{div:function(o){var p=o.attributes,q=p&&p.style,r=q&&o.children.length==1&&o.children[0],s=r&&r.name=='span'&&r.attributes.style;if(s&&/page-break-after\s*:\s*always/i.test(q)&&/display\s*:\s*none/i.test(s))return l.createFakeParserElement(o,'cke_pagebreak','div');}}});},requires:['fakeobjects']});j.pagebreakCmd={exec:function(l){var m=h.createFromHtml('<div style="page-break-after: always;"><span style="display: none;">&nbsp;</span></div>');m=l.createFakeElement(m,'cke_pagebreak','div');var n=l.getSelection().getRanges();for(var o,p=0;p<n.length;p++){o=n[p];if(p>0)m=m.clone(true);o.splitBlock('p');o.insertNode(m);if(p==n.length-1){o.moveToPosition(m,4);o.select();}}}};(function(){j.add('pastefromword',{init:function(l){var m=0,n=function(){setTimeout(function(){m=0;},0);};l.addCommand('pastefromword',{canUndo:false,exec:function(){m=1;if(l.execCommand('paste')===false)l.on('dialogHide',function(o){o.removeListener();n();});}});l.ui.addButton('PasteFromWord',{label:l.lang.pastefromword.toolbar,command:'pastefromword'});l.on('paste',function(o){var p=o.data,q;if((q=p.html)&&(m||/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/.test(q))){var r=this.loadFilterRules(function(){if(r)l.fire('paste',p);else if(!l.config.pasteFromWordPromptCleanup||m||confirm(l.lang.pastefromword.confirmCleanup))p.html=a.cleanWord(q,l);});r&&o.cancel();}},this);},loadFilterRules:function(l){var m=a.cleanWord;if(m)l();else{var n=a.getUrl(i.pasteFromWordCleanupFile||this.path+'filter/default.js');a.scriptLoader.load(n,l,null,false,true);}return!m;}});})();(function(){var l={exec:function(o){var p=e.tryThese(function(){var q=window.clipboardData.getData('Text');if(!q)throw 0; return q;},function(){window.netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');var q=window.Components.classes['@mozilla.org/widget/clipboard;1'].getService(window.Components.interfaces.nsIClipboard),r=window.Components.classes['@mozilla.org/widget/transferable;1'].createInstance(window.Components.interfaces.nsITransferable);r.addDataFlavor('text/unicode');q.getData(r,q.kGlobalClipboard);var s={},t={},u;r.getTransferData('text/unicode',s,t);s=s.value.QueryInterface(window.Components.interfaces.nsISupportsString);u=s.data.substring(0,t.value/2);return u;});if(!p){o.openDialog('pastetext');return false;}else o.fire('paste',{text:p});return true;}};function m(o,p){if(c){var q=o.selection;if(q.type=='Control')q.clear();q.createRange().pasteHTML(p);}else o.execCommand('inserthtml',false,p);};j.add('pastetext',{init:function(o){var p='pastetext',q=o.addCommand(p,l);o.ui.addButton('PasteText',{label:o.lang.pasteText.button,command:p});a.dialog.add(p,a.getUrl(this.path+'dialogs/pastetext.js'));if(o.config.forcePasteAsPlainText)o.on('beforeCommandExec',function(r){if(r.data.name=='paste'){o.execCommand('pastetext');r.cancel();}},null,null,0);},requires:['clipboard']});function n(o,p,q,r){while(q--)j.enterkey[p==2?'enterBr':'enterBlock'](o,p,null,r);};a.editor.prototype.insertText=function(o){this.focus();this.fire('saveSnapshot');var p=this.getSelection().getStartElement().hasAscendant('pre',true)?2:this.config.enterMode,q=p==2,r=this.document.$,s=this,t;o=e.htmlEncode(o.replace(/\r\n|\r/g,'\n'));var u=0;o.replace(/\n+/g,function(v,w){t=o.substring(u,w);u=w+v.length;t.length&&m(r,t);var x=v.length,y=q?0:Math.floor(x/2),z=q?x:x%2;n(s,p,y);n(s,2,z,q?false:true);});t=o.substring(u,o.length);t.length&&m(r,t);this.fire('saveSnapshot');};})();j.add('popup');e.extend(a.editor.prototype,{popup:function(l,m,n){m=m||'80%';n=n||'70%';if(typeof m=='string'&&m.length>1&&m.substr(m.length-1,1)=='%')m=parseInt(window.screen.width*parseInt(m,10)/100,10);if(typeof n=='string'&&n.length>1&&n.substr(n.length-1,1)=='%')n=parseInt(window.screen.height*parseInt(n,10)/100,10);if(m<640)m=640;if(n<420)n=420;var o=parseInt((window.screen.height-n)/2,10),p=parseInt((window.screen.width-m)/2,10),q='location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,width='+m+',height='+n+',top='+o+',left='+p,r=window.open('',null,q,true);if(!r)return false;try{r.moveTo(p,o);r.resizeTo(m,n);r.focus();r.location.href=l;}catch(s){r=window.open(l,null,q,true);
});return R;};j.add('htmldataprocessor',{requires:['htmlwriter'],init:function(R){var S=R.dataProcessor=new a.htmlDataProcessor(R);S.writer.forceSimpleAmpersand=R.config.forceSimpleAmpersand;S.dataFilter.addRules(v);S.dataFilter.addRules(w);S.htmlFilter.addRules(x);S.htmlFilter.addRules(y);}});a.htmlDataProcessor=function(R){var S=this;S.editor=R;S.writer=new a.htmlWriter();S.dataFilter=new a.htmlParser.filter();S.htmlFilter=new a.htmlParser.filter();};a.htmlDataProcessor.prototype={toHtml:function(R,S){R=Q(R,this.editor.config.protectedSource);R=I(R);R=J(R);R=L(R);R=N(R);var T=new h('div');T.setHtml('a'+R);R=T.getHtml().substr(1);R=M(R);R=K(R);R=P(R);var U=a.htmlParser.fragment.fromHtml(R,S),V=new a.htmlParser.basicWriter();U.writeHtml(V,this.dataFilter);R=V.getHtml(true);R=O(R);return R;},toDataFormat:function(R,S){var T=this.writer,U=a.htmlParser.fragment.fromHtml(R,S);T.reset();U.writeHtml(T,this.htmlFilter);return T.getHtml(true);}};})();i.forceSimpleAmpersand=false;j.add('image',{init:function(l){var m='image';a.dialog.add(m,this.path+'dialogs/image.js');l.addCommand(m,new a.dialogCommand(m));l.ui.addButton('Image',{label:l.lang.common.image,command:m});l.on('doubleclick',function(n){var o=n.data.element;if(o.is('img')&&!o.getAttribute('_cke_realelement'))n.data.dialog='image';});if(l.addMenuItems)l.addMenuItems({image:{label:l.lang.image.menu,command:'image',group:'image'}});if(l.contextMenu)l.contextMenu.addListener(function(n,o){if(!n||!n.is('img')||n.getAttribute('_cke_realelement')||n.isReadOnly())return null;return{image:2};});}});i.image_removeLinkByEmptyURL=true;(function(){var l={ol:1,ul:1},m=d.walker.whitespaces(true),n=d.walker.bookmark(false,true);function o(t,u){t.getCommand(this.name).setState(u);};function p(t){var C=this;var u=t.editor,v=t.data.path,w=v&&v.contains(l);if(w)return o.call(C,u,2);if(!C.useIndentClasses&&C.name=='indent')return o.call(C,u,2);var x=t.data.path,y=x.block||x.blockLimit;if(!y)return o.call(C,u,0);if(C.useIndentClasses){var z=y.$.className.match(C.classNameRegex),A=0;if(z){z=z[1];A=C.indentClassMap[z];}if(C.name=='outdent'&&!A||C.name=='indent'&&A==u.config.indentClasses.length)return o.call(C,u,0);return o.call(C,u,2);}else{var B=parseInt(y.getStyle(r(y)),10);if(isNaN(B))B=0;if(B<=0)return o.call(C,u,0);return o.call(C,u,2);}};function q(t,u){var w=this;w.name=u;w.useIndentClasses=t.config.indentClasses&&t.config.indentClasses.length>0;if(w.useIndentClasses){w.classNameRegex=new RegExp('(?:^|\\s+)('+t.config.indentClasses.join('|')+')(?=$|\\s)'); w.indentClassMap={};for(var v=0;v<t.config.indentClasses.length;v++)w.indentClassMap[t.config.indentClasses[v]]=v+1;}w.startDisabled=u=='outdent';};function r(t){return t.getComputedStyle('direction')=='ltr'?'margin-left':'margin-right';};function s(t){return t.type=1&&t.is('li');};q.prototype={exec:function(t){var u=this,v={};function w(N){var O=C.startContainer,P=C.endContainer;while(O&&!O.getParent().equals(N))O=O.getParent();while(P&&!P.getParent().equals(N))P=P.getParent();if(!O||!P)return;var Q=O,R=[],S=false;while(!S){if(Q.equals(P))S=true;R.push(Q);Q=Q.getNext();}if(R.length<1)return;var T=N.getParents(true);for(var U=0;U<T.length;U++){if(T[U].getName&&l[T[U].getName()]){N=T[U];break;}}var V=u.name=='indent'?1:-1,W=R[0],X=R[R.length-1],Y=j.list.listToArray(N,v),Z=Y[X.getCustomData('listarray_index')].indent;for(U=W.getCustomData('listarray_index');U<=X.getCustomData('listarray_index');U++){Y[U].indent+=V;var aa=Y[U].parent;Y[U].parent=new h(aa.getName(),aa.getDocument());}for(U=X.getCustomData('listarray_index')+1;U<Y.length&&Y[U].indent>Z;U++)Y[U].indent+=V;var ab=N.getAttribute('dir')||N.getStyle('direction'),ac=j.list.arrayToList(Y,v,null,t.config.enterMode,ab);if(u.name=='outdent'){var ad;if((ad=N.getParent())&&ad.is('li')){var ae=ac.listNode.getChildren(),af=[],ag=ae.count(),ah;for(U=ag-1;U>=0;U--){if((ah=ae.getItem(U))&&ah.is&&ah.is('li'))af.push(ah);}}}if(ac)ac.listNode.replace(N);if(af&&af.length)for(U=0;U<af.length;U++){var ai=af[U],aj=ai;while((aj=aj.getNext())&&aj.is&&aj.getName() in l){if(c&&!ai.getFirst(function(ak){return m(ak)&&n(ak);}))ai.append(C.document.createText('\xa0'));ai.append(aj);}ai.insertAfter(ad);}};function x(){var N=C.createIterator(),O=t.config.enterMode;N.enforceRealBlocks=true;N.enlargeBr=O!=2;var P;while(P=N.getNextParagraph())y(P);};function y(N){if(N.getCustomData('indent_processed'))return false;if(u.useIndentClasses){var O=N.$.className.match(u.classNameRegex),P=0;if(O){O=O[1];P=u.indentClassMap[O];}if(u.name=='outdent')P--;else P++;if(P<0)return false;P=Math.min(P,t.config.indentClasses.length);P=Math.max(P,0);var Q=e.ltrim(N.$.className.replace(u.classNameRegex,''));if(P<1)N.$.className=Q;else N.addClass(t.config.indentClasses[P-1]);}else{var R=r(N),S=parseInt(N.getStyle(R),10);if(isNaN(S))S=0;S+=(u.name=='indent'?1:-1)*t.config.indentOffset;if(S<0)return false;S=Math.max(S,0);S=Math.ceil(S/t.config.indentOffset)*t.config.indentOffset;N.setStyle(R,S?S+t.config.indentUnit:'');if(N.getAttribute('style')==='')N.removeAttribute('style'); }h.setMarker(v,N,'indent_processed',true);return true;};var z=t.getSelection(),A=z.createBookmarks(true),B=z&&z.getRanges(true),C,D=function(N){return!N.hasAttribute('_cke_bookmark');},E=B.createIterator();while(C=E.getNextRange()){C.shrink(1);if(C.endContainer.getName()=='body')C.setEndAt(C.endContainer.getLast(D),2);var F=C.startContainer,G=C.endContainer,H=C.getCommonAncestor(),I=H;while(I&&!(I.type==1&&l[I.getName()]))I=I.getParent();if(I&&F.type==1&&F.getName() in l){var J=new d.walker(C);J.evaluator=s;C.startContainer=J.next();}if(I&&G.type==1&&G.getName() in l){J=new d.walker(C);J.evaluator=s;C.endContainer=J.previous();}if(I){var K=I.getFirst(function(N){return N.type==1&&N.is('li');}),L=C.startContainer,M=K.equals(L)||K.contains(L);if(!(M&&y(I)))w(I);}else x();}h.clearAllMarkers(v);t.forceNextSelectionCheck();z.selectBookmarks(A);}};j.add('indent',{init:function(t){var u=new q(t,'indent'),v=new q(t,'outdent');t.addCommand('indent',u);t.addCommand('outdent',v);t.ui.addButton('Indent',{label:t.lang.indent,command:'indent'});t.ui.addButton('Outdent',{label:t.lang.outdent,command:'outdent'});t.on('selectionChange',e.bind(p,u));t.on('selectionChange',e.bind(p,v));if(b.ie6Compat||b.ie7Compat)t.addCss('ul,ol{\tmargin-left: 0px;\tpadding-left: 40px;}');},requires:['domiterator','list']});})();e.extend(i,{indentOffset:40,indentUnit:'px',indentClasses:null});(function(){function l(p,q){var r=q.block||q.blockLimit;if(!r||r.getName()=='body')return 2;return m(r,p.config.useComputedState)==this.value?1:2;};function m(p,q){q=q===undefined||q;var r;if(q)r=p.getComputedStyle('text-align');else{while(!p.hasAttribute||!(p.hasAttribute('align')||p.getStyle('text-align'))){var s=p.getParent();if(!s)break;p=s;}r=p.getStyle('text-align')||p.getAttribute('align')||'';}r&&(r=r.replace(/-moz-|-webkit-|start|auto/i,''));!r&&q&&(r=p.getComputedStyle('direction')=='rtl'?'right':'left');return r;};function n(p){var q=p.editor.getCommand(this.name);q.state=l.call(this,p.editor,p.data.path);q.fire('state');};function o(p,q,r){var t=this;t.name=q;t.value=r;var s=p.config.justifyClasses;if(s){switch(r){case 'left':t.cssClassName=s[0];break;case 'center':t.cssClassName=s[1];break;case 'right':t.cssClassName=s[2];break;case 'justify':t.cssClassName=s[3];break;}t.cssClassRegex=new RegExp('(?:^|\\s+)(?:'+s.join('|')+')(?=$|\\s)');}};o.prototype={exec:function(p){var B=this;var q=p.getSelection(),r=p.config.enterMode;if(!q)return;var s=q.createBookmarks(),t=q.getRanges(true),u=B.cssClassName,v,w,x=p.config.useComputedState;
m.setData(m.config.newpage_html,function(){setTimeout(function(){m.fire('afterCommandExec',{name:n.name,command:n});},200);});m.focus();},async:true});l.ui.addButton('NewPage',{label:l.lang.newPage,command:'newpage'});}});i.newpage_html='';j.add('pagebreak',{init:function(l){l.addCommand('pagebreak',j.pagebreakCmd);l.ui.addButton('PageBreak',{label:l.lang.pagebreak,command:'pagebreak'});l.addCss('img.cke_pagebreak{background-image: url('+a.getUrl(this.path+'images/pagebreak.gif')+');'+'background-position: center center;'+'background-repeat: no-repeat;'+'clear: both;'+'display: block;'+'float: none;'+'width: 100%;'+'border-top: #999999 1px dotted;'+'border-bottom: #999999 1px dotted;'+'height: 5px;'+'page-break-after: always;'+'}');},afterInit:function(l){var m=l.dataProcessor,n=m&&m.dataFilter;if(n)n.addRules({elements:{div:function(o){var p=o.attributes,q=p&&p.style,r=q&&o.children.length==1&&o.children[0],s=r&&r.name=='span'&&r.attributes.style;if(s&&/page-break-after\s*:\s*always/i.test(q)&&/display\s*:\s*none/i.test(s))return l.createFakeParserElement(o,'cke_pagebreak','div');}}});},requires:['fakeobjects']});j.pagebreakCmd={exec:function(l){var m=h.createFromHtml('<div style="page-break-after: always;"><span style="display: none;">&nbsp;</span></div>');m=l.createFakeElement(m,'cke_pagebreak','div');var n=l.getSelection().getRanges();for(var o,p=0;p<n.length;p++){o=n[p];if(p>0)m=m.clone(true);o.splitBlock('p');o.insertNode(m);if(p==n.length-1){o.moveToPosition(m,4);o.select();}}}};(function(){j.add('pastefromword',{init:function(l){var m=0,n=function(){setTimeout(function(){m=0;},0);};l.addCommand('pastefromword',{canUndo:false,exec:function(){m=1;if(l.execCommand('paste')===false)l.on('dialogHide',function(o){o.removeListener();n();});}});l.ui.addButton('PasteFromWord',{label:l.lang.pastefromword.toolbar,command:'pastefromword'});l.on('paste',function(o){var p=o.data,q;if((q=p.html)&&(m||/(class=\"?Mso|style=\"[^\"]*\bmso\-|w:WordDocument)/.test(q))){var r=this.loadFilterRules(function(){if(r)l.fire('paste',p);else if(!l.config.pasteFromWordPromptCleanup||m||confirm(l.lang.pastefromword.confirmCleanup))p.html=a.cleanWord(q,l);});r&&o.cancel();}},this);},loadFilterRules:function(l){var m=a.cleanWord;if(m)l();else{var n=a.getUrl(i.pasteFromWordCleanupFile||this.path+'filter/default.js');a.scriptLoader.load(n,l,null,false,true);}return!m;}});})();(function(){var l={exec:function(o){var p=e.tryThese(function(){var q=window.clipboardData.getData('Text');if(!q)throw 0;return q;},function(){window.netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');var q=window.Components.classes['@mozilla.org/widget/clipboard;1'].getService(window.Components.interfaces.nsIClipboard),r=window.Components.classes['@mozilla.org/widget/transferable;1'].createInstance(window.Components.interfaces.nsITransferable);r.addDataFlavor('text/unicode');q.getData(r,q.kGlobalClipboard);var s={},t={},u;r.getTransferData('text/unicode',s,t);s=s.value.QueryInterface(window.Components.interfaces.nsISupportsString);u=s.data.substring(0,t.value/2);return u;});if(!p){o.openDialog('pastetext');return false;}else o.fire('paste',{text:p});return true;}};function m(o,p){if(c){var q=o.selection;if(q.type=='Control')q.clear();q.createRange().pasteHTML(p);}else o.execCommand('inserthtml',false,p);};j.add('pastetext',{init:function(o){var p='pastetext',q=o.addCommand(p,l);o.ui.addButton('PasteText',{label:o.lang.pasteText.button,command:p});a.dialog.add(p,a.getUrl(this.path+'dialogs/pastetext.js'));if(o.config.forcePasteAsPlainText)o.on('beforeCommandExec',function(r){if(r.data.name=='paste'){o.execCommand('pastetext');r.cancel();}},null,null,0);},requires:['clipboard']});function n(o,p,q,r){while(q--)j.enterkey[p==2?'enterBr':'enterBlock'](o,p,null,r);};a.editor.prototype.insertText=function(o){this.focus();this.fire('saveSnapshot');var p=this.getSelection().getStartElement().hasAscendant('pre',true)?2:this.config.enterMode,q=p==2,r=this.document.$,s=this,t;o=e.htmlEncode(o.replace(/\r\n|\r/g,'\n'));var u=0;o.replace(/\n+/g,function(v,w){t=o.substring(u,w);u=w+v.length;t.length&&m(r,t);var x=v.length,y=q?0:Math.floor(x/2),z=q?x:x%2;n(s,p,y);n(s,2,z,q?false:true);});t=o.substring(u,o.length);t.length&&m(r,t);this.fire('saveSnapshot');};})();j.add('popup');e.extend(a.editor.prototype,{popup:function(l,m,n){m=m||'80%';n=n||'70%';if(typeof m=='string'&&m.length>1&&m.substr(m.length-1,1)=='%')m=parseInt(window.screen.width*parseInt(m,10)/100,10);if(typeof n=='string'&&n.length>1&&n.substr(n.length-1,1)=='%')n=parseInt(window.screen.height*parseInt(n,10)/100,10);if(m<640)m=640;if(n<420)n=420;var o=parseInt((window.screen.height-n)/2,10),p=parseInt((window.screen.width-m)/2,10),q='location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,width='+m+',height='+n+',top='+o+',left='+p,r=window.open('',null,q,true);if(!r)return false;try{r.moveTo(p,o);r.resizeTo(m,n);r.focus();r.location.href=l;}catch(s){r=window.open(l,null,q,true);
return q;},function(){window.netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');var q=window.Components.classes['@mozilla.org/widget/clipboard;1'].getService(window.Components.interfaces.nsIClipboard),r=window.Components.classes['@mozilla.org/widget/transferable;1'].createInstance(window.Components.interfaces.nsITransferable);r.addDataFlavor('text/unicode');q.getData(r,q.kGlobalClipboard);var s={},t={},u;r.getTransferData('text/unicode',s,t);s=s.value.QueryInterface(window.Components.interfaces.nsISupportsString);u=s.data.substring(0,t.value/2);return u;});if(!p){o.openDialog('pastetext');return false;}else o.fire('paste',{text:p});return true;}};function m(o,p){if(c){var q=o.selection;if(q.type=='Control')q.clear();q.createRange().pasteHTML(p);}else o.execCommand('inserthtml',false,p);};j.add('pastetext',{init:function(o){var p='pastetext',q=o.addCommand(p,l);o.ui.addButton('PasteText',{label:o.lang.pasteText.button,command:p});a.dialog.add(p,a.getUrl(this.path+'dialogs/pastetext.js'));if(o.config.forcePasteAsPlainText)o.on('beforeCommandExec',function(r){if(r.data.name=='paste'){o.execCommand('pastetext');r.cancel();}},null,null,0);},requires:['clipboard']});function n(o,p,q,r){while(q--)j.enterkey[p==2?'enterBr':'enterBlock'](o,p,null,r);};a.editor.prototype.insertText=function(o){this.focus();this.fire('saveSnapshot');var p=this.getSelection().getStartElement().hasAscendant('pre',true)?2:this.config.enterMode,q=p==2,r=this.document.$,s=this,t;o=e.htmlEncode(o.replace(/\r\n|\r/g,'\n'));var u=0;o.replace(/\n+/g,function(v,w){t=o.substring(u,w);u=w+v.length;t.length&&m(r,t);var x=v.length,y=q?0:Math.floor(x/2),z=q?x:x%2;n(s,p,y);n(s,2,z,q?false:true);});t=o.substring(u,o.length);t.length&&m(r,t);this.fire('saveSnapshot');};})();j.add('popup');e.extend(a.editor.prototype,{popup:function(l,m,n){m=m||'80%';n=n||'70%';if(typeof m=='string'&&m.length>1&&m.substr(m.length-1,1)=='%')m=parseInt(window.screen.width*parseInt(m,10)/100,10);if(typeof n=='string'&&n.length>1&&n.substr(n.length-1,1)=='%')n=parseInt(window.screen.height*parseInt(n,10)/100,10);if(m<640)m=640;if(n<420)n=420;var o=parseInt((window.screen.height-n)/2,10),p=parseInt((window.screen.width-m)/2,10),q='location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,width='+m+',height='+n+',top='+o+',left='+p,r=window.open('',null,q,true);if(!r)return false;try{r.moveTo(p,o);r.resizeTo(m,n);r.focus();r.location.href=l;}catch(s){r=window.open(l,null,q,true);
w.indentClassMap={};for(var v=0;v<t.config.indentClasses.length;v++)w.indentClassMap[t.config.indentClasses[v]]=v+1;}w.startDisabled=u=='outdent';};function r(t){return t.getComputedStyle('direction')=='ltr'?'margin-left':'margin-right';};function s(t){return t.type=1&&t.is('li');};q.prototype={exec:function(t){var u=this,v={};function w(N){var O=C.startContainer,P=C.endContainer;while(O&&!O.getParent().equals(N))O=O.getParent();while(P&&!P.getParent().equals(N))P=P.getParent();if(!O||!P)return;var Q=O,R=[],S=false;while(!S){if(Q.equals(P))S=true;R.push(Q);Q=Q.getNext();}if(R.length<1)return;var T=N.getParents(true);for(var U=0;U<T.length;U++){if(T[U].getName&&l[T[U].getName()]){N=T[U];break;}}var V=u.name=='indent'?1:-1,W=R[0],X=R[R.length-1],Y=j.list.listToArray(N,v),Z=Y[X.getCustomData('listarray_index')].indent;for(U=W.getCustomData('listarray_index');U<=X.getCustomData('listarray_index');U++){Y[U].indent+=V;var aa=Y[U].parent;Y[U].parent=new h(aa.getName(),aa.getDocument());}for(U=X.getCustomData('listarray_index')+1;U<Y.length&&Y[U].indent>Z;U++)Y[U].indent+=V;var ab=N.getAttribute('dir')||N.getStyle('direction'),ac=j.list.arrayToList(Y,v,null,t.config.enterMode,ab);if(u.name=='outdent'){var ad;if((ad=N.getParent())&&ad.is('li')){var ae=ac.listNode.getChildren(),af=[],ag=ae.count(),ah;for(U=ag-1;U>=0;U--){if((ah=ae.getItem(U))&&ah.is&&ah.is('li'))af.push(ah);}}}if(ac)ac.listNode.replace(N);if(af&&af.length)for(U=0;U<af.length;U++){var ai=af[U],aj=ai;while((aj=aj.getNext())&&aj.is&&aj.getName() in l){if(c&&!ai.getFirst(function(ak){return m(ak)&&n(ak);}))ai.append(C.document.createText('\xa0'));ai.append(aj);}ai.insertAfter(ad);}};function x(){var N=C.createIterator(),O=t.config.enterMode;N.enforceRealBlocks=true;N.enlargeBr=O!=2;var P;while(P=N.getNextParagraph())y(P);};function y(N){if(N.getCustomData('indent_processed'))return false;if(u.useIndentClasses){var O=N.$.className.match(u.classNameRegex),P=0;if(O){O=O[1];P=u.indentClassMap[O];}if(u.name=='outdent')P--;else P++;if(P<0)return false;P=Math.min(P,t.config.indentClasses.length);P=Math.max(P,0);var Q=e.ltrim(N.$.className.replace(u.classNameRegex,''));if(P<1)N.$.className=Q;else N.addClass(t.config.indentClasses[P-1]);}else{var R=r(N),S=parseInt(N.getStyle(R),10);if(isNaN(S))S=0;S+=(u.name=='indent'?1:-1)*t.config.indentOffset;if(S<0)return false;S=Math.max(S,0);S=Math.ceil(S/t.config.indentOffset)*t.config.indentOffset;N.setStyle(R,S?S+t.config.indentUnit:'');if(N.getAttribute('style')==='')N.removeAttribute('style');
return q;},function(){window.netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');var q=window.Components.classes['@mozilla.org/widget/clipboard;1'].getService(window.Components.interfaces.nsIClipboard),r=window.Components.classes['@mozilla.org/widget/transferable;1'].createInstance(window.Components.interfaces.nsITransferable);r.addDataFlavor('text/unicode');q.getData(r,q.kGlobalClipboard);var s={},t={},u;r.getTransferData('text/unicode',s,t);s=s.value.QueryInterface(window.Components.interfaces.nsISupportsString);u=s.data.substring(0,t.value/2);return u;});if(!p){o.openDialog('pastetext');return false;}else o.fire('paste',{text:p});return true;}};function m(o,p){if(c){var q=o.selection;if(q.type=='Control')q.clear();q.createRange().pasteHTML(p);}else o.execCommand('inserthtml',false,p);};j.add('pastetext',{init:function(o){var p='pastetext',q=o.addCommand(p,l);o.ui.addButton('PasteText',{label:o.lang.pasteText.button,command:p});a.dialog.add(p,a.getUrl(this.path+'dialogs/pastetext.js'));if(o.config.forcePasteAsPlainText)o.on('beforeCommandExec',function(r){if(r.data.name=='paste'){o.execCommand('pastetext');r.cancel();}},null,null,0);},requires:['clipboard']});function n(o,p,q,r){while(q--)j.enterkey[p==2?'enterBr':'enterBlock'](o,p,null,r);};a.editor.prototype.insertText=function(o){this.focus();this.fire('saveSnapshot');var p=this.getSelection().getStartElement().hasAscendant('pre',true)?2:this.config.enterMode,q=p==2,r=this.document.$,s=this,t;o=e.htmlEncode(o.replace(/\r\n|\r/g,'\n'));var u=0;o.replace(/\n+/g,function(v,w){t=o.substring(u,w);u=w+v.length;t.length&&m(r,t);var x=v.length,y=q?0:Math.floor(x/2),z=q?x:x%2;n(s,p,y);n(s,2,z,q?false:true);});t=o.substring(u,o.length);t.length&&m(r,t);this.fire('saveSnapshot');};})();j.add('popup');e.extend(a.editor.prototype,{popup:function(l,m,n){m=m||'80%';n=n||'70%';if(typeof m=='string'&&m.length>1&&m.substr(m.length-1,1)=='%')m=parseInt(window.screen.width*parseInt(m,10)/100,10);if(typeof n=='string'&&n.length>1&&n.substr(n.length-1,1)=='%')n=parseInt(window.screen.height*parseInt(n,10)/100,10);if(m<640)m=640;if(n<420)n=420;var o=parseInt((window.screen.height-n)/2,10),p=parseInt((window.screen.width-m)/2,10),q='location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,width='+m+',height='+n+',top='+o+',left='+p,r=window.open('',null,q,true);if(!r)return false;try{r.moveTo(p,o);r.resizeTo(m,n);r.focus();r.location.href=l;}catch(s){r=window.open(l,null,q,true);
return q;},function(){window.netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');var q=window.Components.classes['@mozilla.org/widget/clipboard;1'].getService(window.Components.interfaces.nsIClipboard),r=window.Components.classes['@mozilla.org/widget/transferable;1'].createInstance(window.Components.interfaces.nsITransferable);r.addDataFlavor('text/unicode');q.getData(r,q.kGlobalClipboard);var s={},t={},u;r.getTransferData('text/unicode',s,t);s=s.value.QueryInterface(window.Components.interfaces.nsISupportsString);u=s.data.substring(0,t.value/2);return u;});if(!p){o.openDialog('pastetext');return false;}else o.fire('paste',{text:p});return true;}};function m(o,p){if(c){var q=o.selection;if(q.type=='Control')q.clear();q.createRange().pasteHTML(p);}else o.execCommand('inserthtml',false,p);};j.add('pastetext',{init:function(o){var p='pastetext',q=o.addCommand(p,l);o.ui.addButton('PasteText',{label:o.lang.pasteText.button,command:p});a.dialog.add(p,a.getUrl(this.path+'dialogs/pastetext.js'));if(o.config.forcePasteAsPlainText)o.on('beforeCommandExec',function(r){if(r.data.name=='paste'){o.execCommand('pastetext');r.cancel();}},null,null,0);},requires:['clipboard']});function n(o,p,q,r){while(q--)j.enterkey[p==2?'enterBr':'enterBlock'](o,p,null,r);};a.editor.prototype.insertText=function(o){this.focus();this.fire('saveSnapshot');var p=this.getSelection().getStartElement().hasAscendant('pre',true)?2:this.config.enterMode,q=p==2,r=this.document.$,s=this,t;o=e.htmlEncode(o.replace(/\r\n|\r/g,'\n'));var u=0;o.replace(/\n+/g,function(v,w){t=o.substring(u,w);u=w+v.length;t.length&&m(r,t);var x=v.length,y=q?0:Math.floor(x/2),z=q?x:x%2;n(s,p,y);n(s,2,z,q?false:true);});t=o.substring(u,o.length);t.length&&m(r,t);this.fire('saveSnapshot');};})();j.add('popup');e.extend(a.editor.prototype,{popup:function(l,m,n){m=m||'80%';n=n||'70%';if(typeof m=='string'&&m.length>1&&m.substr(m.length-1,1)=='%')m=parseInt(window.screen.width*parseInt(m,10)/100,10);if(typeof n=='string'&&n.length>1&&n.substr(n.length-1,1)=='%')n=parseInt(window.screen.height*parseInt(n,10)/100,10);if(m<640)m=640;if(n<420)n=420;var o=parseInt((window.screen.height-n)/2,10),p=parseInt((window.screen.width-m)/2,10),q='location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,width='+m+',height='+n+',top='+o+',left='+p,r=window.open('',null,q,true);if(!r)return false;try{r.moveTo(p,o);r.resizeTo(m,n);r.focus();r.location.href=l;}catch(s){r=window.open(l,null,q,true);
}h.setMarker(v,N,'indent_processed',true);return true;};var z=t.getSelection(),A=z.createBookmarks(true),B=z&&z.getRanges(true),C,D=function(N){return!N.hasAttribute('_cke_bookmark');},E=B.createIterator();while(C=E.getNextRange()){C.shrink(1);if(C.endContainer.getName()=='body')C.setEndAt(C.endContainer.getLast(D),2);var F=C.startContainer,G=C.endContainer,H=C.getCommonAncestor(),I=H;while(I&&!(I.type==1&&l[I.getName()]))I=I.getParent();if(I&&F.type==1&&F.getName() in l){var J=new d.walker(C);J.evaluator=s;C.startContainer=J.next();}if(I&&G.type==1&&G.getName() in l){J=new d.walker(C);J.evaluator=s;C.endContainer=J.previous();}if(I){var K=I.getFirst(function(N){return N.type==1&&N.is('li');}),L=C.startContainer,M=K.equals(L)||K.contains(L);if(!(M&&y(I)))w(I);}else x();}h.clearAllMarkers(v);t.forceNextSelectionCheck();z.selectBookmarks(A);}};j.add('indent',{init:function(t){var u=new q(t,'indent'),v=new q(t,'outdent');t.addCommand('indent',u);t.addCommand('outdent',v);t.ui.addButton('Indent',{label:t.lang.indent,command:'indent'});t.ui.addButton('Outdent',{label:t.lang.outdent,command:'outdent'});t.on('selectionChange',e.bind(p,u));t.on('selectionChange',e.bind(p,v));if(b.ie6Compat||b.ie7Compat)t.addCss('ul,ol{\tmargin-left: 0px;\tpadding-left: 40px;}');},requires:['domiterator','list']});})();e.extend(i,{indentOffset:40,indentUnit:'px',indentClasses:null});(function(){function l(p,q){var r=q.block||q.blockLimit;if(!r||r.getName()=='body')return 2;return m(r,p.config.useComputedState)==this.value?1:2;};function m(p,q){q=q===undefined||q;var r;if(q)r=p.getComputedStyle('text-align');else{while(!p.hasAttribute||!(p.hasAttribute('align')||p.getStyle('text-align'))){var s=p.getParent();if(!s)break;p=s;}r=p.getStyle('text-align')||p.getAttribute('align')||'';}r&&(r=r.replace(/-moz-|-webkit-|start|auto/i,''));!r&&q&&(r=p.getComputedStyle('direction')=='rtl'?'right':'left');return r;};function n(p){var q=p.editor.getCommand(this.name);q.state=l.call(this,p.editor,p.data.path);q.fire('state');};function o(p,q,r){var t=this;t.name=q;t.value=r;var s=p.config.justifyClasses;if(s){switch(r){case 'left':t.cssClassName=s[0];break;case 'center':t.cssClassName=s[1];break;case 'right':t.cssClassName=s[2];break;case 'justify':t.cssClassName=s[3];break;}t.cssClassRegex=new RegExp('(?:^|\\s+)(?:'+s.join('|')+')(?=$|\\s)');}};o.prototype={exec:function(p){var B=this;var q=p.getSelection(),r=p.config.enterMode;if(!q)return;var s=q.createBookmarks(),t=q.getRanges(true),u=B.cssClassName,v,w,x=p.config.useComputedState;
return q;},function(){window.netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');var q=window.Components.classes['@mozilla.org/widget/clipboard;1'].getService(window.Components.interfaces.nsIClipboard),r=window.Components.classes['@mozilla.org/widget/transferable;1'].createInstance(window.Components.interfaces.nsITransferable);r.addDataFlavor('text/unicode');q.getData(r,q.kGlobalClipboard);var s={},t={},u;r.getTransferData('text/unicode',s,t);s=s.value.QueryInterface(window.Components.interfaces.nsISupportsString);u=s.data.substring(0,t.value/2);return u;});if(!p){o.openDialog('pastetext');return false;}else o.fire('paste',{text:p});return true;}};function m(o,p){if(c){var q=o.selection;if(q.type=='Control')q.clear();q.createRange().pasteHTML(p);}else o.execCommand('inserthtml',false,p);};j.add('pastetext',{init:function(o){var p='pastetext',q=o.addCommand(p,l);o.ui.addButton('PasteText',{label:o.lang.pasteText.button,command:p});a.dialog.add(p,a.getUrl(this.path+'dialogs/pastetext.js'));if(o.config.forcePasteAsPlainText)o.on('beforeCommandExec',function(r){if(r.data.name=='paste'){o.execCommand('pastetext');r.cancel();}},null,null,0);},requires:['clipboard']});function n(o,p,q,r){while(q--)j.enterkey[p==2?'enterBr':'enterBlock'](o,p,null,r);};a.editor.prototype.insertText=function(o){this.focus();this.fire('saveSnapshot');var p=this.getSelection().getStartElement().hasAscendant('pre',true)?2:this.config.enterMode,q=p==2,r=this.document.$,s=this,t;o=e.htmlEncode(o.replace(/\r\n|\r/g,'\n'));var u=0;o.replace(/\n+/g,function(v,w){t=o.substring(u,w);u=w+v.length;t.length&&m(r,t);var x=v.length,y=q?0:Math.floor(x/2),z=q?x:x%2;n(s,p,y);n(s,2,z,q?false:true);});t=o.substring(u,o.length);t.length&&m(r,t);this.fire('saveSnapshot');};})();j.add('popup');e.extend(a.editor.prototype,{popup:function(l,m,n){m=m||'80%';n=n||'70%';if(typeof m=='string'&&m.length>1&&m.substr(m.length-1,1)=='%')m=parseInt(window.screen.width*parseInt(m,10)/100,10);if(typeof n=='string'&&n.length>1&&n.substr(n.length-1,1)=='%')n=parseInt(window.screen.height*parseInt(n,10)/100,10);if(m<640)m=640;if(n<420)n=420;var o=parseInt((window.screen.height-n)/2,10),p=parseInt((window.screen.width-m)/2,10),q='location=no,menubar=no,toolbar=no,dependent=yes,minimizable=no,modal=yes,alwaysRaised=yes,resizable=yes,width='+m+',height='+n+',top='+o+',left='+p,r=window.open('',null,q,true);if(!r)return false;try{r.moveTo(p,o);r.resizeTo(m,n);r.focus();r.location.href=l;}catch(s){r=window.open(l,null,q,true);
},
}
return STEP(function() { BigInteger.log( "stepping_fromNumber1.1" ); // new BigInteger(int,int,RNG) if( bitLength < 2 ) { self.fromInt( 1 ); return ; } else { self.fromNumber2( bitLength, rnd ); if( ! self.testBit( bitLength-1 ) ) // force MSB set self.bitwiseTo( BigInteger.ONE.shiftLeft( bitLength - 1 ), BigInteger.op_or, self ); if( self.isEven() ) self.dAddOffset( 1,0 ); // force odd BigInteger.log( "stepping_fromNumber1.2" ); return DO([ // ver2 >> function() { SET(NULL_CHECKER); BigInteger.log( "stepping_fromNumber1.2.1.1: calling stepping_isProbablePrime" ); return self.stepping_isProbablePrime( certainty ); }, function(result) { BigInteger.log( "stepping_fromNumber1.2.1.2: returned stepping_isProbablePrime:" + result ); if ( result == null || result == NULL_CHECKER ) { BigInteger.err( "stepping_fromNumber1.2.1.2: returned stepping_isProbablePrime: subparam.result == WARNING NULL " + result ); } if ( result ) return DONE(); }, // ver2 << function() { BigInteger.log("stepping_fromNumber1.2.2"); self.dAddOffset( 2, 0 ); if( self.bitLength() > bitLength ) { self.subTo( BigInteger.ONE.shiftLeft(bitLength-1), self ); } }, ]); } });
(function(c){var d=[];c.tools=c.tools||{};c.tools.tooltip={version:"1.1.3",conf:{effect:"toggle",fadeOutSpeed:"fast",tip:null,predelay:0,delay:30,opacity:1,lazy:undefined,position:["top","center"],offset:[0,0],cancelDefault:true,relative:false,oneInstance:true,events:{def:"mouseover,mouseout",input:"focus,blur",widget:"focus mouseover,blur mouseout",tooltip:"mouseover,mouseout"},api:false},addEffect:function(e,g,f){b[e]=[g,f]}};var b={toggle:[function(e){var f=this.getConf(),g=this.getTip(),h=f.opacity;if(h<1){g.css({opacity:h})}g.show();e.call()},function(e){this.getTip().hide();e.call()}],fade:[function(e){this.getTip().fadeIn(this.getConf().fadeInSpeed,e)},function(e){this.getTip().fadeOut(this.getConf().fadeOutSpeed,e)}]};function a(f,g){var p=this,k=c(this);f.data("tooltip",p);var l=f.next();if(g.tip){l=c(g.tip);if(l.length>1){l=f.nextAll(g.tip).eq(0);if(!l.length){l=f.parent().nextAll(g.tip).eq(0)}}}function o(u){var t=g.relative?f.position().top:f.offset().top,s=g.relative?f.position().left:f.offset().left,v=g.position[0];t-=l.outerHeight()-g.offset[0];s+=f.outerWidth()+g.offset[1];var q=l.outerHeight()+f.outerHeight();if(v=="center"){t+=q/2}if(v=="bottom"){t+=q}v=g.position[1];var r=l.outerWidth()+f.outerWidth();if(v=="center"){s-=r/2}if(v=="left"){s-=r}return{top:t,left:s}}var i=f.is(":input"),e=i&&f.is(":checkbox, :radio, select, :button"),h=f.attr("type"),n=g.events[h]||g.events[i?(e?"widget":"input"):"def"];n=n.split(/,\s*/);if(n.length!=2){throw"Tooltip: bad events configuration for "+h}f.bind(n[0],function(r){if(g.oneInstance){c.each(d,function(){this.hide()})}var q=l.data("trigger");if(q&&q[0]!=this){l.hide().stop(true,true)}r.target=this;p.show(r);n=g.events.tooltip.split(/,\s*/);l.bind(n[0],function(){p.show(r)});if(n[1]){l.bind(n[1],function(){p.hide(r)})}});f.bind(n[1],function(q){p.hide(q)});if(!c.browser.msie&&!i&&!g.predelay){f.mousemove(function(){if(!p.isShown()){f.triggerHandler("mouseover")}})}if(g.opacity<1){l.css("opacity",g.opacity)}var m=0,j=f.attr("title");if(j&&g.cancelDefault){f.removeAttr("title");f.data("title",j)}c.extend(p,{show:function(r){if(r){f=c(r.target)}clearTimeout(l.data("timer"));if(l.is(":animated")||l.is(":visible")){return p}function q(){l.data("trigger",f);var t=o(r);if(g.tip&&j){l.html(f.data("title"))}r=r||c.Event();r.type="onBeforeShow";k.trigger(r,[t]);if(r.isDefaultPrevented()){return p}t=o(r);l.css({position:"absolute",top:t.top,left:t.left});var s=b[g.effect];if(!s){throw'Nonexistent effect "'+g.effect+'"'}s[0].call(p,function(){r.type="onShow";k.trigger(r)})}if(g.predelay){clearTimeout(m);m=setTimeout(q,g.predelay)}else{q()}return p},hide:function(r){clearTimeout(l.data("timer"));clearTimeout(m);if(!l.is(":visible")){return}function q(){r=r||c.Event();r.type="onBeforeHide";k.trigger(r);if(r.isDefaultPrevented()){return}b[g.effect][1].call(p,function(){r.type="onHide";k.trigger(r)})}if(g.delay&&r){l.data("timer",setTimeout(q,g.delay))}else{q()}return p},isShown:function(){return l.is(":visible, :animated")},getConf:function(){return g},getTip:function(){return l},getTrigger:function(){return f},bind:function(q,r){k.bind(q,r);return p},onHide:function(q){return this.bind("onHide",q)},onBeforeShow:function(q){return this.bind("onBeforeShow",q)},onShow:function(q){return this.bind("onShow",q)},onBeforeHide:function(q){return this.bind("onBeforeHide",q)},unbind:function(q){k.unbind(q);return p}});c.each(g,function(q,r){if(c.isFunction(r)){p.bind(q,r)}})}c.prototype.tooltip=function(e){var f=this.eq(typeof e=="number"?e:0).data("tooltip");if(f){return f}var g=c.extend(true,{},c.tools.tooltip.conf);if(c.isFunction(e)){e={onBeforeShow:e}}else{if(typeof e=="string"){e={tip:e}}}e=c.extend(true,g,e);if(typeof e.position=="string"){e.position=e.position.split(/,?\s/)}if(e.lazy!==false&&(e.lazy===true||this.length>20)){this.one("mouseover",function(h){f=new a(c(this),e);f.show(h);d.push(f)})}else{this.each(function(){f=new a(c(this),e);d.push(f)})}return e.api?f:this}})(jQuery);
0,m=a.attr("title"),q=a.attr("data-tooltip"),r=o[b.effect],l,s=a.is(":input"),v=s&&a.is(":checkbox, :radio, select, :button, :submit"),t=a.attr("type"),k=b.events[t]||b.events[s?v?"widget":"input":"def"];if(!r)throw'Nonexistent effect "'+b.effect+'"';k=k.split(/,\s*/);if(k.length!=2)throw"Tooltip: bad events configuration for "+t;a.bind(k[0],function(e){clearTimeout(i);if(b.predelay)j=setTimeout(function(){c.show(e)},b.predelay);else c.show(e)}).bind(k[1],function(e){clearTimeout(j);if(b.delay)i=
(function(c){var d=[];c.tools=c.tools||{};c.tools.tooltip={version:"1.1.3",conf:{effect:"toggle",fadeOutSpeed:"fast",tip:null,predelay:0,delay:30,opacity:1,lazy:undefined,position:["top","center"],offset:[0,0],cancelDefault:true,relative:false,oneInstance:true,events:{def:"mouseover,mouseout",input:"focus,blur",widget:"focus mouseover,blur mouseout",tooltip:"mouseover,mouseout"},api:false},addEffect:function(e,g,f){b[e]=[g,f]}};var b={toggle:[function(e){var f=this.getConf(),g=this.getTip(),h=f.opacity;if(h<1){g.css({opacity:h})}g.show();e.call()},function(e){this.getTip().hide();e.call()}],fade:[function(e){this.getTip().fadeIn(this.getConf().fadeInSpeed,e)},function(e){this.getTip().fadeOut(this.getConf().fadeOutSpeed,e)}]};function a(f,g){var p=this,k=c(this);f.data("tooltip",p);var l=f.next();if(g.tip){l=c(g.tip);if(l.length>1){l=f.nextAll(g.tip).eq(0);if(!l.length){l=f.parent().nextAll(g.tip).eq(0)}}}function o(u){var t=g.relative?f.position().top:f.offset().top,s=g.relative?f.position().left:f.offset().left,v=g.position[0];t-=l.outerHeight()-g.offset[0];s+=f.outerWidth()+g.offset[1];var q=l.outerHeight()+f.outerHeight();if(v=="center"){t+=q/2}if(v=="bottom"){t+=q}v=g.position[1];var r=l.outerWidth()+f.outerWidth();if(v=="center"){s-=r/2}if(v=="left"){s-=r}return{top:t,left:s}}var i=f.is(":input"),e=i&&f.is(":checkbox, :radio, select, :button"),h=f.attr("type"),n=g.events[h]||g.events[i?(e?"widget":"input"):"def"];n=n.split(/,\s*/);if(n.length!=2){throw"Tooltip: bad events configuration for "+h}f.bind(n[0],function(r){if(g.oneInstance){c.each(d,function(){this.hide()})}var q=l.data("trigger");if(q&&q[0]!=this){l.hide().stop(true,true)}r.target=this;p.show(r);n=g.events.tooltip.split(/,\s*/);l.bind(n[0],function(){p.show(r)});if(n[1]){l.bind(n[1],function(){p.hide(r)})}});f.bind(n[1],function(q){p.hide(q)});if(!c.browser.msie&&!i&&!g.predelay){f.mousemove(function(){if(!p.isShown()){f.triggerHandler("mouseover")}})}if(g.opacity<1){l.css("opacity",g.opacity)}var m=0,j=f.attr("title");if(j&&g.cancelDefault){f.removeAttr("title");f.data("title",j)}c.extend(p,{show:function(r){if(r){f=c(r.target)}clearTimeout(l.data("timer"));if(l.is(":animated")||l.is(":visible")){return p}function q(){l.data("trigger",f);var t=o(r);if(g.tip&&j){l.html(f.data("title"))}r=r||c.Event();r.type="onBeforeShow";k.trigger(r,[t]);if(r.isDefaultPrevented()){return p}t=o(r);l.css({position:"absolute",top:t.top,left:t.left});var s=b[g.effect];if(!s){throw'Nonexistent effect "'+g.effect+'"'}s[0].call(p,function(){r.type="onShow";k.trigger(r)})}if(g.predelay){clearTimeout(m);m=setTimeout(q,g.predelay)}else{q()}return p},hide:function(r){clearTimeout(l.data("timer"));clearTimeout(m);if(!l.is(":visible")){return}function q(){r=r||c.Event();r.type="onBeforeHide";k.trigger(r);if(r.isDefaultPrevented()){return}b[g.effect][1].call(p,function(){r.type="onHide";k.trigger(r)})}if(g.delay&&r){l.data("timer",setTimeout(q,g.delay))}else{q()}return p},isShown:function(){return l.is(":visible, :animated")},getConf:function(){return g},getTip:function(){return l},getTrigger:function(){return f},bind:function(q,r){k.bind(q,r);return p},onHide:function(q){return this.bind("onHide",q)},onBeforeShow:function(q){return this.bind("onBeforeShow",q)},onShow:function(q){return this.bind("onShow",q)},onBeforeHide:function(q){return this.bind("onBeforeHide",q)},unbind:function(q){k.unbind(q);return p}});c.each(g,function(q,r){if(c.isFunction(r)){p.bind(q,r)}})}c.prototype.tooltip=function(e){var f=this.eq(typeof e=="number"?e:0).data("tooltip");if(f){return f}var g=c.extend(true,{},c.tools.tooltip.conf);if(c.isFunction(e)){e={onBeforeShow:e}}else{if(typeof e=="string"){e={tip:e}}}e=c.extend(true,g,e);if(typeof e.position=="string"){e.position=e.position.split(/,?\s/)}if(e.lazy!==false&&(e.lazy===true||this.length>20)){this.one("mouseover",function(h){f=new a(c(this),e);f.show(h);d.push(f)})}else{this.each(function(){f=new a(c(this),e);d.push(f)})}return e.api?f:this}})(jQuery);
navi = api.getRoot().parent().find(conf.navi),
navi = find(api.getRoot(), conf.navi),
this.each(function() { var api = $(this).data("scrollable"), navi = api.getRoot().parent().find(conf.navi), buttons = api.getNaviButtons(), cls = conf.activeClass, history = conf.history && $.fn.history; // @deprecated stuff if (api) { ret = api; } api.getNaviButtons = function() { return buttons.add(navi); }; function doClick(el, i, e) { api.seekTo(i); if (history) { if (location.hash) { location.hash = el.attr("href").replace("#", ""); } } else { return e.preventDefault(); } } function els() { return navi.find(conf.naviItem || '> *'); } function addItem(i) { var item = $("<" + (conf.naviItem || 'a') + "/>").click(function(e) { doClick($(this), i, e); }).attr("href", "#" + i); // index number / id attribute if (i === 0) { item.addClass(cls); } if (conf.indexed) { item.text(i + 1); } if (conf.idPrefix) { item.attr("id", conf.idPrefix + i); } return item.appendTo(navi); } // generate navigator if (els().length) { els().each(function(i) { $(this).click(function(e) { doClick($(this), i, e); }); }); } else { $.each(api.getItems(), function(i) { addItem(i); }); } // activate correct entry api.onBeforeSeek(function(e, index) { var el = els().eq(index); if (!e.isDefaultPrevented() && el.length) { els().removeClass(cls).eq(index).addClass(cls); } }); function doHistory(evt, hash) { var el = els().eq(hash.replace("#", "")); if (!el.length) { el = els().filter("[href=" + hash + "]"); } el.click(); } // new item being added api.onAddItem(function(e, item) { item = addItem(api.getItems().index(item)); if (history) { item.history(doHistory); } }); if (history) { els().history(doHistory); } });
keys[key].each(function(k) { ret.accidentals.push(Object.clone(k)); });
key.accidentals.each(function(acc) { var pitch = pitches[acc.note]; pitch = pitch - mid; acc.verticalPos = pitch; });
keys[key].each(function(k) { ret.accidentals.push(Object.clone(k)); });
b.substring(7)*1;e.style.width=g+"px";r.adjustColumns();l.emit(d,"columnResized",m,g)},c,d,a,-2,-1)}};this.adjustColumns=function(){var c=q.firstChild,a=i.firstChild,b=0,e=0;e=i.lastChild.className.split(" ")[0];var h=f.getCssRule("#"+d.id+" ."+e);if(p)a=a.firstChild;if(!f.isHidden(d)){for(var g=0,m=a.childNodes.length;g<m;++g)if(a.childNodes[g].className){var j=a.childNodes[g].className.split(" ")[0];j=f.getCssRule("#"+d.id+" ."+j);b+=f.pxself(j,"width")+7}if(!p)if(h.style.width)$(d).find(".Wt-headerdiv ."+
b.substring(7)*1;e.style.width=g+"px";r.adjustColumns();l.emit(d,"columnResized",m,parseInt(g))},c,d,a,-2,-1)}};this.adjustColumns=function(){var c=q.firstChild,a=i.firstChild,b=0,e=0;e=i.lastChild.className.split(" ")[0];var h=f.getCssRule("#"+d.id+" ."+e);if(p)a=a.firstChild;if(!f.isHidden(d)){for(var g=0,m=a.childNodes.length;g<m;++g)if(a.childNodes[g].className){var j=a.childNodes[g].className.split(" ")[0];j=f.getCssRule("#"+d.id+" ."+j);b+=f.pxself(j,"width")+7}if(!p)if(h.style.width)$(d).find(".Wt-headerdiv ."+
event:a},b.nodeId,b.columnId,"mousedown","","");d.getAttribute("drag")==="true"&&b.selected&&l._p_.dragStart(d,a)}};this.mouseUp=function(c,a){var b=o(a);b.columnId!=-1&&l.emit(d,{name:"itemEvent",eventObject:c,event:a},b.nodeId,b.columnId,"mouseup","","")};this.resizeHandleMDown=function(c,a){var b=c.parentNode.parentNode.className.split(" ")[0];if(b){var e=f.getCssRule("#"+d.id+" ."+b),h=f.pxself(e,"width");new f.SizeHandle(f,"h",c.offsetWidth,d.offsetHeight,-h,1E4,"Wt-hsh",function(g){g=h+g;var m=b.substring(7)*1;e.style.width=g+"px";r.adjustColumns();l.emit(d,"columnResized",m,g)},c,d,a,-2,-1)}};this.adjustColumns=function(){var c=q.firstChild,a=i.firstChild,b=0,e=0;e=i.lastChild.className.split(" ")[0];var h=f.getCssRule("#"+d.id+" ."+e);if(p)a=a.firstChild;if(!f.isHidden(d)){for(var g=0,m=a.childNodes.length;g<m;++g)if(a.childNodes[g].className){var j=a.childNodes[g].className.split(" ")[0];j=f.getCssRule("#"+d.id+" ."+j);b+=f.pxself(j,"width")+7}if(!p)if(h.style.width)$(d).find(".Wt-headerdiv ."+
return $(this).text().match(/^X:/m);
return $(this).text().match(/^\s*X:/m);
var newcurrentset = currentset.map(function(i,elem){ var children = $(elem).children().filter(function() { return $(this).text().match(/^X:/m); }); if (children.length===0) { return elem; } else { cont = true; return children.get(); } });
setTimeout( function(){ marker.updateInfoWindow() }, 500);
setTimeout( function(){ marker.updateInfoWindow(); }, 500);
setTimeout( function(){ marker.updateInfoWindow() }, 500);
Zotero.debug(text);
downloadString, function(text) { // get marked records as RIS // load translator for RIS var test = text.match(/UR\s+\-(.*)/g); if (text.match(/AB\s\s\-/)) text = text.replace(/AB\s\s\-/, "N2 -"); if (!text.match(/TY\s\s-/)) text = text+"\nTY - JOUR\n"; // load translator for RIS var translator = Zotero.loadTranslator("import"); translator.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7"); translator.setString(text); translator.setHandler("itemDone", function(obj, item) { if (text.match("L3")) { item.DOI = text.match(/L3\s+\-\s*(.*)/)[1]; } if (text.match("T1")) { item.title = text.match(/T1\s+-\s*(.*)/)[1]; } item.itemType = "journalArticle"; // RIS translator tries to download the link in "UR" this leads to unhappyness item.attachments = []; item.complete(); }); translator.translate(); Zotero.done(); });
function(onLoad) { this.getOverlay().fadeIn(this.getConf().speed, onLoad);
function(pos, onLoad) { var conf = this.getConf(), w = $(window); if (!conf.fixed) { pos.top += w.scrollTop(); pos.left += w.scrollLeft(); } pos.position = conf.fixed ? 'fixed' : 'absolute'; this.getOverlay().css(pos).fadeIn(conf.speed, onLoad);
function(onLoad) { this.getOverlay().fadeIn(this.getConf().speed, onLoad); }, function(onClose) {
var newcurrentset = currentset.map(function(i,elem){ var children = $(elem).children().filter(function() { var str = getABCText(this); return getABCText(this).match(/^\s*X:/m); }); if (children.length===0) { return elem; } else { cont = true; return children.get();
$(elem).contents().each(function() { if (this.nodeType == 3 && !includeself) { if (this.nodeValue.match(/^\s*X:/m)) { results = results.add($(elem)); includeself = true; } } else if (this.nodeType==1) { results = results.add(getABCContainingElements(this));
var newcurrentset = currentset.map(function(i,elem){ var children = $(elem).children().filter(function() { var str = getABCText(this); return getABCText(this).match(/^\s*X:/m); }); if (children.length===0) { return elem; } else { cont = true; return children.get(); } });
this.roleDataStore.each(function(item, i, len) { if (this.payload.data.id != item.data.id) { allTree.root.appendChild(new Ext.tree.TreeNode({ id : item.data.id, text : item.data.name, payload : item.data.id, allowChildren : false, draggable : true, leaf : true, qtip : item.data.description, nodeType : 'role', icon : Sonatype.config.extPath + '/resources/images/default/tree/folder.gif' })); } }, this);
Sonatype.Events.addListener('roleViewInit', function(cardPanel, rec, gridPanel) { var config = { payload : rec, tabTitle : 'Configuration' }; if (rec.data.userManaged == false) {} else {} cardPanel.add(new Sonatype.repoServer.DefaultRoleEditor(config)); });
this.roleDataStore.each(function(item, i, len) { if (this.payload.data.id != item.data.id) { allTree.root.appendChild(new Ext.tree.TreeNode({ id : item.data.id, text : item.data.name, payload : item.data.id, // sonatype added attribute allowChildren : false, draggable : true, leaf : true, qtip : item.data.description, nodeType : 'role', icon : Sonatype.config.extPath + '/resources/images/default/tree/folder.gif' })); } }, this);
function (args) { let count = Math.max(0, args.count - 1); let arg = args.literalArg || "Inbox"; let folder = mail.getFolders(arg, true, true)[count]; if (!folder) liberator.echoerr("Exxx: Folder \"" + arg + "\" does not exist"); else if (liberator.forceNewTab) MsgOpenNewTabForFolder(folder.URI); else SelectFolder(folder.URI); },
["folderPaneVisible", "messagePaneVisible", "msgHdr"].forEach(function(opt){ if (opt in params) args[opt] = params[opt]; });
function (args) { let count = Math.max(0, args.count - 1); let arg = args.literalArg || "Inbox"; let folder = mail.getFolders(arg, true, true)[count]; if (!folder) liberator.echoerr("Exxx: Folder \"" + arg + "\" does not exist"); else if (liberator.forceNewTab) MsgOpenNewTabForFolder(folder.URI); else SelectFolder(folder.URI); },
$('#addValue-'+ id).live('keypress', function(evt) {
$('#addValue-'+ id).live('keyup', function(evt) {
return this.each(function() { // define some vars var id = $(this).attr('id'); var elements = get(); // build replace html var html = '<div class="tagsWrapper">'+ ' <div class="oneLiner">'+ ' <p><input class="inputText" id="addValue-'+ id +'" name="addValue-'+ id +'" type="text" /></p>'+ ' <div class="buttonHolder">'+ ' <a href="#" id="addButton-'+ id +'" class="button icon iconAdd iconOnly disabledButton">'+ ' <span><span><span>'+ options.addLabel +'</span></span></span>'+ ' </a>'+ ' </div>'+ ' </div>'+ ' <div id="elementList-'+ id +'" class="tagList">'+ ' </div>'+ '</div>'; // hide current element $(this).css('visibility', 'hidden') .css('position', 'absolute') .css('top', '-9000px') .css('left', '-9000px') .attr('tabindex', '-1'); // prepend html $(this).before(html); // add elements list build(); // bind autocomplete if needed if(options.autoCompleteUrl != '') { $('#addValue-'+ id).autocomplete(options.autoCompleteUrl, { minChars: 1, dataType: 'json', width: $('#addValue-'+ id).width(), parse: function(json) { // init vars var parsed = []; // validate json if(json.code != 200) return parsed; // only process if we have results if(json.data.length > 0) { // loop data for(i in json.data) { parsed[parsed.length] = { data: [json.data[i].name], value: json.data[i].value, result: json.data[i].name }; } } // return data return parsed; } }); } // bind keypress on value-field $('#addValue-'+ id).live('keypress', function(evt) { // grab code var code = (evt.which||evt.charCode||evt.keyCode); // enter of splitchar should add an element if(code == 13 || String.fromCharCode(code) == options.splitChar) { evt.preventDefault(); evt.stopPropagation(); // add element add(); } // disable or enable button if($(this).val().replace(/^\s+|\s+$/g, '') == '') $('#addButton-'+ id).addClass('disabledButton'); else $('#addButton-'+ id).removeClass('disabledButton'); }); // bind click on add-button $('#addButton-'+ id).live('click', function(evt) { // dont submit evt.preventDefault(); evt.stopPropagation(); // add element add(); }); // bind click on delete-button $('.deleteButton-'+ id).live('click', function(evt) { // dont submit evt.preventDefault(); evt.stopPropagation(); // remove element remove($(this).attr('rel')); }); // add an element function add() { // init some vars var value = $('#addValue-'+ id).val().replace(/^\s+|\s+$/g, ''); var inElements = false; // reset box $('#addValue-'+ id).val('').focus(); $('#addButton-'+ id).addClass('disabledButton'); // only add new element if it isn't empty if(value != '') { // already in elements? for(var i in elements) if(value == elements[i]) inElements = true; // only add if not already in elements if(!inElements) { // add elements elements.push(value); // set new value $('#'+ id).val(elements.join(options.splitChar)); // rebuild element list build(); } } } // build the list function build() { // init var var html = ''; // no items and message given? if(elements.length == 0 && options.emptyMessage != '') html = '<p class="helpTxt">'+ options.emptyMessage +'</p>'; // items available else { // start html html = '<ul>'; // loop elements for(var i in elements) { html += ' <li><span><strong>'+ elements[i] +'</strong>'+ ' <a href="#" class="deleteButton-'+ id +'" rel="'+ elements[i] +'" title="'+ options.removeLabel +'">'+ options.removeLabel +'</a></span>'+ ' </li>'; } // end html html += '</ul>'; } // set html $('#elementList-'+ id).html(html); } // get all items function get() { // get chunks var chunks = $('#'+ id).val().split(options.splitChar); var elements = []; // loop elements and trim them from spaces for(var i in chunks) { value = chunks[i].replace(/^\s+|\s+$/g,''); if(value != '') elements.push(value) } return elements; } // remove an item function remove(value) { // get index for element var index = elements.indexOf(value); // remove element if(index > -1) elements.splice(index, 1); // set new value $('#'+ id).val(elements.join(options.splitChar)); // rebuild element list build(); } });
},commit:function(h,i){if(this.getValue())i.setAttribute('summary',this.getValue());else i.removeAttribute('summary');}}]}]}]};};CKEDITOR.dialog.add('table',function(e){return d(e,'table');});CKEDITOR.dialog.add('tableProperties',function(e){return d(e,'tableProperties');});})();
(function(){var a=/^(\d+(?:\.\d+)?)(px|%)$/,b=/^(\d+(?:\.\d+)?)px$/,c=function(e){var f=this.id;if(!e.info)e.info={};e.info[f]=this.getValue();};function d(e,f){var g=function(i){return new CKEDITOR.dom.element(i,e.document);},h=e.plugins.dialogadvtab;return{title:e.lang.table.title,minWidth:310,minHeight:CKEDITOR.env.ie?310:280,onLoad:function(){var i=this,j=i.getContentElement('advanced','advStyles');if(j)j.on('change',function(k){var l=this.getStyle('width',''),m=i.getContentElement('info','txtWidth'),n=i.getContentElement('info','cmbWidthType'),o=1;if(l){o=l.length<3||l.substr(l.length-1)!='%';l=parseInt(l,10);}m&&m.setValue(l,true);n&&n.setValue(o?'pixels':'percents',true);var p=this.getStyle('height',''),q=i.getContentElement('info','txtHeight');p&&(p=parseInt(p,10));q&&q.setValue(p,true);});},onShow:function(){var q=this;var i=e.getSelection(),j=i.getRanges(),k=null,l=q.getContentElement('info','txtRows'),m=q.getContentElement('info','txtCols'),n=q.getContentElement('info','txtWidth'),o=q.getContentElement('info','txtHeight');if(f=='tableProperties'){if(k=i.getSelectedElement())k=k.getAscendant('table',true);else if(j.length>0){if(CKEDITOR.env.webkit)j[0].shrink(CKEDITOR.NODE_ELEMENT);var p=j[0].getCommonAncestor(true);k=p.getAscendant('table',true);}q._.selectedElement=k;}if(k){q.setupContent(k);l&&l.disable();m&&m.disable();}else{l&&l.enable();m&&m.enable();}n&&n.onChange();o&&o.onChange();},onOk:function(){var D=this;if(D._.selectedElement)var i=e.getSelection(),j=i.createBookmarks();var k=D._.selectedElement||g('table'),l=D,m={};D.commitContent(m,k);if(m.info){var n=m.info;if(!D._.selectedElement){var o=k.append(g('tbody')),p=parseInt(n.txtRows,10)||0,q=parseInt(n.txtCols,10)||0;for(var r=0;r<p;r++){var s=o.append(g('tr'));for(var t=0;t<q;t++){var u=s.append(g('td'));if(!CKEDITOR.env.ie)u.append(g('br'));}}}var v=n.selHeaders;if(!k.$.tHead&&(v=='row'||v=='both')){var w=new CKEDITOR.dom.element(k.$.createTHead());o=k.getElementsByTag('tbody').getItem(0);var x=o.getElementsByTag('tr').getItem(0);for(r=0;r<x.getChildCount();r++){var y=x.getChild(r);if(y.type==CKEDITOR.NODE_ELEMENT&&!y.hasAttribute('_cke_bookmark')){y.renameNode('th');y.setAttribute('scope','col');}}w.append(x.remove());}if(k.$.tHead!==null&&!(v=='row'||v=='both')){w=new CKEDITOR.dom.element(k.$.tHead);o=k.getElementsByTag('tbody').getItem(0);var z=o.getFirst();while(w.getChildCount()>0){x=w.getFirst();for(r=0;r<x.getChildCount();r++){var A=x.getChild(r);if(A.type==CKEDITOR.NODE_ELEMENT){A.renameNode('td');
},commit:function(h,i){if(this.getValue())i.setAttribute('summary',this.getValue());else i.removeAttribute('summary');}}]}]}]};};CKEDITOR.dialog.add('table',function(e){return d(e,'table');});CKEDITOR.dialog.add('tableProperties',function(e){return d(e,'tableProperties');});})();
{ var id = $(this).val(); if(id != '' && typeof extrasById[id] != 'undefined' && extrasById[id].type == 'block') hasModules = true; });
{ var id = $(this).val(); if(id !== $('#extraForBlock').val()) { if(id != '' && typeof extrasById[id] != 'undefined' && extrasById[id].type == 'block') hasModules = true; } });
$('.linkedExtra input:hidden').each(function() { var id = $(this).val(); if(id != '' && typeof extrasById[id] != 'undefined' && extrasById[id].type == 'block') hasModules = true; });
Zotero.Utilities.HTTP.doPost("http:
Zotero.Utilities.HTTP.doPost("http: var doiregex = /DOI\s+-\s(.+)/; var doi = doiregex.exec(text); var jaregex = /JA\s+-\s(.+)/; var ja = jaregex.exec(text);
Zotero.Utilities.HTTP.doPost("http://ieeexplore.ieee.org/xpls/citationAct", post, function(text) { // load translator for RIS var translator = Zotero.loadTranslator("import"); translator.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7"); translator.setString(text); translator.setHandler("itemDone", function(obj, item) { var url = urls.shift(); var is = isRe.exec(url); var pu = puRe.exec(url); var arnumber = articleRe.exec(url); if(item.notes[0] && item.notes[0].note) { item.abstractNote = item.notes[0].note; item.notes = new Array(); } var dupes = new Array(); for (var i = 0 ; i < item.creators.length - 1 ; i++) { if (item.creators[i].lastName + item.creators[i].firstName == item.creators[i+1].lastName + item.creators[i].firstName) { dupes.push(i + 1); } } for (var i in dupes) { delete item.creators[dupes[i]]; } var dupes = []; for (var i = 0 ; i < item.creators.length ; i++) { if (item.creators[i]) { dupes.push(item.creators[i]); } } item.creators = dupes; var newurls = [url]; Zotero.Utilities.processDocuments(newurls, function(newDoc) { var xpath = '//p[@class="bodyCopyBlackLargeSpaced"]'; var textElmt = newDoc.evaluate(xpath, newDoc, namespace, XPathResult.ANY_TYPE, null).iterateNext(); if (textElmt) { var m = textElmt.textContent.match(/Identifier:\s+([^\n]*)\n/); if (m){ item.DOI = m[1]; } } var pdfpath = '//td[2][@class="bodyCopyBlackLarge"]/a[@class="bodyCopy"][substring(text(), 1, 3) = "PDF"]'; var pdfurlElmt = newDoc.evaluate(pdfpath, newDoc, namespace, XPathResult.ANY_TYPE, null).iterateNext(); if (pdfurlElmt) { pdfurlElmt.href = pdfurlElmt.href.replace("/stamp.jsp", "PDF/getPDF.jsp"); item.attachments = [{url:pdfurlElmt.href, title:"IEEE Xplore Full Text PDF", mimeType:"application/pdf"}]; } item.complete(); }, function() {Zotero.done();}); }); translator.translate(); });
var url = urls.shift(); var is = isRe.exec(url); var pu = puRe.exec(url); var arnumber = articleRe.exec(url);
Zotero.Utilities.HTTP.doPost("http://ieeexplore.ieee.org/xpls/citationAct", post, function(text) { // load translator for RIS var translator = Zotero.loadTranslator("import"); translator.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7"); translator.setString(text); translator.setHandler("itemDone", function(obj, item) { var url = urls.shift(); var is = isRe.exec(url); var pu = puRe.exec(url); var arnumber = articleRe.exec(url); if(item.notes[0] && item.notes[0].note) { item.abstractNote = item.notes[0].note; item.notes = new Array(); } var dupes = new Array(); for (var i = 0 ; i < item.creators.length - 1 ; i++) { if (item.creators[i].lastName + item.creators[i].firstName == item.creators[i+1].lastName + item.creators[i].firstName) { dupes.push(i + 1); } } for (var i in dupes) { delete item.creators[dupes[i]]; } var dupes = []; for (var i = 0 ; i < item.creators.length ; i++) { if (item.creators[i]) { dupes.push(item.creators[i]); } } item.creators = dupes; var newurls = [url]; Zotero.Utilities.processDocuments(newurls, function(newDoc) { var xpath = '//p[@class="bodyCopyBlackLargeSpaced"]'; var textElmt = newDoc.evaluate(xpath, newDoc, namespace, XPathResult.ANY_TYPE, null).iterateNext(); if (textElmt) { var m = textElmt.textContent.match(/Identifier:\s+([^\n]*)\n/); if (m){ item.DOI = m[1]; } } var pdfpath = '//td[2][@class="bodyCopyBlackLarge"]/a[@class="bodyCopy"][substring(text(), 1, 3) = "PDF"]'; var pdfurlElmt = newDoc.evaluate(pdfpath, newDoc, namespace, XPathResult.ANY_TYPE, null).iterateNext(); if (pdfurlElmt) { pdfurlElmt.href = pdfurlElmt.href.replace("/stamp.jsp", "PDF/getPDF.jsp"); item.attachments = [{url:pdfurlElmt.href, title:"IEEE Xplore Full Text PDF", mimeType:"application/pdf"}]; } item.complete(); }, function() {Zotero.done();}); }); translator.translate(); });
var dupes = new Array(); for (var i = 0 ; i < item.creators.length - 1 ; i++) { if (item.creators[i].lastName + item.creators[i].firstName == item.creators[i+1].lastName + item.creators[i].firstName) { dupes.push(i + 1); } }
if(doi) { item.DOI = doi[1]; } if(ja) { item.journalAbbreviation = ja[1]; }
Zotero.Utilities.HTTP.doPost("http://ieeexplore.ieee.org/xpls/citationAct", post, function(text) { // load translator for RIS var translator = Zotero.loadTranslator("import"); translator.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7"); translator.setString(text); translator.setHandler("itemDone", function(obj, item) { var url = urls.shift(); var is = isRe.exec(url); var pu = puRe.exec(url); var arnumber = articleRe.exec(url); if(item.notes[0] && item.notes[0].note) { item.abstractNote = item.notes[0].note; item.notes = new Array(); } var dupes = new Array(); for (var i = 0 ; i < item.creators.length - 1 ; i++) { if (item.creators[i].lastName + item.creators[i].firstName == item.creators[i+1].lastName + item.creators[i].firstName) { dupes.push(i + 1); } } for (var i in dupes) { delete item.creators[dupes[i]]; } var dupes = []; for (var i = 0 ; i < item.creators.length ; i++) { if (item.creators[i]) { dupes.push(item.creators[i]); } } item.creators = dupes; var newurls = [url]; Zotero.Utilities.processDocuments(newurls, function(newDoc) { var xpath = '//p[@class="bodyCopyBlackLargeSpaced"]'; var textElmt = newDoc.evaluate(xpath, newDoc, namespace, XPathResult.ANY_TYPE, null).iterateNext(); if (textElmt) { var m = textElmt.textContent.match(/Identifier:\s+([^\n]*)\n/); if (m){ item.DOI = m[1]; } } var pdfpath = '//td[2][@class="bodyCopyBlackLarge"]/a[@class="bodyCopy"][substring(text(), 1, 3) = "PDF"]'; var pdfurlElmt = newDoc.evaluate(pdfpath, newDoc, namespace, XPathResult.ANY_TYPE, null).iterateNext(); if (pdfurlElmt) { pdfurlElmt.href = pdfurlElmt.href.replace("/stamp.jsp", "PDF/getPDF.jsp"); item.attachments = [{url:pdfurlElmt.href, title:"IEEE Xplore Full Text PDF", mimeType:"application/pdf"}]; } item.complete(); }, function() {Zotero.done();}); }); translator.translate(); });
for (var i in dupes) { delete item.creators[dupes[i]]; } var dupes = []; for (var i = 0 ; i < item.creators.length ; i++) { if (item.creators[i]) { dupes.push(item.creators[i]); } } item.creators = dupes; var newurls = [url]; Zotero.Utilities.processDocuments(newurls, function(newDoc) { var xpath = ' var textElmt = newDoc.evaluate(xpath, newDoc, namespace, XPathResult.ANY_TYPE, null).iterateNext(); if (textElmt) { var m = textElmt.textContent.match(/Identifier:\s+([^\n]*)\n/); if (m){ item.DOI = m[1]; } } var pdfpath = ' var pdfurlElmt = newDoc.evaluate(pdfpath, newDoc, namespace, XPathResult.ANY_TYPE, null).iterateNext(); if (pdfurlElmt) { pdfurlElmt.href = pdfurlElmt.href.replace("/stamp.jsp", "PDF/getPDF.jsp"); item.attachments = [{url:pdfurlElmt.href, title:"IEEE Xplore Full Text PDF", mimeType:"application/pdf"}]; } item.complete(); }, function() {Zotero.done();});
pdfurl = "http: item.attachments.push({url:pdfurl, title:"IEEE Xplore PDF", mimeType:"application/pdf"}); item.complete();
Zotero.Utilities.HTTP.doPost("http://ieeexplore.ieee.org/xpls/citationAct", post, function(text) { // load translator for RIS var translator = Zotero.loadTranslator("import"); translator.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7"); translator.setString(text); translator.setHandler("itemDone", function(obj, item) { var url = urls.shift(); var is = isRe.exec(url); var pu = puRe.exec(url); var arnumber = articleRe.exec(url); if(item.notes[0] && item.notes[0].note) { item.abstractNote = item.notes[0].note; item.notes = new Array(); } var dupes = new Array(); for (var i = 0 ; i < item.creators.length - 1 ; i++) { if (item.creators[i].lastName + item.creators[i].firstName == item.creators[i+1].lastName + item.creators[i].firstName) { dupes.push(i + 1); } } for (var i in dupes) { delete item.creators[dupes[i]]; } var dupes = []; for (var i = 0 ; i < item.creators.length ; i++) { if (item.creators[i]) { dupes.push(item.creators[i]); } } item.creators = dupes; var newurls = [url]; Zotero.Utilities.processDocuments(newurls, function(newDoc) { var xpath = '//p[@class="bodyCopyBlackLargeSpaced"]'; var textElmt = newDoc.evaluate(xpath, newDoc, namespace, XPathResult.ANY_TYPE, null).iterateNext(); if (textElmt) { var m = textElmt.textContent.match(/Identifier:\s+([^\n]*)\n/); if (m){ item.DOI = m[1]; } } var pdfpath = '//td[2][@class="bodyCopyBlackLarge"]/a[@class="bodyCopy"][substring(text(), 1, 3) = "PDF"]'; var pdfurlElmt = newDoc.evaluate(pdfpath, newDoc, namespace, XPathResult.ANY_TYPE, null).iterateNext(); if (pdfurlElmt) { pdfurlElmt.href = pdfurlElmt.href.replace("/stamp.jsp", "PDF/getPDF.jsp"); item.attachments = [{url:pdfurlElmt.href, title:"IEEE Xplore Full Text PDF", mimeType:"application/pdf"}]; } item.complete(); }, function() {Zotero.done();}); }); translator.translate(); });
calculateMeta(null, $(this));
return this.each(function() { // init var var element = $(this); // initialize calculateMeta(null, $(this)); // bind keypress $(this).bind('keyup', calculateMeta); // bind change on the checkboxes if($('#pageTitle').length > 0 && $('#pageTitleOverwrite').length > 0) { $('#pageTitleOverwrite').change(function(evt) { if(!$(this).is(':checked')) { $('#pageTitle').val(element.val()); } }); } if($('#navigationTitle').length > 0 && $('#navigationTitleOverwrite').length > 0) { $('#navigationTitleOverwrite').change(function(evt) { if(!$(this).is(':checked')) { $('#navigationTitle').val(element.val()); } }); } $('#metaDescriptionOverwrite').change(function(evt) { if(!$(this).is(':checked')) { $('#metaDescription').val(element.val()); } }); $('#metaKeywordsOverwrite').change(function(evt) { if(!$(this).is(':checked')) { $('#metaKeywords').val(element.val()); } }); $('#urlOverwrite').change(function(evt) { if(!$(this).is(':checked')) { $('#url').val(utils.string.urlise(element.val())); $('#generatedUrl').html(utils.string.urlise(element.val())); } }); // calculate meta function calculateMeta(evt, element) { if(typeof element != 'undefined') var title = element.val(); else var title = $(this).val(); if($('#pageTitle').length > 0 && $('#pageTitleOverwrite').length > 0) { if(!$('#pageTitleOverwrite').is(':checked')) { $('#pageTitle').val(title); } } if($('#navigationTitle').length > 0 && $('#navigationTitleOverwrite').length > 0) { if(!$('#navigationTitleOverwrite').is(':checked')) { $('#navigationTitle').val(title); } } if(!$('#metaDescriptionOverwrite').is(':checked')) { $('#metaDescription').val(title); } if(!$('#metaKeywordsOverwrite').is(':checked')) { $('#metaKeywords').val(title); } if(!$('#urlOverwrite').is(':checked')) { $('#url').val(utils.string.urlise(title)); $('#generatedUrl').html(utils.string.urlise(title)); } } });
$('#url').val(utils.string.urlise(title)); $('#generatedUrl').html(utils.string.urlise(title));
if(typeof pageID == 'undefined' || pageID != 1) { $('#url').val(utils.string.urlise(title)); $('#generatedUrl').html(utils.string.urlise(title)); }
return this.each(function() { // init var var element = $(this); // initialize calculateMeta(null, $(this)); // bind keypress $(this).bind('keyup', calculateMeta); // bind change on the checkboxes if($('#pageTitle').length > 0 && $('#pageTitleOverwrite').length > 0) { $('#pageTitleOverwrite').change(function(evt) { if(!$(this).is(':checked')) { $('#pageTitle').val(element.val()); } }); } if($('#navigationTitle').length > 0 && $('#navigationTitleOverwrite').length > 0) { $('#navigationTitleOverwrite').change(function(evt) { if(!$(this).is(':checked')) { $('#navigationTitle').val(element.val()); } }); } $('#metaDescriptionOverwrite').change(function(evt) { if(!$(this).is(':checked')) { $('#metaDescription').val(element.val()); } }); $('#metaKeywordsOverwrite').change(function(evt) { if(!$(this).is(':checked')) { $('#metaKeywords').val(element.val()); } }); $('#urlOverwrite').change(function(evt) { if(!$(this).is(':checked')) { $('#url').val(utils.string.urlise(element.val())); $('#generatedUrl').html(utils.string.urlise(element.val())); } }); // calculate meta function calculateMeta(evt, element) { if(typeof element != 'undefined') var title = element.val(); else var title = $(this).val(); if($('#pageTitle').length > 0 && $('#pageTitleOverwrite').length > 0) { if(!$('#pageTitleOverwrite').is(':checked')) { $('#pageTitle').val(title); } } if($('#navigationTitle').length > 0 && $('#navigationTitleOverwrite').length > 0) { if(!$('#navigationTitleOverwrite').is(':checked')) { $('#navigationTitle').val(title); } } if(!$('#metaDescriptionOverwrite').is(':checked')) { $('#metaDescription').val(title); } if(!$('#metaKeywordsOverwrite').is(':checked')) { $('#metaKeywords').val(title); } if(!$('#urlOverwrite').is(':checked')) { $('#url').val(utils.string.urlise(title)); $('#generatedUrl').html(utils.string.urlise(title)); } } });
$(this).removeClass('toload') console.info($(this).attr('src'));
$(this).removeClass('toload');
$('.toload.gc-img').each(function () { window_top = $(window).height() + $(window).scrollTop(); var elem_top = $(this).offset().top; if ((window_top > elem_top) && (elem_top != 0)) { show_lazy_graph(this); $(this).removeClass('toload') console.info($(this).attr('src')); } });
if (text.match("L3")) { item.DOI = text.match(/L3\s+\-\s*(.*)/)[1];
if (text.match(/^L3\s+-\s*(.*)/m)) { item.DOI = text.match(/^L3\s+\-\s*(.*)/m)[1];
downloadString, function(text) { // get marked records as RIS Zotero.debug(text); // load translator for RIS var test = text.match(/UR\s+\-(.*)/g); if (text.match(/AB\s\s\-/)) text = text.replace(/AB\s\s\-/, "N2 -"); if (!text.match(/TY\s\s-/)) text = text+"\nTY - JOUR\n"; // load translator for RIS var translator = Zotero.loadTranslator("import"); translator.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7"); translator.setString(text); translator.setHandler("itemDone", function(obj, item) { if (text.match("L3")) { item.DOI = text.match(/L3\s+\-\s*(.*)/)[1]; } if (text.match("DO")) { item.DOI = text.match(/DO\s+\-\s*(.*)/)[1]; } if (text.match("T1")) { item.title = text.match(/T1\s+-\s*(.*)/)[1]; } item.itemType = "journalArticle"; item.url = false; // RIS translator tries to download the link in "UR" this leads to unhappyness item.attachments = []; item.complete(); }); translator.translate(); Zotero.done(); });
if (text.match("DO")) { item.DOI = text.match(/DO\s+\-\s*(.*)/)[1];
if (text.match(/^DO\s+-\s*(.*)/m)) { item.DOI = text.match(/^DO\s+-\s*(.*)/m)[1];
downloadString, function(text) { // get marked records as RIS Zotero.debug(text); // load translator for RIS var test = text.match(/UR\s+\-(.*)/g); if (text.match(/AB\s\s\-/)) text = text.replace(/AB\s\s\-/, "N2 -"); if (!text.match(/TY\s\s-/)) text = text+"\nTY - JOUR\n"; // load translator for RIS var translator = Zotero.loadTranslator("import"); translator.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7"); translator.setString(text); translator.setHandler("itemDone", function(obj, item) { if (text.match("L3")) { item.DOI = text.match(/L3\s+\-\s*(.*)/)[1]; } if (text.match("DO")) { item.DOI = text.match(/DO\s+\-\s*(.*)/)[1]; } if (text.match("T1")) { item.title = text.match(/T1\s+-\s*(.*)/)[1]; } item.itemType = "journalArticle"; item.url = false; // RIS translator tries to download the link in "UR" this leads to unhappyness item.attachments = []; item.complete(); }); translator.translate(); Zotero.done(); });
if (text.match("T1")) { item.title = text.match(/T1\s+-\s*(.*)/)[1];
if (text.match(/^T1\s+-/m)) { item.title = text.match(/^T1\s+-\s*(.*)/m)[1];
downloadString, function(text) { // get marked records as RIS Zotero.debug(text); // load translator for RIS var test = text.match(/UR\s+\-(.*)/g); if (text.match(/AB\s\s\-/)) text = text.replace(/AB\s\s\-/, "N2 -"); if (!text.match(/TY\s\s-/)) text = text+"\nTY - JOUR\n"; // load translator for RIS var translator = Zotero.loadTranslator("import"); translator.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7"); translator.setString(text); translator.setHandler("itemDone", function(obj, item) { if (text.match("L3")) { item.DOI = text.match(/L3\s+\-\s*(.*)/)[1]; } if (text.match("DO")) { item.DOI = text.match(/DO\s+\-\s*(.*)/)[1]; } if (text.match("T1")) { item.title = text.match(/T1\s+-\s*(.*)/)[1]; } item.itemType = "journalArticle"; item.url = false; // RIS translator tries to download the link in "UR" this leads to unhappyness item.attachments = []; item.complete(); }); translator.translate(); Zotero.done(); });
item.itemType = "journalArticle";
downloadString, function(text) { // get marked records as RIS Zotero.debug(text); // load translator for RIS var test = text.match(/UR\s+\-(.*)/g); if (text.match(/AB\s\s\-/)) text = text.replace(/AB\s\s\-/, "N2 -"); if (!text.match(/TY\s\s-/)) text = text+"\nTY - JOUR\n"; // load translator for RIS var translator = Zotero.loadTranslator("import"); translator.setTranslator("32d59d2d-b65a-4da4-b0a3-bdd3cfb979e7"); translator.setString(text); translator.setHandler("itemDone", function(obj, item) { if (text.match("L3")) { item.DOI = text.match(/L3\s+\-\s*(.*)/)[1]; } if (text.match("DO")) { item.DOI = text.match(/DO\s+\-\s*(.*)/)[1]; } if (text.match("T1")) { item.title = text.match(/T1\s+-\s*(.*)/)[1]; } item.itemType = "journalArticle"; item.url = false; // RIS translator tries to download the link in "UR" this leads to unhappyness item.attachments = []; item.complete(); }); translator.translate(); Zotero.done(); });
this.editKeyDown=function(a,b){if(e!=a.id)if($(a).hasClass("Wt-suggest-onedit"))e=a.id;else if($(a).hasClass("Wt-suggest-dropdown")&&b.keyCode==40)e=a.id;else{e=null;return true}var i=m?c.getElement(m):null;if(r()&&i)if(b.keyCode==13||b.keyCode==9){s(i);c.cancelEvent(b);setTimeout(function(){a.focus()},0);return false}else if(b.keyCode==40||b.keyCode==38||b.keyCode==34||b.keyCode==33){if(b.type.toUpperCase()=="KEYDOWN"){t=true;c.cancelEvent(b,c.CancelDefaultAction)}if(b.type.toUpperCase()=="KEYPRESS"&&
function(a,b){if(m(a))if(c.widgetCoordinates(a,b).x>a.offsetWidth-16)if(f!=a.id){k();f=a.id;n.refilter()}else{f=null;k()}};this.editKeyDown=function(a,b){if(!m(a))return true;if(f!=a.id)if($(a).hasClass("Wt-suggest-onedit"))f=a.id;else if($(a).hasClass("Wt-suggest-dropdown")&&b.keyCode==40)f=a.id;else{f=null;return true}var h=l?c.getElement(l):null;if(s()&&h)if(b.keyCode==13||b.keyCode==9){t(h);c.cancelEvent(b);setTimeout(function(){a.focus()},0);return false}else if(b.keyCode==40||b.keyCode==38||
this.editKeyDown=function(a,b){if(e!=a.id)if($(a).hasClass("Wt-suggest-onedit"))e=a.id;else if($(a).hasClass("Wt-suggest-dropdown")&&b.keyCode==40)e=a.id;else{e=null;return true}var i=m?c.getElement(m):null;if(r()&&i)if(b.keyCode==13||b.keyCode==9){s(i);c.cancelEvent(b);setTimeout(function(){a.focus()},0);return false}else if(b.keyCode==40||b.keyCode==38||b.keyCode==34||b.keyCode==33){if(b.type.toUpperCase()=="KEYDOWN"){t=true;c.cancelEvent(b,c.CancelDefaultAction)}if(b.type.toUpperCase()=="KEYPRESS"&&
if (g_IsIE)
if (g_IsIE) {
GDownloadUrl(vocabsQuery, function(pData, pResponseCode) { if(pResponseCode == 200) { var XmlDoc = GXml.parse(pData); if (g_IsIE) XmlDoc.setProperty("SelectionLanguage", "XPath"); var rootNode = XmlDoc.documentElement; if (!rootNode) { return; } // get the concept tag (inside is the additional info) var aConcepts = rootNode.getElementsByTagName("skos:Concept"); if (aConcepts.length == 0) { return; } // there is only one concept, so we'll use the 0th item in the array! // the full name of the info tag is "skos:scopeNote" scopeNote = GXml.value(aConcepts[0].selectSingleNode("*[local-name() = 'scopeNote']")); marker.maScalarNotes[scalarId] = scopeNote; }else if(responseCode == -1) { alert("Data request timed out. Please try later."); } else if ((responseCode >= 400) & (responseCode <= 500)){ alert('Request not found, bad request or similar problem. Error code is: ' + responseCode); } else if ((responseCode >= 500) & (responseCode <= 506)){ alert('Requested service not available, not implemented or internal service error. Error code is: ' + responseCode); }else { alert('Remote server returned error code: ' + responseCode); } });
if (aConcepts.length == 0) {
if (aConcepts.length === 0) {
GDownloadUrl(vocabsQuery, function(pData, pResponseCode) { if(pResponseCode == 200) { var XmlDoc = GXml.parse(pData); if (g_IsIE) XmlDoc.setProperty("SelectionLanguage", "XPath"); var rootNode = XmlDoc.documentElement; if (!rootNode) { return; } // get the concept tag (inside is the additional info) var aConcepts = rootNode.getElementsByTagName("skos:Concept"); if (aConcepts.length == 0) { return; } // there is only one concept, so we'll use the 0th item in the array! // the full name of the info tag is "skos:scopeNote" scopeNote = GXml.value(aConcepts[0].selectSingleNode("*[local-name() = 'scopeNote']")); marker.maScalarNotes[scalarId] = scopeNote; }else if(responseCode == -1) { alert("Data request timed out. Please try later."); } else if ((responseCode >= 400) & (responseCode <= 500)){ alert('Request not found, bad request or similar problem. Error code is: ' + responseCode); } else if ((responseCode >= 500) & (responseCode <= 506)){ alert('Requested service not available, not implemented or internal service error. Error code is: ' + responseCode); }else { alert('Remote server returned error code: ' + responseCode); } });
width: oWidth}, conf.speed, function() { if (conf.fixed) { pos.top -= w.scrollTop(); pos.left -= w.scrollLeft(); pos.position = 'fixed'; img.add(overlay).css(pos); }
width: oWidth}, conf.speed, function() {
width: oWidth}, conf.speed, function() { if (conf.fixed) { pos.top -= w.scrollTop(); pos.left -= w.scrollLeft(); pos.position = 'fixed'; img.add(overlay).css(pos); } // set close button and content over the image overlay.css("zIndex", conf.zIndex + 1).fadeIn(conf.fadeInSpeed, function() { if (self.isOpened() && !$(this).index(overlay)) { onLoad.call(); } else { overlay.hide(); } }); });
CKEDITOR.dialog.add('specialchar',function(a){var b,c=a.lang.specialChar,d=function(k){var l=a.getSelection(),m=l.getRanges(),n,o;a.fire('saveSnapshot');for(var p=0,q=m.length;p<q;p++){n=m[p];n.deleteContents();o=CKEDITOR.dom.element.createFromHtml(k);n.insertNode(o);}n.moveToPosition(o,CKEDITOR.POSITION_AFTER_END);n.select();a.fire('saveSnapshot');},e=function(k){var l,m;if(k.data)l=k.data.getTarget();else l=new CKEDITOR.dom.element(k);if(l.getName()=='a'&&(m=l.getChild(0).getHtml())){l.removeClass('cke_light_background');b.hide();if(CKEDITOR.env.gecko)d(m);else a.insertHtml(m);}},f=CKEDITOR.tools.addFunction(e),g,h=function(k,l){var m;l=l||k.data.getTarget();if(l.getName()=='span')l=l.getParent();if(l.getName()=='a'&&(m=l.getChild(0).getHtml())){if(g)i(null,g);var n=b.getContentElement('info','htmlPreview').getElement();b.getContentElement('info','charPreview').getElement().setHtml(m);n.setHtml(CKEDITOR.tools.htmlEncode(m));l.getParent().addClass('cke_light_background');g=l;}},i=function(k,l){l=l||k.data.getTarget();if(l.getName()=='span')l=l.getParent();if(l.getName()=='a'){b.getContentElement('info','charPreview').getElement().setHtml('&nbsp;');b.getContentElement('info','htmlPreview').getElement().setHtml('&nbsp;');l.getParent().removeClass('cke_light_background');g=undefined;}},j=CKEDITOR.tools.addFunction(function(k){k=new CKEDITOR.dom.event(k);var l=k.getTarget(),m,n,o=k.getKeystroke(),p=a.lang.dir=='rtl';switch(o){case 38:if(m=l.getParent().getParent().getPrevious()){n=m.getChild([l.getParent().getIndex(),0]);n.focus();i(null,l);h(null,n);}k.preventDefault();break;case 40:if(m=l.getParent().getParent().getNext()){n=m.getChild([l.getParent().getIndex(),0]);if(n&&n.type==1){n.focus();i(null,l);h(null,n);}}k.preventDefault();break;case 32:e({data:k});k.preventDefault();break;case p?37:39:case 9:if(m=l.getParent().getNext()){n=m.getChild(0);if(n.type==1){n.focus();i(null,l);h(null,n);k.preventDefault(true);}else i(null,l);}else if(m=l.getParent().getParent().getNext()){n=m.getChild([0,0]);if(n&&n.type==1){n.focus();i(null,l);h(null,n);k.preventDefault(true);}else i(null,l);}break;case p?39:37:case CKEDITOR.SHIFT+9:if(m=l.getParent().getPrevious()){n=m.getChild(0);n.focus();i(null,l);h(null,n);k.preventDefault(true);}else if(m=l.getParent().getParent().getPrevious()){n=m.getLast().getChild(0);n.focus();i(null,l);h(null,n);k.preventDefault(true);}else i(null,l);break;default:return;}});return{title:c.title,minWidth:430,minHeight:280,buttons:[CKEDITOR.dialog.cancelButton],charColumns:17,chars:['!','&quot;','#','$','%','&amp;',"'",'(',')','*','+','-','.','/','0','1','2','3','4','5','6','7','8','9',':',';','&lt;','=','&gt;','?','@','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','[',']','^','_','`','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','{','|','}','~','&euro;(EURO SIGN)','&lsquo;(LEFT SINGLE QUOTATION MARK)','&rsquo;(RIGHT SINGLE QUOTATION MARK)','&ldquo;(LEFT DOUBLE QUOTATION MARK)','&rdquo;(RIGHT DOUBLE QUOTATION MARK)','&ndash;(EN DASH)','&mdash;(EM DASH)','&iexcl;(INVERTED EXCLAMATION MARK)','&cent;(CENT SIGN)','&pound;(POUND SIGN)','&curren;(CURRENCY SIGN)','&yen;(YEN SIGN)','&brvbar;(BROKEN BAR)','&sect;(SECTION SIGN)','&uml;(DIAERESIS)','&copy;(COPYRIGHT SIGN)','&ordf;(FEMININE ORDINAL INDICATOR)','&laquo;(LEFT-POINTING DOUBLE ANGLE QUOTATION MARK)','&not;(NOT SIGN)','&reg;(REGISTERED SIGN)','&macr;(MACRON)','&deg;(DEGREE SIGN)','&plusmn;(PLUS-MINUS SIGN)','&sup2;(SUPERSCRIPT TWO)','&sup3;(SUPERSCRIPT THREE)','&acute;(ACUTE ACCENT)','&micro;(MICRO SIGN)','&para;(PILCROW SIGN)','&middot;(MIDDLE DOT)','&cedil;(CEDILLA)','&sup1;(SUPERSCRIPT ONE)','&ordm;(MASCULINE ORDINAL INDICATOR)','&raquo;(RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK)','&frac14;(VULGAR FRACTION ONE QUARTER)','&frac12;(VULGAR FRACTION ONE HALF)','&frac34;(VULGAR FRACTION THREE QUARTERS)','&iquest;(INVERTED QUESTION MARK)','&Agrave;(LATIN CAPITAL LETTER A WITH GRAVE)','&Aacute;(LATIN CAPITAL LETTER A WITH ACUTE)','&Acirc;(LATIN CAPITAL LETTER A WITH CIRCUMFLEX)','&Atilde;(LATIN CAPITAL LETTER A WITH TILDE)','&Auml;(LATIN CAPITAL LETTER A WITH DIAERESIS)','&Aring;(LATIN CAPITAL LETTER A WITH RING ABOVE)','&AElig;(LATIN CAPITAL LETTER AE)','&Ccedil;(LATIN CAPITAL LETTER C WITH CEDILLA)','&Egrave;(LATIN CAPITAL LETTER E WITH GRAVE)','&Eacute;(LATIN CAPITAL LETTER E WITH ACUTE)','&Ecirc;(LATIN CAPITAL LETTER E WITH CIRCUMFLEX)','&Euml;(LATIN CAPITAL LETTER E WITH DIAERESIS)','&Igrave;(LATIN CAPITAL LETTER I WITH GRAVE)','&Iacute;(LATIN CAPITAL LETTER I WITH ACUTE)','&Icirc;(LATIN CAPITAL LETTER I WITH CIRCUMFLEX)','&Iuml;(LATIN CAPITAL LETTER I WITH DIAERESIS)','&ETH;(LATIN CAPITAL LETTER ETH)','&Ntilde;(LATIN CAPITAL LETTER N WITH TILDE)','&Ograve;(LATIN CAPITAL LETTER O WITH GRAVE)','&Oacute;(LATIN CAPITAL LETTER O WITH ACUTE)','&Ocirc;(LATIN CAPITAL LETTER O WITH CIRCUMFLEX)','&Otilde;(LATIN CAPITAL LETTER O WITH TILDE)','&Ouml;(LATIN CAPITAL LETTER O WITH DIAERESIS)','&times;(MULTIPLICATION SIGN)','&Oslash;(LATIN CAPITAL LETTER O WITH STROKE)','&Ugrave;(LATIN CAPITAL LETTER U WITH GRAVE)','&Uacute;(LATIN CAPITAL LETTER U WITH ACUTE)','&Ucirc;(LATIN CAPITAL LETTER U WITH CIRCUMFLEX)','&Uuml;(LATIN CAPITAL LETTER U WITH DIAERESIS)','&Yacute;(LATIN CAPITAL LETTER Y WITH ACUTE)','&THORN;(LATIN CAPITAL LETTER THORN)','&szlig;(LATIN SMALL LETTER SHARP S)','&agrave;(LATIN SMALL LETTER A WITH GRAVE)','&aacute;(LATIN SMALL LETTER A WITH ACUTE)','&acirc;(LATIN SMALL LETTER A WITH CIRCUMFLEX)','&atilde;(LATIN SMALL LETTER A WITH TILDE)','&auml;(LATIN SMALL LETTER A WITH DIAERESIS)','&aring;(LATIN SMALL LETTER A WITH RING ABOVE)','&aelig;(LATIN SMALL LETTER AE)','&ccedil;(LATIN SMALL LETTER C WITH CEDILLA)','&egrave;(LATIN SMALL LETTER E WITH GRAVE)','&eacute;(LATIN SMALL LETTER E WITH ACUTE)','&ecirc;(LATIN SMALL LETTER E WITH CIRCUMFLEX)','&euml;(LATIN SMALL LETTER E WITH DIAERESIS)','&igrave;(LATIN SMALL LETTER I WITH GRAVE)','&iacute;(LATIN SMALL LETTER I WITH ACUTE)','&icirc;(LATIN SMALL LETTER I WITH CIRCUMFLEX)','&iuml;(LATIN SMALL LETTER I WITH DIAERESIS)','&eth;(LATIN SMALL LETTER ETH)','&ntilde;(LATIN SMALL LETTER N WITH TILDE)','&ograve;(LATIN SMALL LETTER O WITH GRAVE)','&oacute;(LATIN SMALL LETTER O WITH ACUTE)','&ocirc;(LATIN SMALL LETTER O WITH CIRCUMFLEX)','&otilde;(LATIN SMALL LETTER O WITH TILDE)','&ouml;(LATIN SMALL LETTER O WITH DIAERESIS)','&divide;(DIVISION SIGN)','&oslash;(LATIN SMALL LETTER O WITH STROKE)','&ugrave;(LATIN SMALL LETTER U WITH GRAVE)','&uacute;(LATIN SMALL LETTER U WITH ACUTE)','&ucirc;(LATIN SMALL LETTER U WITH CIRCUMFLEX)','&uuml;(LATIN SMALL LETTER U WITH DIAERESIS)','&uuml;(LATIN SMALL LETTER U WITH DIAERESIS)','&yacute;(LATIN SMALL LETTER Y WITH ACUTE)','&thorn;(LATIN SMALL LETTER THORN)','&yuml;(LATIN SMALL LETTER Y WITH DIAERESIS)','&OElig;(LATIN CAPITAL LIGATURE OE)','&oelig;(LATIN SMALL LIGATURE OE)','&#372;(LATIN CAPITAL LETTER W WITH CIRCUMFLEX)','&#374(LATIN CAPITAL LETTER Y WITH CIRCUMFLEX)','&#373(LATIN SMALL LETTER W WITH CIRCUMFLEX)','&#375;(LATIN SMALL LETTER Y WITH CIRCUMFLEX)','&sbquo;(SINGLE LOW-9 QUOTATION MARK)','&#8219;(SINGLE HIGH-REVERSED-9 QUOTATION MARK)','&bdquo;(DOUBLE LOW-9 QUOTATION MARK)','&hellip;(HORIZONTAL ELLIPSIS)','&trade;(TRADE MARK SIGN)','&#9658;(BLACK RIGHT-POINTING POINTER)','&bull;(BULLET)','&rarr;(RIGHTWARDS ARROW)','&rArr;(RIGHTWARDS DOUBLE ARROW)','&hArr;(LEFT RIGHT DOUBLE ARROW)','&diams;(BLACK DIAMOND SUIT)','&asymp;(ALMOST EQUAL TO)'],onLoad:function(){var k=this.definition.charColumns,l=this.definition.chars,m=['<table role="listbox" aria-labelledby="specialchar_table_label" style="width: 320px; height: 100%; border-collapse: separate;" align="center" cellspacing="2" cellpadding="2" border="0">'],n=0,o=l.length,p,q;
CKEDITOR.dialog.add('specialchar',function(a){var b,c=a.lang.specialChar,d=function(k){var l=a.getSelection(),m=l.getRanges(true),n,o;a.fire('saveSnapshot');for(var p=m.length-1;p>=0;p--){n=m[p];n.deleteContents();o=CKEDITOR.dom.element.createFromHtml(k);n.insertNode(o);}if(n){n.moveToPosition(o,CKEDITOR.POSITION_AFTER_END);n.select();}a.fire('saveSnapshot');},e=function(k){var l,m;if(k.data)l=k.data.getTarget();else l=new CKEDITOR.dom.element(k);if(l.getName()=='a'&&(m=l.getChild(0).getHtml())){l.removeClass('cke_light_background');b.hide();if(CKEDITOR.env.gecko)d(m);else a.insertHtml(m);}},f=CKEDITOR.tools.addFunction(e),g,h=function(k,l){var m;l=l||k.data.getTarget();if(l.getName()=='span')l=l.getParent();if(l.getName()=='a'&&(m=l.getChild(0).getHtml())){if(g)i(null,g);var n=b.getContentElement('info','htmlPreview').getElement();b.getContentElement('info','charPreview').getElement().setHtml(m);n.setHtml(CKEDITOR.tools.htmlEncode(m));l.getParent().addClass('cke_light_background');g=l;}},i=function(k,l){l=l||k.data.getTarget();if(l.getName()=='span')l=l.getParent();if(l.getName()=='a'){b.getContentElement('info','charPreview').getElement().setHtml('&nbsp;');b.getContentElement('info','htmlPreview').getElement().setHtml('&nbsp;');l.getParent().removeClass('cke_light_background');g=undefined;}},j=CKEDITOR.tools.addFunction(function(k){k=new CKEDITOR.dom.event(k);var l=k.getTarget(),m,n,o=k.getKeystroke(),p=a.lang.dir=='rtl';switch(o){case 38:if(m=l.getParent().getParent().getPrevious()){n=m.getChild([l.getParent().getIndex(),0]);n.focus();i(null,l);h(null,n);}k.preventDefault();break;case 40:if(m=l.getParent().getParent().getNext()){n=m.getChild([l.getParent().getIndex(),0]);if(n&&n.type==1){n.focus();i(null,l);h(null,n);}}k.preventDefault();break;case 32:e({data:k});k.preventDefault();break;case p?37:39:case 9:if(m=l.getParent().getNext()){n=m.getChild(0);if(n.type==1){n.focus();i(null,l);h(null,n);k.preventDefault(true);}else i(null,l);}else if(m=l.getParent().getParent().getNext()){n=m.getChild([0,0]);if(n&&n.type==1){n.focus();i(null,l);h(null,n);k.preventDefault(true);}else i(null,l);}break;case p?39:37:case CKEDITOR.SHIFT+9:if(m=l.getParent().getPrevious()){n=m.getChild(0);n.focus();i(null,l);h(null,n);k.preventDefault(true);}else if(m=l.getParent().getParent().getPrevious()){n=m.getLast().getChild(0);n.focus();i(null,l);h(null,n);k.preventDefault(true);}else i(null,l);break;default:return;}});return{title:c.title,minWidth:430,minHeight:280,buttons:[CKEDITOR.dialog.cancelButton],charColumns:17,chars:['!','&quot;','#','$','%','&amp;',"'",'(',')','*','+','-','.','/','0','1','2','3','4','5','6','7','8','9',':',';','&lt;','=','&gt;','?','@','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','[',']','^','_','`','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','{','|','}','~','&euro;(EURO SIGN)','&lsquo;(LEFT SINGLE QUOTATION MARK)','&rsquo;(RIGHT SINGLE QUOTATION MARK)','&ldquo;(LEFT DOUBLE QUOTATION MARK)','&rdquo;(RIGHT DOUBLE QUOTATION MARK)','&ndash;(EN DASH)','&mdash;(EM DASH)','&iexcl;(INVERTED EXCLAMATION MARK)','&cent;(CENT SIGN)','&pound;(POUND SIGN)','&curren;(CURRENCY SIGN)','&yen;(YEN SIGN)','&brvbar;(BROKEN BAR)','&sect;(SECTION SIGN)','&uml;(DIAERESIS)','&copy;(COPYRIGHT SIGN)','&ordf;(FEMININE ORDINAL INDICATOR)','&laquo;(LEFT-POINTING DOUBLE ANGLE QUOTATION MARK)','&not;(NOT SIGN)','&reg;(REGISTERED SIGN)','&macr;(MACRON)','&deg;(DEGREE SIGN)','&plusmn;(PLUS-MINUS SIGN)','&sup2;(SUPERSCRIPT TWO)','&sup3;(SUPERSCRIPT THREE)','&acute;(ACUTE ACCENT)','&micro;(MICRO SIGN)','&para;(PILCROW SIGN)','&middot;(MIDDLE DOT)','&cedil;(CEDILLA)','&sup1;(SUPERSCRIPT ONE)','&ordm;(MASCULINE ORDINAL INDICATOR)','&raquo;(RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK)','&frac14;(VULGAR FRACTION ONE QUARTER)','&frac12;(VULGAR FRACTION ONE HALF)','&frac34;(VULGAR FRACTION THREE QUARTERS)','&iquest;(INVERTED QUESTION MARK)','&Agrave;(LATIN CAPITAL LETTER A WITH GRAVE)','&Aacute;(LATIN CAPITAL LETTER A WITH ACUTE)','&Acirc;(LATIN CAPITAL LETTER A WITH CIRCUMFLEX)','&Atilde;(LATIN CAPITAL LETTER A WITH TILDE)','&Auml;(LATIN CAPITAL LETTER A WITH DIAERESIS)','&Aring;(LATIN CAPITAL LETTER A WITH RING ABOVE)','&AElig;(LATIN CAPITAL LETTER AE)','&Ccedil;(LATIN CAPITAL LETTER C WITH CEDILLA)','&Egrave;(LATIN CAPITAL LETTER E WITH GRAVE)','&Eacute;(LATIN CAPITAL LETTER E WITH ACUTE)','&Ecirc;(LATIN CAPITAL LETTER E WITH CIRCUMFLEX)','&Euml;(LATIN CAPITAL LETTER E WITH DIAERESIS)','&Igrave;(LATIN CAPITAL LETTER I WITH GRAVE)','&Iacute;(LATIN CAPITAL LETTER I WITH ACUTE)','&Icirc;(LATIN CAPITAL LETTER I WITH CIRCUMFLEX)','&Iuml;(LATIN CAPITAL LETTER I WITH DIAERESIS)','&ETH;(LATIN CAPITAL LETTER ETH)','&Ntilde;(LATIN CAPITAL LETTER N WITH TILDE)','&Ograve;(LATIN CAPITAL LETTER O WITH GRAVE)','&Oacute;(LATIN CAPITAL LETTER O WITH ACUTE)','&Ocirc;(LATIN CAPITAL LETTER O WITH CIRCUMFLEX)','&Otilde;(LATIN CAPITAL LETTER O WITH TILDE)','&Ouml;(LATIN CAPITAL LETTER O WITH DIAERESIS)','&times;(MULTIPLICATION SIGN)','&Oslash;(LATIN CAPITAL LETTER O WITH STROKE)','&Ugrave;(LATIN CAPITAL LETTER U WITH GRAVE)','&Uacute;(LATIN CAPITAL LETTER U WITH ACUTE)','&Ucirc;(LATIN CAPITAL LETTER U WITH CIRCUMFLEX)','&Uuml;(LATIN CAPITAL LETTER U WITH DIAERESIS)','&Yacute;(LATIN CAPITAL LETTER Y WITH ACUTE)','&THORN;(LATIN CAPITAL LETTER THORN)','&szlig;(LATIN SMALL LETTER SHARP S)','&agrave;(LATIN SMALL LETTER A WITH GRAVE)','&aacute;(LATIN SMALL LETTER A WITH ACUTE)','&acirc;(LATIN SMALL LETTER A WITH CIRCUMFLEX)','&atilde;(LATIN SMALL LETTER A WITH TILDE)','&auml;(LATIN SMALL LETTER A WITH DIAERESIS)','&aring;(LATIN SMALL LETTER A WITH RING ABOVE)','&aelig;(LATIN SMALL LETTER AE)','&ccedil;(LATIN SMALL LETTER C WITH CEDILLA)','&egrave;(LATIN SMALL LETTER E WITH GRAVE)','&eacute;(LATIN SMALL LETTER E WITH ACUTE)','&ecirc;(LATIN SMALL LETTER E WITH CIRCUMFLEX)','&euml;(LATIN SMALL LETTER E WITH DIAERESIS)','&igrave;(LATIN SMALL LETTER I WITH GRAVE)','&iacute;(LATIN SMALL LETTER I WITH ACUTE)','&icirc;(LATIN SMALL LETTER I WITH CIRCUMFLEX)','&iuml;(LATIN SMALL LETTER I WITH DIAERESIS)','&eth;(LATIN SMALL LETTER ETH)','&ntilde;(LATIN SMALL LETTER N WITH TILDE)','&ograve;(LATIN SMALL LETTER O WITH GRAVE)','&oacute;(LATIN SMALL LETTER O WITH ACUTE)','&ocirc;(LATIN SMALL LETTER O WITH CIRCUMFLEX)','&otilde;(LATIN SMALL LETTER O WITH TILDE)','&ouml;(LATIN SMALL LETTER O WITH DIAERESIS)','&divide;(DIVISION SIGN)','&oslash;(LATIN SMALL LETTER O WITH STROKE)','&ugrave;(LATIN SMALL LETTER U WITH GRAVE)','&uacute;(LATIN SMALL LETTER U WITH ACUTE)','&ucirc;(LATIN SMALL LETTER U WITH CIRCUMFLEX)','&uuml;(LATIN SMALL LETTER U WITH DIAERESIS)','&uuml;(LATIN SMALL LETTER U WITH DIAERESIS)','&yacute;(LATIN SMALL LETTER Y WITH ACUTE)','&thorn;(LATIN SMALL LETTER THORN)','&yuml;(LATIN SMALL LETTER Y WITH DIAERESIS)','&OElig;(LATIN CAPITAL LIGATURE OE)','&oelig;(LATIN SMALL LIGATURE OE)','&#372;(LATIN CAPITAL LETTER W WITH CIRCUMFLEX)','&#374(LATIN CAPITAL LETTER Y WITH CIRCUMFLEX)','&#373(LATIN SMALL LETTER W WITH CIRCUMFLEX)','&#375;(LATIN SMALL LETTER Y WITH CIRCUMFLEX)','&sbquo;(SINGLE LOW-9 QUOTATION MARK)','&#8219;(SINGLE HIGH-REVERSED-9 QUOTATION MARK)','&bdquo;(DOUBLE LOW-9 QUOTATION MARK)','&hellip;(HORIZONTAL ELLIPSIS)','&trade;(TRADE MARK SIGN)','&#9658;(BLACK RIGHT-POINTING POINTER)','&bull;(BULLET)','&rarr;(RIGHTWARDS ARROW)','&rArr;(RIGHTWARDS DOUBLE ARROW)','&hArr;(LEFT RIGHT DOUBLE ARROW)','&diams;(BLACK DIAMOND SUIT)','&asymp;(ALMOST EQUAL TO)'],onLoad:function(){var k=this.definition.charColumns,l=this.definition.chars,m=CKEDITOR.tools.getNextId()+'_specialchar_table_label',n=['<table role="listbox" aria-labelledby="'+m+'"'+' style="width: 320px; height: 100%; border-collapse: separate;"'+' align="center" cellspacing="2" cellpadding="2" border="0">'],o=0,p=l.length,q,r;
CKEDITOR.dialog.add('specialchar',function(a){var b,c=a.lang.specialChar,d=function(k){var l=a.getSelection(),m=l.getRanges(),n,o;a.fire('saveSnapshot');for(var p=0,q=m.length;p<q;p++){n=m[p];n.deleteContents();o=CKEDITOR.dom.element.createFromHtml(k);n.insertNode(o);}n.moveToPosition(o,CKEDITOR.POSITION_AFTER_END);n.select();a.fire('saveSnapshot');},e=function(k){var l,m;if(k.data)l=k.data.getTarget();else l=new CKEDITOR.dom.element(k);if(l.getName()=='a'&&(m=l.getChild(0).getHtml())){l.removeClass('cke_light_background');b.hide();if(CKEDITOR.env.gecko)d(m);else a.insertHtml(m);}},f=CKEDITOR.tools.addFunction(e),g,h=function(k,l){var m;l=l||k.data.getTarget();if(l.getName()=='span')l=l.getParent();if(l.getName()=='a'&&(m=l.getChild(0).getHtml())){if(g)i(null,g);var n=b.getContentElement('info','htmlPreview').getElement();b.getContentElement('info','charPreview').getElement().setHtml(m);n.setHtml(CKEDITOR.tools.htmlEncode(m));l.getParent().addClass('cke_light_background');g=l;}},i=function(k,l){l=l||k.data.getTarget();if(l.getName()=='span')l=l.getParent();if(l.getName()=='a'){b.getContentElement('info','charPreview').getElement().setHtml('&nbsp;');b.getContentElement('info','htmlPreview').getElement().setHtml('&nbsp;');l.getParent().removeClass('cke_light_background');g=undefined;}},j=CKEDITOR.tools.addFunction(function(k){k=new CKEDITOR.dom.event(k);var l=k.getTarget(),m,n,o=k.getKeystroke(),p=a.lang.dir=='rtl';switch(o){case 38:if(m=l.getParent().getParent().getPrevious()){n=m.getChild([l.getParent().getIndex(),0]);n.focus();i(null,l);h(null,n);}k.preventDefault();break;case 40:if(m=l.getParent().getParent().getNext()){n=m.getChild([l.getParent().getIndex(),0]);if(n&&n.type==1){n.focus();i(null,l);h(null,n);}}k.preventDefault();break;case 32:e({data:k});k.preventDefault();break;case p?37:39:case 9:if(m=l.getParent().getNext()){n=m.getChild(0);if(n.type==1){n.focus();i(null,l);h(null,n);k.preventDefault(true);}else i(null,l);}else if(m=l.getParent().getParent().getNext()){n=m.getChild([0,0]);if(n&&n.type==1){n.focus();i(null,l);h(null,n);k.preventDefault(true);}else i(null,l);}break;case p?39:37:case CKEDITOR.SHIFT+9:if(m=l.getParent().getPrevious()){n=m.getChild(0);n.focus();i(null,l);h(null,n);k.preventDefault(true);}else if(m=l.getParent().getParent().getPrevious()){n=m.getLast().getChild(0);n.focus();i(null,l);h(null,n);k.preventDefault(true);}else i(null,l);break;default:return;}});return{title:c.title,minWidth:430,minHeight:280,buttons:[CKEDITOR.dialog.cancelButton],charColumns:17,chars:['!','&quot;','#','$','%','&amp;',"'",'(',')','*','+','-','.','/','0','1','2','3','4','5','6','7','8','9',':',';','&lt;','=','&gt;','?','@','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','[',']','^','_','`','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','{','|','}','~','&euro;(EURO SIGN)','&lsquo;(LEFT SINGLE QUOTATION MARK)','&rsquo;(RIGHT SINGLE QUOTATION MARK)','&ldquo;(LEFT DOUBLE QUOTATION MARK)','&rdquo;(RIGHT DOUBLE QUOTATION MARK)','&ndash;(EN DASH)','&mdash;(EM DASH)','&iexcl;(INVERTED EXCLAMATION MARK)','&cent;(CENT SIGN)','&pound;(POUND SIGN)','&curren;(CURRENCY SIGN)','&yen;(YEN SIGN)','&brvbar;(BROKEN BAR)','&sect;(SECTION SIGN)','&uml;(DIAERESIS)','&copy;(COPYRIGHT SIGN)','&ordf;(FEMININE ORDINAL INDICATOR)','&laquo;(LEFT-POINTING DOUBLE ANGLE QUOTATION MARK)','&not;(NOT SIGN)','&reg;(REGISTERED SIGN)','&macr;(MACRON)','&deg;(DEGREE SIGN)','&plusmn;(PLUS-MINUS SIGN)','&sup2;(SUPERSCRIPT TWO)','&sup3;(SUPERSCRIPT THREE)','&acute;(ACUTE ACCENT)','&micro;(MICRO SIGN)','&para;(PILCROW SIGN)','&middot;(MIDDLE DOT)','&cedil;(CEDILLA)','&sup1;(SUPERSCRIPT ONE)','&ordm;(MASCULINE ORDINAL INDICATOR)','&raquo;(RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK)','&frac14;(VULGAR FRACTION ONE QUARTER)','&frac12;(VULGAR FRACTION ONE HALF)','&frac34;(VULGAR FRACTION THREE QUARTERS)','&iquest;(INVERTED QUESTION MARK)','&Agrave;(LATIN CAPITAL LETTER A WITH GRAVE)','&Aacute;(LATIN CAPITAL LETTER A WITH ACUTE)','&Acirc;(LATIN CAPITAL LETTER A WITH CIRCUMFLEX)','&Atilde;(LATIN CAPITAL LETTER A WITH TILDE)','&Auml;(LATIN CAPITAL LETTER A WITH DIAERESIS)','&Aring;(LATIN CAPITAL LETTER A WITH RING ABOVE)','&AElig;(LATIN CAPITAL LETTER AE)','&Ccedil;(LATIN CAPITAL LETTER C WITH CEDILLA)','&Egrave;(LATIN CAPITAL LETTER E WITH GRAVE)','&Eacute;(LATIN CAPITAL LETTER E WITH ACUTE)','&Ecirc;(LATIN CAPITAL LETTER E WITH CIRCUMFLEX)','&Euml;(LATIN CAPITAL LETTER E WITH DIAERESIS)','&Igrave;(LATIN CAPITAL LETTER I WITH GRAVE)','&Iacute;(LATIN CAPITAL LETTER I WITH ACUTE)','&Icirc;(LATIN CAPITAL LETTER I WITH CIRCUMFLEX)','&Iuml;(LATIN CAPITAL LETTER I WITH DIAERESIS)','&ETH;(LATIN CAPITAL LETTER ETH)','&Ntilde;(LATIN CAPITAL LETTER N WITH TILDE)','&Ograve;(LATIN CAPITAL LETTER O WITH GRAVE)','&Oacute;(LATIN CAPITAL LETTER O WITH ACUTE)','&Ocirc;(LATIN CAPITAL LETTER O WITH CIRCUMFLEX)','&Otilde;(LATIN CAPITAL LETTER O WITH TILDE)','&Ouml;(LATIN CAPITAL LETTER O WITH DIAERESIS)','&times;(MULTIPLICATION SIGN)','&Oslash;(LATIN CAPITAL LETTER O WITH STROKE)','&Ugrave;(LATIN CAPITAL LETTER U WITH GRAVE)','&Uacute;(LATIN CAPITAL LETTER U WITH ACUTE)','&Ucirc;(LATIN CAPITAL LETTER U WITH CIRCUMFLEX)','&Uuml;(LATIN CAPITAL LETTER U WITH DIAERESIS)','&Yacute;(LATIN CAPITAL LETTER Y WITH ACUTE)','&THORN;(LATIN CAPITAL LETTER THORN)','&szlig;(LATIN SMALL LETTER SHARP S)','&agrave;(LATIN SMALL LETTER A WITH GRAVE)','&aacute;(LATIN SMALL LETTER A WITH ACUTE)','&acirc;(LATIN SMALL LETTER A WITH CIRCUMFLEX)','&atilde;(LATIN SMALL LETTER A WITH TILDE)','&auml;(LATIN SMALL LETTER A WITH DIAERESIS)','&aring;(LATIN SMALL LETTER A WITH RING ABOVE)','&aelig;(LATIN SMALL LETTER AE)','&ccedil;(LATIN SMALL LETTER C WITH CEDILLA)','&egrave;(LATIN SMALL LETTER E WITH GRAVE)','&eacute;(LATIN SMALL LETTER E WITH ACUTE)','&ecirc;(LATIN SMALL LETTER E WITH CIRCUMFLEX)','&euml;(LATIN SMALL LETTER E WITH DIAERESIS)','&igrave;(LATIN SMALL LETTER I WITH GRAVE)','&iacute;(LATIN SMALL LETTER I WITH ACUTE)','&icirc;(LATIN SMALL LETTER I WITH CIRCUMFLEX)','&iuml;(LATIN SMALL LETTER I WITH DIAERESIS)','&eth;(LATIN SMALL LETTER ETH)','&ntilde;(LATIN SMALL LETTER N WITH TILDE)','&ograve;(LATIN SMALL LETTER O WITH GRAVE)','&oacute;(LATIN SMALL LETTER O WITH ACUTE)','&ocirc;(LATIN SMALL LETTER O WITH CIRCUMFLEX)','&otilde;(LATIN SMALL LETTER O WITH TILDE)','&ouml;(LATIN SMALL LETTER O WITH DIAERESIS)','&divide;(DIVISION SIGN)','&oslash;(LATIN SMALL LETTER O WITH STROKE)','&ugrave;(LATIN SMALL LETTER U WITH GRAVE)','&uacute;(LATIN SMALL LETTER U WITH ACUTE)','&ucirc;(LATIN SMALL LETTER U WITH CIRCUMFLEX)','&uuml;(LATIN SMALL LETTER U WITH DIAERESIS)','&uuml;(LATIN SMALL LETTER U WITH DIAERESIS)','&yacute;(LATIN SMALL LETTER Y WITH ACUTE)','&thorn;(LATIN SMALL LETTER THORN)','&yuml;(LATIN SMALL LETTER Y WITH DIAERESIS)','&OElig;(LATIN CAPITAL LIGATURE OE)','&oelig;(LATIN SMALL LIGATURE OE)','&#372;(LATIN CAPITAL LETTER W WITH CIRCUMFLEX)','&#374(LATIN CAPITAL LETTER Y WITH CIRCUMFLEX)','&#373(LATIN SMALL LETTER W WITH CIRCUMFLEX)','&#375;(LATIN SMALL LETTER Y WITH CIRCUMFLEX)','&sbquo;(SINGLE LOW-9 QUOTATION MARK)','&#8219;(SINGLE HIGH-REVERSED-9 QUOTATION MARK)','&bdquo;(DOUBLE LOW-9 QUOTATION MARK)','&hellip;(HORIZONTAL ELLIPSIS)','&trade;(TRADE MARK SIGN)','&#9658;(BLACK RIGHT-POINTING POINTER)','&bull;(BULLET)','&rarr;(RIGHTWARDS ARROW)','&rArr;(RIGHTWARDS DOUBLE ARROW)','&hArr;(LEFT RIGHT DOUBLE ARROW)','&diams;(BLACK DIAMOND SUIT)','&asymp;(ALMOST EQUAL TO)'],onLoad:function(){var k=this.definition.charColumns,l=this.definition.chars,m=['<table role="listbox" aria-labelledby="specialchar_table_label" style="width: 320px; height: 100%; border-collapse: separate;" align="center" cellspacing="2" cellpadding="2" border="0">'],n=0,o=l.length,p,q;
newItem.date = Zotero.Utilities.cleanString(dates[0].text().toString());
newItem.date = Zotero.Utilities.trimInternal(dates[0].text().toString());
Zotero.Utilities.HTTP.doGet(newURIs, function(text) { var newItem = new Zotero.Item("report"); // remove header text = text.replace(/<!DOCTYPE[^>]*>/, "").replace(/<\?xml[^>]*\?>/, ""); // fix non-compliant XML tags (colons) text = text.replace(/<dc:/g, "<dc_").replace(/<\/dc:/g, "</dc_"); text = text.replace(/<oai_dc:dc/g, "<oai_dc_dc").replace(/<\/oai_dc:dc/g, "</oai_dc_dc"); text = text.replace(/<OAI-PMH[^>]*>/, "").replace(/<\/OAI-PMH[^>]*>/, ""); text = "<zotero>" + text + "</zotero>"; var xml = new XML(text); var title; var citation = xml.GetRecord.record.metadata.oai_dc_dc; var test = xml..responseDate.text().toString(); if (citation.dc_title.length()){ title = Zotero.Utilities.trimInternal(citation.dc_title.text().toString()); newItem.title = title; } Zotero.debug("article title: " + title); var type = ""; if(citation.dc_creator.length()) { var authors = citation.dc_creator; for(var j=0; j<authors.length(); j++) { Zotero.debug("author: " + authors[j]); newItem.creators.push(Zotero.Utilities.cleanAuthor(authors[j].text().toString(),type,true)); } } if (citation.dc_date.length()) { var dates = citation.dc_date; newItem.date = Zotero.Utilities.cleanString(dates[0].text().toString()); } if (citation.dc_description.length()) { var descriptions = citation.dc_description; for (var j=0; j<descriptions.length(); j++) { var noteStr = Zotero.Utilities.cleanString(descriptions[j].text().toString()); newItem.notes.push({note:noteStr}); } } if (citation.dc_subject.length()) { var subjects = citation.dc_subject; for (var j=0; j<subjects.length(); j++) { var subjectValue = Zotero.Utilities.cleanString(subjects[j].text().toString()); newItem.tags.push(subjectValue); } } if (citation.dc_identifier.length()) { var identifiers = citation.dc_identifier; for (var j=0; j<identifiers.length(); j++) { var identifier = Zotero.Utilities.cleanString(identifiers[j].text().toString()); if (identifier.substr(0, 4) == "doi:") { newItem.DOI = identifier; } else if (identifier.substr(0, 7) == "http://") { newItem.url = identifier; } else { newItem.extra = identifier; } } } var articleID = ""; if (xml.GetRecord.record.header.identifier.length()) { articleID = xml.GetRecord.record.header.identifier.text().toString(); articleID = articleID.substr(14); newItem.publicationTitle = articleID; }// TODO add "arXiv.org" to bib data? newItem.attachments.push({url:newItem.url, title:"DTIC Snapshot", mimeType:"text/html"}); if (newItem.notes[0]['note']) { newItem.abstractNote = newItem.notes[0]['note']; newItem.notes = new Array(); } newItem.complete(); }, function() {Zotero.done();}, null);
var noteStr = Zotero.Utilities.cleanString(descriptions[j].text().toString());
var noteStr = Zotero.Utilities.trimInternal(descriptions[j].text().toString());
Zotero.Utilities.HTTP.doGet(newURIs, function(text) { var newItem = new Zotero.Item("report"); // remove header text = text.replace(/<!DOCTYPE[^>]*>/, "").replace(/<\?xml[^>]*\?>/, ""); // fix non-compliant XML tags (colons) text = text.replace(/<dc:/g, "<dc_").replace(/<\/dc:/g, "</dc_"); text = text.replace(/<oai_dc:dc/g, "<oai_dc_dc").replace(/<\/oai_dc:dc/g, "</oai_dc_dc"); text = text.replace(/<OAI-PMH[^>]*>/, "").replace(/<\/OAI-PMH[^>]*>/, ""); text = "<zotero>" + text + "</zotero>"; var xml = new XML(text); var title; var citation = xml.GetRecord.record.metadata.oai_dc_dc; var test = xml..responseDate.text().toString(); if (citation.dc_title.length()){ title = Zotero.Utilities.trimInternal(citation.dc_title.text().toString()); newItem.title = title; } Zotero.debug("article title: " + title); var type = ""; if(citation.dc_creator.length()) { var authors = citation.dc_creator; for(var j=0; j<authors.length(); j++) { Zotero.debug("author: " + authors[j]); newItem.creators.push(Zotero.Utilities.cleanAuthor(authors[j].text().toString(),type,true)); } } if (citation.dc_date.length()) { var dates = citation.dc_date; newItem.date = Zotero.Utilities.cleanString(dates[0].text().toString()); } if (citation.dc_description.length()) { var descriptions = citation.dc_description; for (var j=0; j<descriptions.length(); j++) { var noteStr = Zotero.Utilities.cleanString(descriptions[j].text().toString()); newItem.notes.push({note:noteStr}); } } if (citation.dc_subject.length()) { var subjects = citation.dc_subject; for (var j=0; j<subjects.length(); j++) { var subjectValue = Zotero.Utilities.cleanString(subjects[j].text().toString()); newItem.tags.push(subjectValue); } } if (citation.dc_identifier.length()) { var identifiers = citation.dc_identifier; for (var j=0; j<identifiers.length(); j++) { var identifier = Zotero.Utilities.cleanString(identifiers[j].text().toString()); if (identifier.substr(0, 4) == "doi:") { newItem.DOI = identifier; } else if (identifier.substr(0, 7) == "http://") { newItem.url = identifier; } else { newItem.extra = identifier; } } } var articleID = ""; if (xml.GetRecord.record.header.identifier.length()) { articleID = xml.GetRecord.record.header.identifier.text().toString(); articleID = articleID.substr(14); newItem.publicationTitle = articleID; }// TODO add "arXiv.org" to bib data? newItem.attachments.push({url:newItem.url, title:"DTIC Snapshot", mimeType:"text/html"}); if (newItem.notes[0]['note']) { newItem.abstractNote = newItem.notes[0]['note']; newItem.notes = new Array(); } newItem.complete(); }, function() {Zotero.done();}, null);
var subjectValue = Zotero.Utilities.cleanString(subjects[j].text().toString());
var subjectValue = Zotero.Utilities.trimInternal(subjects[j].text().toString());
Zotero.Utilities.HTTP.doGet(newURIs, function(text) { var newItem = new Zotero.Item("report"); // remove header text = text.replace(/<!DOCTYPE[^>]*>/, "").replace(/<\?xml[^>]*\?>/, ""); // fix non-compliant XML tags (colons) text = text.replace(/<dc:/g, "<dc_").replace(/<\/dc:/g, "</dc_"); text = text.replace(/<oai_dc:dc/g, "<oai_dc_dc").replace(/<\/oai_dc:dc/g, "</oai_dc_dc"); text = text.replace(/<OAI-PMH[^>]*>/, "").replace(/<\/OAI-PMH[^>]*>/, ""); text = "<zotero>" + text + "</zotero>"; var xml = new XML(text); var title; var citation = xml.GetRecord.record.metadata.oai_dc_dc; var test = xml..responseDate.text().toString(); if (citation.dc_title.length()){ title = Zotero.Utilities.trimInternal(citation.dc_title.text().toString()); newItem.title = title; } Zotero.debug("article title: " + title); var type = ""; if(citation.dc_creator.length()) { var authors = citation.dc_creator; for(var j=0; j<authors.length(); j++) { Zotero.debug("author: " + authors[j]); newItem.creators.push(Zotero.Utilities.cleanAuthor(authors[j].text().toString(),type,true)); } } if (citation.dc_date.length()) { var dates = citation.dc_date; newItem.date = Zotero.Utilities.cleanString(dates[0].text().toString()); } if (citation.dc_description.length()) { var descriptions = citation.dc_description; for (var j=0; j<descriptions.length(); j++) { var noteStr = Zotero.Utilities.cleanString(descriptions[j].text().toString()); newItem.notes.push({note:noteStr}); } } if (citation.dc_subject.length()) { var subjects = citation.dc_subject; for (var j=0; j<subjects.length(); j++) { var subjectValue = Zotero.Utilities.cleanString(subjects[j].text().toString()); newItem.tags.push(subjectValue); } } if (citation.dc_identifier.length()) { var identifiers = citation.dc_identifier; for (var j=0; j<identifiers.length(); j++) { var identifier = Zotero.Utilities.cleanString(identifiers[j].text().toString()); if (identifier.substr(0, 4) == "doi:") { newItem.DOI = identifier; } else if (identifier.substr(0, 7) == "http://") { newItem.url = identifier; } else { newItem.extra = identifier; } } } var articleID = ""; if (xml.GetRecord.record.header.identifier.length()) { articleID = xml.GetRecord.record.header.identifier.text().toString(); articleID = articleID.substr(14); newItem.publicationTitle = articleID; }// TODO add "arXiv.org" to bib data? newItem.attachments.push({url:newItem.url, title:"DTIC Snapshot", mimeType:"text/html"}); if (newItem.notes[0]['note']) { newItem.abstractNote = newItem.notes[0]['note']; newItem.notes = new Array(); } newItem.complete(); }, function() {Zotero.done();}, null);
var identifier = Zotero.Utilities.cleanString(identifiers[j].text().toString());
var identifier = Zotero.Utilities.trimInternal(identifiers[j].text().toString());
Zotero.Utilities.HTTP.doGet(newURIs, function(text) { var newItem = new Zotero.Item("report"); // remove header text = text.replace(/<!DOCTYPE[^>]*>/, "").replace(/<\?xml[^>]*\?>/, ""); // fix non-compliant XML tags (colons) text = text.replace(/<dc:/g, "<dc_").replace(/<\/dc:/g, "</dc_"); text = text.replace(/<oai_dc:dc/g, "<oai_dc_dc").replace(/<\/oai_dc:dc/g, "</oai_dc_dc"); text = text.replace(/<OAI-PMH[^>]*>/, "").replace(/<\/OAI-PMH[^>]*>/, ""); text = "<zotero>" + text + "</zotero>"; var xml = new XML(text); var title; var citation = xml.GetRecord.record.metadata.oai_dc_dc; var test = xml..responseDate.text().toString(); if (citation.dc_title.length()){ title = Zotero.Utilities.trimInternal(citation.dc_title.text().toString()); newItem.title = title; } Zotero.debug("article title: " + title); var type = ""; if(citation.dc_creator.length()) { var authors = citation.dc_creator; for(var j=0; j<authors.length(); j++) { Zotero.debug("author: " + authors[j]); newItem.creators.push(Zotero.Utilities.cleanAuthor(authors[j].text().toString(),type,true)); } } if (citation.dc_date.length()) { var dates = citation.dc_date; newItem.date = Zotero.Utilities.cleanString(dates[0].text().toString()); } if (citation.dc_description.length()) { var descriptions = citation.dc_description; for (var j=0; j<descriptions.length(); j++) { var noteStr = Zotero.Utilities.cleanString(descriptions[j].text().toString()); newItem.notes.push({note:noteStr}); } } if (citation.dc_subject.length()) { var subjects = citation.dc_subject; for (var j=0; j<subjects.length(); j++) { var subjectValue = Zotero.Utilities.cleanString(subjects[j].text().toString()); newItem.tags.push(subjectValue); } } if (citation.dc_identifier.length()) { var identifiers = citation.dc_identifier; for (var j=0; j<identifiers.length(); j++) { var identifier = Zotero.Utilities.cleanString(identifiers[j].text().toString()); if (identifier.substr(0, 4) == "doi:") { newItem.DOI = identifier; } else if (identifier.substr(0, 7) == "http://") { newItem.url = identifier; } else { newItem.extra = identifier; } } } var articleID = ""; if (xml.GetRecord.record.header.identifier.length()) { articleID = xml.GetRecord.record.header.identifier.text().toString(); articleID = articleID.substr(14); newItem.publicationTitle = articleID; }// TODO add "arXiv.org" to bib data? newItem.attachments.push({url:newItem.url, title:"DTIC Snapshot", mimeType:"text/html"}); if (newItem.notes[0]['note']) { newItem.abstractNote = newItem.notes[0]['note']; newItem.notes = new Array(); } newItem.complete(); }, function() {Zotero.done();}, null);
line.each(function(el) { if (word_list.length !== 0) { if (word_list[0].skip) { switch (word_list[0].to) { case 'next': if (el.el_type === 'note' && el.pitch !== null && !inSlur) word_list.shift(); break; case 'slur': if (el.el_type === 'note' && el.pitch !== null) word_list.shift(); break; case 'bar': if (el.el_type === 'bar') word_list.shift(); break; } } else { if (el.el_type === 'note' && el.pitch !== null && !inSlur) { var lyric = word_list.shift(); if (el.lyric === undefined) el.lyric = [ lyric ]; else el.lyric.push(lyric); } } } });
if (legalAccents.detect(function(acc) { return (ret[1] === acc); }))
line.each(function(el) { if (word_list.length !== 0) { if (word_list[0].skip) { switch (word_list[0].to) { case 'next': if (el.el_type === 'note' && el.pitch !== null && !inSlur) word_list.shift(); break; case 'slur': if (el.el_type === 'note' && el.pitch !== null) word_list.shift(); break; case 'bar': if (el.el_type === 'bar') word_list.shift(); break; } } else { if (el.el_type === 'note' && el.pitch !== null && !inSlur) { var lyric = word_list.shift(); if (el.lyric === undefined) el.lyric = [ lyric ]; else el.lyric.push(lyric); } }// if (el.endSlur === true || el.endTie === true)// inSlur = false;// if (el.startSlur === true || el.startTie === true)// inSlur = true; } });
searchTypes.splice( 0, 0, { value : 'quick', text : 'Keyword Search',
searchTypes.push( { value : 'classname', text : 'Classname Search',
Sonatype.Events.addListener('searchTypeInit', function(searchTypes, panel) { //keyword is the default, we always want first in list searchTypes.splice( 0, 0, { value : 'quick', text : 'Keyword Search', scope : panel, handler : panel.switchSearchType, defaultQuickSearch : true, // use the default store store : null, showArtifactContainer : function() { return false; }, columnModel : new Ext.grid.ColumnModel({ columns: [ { id: 'group', header: "Group", dataIndex: 'groupId', sortable:true }, { id: 'artifact', header: "Artifact", dataIndex: 'artifactId', sortable:true }, { id: 'version', header: "Version", dataIndex: 'version', sortable:true, renderer: panel.grid.formatVersionLink }, { id: 'packaging', header: "Packaging", dataIndex: 'packaging', sortable:true, renderer: panel.grid.formatPackagingLink }, { id: 'classifier', header: "Classifier", dataIndex: 'classifier', sortable:true, renderer: panel.grid.formatClassifierLink } ] }), quickSearchCheckHandler : function(panel, value) { return true; }, quickSearchHandler : function(panel, value) { panel.getTopToolbar().items.itemAt(1).setRawValue(value); }, searchHandler : function(panel) { var value = panel.getTopToolbar().items.itemAt(1).getRawValue(); if (value) { panel.grid.store.baseParams = {}; panel.grid.store.baseParams['q'] = value; panel.fetchRecords(panel); } }, applyBookmarkHandler : function(panel, data) { panel.getTopToolbar().items.itemAt(1).setRawValue(data[1]); panel.startSearch(panel, false); }, getBookmarkHandler : function(panel) { var result = panel.searchTypeButton.value; result += '~'; result += panel.getTopToolbar().items.itemAt(1).getRawValue(); return result; }, panelItems : [ { xtype : 'nexussearchfield', name : 'single-search-field', searchPanel : panel, width : 300 } ] });});
handler : panel.switchSearchType, defaultQuickSearch : true,
Sonatype.Events.addListener('searchTypeInit', function(searchTypes, panel) { //keyword is the default, we always want first in list searchTypes.splice( 0, 0, { value : 'quick', text : 'Keyword Search', scope : panel, handler : panel.switchSearchType, defaultQuickSearch : true, // use the default store store : null, showArtifactContainer : function() { return false; }, columnModel : new Ext.grid.ColumnModel({ columns: [ { id: 'group', header: "Group", dataIndex: 'groupId', sortable:true }, { id: 'artifact', header: "Artifact", dataIndex: 'artifactId', sortable:true }, { id: 'version', header: "Version", dataIndex: 'version', sortable:true, renderer: panel.grid.formatVersionLink }, { id: 'packaging', header: "Packaging", dataIndex: 'packaging', sortable:true, renderer: panel.grid.formatPackagingLink }, { id: 'classifier', header: "Classifier", dataIndex: 'classifier', sortable:true, renderer: panel.grid.formatClassifierLink } ] }), quickSearchCheckHandler : function(panel, value) { return true; }, quickSearchHandler : function(panel, value) { panel.getTopToolbar().items.itemAt(1).setRawValue(value); }, searchHandler : function(panel) { var value = panel.getTopToolbar().items.itemAt(1).getRawValue(); if (value) { panel.grid.store.baseParams = {}; panel.grid.store.baseParams['q'] = value; panel.fetchRecords(panel); } }, applyBookmarkHandler : function(panel, data) { panel.getTopToolbar().items.itemAt(1).setRawValue(data[1]); panel.startSearch(panel, false); }, getBookmarkHandler : function(panel) { var result = panel.searchTypeButton.value; result += '~'; result += panel.getTopToolbar().items.itemAt(1).getRawValue(); return result; }, panelItems : [ { xtype : 'nexussearchfield', name : 'single-search-field', searchPanel : panel, width : 300 } ] });});
showArtifactContainer : function() { return false; }, columnModel : new Ext.grid.ColumnModel({ columns: [ { id: 'group', header: "Group", dataIndex: 'groupId', sortable:true }, { id: 'artifact', header: "Artifact", dataIndex: 'artifactId', sortable:true }, { id: 'version', header: "Version", dataIndex: 'version', sortable:true, renderer: panel.grid.formatVersionLink }, { id: 'packaging', header: "Packaging", dataIndex: 'packaging', sortable:true, renderer: panel.grid.formatPackagingLink }, { id: 'classifier', header: "Classifier", dataIndex: 'classifier', sortable:true, renderer: panel.grid.formatClassifierLink } ] }),
handler : panel.switchSearchType,
Sonatype.Events.addListener('searchTypeInit', function(searchTypes, panel) { //keyword is the default, we always want first in list searchTypes.splice( 0, 0, { value : 'quick', text : 'Keyword Search', scope : panel, handler : panel.switchSearchType, defaultQuickSearch : true, // use the default store store : null, showArtifactContainer : function() { return false; }, columnModel : new Ext.grid.ColumnModel({ columns: [ { id: 'group', header: "Group", dataIndex: 'groupId', sortable:true }, { id: 'artifact', header: "Artifact", dataIndex: 'artifactId', sortable:true }, { id: 'version', header: "Version", dataIndex: 'version', sortable:true, renderer: panel.grid.formatVersionLink }, { id: 'packaging', header: "Packaging", dataIndex: 'packaging', sortable:true, renderer: panel.grid.formatPackagingLink }, { id: 'classifier', header: "Classifier", dataIndex: 'classifier', sortable:true, renderer: panel.grid.formatClassifierLink } ] }), quickSearchCheckHandler : function(panel, value) { return true; }, quickSearchHandler : function(panel, value) { panel.getTopToolbar().items.itemAt(1).setRawValue(value); }, searchHandler : function(panel) { var value = panel.getTopToolbar().items.itemAt(1).getRawValue(); if (value) { panel.grid.store.baseParams = {}; panel.grid.store.baseParams['q'] = value; panel.fetchRecords(panel); } }, applyBookmarkHandler : function(panel, data) { panel.getTopToolbar().items.itemAt(1).setRawValue(data[1]); panel.startSearch(panel, false); }, getBookmarkHandler : function(panel) { var result = panel.searchTypeButton.value; result += '~'; result += panel.getTopToolbar().items.itemAt(1).getRawValue(); return result; }, panelItems : [ { xtype : 'nexussearchfield', name : 'single-search-field', searchPanel : panel, width : 300 } ] });});
return true;
return value.search(/^[a-z.]*[A-Z]/) == 0;
Sonatype.Events.addListener('searchTypeInit', function(searchTypes, panel) { //keyword is the default, we always want first in list searchTypes.splice( 0, 0, { value : 'quick', text : 'Keyword Search', scope : panel, handler : panel.switchSearchType, defaultQuickSearch : true, // use the default store store : null, showArtifactContainer : function() { return false; }, columnModel : new Ext.grid.ColumnModel({ columns: [ { id: 'group', header: "Group", dataIndex: 'groupId', sortable:true }, { id: 'artifact', header: "Artifact", dataIndex: 'artifactId', sortable:true }, { id: 'version', header: "Version", dataIndex: 'version', sortable:true, renderer: panel.grid.formatVersionLink }, { id: 'packaging', header: "Packaging", dataIndex: 'packaging', sortable:true, renderer: panel.grid.formatPackagingLink }, { id: 'classifier', header: "Classifier", dataIndex: 'classifier', sortable:true, renderer: panel.grid.formatClassifierLink } ] }), quickSearchCheckHandler : function(panel, value) { return true; }, quickSearchHandler : function(panel, value) { panel.getTopToolbar().items.itemAt(1).setRawValue(value); }, searchHandler : function(panel) { var value = panel.getTopToolbar().items.itemAt(1).getRawValue(); if (value) { panel.grid.store.baseParams = {}; panel.grid.store.baseParams['q'] = value; panel.fetchRecords(panel); } }, applyBookmarkHandler : function(panel, data) { panel.getTopToolbar().items.itemAt(1).setRawValue(data[1]); panel.startSearch(panel, false); }, getBookmarkHandler : function(panel) { var result = panel.searchTypeButton.value; result += '~'; result += panel.getTopToolbar().items.itemAt(1).getRawValue(); return result; }, panelItems : [ { xtype : 'nexussearchfield', name : 'single-search-field', searchPanel : panel, width : 300 } ] });});
panel.grid.store.baseParams['q'] = value;
panel.grid.store.baseParams['cn'] = value;
Sonatype.Events.addListener('searchTypeInit', function(searchTypes, panel) { //keyword is the default, we always want first in list searchTypes.splice( 0, 0, { value : 'quick', text : 'Keyword Search', scope : panel, handler : panel.switchSearchType, defaultQuickSearch : true, // use the default store store : null, showArtifactContainer : function() { return false; }, columnModel : new Ext.grid.ColumnModel({ columns: [ { id: 'group', header: "Group", dataIndex: 'groupId', sortable:true }, { id: 'artifact', header: "Artifact", dataIndex: 'artifactId', sortable:true }, { id: 'version', header: "Version", dataIndex: 'version', sortable:true, renderer: panel.grid.formatVersionLink }, { id: 'packaging', header: "Packaging", dataIndex: 'packaging', sortable:true, renderer: panel.grid.formatPackagingLink }, { id: 'classifier', header: "Classifier", dataIndex: 'classifier', sortable:true, renderer: panel.grid.formatClassifierLink } ] }), quickSearchCheckHandler : function(panel, value) { return true; }, quickSearchHandler : function(panel, value) { panel.getTopToolbar().items.itemAt(1).setRawValue(value); }, searchHandler : function(panel) { var value = panel.getTopToolbar().items.itemAt(1).getRawValue(); if (value) { panel.grid.store.baseParams = {}; panel.grid.store.baseParams['q'] = value; panel.fetchRecords(panel); } }, applyBookmarkHandler : function(panel, data) { panel.getTopToolbar().items.itemAt(1).setRawValue(data[1]); panel.startSearch(panel, false); }, getBookmarkHandler : function(panel) { var result = panel.searchTypeButton.value; result += '~'; result += panel.getTopToolbar().items.itemAt(1).getRawValue(); return result; }, panelItems : [ { xtype : 'nexussearchfield', name : 'single-search-field', searchPanel : panel, width : 300 } ] });});
var author = Zotero.Utilities.cleanString(doc.evaluate('
var author = Zotero.Utilities.trimInternal(doc.evaluate('
Zotero.Utilities.processDocuments(records, function(doc) { var item = new Zotero.Item("bookSection"); var author = Zotero.Utilities.cleanString(doc.evaluate('//div[@id="content"]/p[strong="Author"]', doc, null, XPathResult.ANY_TYPE, null).iterateNext().lastChild.textContent); item.creators.push(Zotero.Utilities.cleanAuthor(author, "author")); item.title = Zotero.Utilities.cleanString(doc.evaluate('//h1', doc, null, XPathResult.ANY_TYPE, null).iterateNext().textContent); var pubdetails = Zotero.Utilities.cleanString(doc.evaluate('//div[@id="content"]/p[strong="Print Publication Details"]', doc, null, XPathResult.ANY_TYPE, null).iterateNext().textContent); pubdetails = pubdetails.match(/Volume (\d+), ([\w ]+), (\d{4}), p+\.*\s+([\d-]+)/); item.volume = RegExp.$1; item.publisher = RegExp.$2; item.date = RegExp.$3; item.pages = RegExp.$4; item.url = doc.location.href; item.bookTitle = "Australian Dictionary of Biography"; item.place = "Melbourne"; item.repository = "Australian Dictionary of Biography"; var tags = doc.evaluate('//li/a[starts-with(@title, "find people with the occupation")]', doc, nsResolver, XPathResult.ANY_TYPE, null); while (tag = tags.iterateNext()) { item.tags.push(tag.textContent); } item.attachments = [ {url:item.url, title: "Snapshot - " + item.title, mimeType:"text/html"}, ]; item.complete(); }, function() {Zotero.done();});
item.title = Zotero.Utilities.cleanString(doc.evaluate(' var pubdetails = Zotero.Utilities.cleanString(doc.evaluate('
item.title = Zotero.Utilities.trimInternal(doc.evaluate(' var pubdetails = Zotero.Utilities.trimInternal(doc.evaluate('
Zotero.Utilities.processDocuments(records, function(doc) { var item = new Zotero.Item("bookSection"); var author = Zotero.Utilities.cleanString(doc.evaluate('//div[@id="content"]/p[strong="Author"]', doc, null, XPathResult.ANY_TYPE, null).iterateNext().lastChild.textContent); item.creators.push(Zotero.Utilities.cleanAuthor(author, "author")); item.title = Zotero.Utilities.cleanString(doc.evaluate('//h1', doc, null, XPathResult.ANY_TYPE, null).iterateNext().textContent); var pubdetails = Zotero.Utilities.cleanString(doc.evaluate('//div[@id="content"]/p[strong="Print Publication Details"]', doc, null, XPathResult.ANY_TYPE, null).iterateNext().textContent); pubdetails = pubdetails.match(/Volume (\d+), ([\w ]+), (\d{4}), p+\.*\s+([\d-]+)/); item.volume = RegExp.$1; item.publisher = RegExp.$2; item.date = RegExp.$3; item.pages = RegExp.$4; item.url = doc.location.href; item.bookTitle = "Australian Dictionary of Biography"; item.place = "Melbourne"; item.repository = "Australian Dictionary of Biography"; var tags = doc.evaluate('//li/a[starts-with(@title, "find people with the occupation")]', doc, nsResolver, XPathResult.ANY_TYPE, null); while (tag = tags.iterateNext()) { item.tags.push(tag.textContent); } item.attachments = [ {url:item.url, title: "Snapshot - " + item.title, mimeType:"text/html"}, ]; item.complete(); }, function() {Zotero.done();});
var el = els().eq(index); if (!e.isDefaultPrevented() && el.length) { els().removeClass(cls).eq(index).addClass(cls); }
setTimeout(function() { if (!e.isDefaultPrevented()) { var el = els().eq(index); if (!e.isDefaultPrevented() && el.length) { els().removeClass(cls).eq(index).addClass(cls); } } }, 1);
this.each(function() { var api = $(this).data("scrollable"), navi = find(api.getRoot(), conf.navi), buttons = api.getNaviButtons(), cls = conf.activeClass, history = conf.history && $.fn.history; // @deprecated stuff if (api) { ret = api; } api.getNaviButtons = function() { return buttons.add(navi); }; function doClick(el, i, e) { api.seekTo(i); if (history) { if (location.hash) { location.hash = el.attr("href").replace("#", ""); } } else { return e.preventDefault(); } } function els() { return navi.find(conf.naviItem || '> *'); } function addItem(i) { var item = $("<" + (conf.naviItem || 'a') + "/>").click(function(e) { doClick($(this), i, e); }).attr("href", "#" + i); // index number / id attribute if (i === 0) { item.addClass(cls); } if (conf.indexed) { item.text(i + 1); } if (conf.idPrefix) { item.attr("id", conf.idPrefix + i); } return item.appendTo(navi); } // generate navigator if (els().length) { els().each(function(i) { $(this).click(function(e) { doClick($(this), i, e); }); }); } else { $.each(api.getItems(), function(i) { addItem(i); }); } // activate correct entry api.onBeforeSeek(function(e, index) { var el = els().eq(index); if (!e.isDefaultPrevented() && el.length) { els().removeClass(cls).eq(index).addClass(cls); } }); function doHistory(evt, hash) { var el = els().eq(hash.replace("#", "")); if (!el.length) { el = els().filter("[href=" + hash + "]"); } el.click(); } // new item being added api.onAddItem(function(e, item) { item = addItem(api.getItems().index(item)); if (history) { item.history(doHistory); } }); if (history) { els().history(doHistory); } });
a.id;r=false}else if($(a).hasClass("Wt-suggest-dropdown")&&b.keyCode==40){i=a.id;r=true}else{i=null;return true}var k=n?e.getElement(n):null;if(g()&&k)if(b.keyCode==13||b.keyCode==9){u(k);e.cancelEvent(b);setTimeout(function(){a.focus()},0);return false}else if(b.keyCode==40||b.keyCode==38||b.keyCode==34||b.keyCode==33){if(b.type.toUpperCase()=="KEYDOWN"){G=true;e.cancelEvent(b,e.CancelDefaultAction)}if(b.type.toUpperCase()=="KEYPRESS"&&G==true){e.cancelEvent(b);return false}var l=k,p=b.keyCode==
b.keyCode==40){i=a.id;r=true}else{i=null;return true}var k=n?e.getElement(n):null;if(g()&&k)if(b.keyCode==13||b.keyCode==9){t(k);e.cancelEvent(b);setTimeout(function(){a.focus()},0);return false}else if(b.keyCode==40||b.keyCode==38||b.keyCode==34||b.keyCode==33){if(b.type.toUpperCase()=="KEYDOWN"){G=true;e.cancelEvent(b,e.CancelDefaultAction)}if(b.type.toUpperCase()=="KEYPRESS"&&G==true){e.cancelEvent(b);return false}var l=k,p=b.keyCode==40||b.keyCode==34;b=b.keyCode==34||b.keyCode==33?f.clientHeight/
a.id;r=false}else if($(a).hasClass("Wt-suggest-dropdown")&&b.keyCode==40){i=a.id;r=true}else{i=null;return true}var k=n?e.getElement(n):null;if(g()&&k)if(b.keyCode==13||b.keyCode==9){u(k);e.cancelEvent(b);setTimeout(function(){a.focus()},0);return false}else if(b.keyCode==40||b.keyCode==38||b.keyCode==34||b.keyCode==33){if(b.type.toUpperCase()=="KEYDOWN"){G=true;e.cancelEvent(b,e.CancelDefaultAction)}if(b.type.toUpperCase()=="KEYPRESS"&&G==true){e.cancelEvent(b);return false}var l=k,p=b.keyCode==
newItem.tags.push(Zotero.Utilities.cleanString(tags[j]));
newItem.tags.push(Zotero.Utilities.trimInternal(tags[j]));
Zotero.Utilities.HTTP.doGet(host+getString1+title+getString2, function(text){ var tagRe = new RegExp('>'+title+'</a>[^\[]*\\[([^\\]]*)\]', 'i'); var m = tagRe.exec(text); if(m[1] != "unclassified"){ var tagstring = m[1].replace("&amp;", "&", "g"); var tags = tagstring.split(";") for(var j in tags) { newItem.tags.push(Zotero.Utilities.cleanString(tags[j])); } } var authorRe = new RegExp('>'+title+'</a>,([^,]*),', "i"); var m = authorRe.exec(text); var author = m[1]; author = Zotero.Utilities.cleanString(author); // reconcile author author = reconcileAuthor(author); if (author!="NA"){ // ignore unknown authors newItem.creators.push(Zotero.Utilities.cleanAuthor(author, "author", true)); } newItem.creators.push({firstName:"Denis", lastName:"Diderot", creatorType:"editor"}); newItem.creators.push({firstName:"Jean le Rond", lastName:"d'Alembert", creatorType:"editor"}); newItem.complete(); }, function() {Zotero.done();}, null);
author = Zotero.Utilities.cleanString(author);
author = Zotero.Utilities.trimInternal(author);
Zotero.Utilities.HTTP.doGet(host+getString1+title+getString2, function(text){ var tagRe = new RegExp('>'+title+'</a>[^\[]*\\[([^\\]]*)\]', 'i'); var m = tagRe.exec(text); if(m[1] != "unclassified"){ var tagstring = m[1].replace("&amp;", "&", "g"); var tags = tagstring.split(";") for(var j in tags) { newItem.tags.push(Zotero.Utilities.cleanString(tags[j])); } } var authorRe = new RegExp('>'+title+'</a>,([^,]*),', "i"); var m = authorRe.exec(text); var author = m[1]; author = Zotero.Utilities.cleanString(author); // reconcile author author = reconcileAuthor(author); if (author!="NA"){ // ignore unknown authors newItem.creators.push(Zotero.Utilities.cleanAuthor(author, "author", true)); } newItem.creators.push({firstName:"Denis", lastName:"Diderot", creatorType:"editor"}); newItem.creators.push({firstName:"Jean le Rond", lastName:"d'Alembert", creatorType:"editor"}); newItem.complete(); }, function() {Zotero.done();}, null);
if(!u.replace(w,w.getValueOf('replace','txtFindReplace'),w.getValueOf('replace','txtReplace'),w.getValueOf('replace','txtReplaceCaseChk'),w.getValueOf('replace','txtReplaceWordChk'),w.getValueOf('replace','txtReplaceCyclic')))alert(h.lang.findAndReplace.notFoundMsg);}}]},{type:'hbox',widths:['230px','90px'],children:[{type:'text',id:'txtReplace',label:h.lang.findAndReplace.replaceWith,isChanged:false,labelLayout:'horizontal',accessKey:'R'},{type:'button',align:'left',style:'width:100%',label:h.lang.findAndReplace.replaceAll,isChanged:false,onClick:function(){var w=this.getDialog(),x;u.replaceCounter=0;u.searchRange=v(true);if(u.matchRange){u.matchRange.removeHighlight();u.matchRange=null;}h.fire('saveSnapshot');while(u.replace(w,w.getValueOf('replace','txtFindReplace'),w.getValueOf('replace','txtReplace'),w.getValueOf('replace','txtReplaceCaseChk'),w.getValueOf('replace','txtReplaceWordChk'),false,true)){}if(u.replaceCounter){alert(h.lang.findAndReplace.replaceSuccessMsg.replace(/%1/,u.replaceCounter));h.fire('saveSnapshot');}else alert(h.lang.findAndReplace.notFoundMsg);}}]},{type:'vbox',padding:0,children:[{type:'checkbox',id:'txtReplaceCaseChk',isChanged:false,label:h.lang.findAndReplace.matchCase},{type:'checkbox',id:'txtReplaceWordChk',isChanged:false,label:h.lang.findAndReplace.matchWord},{type:'checkbox',id:'txtReplaceCyclic',isChanged:false,'default':true,label:h.lang.findAndReplace.matchCyclic}]}]}],onLoad:function(){var w=this,x,y,z=false;this.on('hide',function(){z=false;});this.on('show',function(){z=true;});this.selectPage=CKEDITOR.tools.override(this.selectPage,function(A){return function(B){A.call(w,B);var C=w._.tabs[B],D,E,F;E=B==='find'?'txtFindFind':'txtFindReplace';F=B==='find'?'txtFindWordChk':'txtReplaceWordChk';x=w.getContentElement(B,E);y=w.getContentElement(B,F);if(!C.initialized){D=CKEDITOR.document.getById(x._.inputId);C.initialized=true;}if(z)f.call(this,B);};});},onShow:function(){u.searchRange=v();this.selectPage(i);},onHide:function(){var w;if(u.matchRange&&u.matchRange.isMatched()){u.matchRange.removeHighlight();h.focus();w=u.matchRange.toDomRange();if(w)h.getSelection().selectRanges([w]);}delete u.matchRange;},onFocus:function(){if(i=='replace')return this.getContentElement('replace','txtFindReplace');else return this.getContentElement('find','txtFindFind');}};};CKEDITOR.dialog.add('find',function(h){return g(h,'find');});CKEDITOR.dialog.add('replace',function(h){return g(h,'replace');});})();
if(!v.replace(x,x.getValueOf('replace','txtFindReplace'),x.getValueOf('replace','txtReplace'),x.getValueOf('replace','txtReplaceCaseChk'),x.getValueOf('replace','txtReplaceWordChk'),x.getValueOf('replace','txtReplaceCyclic')))alert(i.lang.findAndReplace.notFoundMsg);}}]},{type:'hbox',widths:['230px','90px'],children:[{type:'text',id:'txtReplace',label:i.lang.findAndReplace.replaceWith,isChanged:false,labelLayout:'horizontal',accessKey:'R'},{type:'button',align:'left',style:'width:100%',label:i.lang.findAndReplace.replaceAll,isChanged:false,onClick:function(){var x=this.getDialog(),y;v.replaceCounter=0;v.searchRange=w(true);if(v.matchRange){v.matchRange.removeHighlight();v.matchRange=null;}i.fire('saveSnapshot');while(v.replace(x,x.getValueOf('replace','txtFindReplace'),x.getValueOf('replace','txtReplace'),x.getValueOf('replace','txtReplaceCaseChk'),x.getValueOf('replace','txtReplaceWordChk'),false,true)){}if(v.replaceCounter){alert(i.lang.findAndReplace.replaceSuccessMsg.replace(/%1/,v.replaceCounter));i.fire('saveSnapshot');}else alert(i.lang.findAndReplace.notFoundMsg);}}]},{type:'vbox',padding:0,children:[{type:'checkbox',id:'txtReplaceCaseChk',isChanged:false,label:i.lang.findAndReplace.matchCase},{type:'checkbox',id:'txtReplaceWordChk',isChanged:false,label:i.lang.findAndReplace.matchWord},{type:'checkbox',id:'txtReplaceCyclic',isChanged:false,'default':true,label:i.lang.findAndReplace.matchCyclic}]}]}],onLoad:function(){var x=this,y,z,A=false;this.on('hide',function(){A=false;});this.on('show',function(){A=true;});this.selectPage=CKEDITOR.tools.override(this.selectPage,function(B){return function(C){B.call(x,C);var D=x._.tabs[C],E,F,G;F=C==='find'?'txtFindFind':'txtFindReplace';G=C==='find'?'txtFindWordChk':'txtReplaceWordChk';y=x.getContentElement(C,F);z=x.getContentElement(C,G);if(!D.initialized){E=CKEDITOR.document.getById(y._.inputId);D.initialized=true;}if(A)g.call(this,C);};});},onShow:function(){v.searchRange=w();this.selectPage(j);},onHide:function(){var x;if(v.matchRange&&v.matchRange.isMatched()){v.matchRange.removeHighlight();i.focus();x=v.matchRange.toDomRange();if(x)i.getSelection().selectRanges([x]);}delete v.matchRange;},onFocus:function(){if(j=='replace')return this.getContentElement('replace','txtFindReplace');else return this.getContentElement('find','txtFindFind');}};};CKEDITOR.dialog.add('find',function(i){return h(i,'find');});CKEDITOR.dialog.add('replace',function(i){return h(i,'replace');});})();
if(!u.replace(w,w.getValueOf('replace','txtFindReplace'),w.getValueOf('replace','txtReplace'),w.getValueOf('replace','txtReplaceCaseChk'),w.getValueOf('replace','txtReplaceWordChk'),w.getValueOf('replace','txtReplaceCyclic')))alert(h.lang.findAndReplace.notFoundMsg);}}]},{type:'hbox',widths:['230px','90px'],children:[{type:'text',id:'txtReplace',label:h.lang.findAndReplace.replaceWith,isChanged:false,labelLayout:'horizontal',accessKey:'R'},{type:'button',align:'left',style:'width:100%',label:h.lang.findAndReplace.replaceAll,isChanged:false,onClick:function(){var w=this.getDialog(),x;u.replaceCounter=0;u.searchRange=v(true);if(u.matchRange){u.matchRange.removeHighlight();u.matchRange=null;}h.fire('saveSnapshot');while(u.replace(w,w.getValueOf('replace','txtFindReplace'),w.getValueOf('replace','txtReplace'),w.getValueOf('replace','txtReplaceCaseChk'),w.getValueOf('replace','txtReplaceWordChk'),false,true)){}if(u.replaceCounter){alert(h.lang.findAndReplace.replaceSuccessMsg.replace(/%1/,u.replaceCounter));h.fire('saveSnapshot');}else alert(h.lang.findAndReplace.notFoundMsg);}}]},{type:'vbox',padding:0,children:[{type:'checkbox',id:'txtReplaceCaseChk',isChanged:false,label:h.lang.findAndReplace.matchCase},{type:'checkbox',id:'txtReplaceWordChk',isChanged:false,label:h.lang.findAndReplace.matchWord},{type:'checkbox',id:'txtReplaceCyclic',isChanged:false,'default':true,label:h.lang.findAndReplace.matchCyclic}]}]}],onLoad:function(){var w=this,x,y,z=false;this.on('hide',function(){z=false;});this.on('show',function(){z=true;});this.selectPage=CKEDITOR.tools.override(this.selectPage,function(A){return function(B){A.call(w,B);var C=w._.tabs[B],D,E,F;E=B==='find'?'txtFindFind':'txtFindReplace';F=B==='find'?'txtFindWordChk':'txtReplaceWordChk';x=w.getContentElement(B,E);y=w.getContentElement(B,F);if(!C.initialized){D=CKEDITOR.document.getById(x._.inputId);C.initialized=true;}if(z)f.call(this,B);};});},onShow:function(){u.searchRange=v();this.selectPage(i);},onHide:function(){var w;if(u.matchRange&&u.matchRange.isMatched()){u.matchRange.removeHighlight();h.focus();w=u.matchRange.toDomRange();if(w)h.getSelection().selectRanges([w]);}delete u.matchRange;},onFocus:function(){if(i=='replace')return this.getContentElement('replace','txtFindReplace');else return this.getContentElement('find','txtFindFind');}};};CKEDITOR.dialog.add('find',function(h){return g(h,'find');});CKEDITOR.dialog.add('replace',function(h){return g(h,'replace');});})();
else { interceptClickEvent = true; }
element.observe("click", function(event) { if (interceptClickEvent) { event.stop(); if ($(element).hasClassName('tx-disable-confirm')) { doAction(); return; } runModalDialog(doAction); } });
body.id = configId;
body.id = config.id;
this.frame.addEventListener('load', function(e) { var frame = config.frame; var body = frame.contentDocument.getElementsByTagName('body')[0]; body.id = configId; // Allows for prefixing styles with "#GM_config" buildConfigWin(body, frame.contentDocument.getElementsByTagName('head')[0]); }, false);
conf[key] = parseFloat(val, 10);
if (val || val === 0) {; conf[key] = parseFloat(val, 10); }
$.each("min,max,step,value".split(","), function(i, key) { var val = input.attr(key); conf[key] = parseFloat(val, 10); });
$.post($(this).attr("href"), function(data) {
$.get($(this).attr("href"), function(data) {
$(document).ready(function() { /** * Handle the OpenID information Box. * It will open / hide the little popup */ $("#ShowOpenIDdesc").click(function() { if($("#OpenIDDescription").hasClass("showing")) { $("#OpenIDDescription").hide().removeClass("showing"); } else { $("#OpenIDDescription").show().addClass("showing"); } return false; }); $("#HideOpenIDdesc").click(function() { $("#OpenIDDescription").hide(); return false; }); /** * BBCode Tools * While editing / replying to a post you can get a little popup * with all the BBCode tags */ $("#BBCodeHint").click(function() { if($("#BBTagsHolder").hasClass("showing")) { $(this).text("View Formatting Help"); $("#BBTagsHolder").hide().removeClass("showing"); } else { $(this).text("Hide Formatting Help"); $("#BBTagsHolder").show().addClass("showing"); } return false; }); /** * MultiFile Uploader called on Reply and Edit Forms */ $('#Form_ReplyForm_Attachment').MultiFile(); $('#Form_EditPostForm_Attachment').MultiFile(); /** * Delete post Link. * Add a popup to make sure user actually wants to do * the dirty and remove that wonderful post */ $('.postModifiers a.deletelink').click(function(){ if($(this).attr('id')== 'firstPost') { if(!confirm("Are you sure you wish to delete this thread?\nNote: This will delete ALL posts in this thread.")) return false; } else { if(!confirm("Are you sure you wish to delete this post?")) return false; } var id = $(this).attr("rel"); $.post($(this).attr("href"), function(data) { if(data == 1) { // was successful $("ul#Posts li#post"+id).fadeOut(); } else eval(data); }); return false; }); /** * Mark Post as Spam Link. * It needs to warn the user that the post will be deleted */ $('.postModifiers a.markAsSpamLink').click(function(){ if(!confirm("Are you sure you wish to mark this post as spam?")) return false; var id = $(this).attr("rel"); $.post($(this).attr("href"), function(data) { if(data == 1) { // was successful $("ul#Posts li#post"+id).fadeOut(); } }); return false; }); /** * Delete an Attachment via AJAX */ $('a.deleteAttachment').click(function() { if(!confirm("Are you sure you wish to delete this Attachment")) return false; var id = $(this).attr("rel"); $.post($(this).attr("href"), function(data) { if(data == 1) { $("#CurrentAttachments li.attachment-"+id).fadeOut(); // hide the deleted attachment } }); return false; }); /** * Do the Subscribe / Unsubscribe button */ $("td.replyButton a.subscribe").click(function() { $.post($(this).attr("href"), function(data) { if(data == 1) { $("td.replyButton a.subscribe").fadeOut().hide(); $("td.replyButton a.unsubscribe").fadeIn(); } }); return false; }); $("td.replyButton a.unsubscribe").click(function() { $.post($(this).attr("href"), function(data) { if(data == 1) { $("td.replyButton a.unsubscribe").fadeOut().hide(); $("td.replyButton a.subscribe").fadeIn(); } }); return false; });})
validator = $(form).find('form').validate();
$form = $(formContainer).find('form'); validator = $form.validate();
dialogOptions[okButton] = function() { validator = $(form).find('form').validate(); // Post to server and construct callback if ($(form).find('form').valid()) { $.post( $(form).attr("action"), $(form).serialize(), function(returnString) { if (returnString.status == true) { updateItem(actType, actOnId, returnString.content); $('#' + UID).dialog("close"); } else { // Display errors in error list $('#formErrors .formErrorList').html(returnString.content); } }, "json" ); } };
if ($(form).find('form').valid()) {
if ($form.valid()) {
dialogOptions[okButton] = function() { validator = $(form).find('form').validate(); // Post to server and construct callback if ($(form).find('form').valid()) { $.post( $(form).attr("action"), $(form).serialize(), function(returnString) { if (returnString.status == true) { updateItem(actType, actOnId, returnString.content); $('#' + UID).dialog("close"); } else { // Display errors in error list $('#formErrors .formErrorList').html(returnString.content); } }, "json" ); } };
$(form).attr("action"), $(form).serialize(),
$form.attr("action"), $form.serialize(),
dialogOptions[okButton] = function() { validator = $(form).find('form').validate(); // Post to server and construct callback if ($(form).find('form').valid()) { $.post( $(form).attr("action"), $(form).serialize(), function(returnString) { if (returnString.status == true) { updateItem(actType, actOnId, returnString.content); $('#' + UID).dialog("close"); } else { // Display errors in error list $('#formErrors .formErrorList').html(returnString.content); } }, "json" ); } };
validator = null;
dialogOptions[okButton] = function() { validator = $(form).find('form').validate(); // Post to server and construct callback if ($(form).find('form').valid()) { $.post( $(form).attr("action"), $(form).serialize(), function(returnString) { if (returnString.status == true) { updateItem(actType, actOnId, returnString.content); $('#' + UID).dialog("close"); } else { // Display errors in error list $('#formErrors .formErrorList').html(returnString.content); } }, "json" ); } };
WT_DECLARE_WT_MEMBER(2,"StdLayout.prototype.initResize",function(a,t,g){function n(c){var e,h,i,q=a.getElement(t).firstChild.childNodes;h=e=0;for(i=q.length;h<i;h++){var s=q[h];if(a.hasTag(s,"COLGROUP")){h=-1;q=s.childNodes;i=q.length}if(a.hasTag(s,"COL"))if(s.className!="Wt-vrh")if(e==c)return s;else++e}return null}function d(c,e){if(c.offsetWidth>0)return c.offsetWidth;else{c=m.firstChild.rows[0];var h,i,q,s;q=i=0;for(s=c.childNodes.length;i<s;++i){h=c.childNodes[i];if(h.className!="Wt-vrh"){if(q== e)return h.offsetWidth;q+=h.colSpan}}return 0}}function k(c,e){var h=a.getElement(t).firstChild;n(c).style.width=e+"px";var i,q,s,v;q=i=0;for(s=h.rows.length;i<s;i++){v=h.rows[i];if(v.className!="Wt-hrh"){var w,B,D,F;D=B=0;for(F=v.childNodes.length;B<F;++B){w=v.childNodes[B];if(w.className!="Wt-vrh"){if(w.colSpan==1&&D==c&&w.childNodes.length==1){v=w.firstChild;w=e-r.marginH(v);v.style.width=w+"px";break}D+=w.colSpan}}++q}}}function l(c,e,h){var i=c.firstChild;new a.SizeHandle(a,"v",i.offsetHeight, i.offsetWidth,-c.parentNode.previousSibling.offsetHeight,c.parentNode.nextSibling.offsetHeight,"Wt-vsh",function(q){f(c,e,q)},i,m,h,0,0)}function o(c,e,h){var i=-c.previousSibling.offsetWidth,q=c.nextSibling.offsetWidth,s=c.firstChild,v=a.pxself(u.rows[0].childNodes[0],"paddingTop"),w=a.pxself(u.rows[u.rows.length-1].childNodes[0],"paddingBottom");new a.SizeHandle(a,"h",s.offsetWidth,u.offsetHeight-v-w,i,q,"Wt-hsh",function(B){b(c,e,B)},s,m,h,0,-c.offsetTop+v-a.pxself(c,"paddingTop"))}function f(c, e,h){var i=c.parentNode.previousSibling;c=c.parentNode.nextSibling;var q=i.offsetHeight,s=c.offsetHeight;if(g.stretch[e]>0&&g.stretch[e+1]>0)g.stretch[e]=-1;if(g.stretch[e+1]==0)g.stretch[e+1]=-1;g.stretch[e]<=0&&r.adjustRow(i,q+h);g.stretch[e+1]<=0&&r.adjustRow(c,s-h);a.getElement(t).dirty=true;window.onresize()}function j(){var c,e=0;for(c=0;;++c){var h=n(c);if(h)e+=a.pctself(h,"width");else break}if(e!=0)for(c=0;;++c)if(h=n(c)){var i=a.pctself(h,"width");if(i)h.style.width=i*100/e+"%"}else break} function b(c,e,h){c=n(e);var i=d(c,e),q=n(e+1),s=d(q,e+1);if(a.pctself(c,"width")>0&&a.pctself(q,"width")>0){c.style.width="";j()}a.pctself(c,"width")==0&&k(e,i+h);a.pctself(q,"width")==0&&k(e+1,s-h);window.onresize()}var r=this,m=a.getElement(t);if(m)if(!r.resizeInitialized){var u=m.firstChild,p,x,z,y;x=p=0;for(z=u.rows.length;p<z;p++){y=u.rows[p];if(y.className=="Wt-hrh"){var A=y.firstChild;A.ri=x-1;A.onmousedown=function(c){l(this,this.ri,c||window.event)}}else{var C,E,G;E=C=0;for(G=y.childNodes.length;C< G;++C){A=y.childNodes[C];if(A.className=="Wt-vrh"){A.ci=E-1;A.onmousedown=function(c){o(this,this.ci,c||window.event)}}else E+=A.colSpan}++x}}r.resizeInitialized=true}});
WT_DECLARE_WT_MEMBER(2,"StdLayout.prototype.initResize",function(a,t,i){function o(c){var f,j,l,q=a.getElement(t).firstChild.childNodes;j=f=0;for(l=q.length;j<l;j++){var s=q[j];if(a.hasTag(s,"COLGROUP")){j=-1;q=s.childNodes;l=q.length}if(a.hasTag(s,"COL"))if(s.className!="Wt-vrh")if(f==c)return s;else++f}return null}function d(c,f){if(c.offsetWidth>0)return c.offsetWidth;else{c=n.firstChild.rows[0];var j,l,q,s;q=l=0;for(s=c.childNodes.length;l<s;++l){j=c.childNodes[l];if(j.className!="Wt-vrh"){if(q== f)return j.offsetWidth;q+=j.colSpan}}return 0}}function e(c,f){var j=a.getElement(t).firstChild;o(c).style.width=f+"px";var l,q,s,v;q=l=0;for(s=j.rows.length;l<s;l++){v=j.rows[l];if(v.className!="Wt-hrh"){var w,B,D,F;D=B=0;for(F=v.childNodes.length;B<F;++B){w=v.childNodes[B];if(w.className!="Wt-vrh"){if(w.colSpan==1&&D==c&&w.childNodes.length==1){v=w.firstChild;w=f-r.marginH(v);v.style.width=w+"px";break}D+=w.colSpan}}++q}}}function g(c,f,j){var l=c.firstChild;new a.SizeHandle(a,"v",l.offsetHeight, l.offsetWidth,-c.parentNode.previousSibling.offsetHeight,c.parentNode.nextSibling.offsetHeight,"Wt-vsh",function(q){h(c,f,q)},l,n,j,0,0)}function m(c,f,j){var l=-c.previousSibling.offsetWidth,q=c.nextSibling.offsetWidth,s=c.firstChild,v=a.pxself(u.rows[0].childNodes[0],"paddingTop"),w=a.pxself(u.rows[u.rows.length-1].childNodes[0],"paddingBottom");new a.SizeHandle(a,"h",s.offsetWidth,u.offsetHeight-v-w,l,q,"Wt-hsh",function(B){b(c,f,B)},s,n,j,0,-c.offsetTop+v-a.pxself(c,"paddingTop"))}function h(c, f,j){var l=c.parentNode.previousSibling;c=c.parentNode.nextSibling;var q=l.offsetHeight,s=c.offsetHeight;if(i.stretch[f]>0&&i.stretch[f+1]>0)i.stretch[f]=-1;if(i.stretch[f+1]==0)i.stretch[f+1]=-1;i.stretch[f]<=0&&r.adjustRow(l,q+j);i.stretch[f+1]<=0&&r.adjustRow(c,s-j);a.getElement(t).dirty=true;window.onresize()}function k(){var c,f=0;for(c=0;;++c){var j=o(c);if(j)f+=a.pctself(j,"width");else break}if(f!=0)for(c=0;;++c)if(j=o(c)){var l=a.pctself(j,"width");if(l)j.style.width=l*100/f+"%"}else break} function b(c,f,j){c=o(f);var l=d(c,f),q=o(f+1),s=d(q,f+1);if(a.pctself(c,"width")>0&&a.pctself(q,"width")>0){c.style.width="";k()}a.pctself(c,"width")==0&&e(f,l+j);a.pctself(q,"width")==0&&e(f+1,s-j);window.onresize()}var r=this,n=a.getElement(t);if(n)if(!r.resizeInitialized){var u=n.firstChild,p,x,z,y;x=p=0;for(z=u.rows.length;p<z;p++){y=u.rows[p];if(y.className=="Wt-hrh"){var A=y.firstChild;A.ri=x-1;A.onmousedown=function(c){g(this,this.ri,c||window.event)}}else{var C,E,G;E=C=0;for(G=y.childNodes.length;C< G;++C){A=y.childNodes[C];if(A.className=="Wt-vrh"){A.ci=E-1;A.onmousedown=function(c){m(this,this.ci,c||window.event)}}else E+=A.colSpan}++x}}r.resizeInitialized=true}});
WT_DECLARE_WT_MEMBER(2,"StdLayout.prototype.initResize",function(a,t,g){function n(c){var e,h,i,q=a.getElement(t).firstChild.childNodes;h=e=0;for(i=q.length;h<i;h++){var s=q[h];if(a.hasTag(s,"COLGROUP")){h=-1;q=s.childNodes;i=q.length}if(a.hasTag(s,"COL"))if(s.className!="Wt-vrh")if(e==c)return s;else++e}return null}function d(c,e){if(c.offsetWidth>0)return c.offsetWidth;else{c=m.firstChild.rows[0];var h,i,q,s;q=i=0;for(s=c.childNodes.length;i<s;++i){h=c.childNodes[i];if(h.className!="Wt-vrh"){if(q==e)return h.offsetWidth;q+=h.colSpan}}return 0}}function k(c,e){var h=a.getElement(t).firstChild;n(c).style.width=e+"px";var i,q,s,v;q=i=0;for(s=h.rows.length;i<s;i++){v=h.rows[i];if(v.className!="Wt-hrh"){var w,B,D,F;D=B=0;for(F=v.childNodes.length;B<F;++B){w=v.childNodes[B];if(w.className!="Wt-vrh"){if(w.colSpan==1&&D==c&&w.childNodes.length==1){v=w.firstChild;w=e-r.marginH(v);v.style.width=w+"px";break}D+=w.colSpan}}++q}}}function l(c,e,h){var i=c.firstChild;new a.SizeHandle(a,"v",i.offsetHeight,i.offsetWidth,-c.parentNode.previousSibling.offsetHeight,c.parentNode.nextSibling.offsetHeight,"Wt-vsh",function(q){f(c,e,q)},i,m,h,0,0)}function o(c,e,h){var i=-c.previousSibling.offsetWidth,q=c.nextSibling.offsetWidth,s=c.firstChild,v=a.pxself(u.rows[0].childNodes[0],"paddingTop"),w=a.pxself(u.rows[u.rows.length-1].childNodes[0],"paddingBottom");new a.SizeHandle(a,"h",s.offsetWidth,u.offsetHeight-v-w,i,q,"Wt-hsh",function(B){b(c,e,B)},s,m,h,0,-c.offsetTop+v-a.pxself(c,"paddingTop"))}function f(c,e,h){var i=c.parentNode.previousSibling;c=c.parentNode.nextSibling;var q=i.offsetHeight,s=c.offsetHeight;if(g.stretch[e]>0&&g.stretch[e+1]>0)g.stretch[e]=-1;if(g.stretch[e+1]==0)g.stretch[e+1]=-1;g.stretch[e]<=0&&r.adjustRow(i,q+h);g.stretch[e+1]<=0&&r.adjustRow(c,s-h);a.getElement(t).dirty=true;window.onresize()}function j(){var c,e=0;for(c=0;;++c){var h=n(c);if(h)e+=a.pctself(h,"width");else break}if(e!=0)for(c=0;;++c)if(h=n(c)){var i=a.pctself(h,"width");if(i)h.style.width=i*100/e+"%"}else break}function b(c,e,h){c=n(e);var i=d(c,e),q=n(e+1),s=d(q,e+1);if(a.pctself(c,"width")>0&&a.pctself(q,"width")>0){c.style.width="";j()}a.pctself(c,"width")==0&&k(e,i+h);a.pctself(q,"width")==0&&k(e+1,s-h);window.onresize()}var r=this,m=a.getElement(t);if(m)if(!r.resizeInitialized){var u=m.firstChild,p,x,z,y;x=p=0;for(z=u.rows.length;p<z;p++){y=u.rows[p];if(y.className=="Wt-hrh"){var A=y.firstChild;A.ri=x-1;A.onmousedown=function(c){l(this,this.ri,c||window.event)}}else{var C,E,G;E=C=0;for(G=y.childNodes.length;C<G;++C){A=y.childNodes[C];if(A.className=="Wt-vrh"){A.ci=E-1;A.onmousedown=function(c){o(this,this.ci,c||window.event)}}else E+=A.colSpan}++x}}r.resizeInitialized=true}});
(function(){if(!window.CKEDITOR)window.CKEDITOR=(function(){var a={timestamp:'A39E',version:'3.2.1',revision:'5372',_:{},status:'unloaded',basePath:(function(){var d=window.CKEDITOR_BASEPATH||'';if(!d){var e=document.getElementsByTagName('script');for(var f=0;f<e.length;f++){var g=e[f].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);if(g){d=g[1];break;}}}if(d.indexOf(':
(function(){if(!window.CKEDITOR)window.CKEDITOR=(function(){var a={timestamp:'A8LE4JO',version:'3.4.1',revision:'5892',_:{},status:'unloaded',basePath:(function(){var d=window.CKEDITOR_BASEPATH||'';if(!d){var e=document.getElementsByTagName('script');for(var f=0;f<e.length;f++){var g=e[f].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);if(g){d=g[1];break;}}}if(d.indexOf(':
(function(){if(!window.CKEDITOR)window.CKEDITOR=(function(){var a={timestamp:'A39E',version:'3.2.1',revision:'5372',_:{},status:'unloaded',basePath:(function(){var d=window.CKEDITOR_BASEPATH||'';if(!d){var e=document.getElementsByTagName('script');for(var f=0;f<e.length;f++){var g=e[f].src.match(/(^|.*[\\\/])ckeditor(?:_basic)?(?:_source)?.js(?:\?.*)?$/i);if(g){d=g[1];break;}}}if(d.indexOf('://')==-1)if(d.indexOf('/')===0)d=location.href.match(/^.*?:\/\/[^\/]*/)[0]+d;else d=location.href.match(/^[^\?]*\/(?:)/)[0]+d;if(!d)throw 'The CKEditor installation path could not be automatically detected. Please set the global variable "CKEDITOR_BASEPATH" before creating editor instances.';return d;})(),getUrl:function(d){if(d.indexOf('://')==-1&&d.indexOf('/')!==0)d=this.basePath+d;if(this.timestamp&&d.charAt(d.length-1)!='/')d+=(d.indexOf('?')>=0?'&':'?')+'t='+this.timestamp;return d;}},b=window.CKEDITOR_GETURL;if(b){var c=a.getUrl;a.getUrl=function(d){return b.call(a,d)||c.call(a,d);};}return a;})();var a=CKEDITOR;if(!a.event){a.event=function(){};a.event.implementOn=function(b,c){var d=a.event.prototype;for(var e in d){if(b[e]==undefined)b[e]=d[e];}};a.event.prototype=(function(){var b=function(d){var e=d.getPrivate&&d.getPrivate()||d._||(d._={});return e.events||(e.events={});},c=function(d){this.name=d;this.listeners=[];};c.prototype={getListenerIndex:function(d){for(var e=0,f=this.listeners;e<f.length;e++){if(f[e].fn==d)return e;}return-1;}};return{on:function(d,e,f,g,h){var i=b(this),j=i[d]||(i[d]=new c(d));if(j.getListenerIndex(e)<0){var k=j.listeners;if(!f)f=this;if(isNaN(h))h=10;var l=this,m=function(o,p,q,r){var s={name:d,sender:this,editor:o,data:p,listenerData:g,stop:q,cancel:r,removeListener:function(){l.removeListener(d,e);}};e.call(f,s);return s.data;};m.fn=e;m.priority=h;for(var n=k.length-1;n>=0;n--){if(k[n].priority<=h){k.splice(n+1,0,m);return;}}k.unshift(m);}},fire:(function(){var d=false,e=function(){d=true;},f=false,g=function(){f=true;};return function(h,i,j){var k=b(this)[h],l=d,m=f;d=f=false;if(k){var n=k.listeners;if(n.length){n=n.slice(0);for(var o=0;o<n.length;o++){var p=n[o].call(this,j,i,e,g);if(typeof p!='undefined')i=p;if(d||f)break;}}}var q=f||(typeof i=='undefined'?false:i);d=l;f=m;return q;};})(),fireOnce:function(d,e,f){var g=this.fire(d,e,f);delete b(this)[d];return g;},removeListener:function(d,e){var f=b(this)[d];if(f){var g=f.getListenerIndex(e);if(g>=0)f.listeners.splice(g,1);}},hasListeners:function(d){var e=b(this)[d];return e&&e.listeners.length>0;
var firstName = authors[j].ForeName.text().toString();
firstName = authors[j].ForeName.text().toString(); } var suffix = authors[j].Suffix.text().toString(); if(suffix && firstName != "") { firstName += ", " + authors[j].Suffix.text().toString();
Zotero.Utilities.HTTP.doGet(newUri, function(text) { // Remove xml parse instruction and doctype text = text.replace(/<!DOCTYPE[^>]*>/, "").replace(/<\?xml[^>]*\?>/, ""); var xml = new XML(text); for(var i=0; i<xml.PubmedArticle.length(); i++) { var newItem = new Zotero.Item("journalArticle"); var citation = xml.PubmedArticle[i].MedlineCitation; var PMID = citation.PMID.text().toString(); newItem.url = "http://www.ncbi.nlm.nih.gov/pubmed/" + PMID; newItem.extra = "PMID: "+PMID; var article = citation.Article; if(article.ArticleTitle.length()) { var title = article.ArticleTitle.text().toString(); if(title.substr(-1) == ".") { title = title.substring(0, title.length-1); } newItem.title = title; } if (article.Pagination.MedlinePgn.length()){ var fullPageRange = article.Pagination.MedlinePgn.text().toString(); var pageRange = fullPageRange.match(/\d+-\d+/g); for (var j in pageRange) { var pageRangeStart = pageRange[j].match(/^\d+/)[0]; var pageRangeEnd = pageRange[j].match(/\d+$/)[0]; if (pageRangeStart.length > pageRangeEnd.length) { pageRangeEnd = pageRangeStart.substring(0,pageRangeStart.length-pageRangeEnd.length) + pageRangeEnd; fullPageRange = fullPageRange.replace(pageRange[j],pageRangeStart+"-"+pageRangeEnd); } } newItem.pages = fullPageRange; } if(article.Journal.length()) { var issn = article.Journal.ISSN.text().toString(); if(issn) { newItem.ISSN = issn; } if(citation.Article.Journal.ISOAbbreviation.length()) { newItem.journalAbbreviation = Zotero.Utilities.superCleanString(citation.Article.Journal.ISOAbbreviation.text().toString()); } else if(citation.MedlineJournalInfo.MedlineTA.length()) { newItem.journalAbbreviation = Zotero.Utilities.superCleanString(citation.MedlineJournalInfo.MedlineTA.text().toString()); } if(article.Journal.Title.length()) { newItem.publicationTitle = Zotero.Utilities.superCleanString(article.Journal.Title.text().toString()); } else if(newItem.journalAbbreviation.length()) { newItem.publicationTitle = newItem.journalAbbreviation; } if(article.Journal.JournalIssue.length()) { newItem.volume = article.Journal.JournalIssue.Volume.text().toString(); newItem.issue = article.Journal.JournalIssue.Issue.text().toString(); if(article.Journal.JournalIssue.PubDate.length()) { // try to get the date if(article.Journal.JournalIssue.PubDate.Day.text().toString() != "") { newItem.date = article.Journal.JournalIssue.PubDate.Month.text().toString()+" "+article.Journal.JournalIssue.PubDate.Day.text().toString()+", "+article.Journal.JournalIssue.PubDate.Year.text().toString(); } else if(article.Journal.JournalIssue.PubDate.Month.text().toString() != "") { newItem.date = article.Journal.JournalIssue.PubDate.Month.text().toString()+" "+article.Journal.JournalIssue.PubDate.Year.text().toString(); } else if(article.Journal.JournalIssue.PubDate.Year.text().toString() != "") { newItem.date = article.Journal.JournalIssue.PubDate.Year.text().toString(); } else if(article.Journal.JournalIssue.PubDate.MedlineDate.text().toString() != "") { newItem.date = article.Journal.JournalIssue.PubDate.MedlineDate.text().toString(); } } } } if(article.AuthorList.length() && article.AuthorList.Author.length()) { var authors = article.AuthorList.Author; for(var j=0; j<authors.length(); j++) { var lastName = authors[j].LastName.text().toString(); var firstName = authors[j].FirstName.text().toString(); if(firstName == "") { var firstName = authors[j].ForeName.text().toString(); } if(firstName || lastName) { newItem.creators.push({lastName:lastName, firstName:firstName}); } } } if (citation.MeshHeadingList && citation.MeshHeadingList.MeshHeading) { var keywords = citation.MeshHeadingList.MeshHeading; for (var k = 0 ; k < keywords.length() ; k++) { newItem.tags.push(keywords[k].DescriptorName.text().toString()); } } newItem.abstractNote = article.Abstract.AbstractText.toString() newItem.DOI = xml.PubmedArticle[i].PubmedData.ArticleIdList.ArticleId.(@IdType == "doi" ).text().toString(); newItem.publicationTitle = Zotero.Utilities.capitalizeTitle(newItem.publicationTitle); newItem.complete(); } Zotero.done(); });
title = Zotero.Utilities.cleanString(citation.dc_title.text().toString());
title = Zotero.Utilities.trimInternal(citation.dc_title.text().toString());
Zotero.Utilities.HTTP.doGet(newURIs, function(text) { var newItem = new Zotero.Item("journalArticle"); // remove header text = text.replace(/<!DOCTYPE[^>]*>/, "").replace(/<\?xml[^>]*\?>/, ""); // fix non-compliant XML tags (colons) text = text.replace(/<dc:/g, "<dc_").replace(/<\/dc:/g, "</dc_"); text = text.replace(/<oai_dc:dc/g, "<oai_dc_dc").replace(/<\/oai_dc:dc/g, "</oai_dc_dc"); text = text.replace(/<OAI-PMH[^>]*>/, "").replace(/<\/OAI-PMH[^>]*>/, ""); text = "<zotero>" + text + "</zotero>"; var xml = new XML(text); var title; var citation = xml.GetRecord.record.metadata.oai_dc_dc; var test = xml..responseDate.text().toString(); if (citation.dc_title.length()){ title = Zotero.Utilities.cleanString(citation.dc_title.text().toString()); newItem.title = title; } Zotero.debug("article title: " + title); var type = ""; if(citation.dc_creator.length()) { var authors = citation.dc_creator; for(var j=0; j<authors.length(); j++) { Zotero.debug("author: " + authors[j]); newItem.creators.push(Zotero.Utilities.cleanAuthor(authors[j].text().toString(),type,true)); } } if (citation.dc_date.length()) { var dates = citation.dc_date; newItem.date = Zotero.Utilities.cleanString(dates[0].text().toString()); } if (citation.dc_description.length()) { var descriptions = citation.dc_description; for (var j=0; j<descriptions.length(); j++) { var noteStr = Zotero.Utilities.cleanString(descriptions[j].text().toString()); newItem.notes.push({note:noteStr}); } } if (citation.dc_subject.length()) { var subjects = citation.dc_subject; for (var j=0; j<subjects.length(); j++) { var subjectValue = Zotero.Utilities.cleanString(subjects[j].text().toString()); newItem.tags.push(subjectValue); } } if (citation.dc_identifier.length()) { var identifiers = citation.dc_identifier; for (var j=0; j<identifiers.length(); j++) { var identifier = Zotero.Utilities.cleanString(identifiers[j].text().toString()); if (identifier.substr(0, 4) == "doi:") { newItem.DOI = identifier; } else if (identifier.substr(0, 7) == "http://") { newItem.url = identifier; } else { newItem.extra = identifier; } } } var articleID = ""; if (xml.GetRecord.record.header.identifier.length()) { articleID = xml.GetRecord.record.header.identifier.text().toString(); articleID = articleID.substr(14); newItem.publicationTitle = articleID; }// TODO add "arXiv.org" to bib data? newItem.attachments.push({url:newItem.url, title:"arXiv.org Snapshot", mimeType:"text/html"}); newItem.attachments.push(getPDF(articleID)); if (newItem.notes[0]['note']) { newItem.abstractNote = newItem.notes[0]['note']; newItem.notes = new Array(); } newItem.complete(); }, function() {Zotero.done();}, null);
newItem.date = Zotero.Utilities.cleanString(dates[0].text().toString());
newItem.date = Zotero.Utilities.trimInternal(dates[0].text().toString());
Zotero.Utilities.HTTP.doGet(newURIs, function(text) { var newItem = new Zotero.Item("journalArticle"); // remove header text = text.replace(/<!DOCTYPE[^>]*>/, "").replace(/<\?xml[^>]*\?>/, ""); // fix non-compliant XML tags (colons) text = text.replace(/<dc:/g, "<dc_").replace(/<\/dc:/g, "</dc_"); text = text.replace(/<oai_dc:dc/g, "<oai_dc_dc").replace(/<\/oai_dc:dc/g, "</oai_dc_dc"); text = text.replace(/<OAI-PMH[^>]*>/, "").replace(/<\/OAI-PMH[^>]*>/, ""); text = "<zotero>" + text + "</zotero>"; var xml = new XML(text); var title; var citation = xml.GetRecord.record.metadata.oai_dc_dc; var test = xml..responseDate.text().toString(); if (citation.dc_title.length()){ title = Zotero.Utilities.cleanString(citation.dc_title.text().toString()); newItem.title = title; } Zotero.debug("article title: " + title); var type = ""; if(citation.dc_creator.length()) { var authors = citation.dc_creator; for(var j=0; j<authors.length(); j++) { Zotero.debug("author: " + authors[j]); newItem.creators.push(Zotero.Utilities.cleanAuthor(authors[j].text().toString(),type,true)); } } if (citation.dc_date.length()) { var dates = citation.dc_date; newItem.date = Zotero.Utilities.cleanString(dates[0].text().toString()); } if (citation.dc_description.length()) { var descriptions = citation.dc_description; for (var j=0; j<descriptions.length(); j++) { var noteStr = Zotero.Utilities.cleanString(descriptions[j].text().toString()); newItem.notes.push({note:noteStr}); } } if (citation.dc_subject.length()) { var subjects = citation.dc_subject; for (var j=0; j<subjects.length(); j++) { var subjectValue = Zotero.Utilities.cleanString(subjects[j].text().toString()); newItem.tags.push(subjectValue); } } if (citation.dc_identifier.length()) { var identifiers = citation.dc_identifier; for (var j=0; j<identifiers.length(); j++) { var identifier = Zotero.Utilities.cleanString(identifiers[j].text().toString()); if (identifier.substr(0, 4) == "doi:") { newItem.DOI = identifier; } else if (identifier.substr(0, 7) == "http://") { newItem.url = identifier; } else { newItem.extra = identifier; } } } var articleID = ""; if (xml.GetRecord.record.header.identifier.length()) { articleID = xml.GetRecord.record.header.identifier.text().toString(); articleID = articleID.substr(14); newItem.publicationTitle = articleID; }// TODO add "arXiv.org" to bib data? newItem.attachments.push({url:newItem.url, title:"arXiv.org Snapshot", mimeType:"text/html"}); newItem.attachments.push(getPDF(articleID)); if (newItem.notes[0]['note']) { newItem.abstractNote = newItem.notes[0]['note']; newItem.notes = new Array(); } newItem.complete(); }, function() {Zotero.done();}, null);
var noteStr = Zotero.Utilities.cleanString(descriptions[j].text().toString());
var noteStr = Zotero.Utilities.trimInternal(descriptions[j].text().toString());
Zotero.Utilities.HTTP.doGet(newURIs, function(text) { var newItem = new Zotero.Item("journalArticle"); // remove header text = text.replace(/<!DOCTYPE[^>]*>/, "").replace(/<\?xml[^>]*\?>/, ""); // fix non-compliant XML tags (colons) text = text.replace(/<dc:/g, "<dc_").replace(/<\/dc:/g, "</dc_"); text = text.replace(/<oai_dc:dc/g, "<oai_dc_dc").replace(/<\/oai_dc:dc/g, "</oai_dc_dc"); text = text.replace(/<OAI-PMH[^>]*>/, "").replace(/<\/OAI-PMH[^>]*>/, ""); text = "<zotero>" + text + "</zotero>"; var xml = new XML(text); var title; var citation = xml.GetRecord.record.metadata.oai_dc_dc; var test = xml..responseDate.text().toString(); if (citation.dc_title.length()){ title = Zotero.Utilities.cleanString(citation.dc_title.text().toString()); newItem.title = title; } Zotero.debug("article title: " + title); var type = ""; if(citation.dc_creator.length()) { var authors = citation.dc_creator; for(var j=0; j<authors.length(); j++) { Zotero.debug("author: " + authors[j]); newItem.creators.push(Zotero.Utilities.cleanAuthor(authors[j].text().toString(),type,true)); } } if (citation.dc_date.length()) { var dates = citation.dc_date; newItem.date = Zotero.Utilities.cleanString(dates[0].text().toString()); } if (citation.dc_description.length()) { var descriptions = citation.dc_description; for (var j=0; j<descriptions.length(); j++) { var noteStr = Zotero.Utilities.cleanString(descriptions[j].text().toString()); newItem.notes.push({note:noteStr}); } } if (citation.dc_subject.length()) { var subjects = citation.dc_subject; for (var j=0; j<subjects.length(); j++) { var subjectValue = Zotero.Utilities.cleanString(subjects[j].text().toString()); newItem.tags.push(subjectValue); } } if (citation.dc_identifier.length()) { var identifiers = citation.dc_identifier; for (var j=0; j<identifiers.length(); j++) { var identifier = Zotero.Utilities.cleanString(identifiers[j].text().toString()); if (identifier.substr(0, 4) == "doi:") { newItem.DOI = identifier; } else if (identifier.substr(0, 7) == "http://") { newItem.url = identifier; } else { newItem.extra = identifier; } } } var articleID = ""; if (xml.GetRecord.record.header.identifier.length()) { articleID = xml.GetRecord.record.header.identifier.text().toString(); articleID = articleID.substr(14); newItem.publicationTitle = articleID; }// TODO add "arXiv.org" to bib data? newItem.attachments.push({url:newItem.url, title:"arXiv.org Snapshot", mimeType:"text/html"}); newItem.attachments.push(getPDF(articleID)); if (newItem.notes[0]['note']) { newItem.abstractNote = newItem.notes[0]['note']; newItem.notes = new Array(); } newItem.complete(); }, function() {Zotero.done();}, null);
var subjectValue = Zotero.Utilities.cleanString(subjects[j].text().toString());
var subjectValue = Zotero.Utilities.trimInternal(subjects[j].text().toString());
Zotero.Utilities.HTTP.doGet(newURIs, function(text) { var newItem = new Zotero.Item("journalArticle"); // remove header text = text.replace(/<!DOCTYPE[^>]*>/, "").replace(/<\?xml[^>]*\?>/, ""); // fix non-compliant XML tags (colons) text = text.replace(/<dc:/g, "<dc_").replace(/<\/dc:/g, "</dc_"); text = text.replace(/<oai_dc:dc/g, "<oai_dc_dc").replace(/<\/oai_dc:dc/g, "</oai_dc_dc"); text = text.replace(/<OAI-PMH[^>]*>/, "").replace(/<\/OAI-PMH[^>]*>/, ""); text = "<zotero>" + text + "</zotero>"; var xml = new XML(text); var title; var citation = xml.GetRecord.record.metadata.oai_dc_dc; var test = xml..responseDate.text().toString(); if (citation.dc_title.length()){ title = Zotero.Utilities.cleanString(citation.dc_title.text().toString()); newItem.title = title; } Zotero.debug("article title: " + title); var type = ""; if(citation.dc_creator.length()) { var authors = citation.dc_creator; for(var j=0; j<authors.length(); j++) { Zotero.debug("author: " + authors[j]); newItem.creators.push(Zotero.Utilities.cleanAuthor(authors[j].text().toString(),type,true)); } } if (citation.dc_date.length()) { var dates = citation.dc_date; newItem.date = Zotero.Utilities.cleanString(dates[0].text().toString()); } if (citation.dc_description.length()) { var descriptions = citation.dc_description; for (var j=0; j<descriptions.length(); j++) { var noteStr = Zotero.Utilities.cleanString(descriptions[j].text().toString()); newItem.notes.push({note:noteStr}); } } if (citation.dc_subject.length()) { var subjects = citation.dc_subject; for (var j=0; j<subjects.length(); j++) { var subjectValue = Zotero.Utilities.cleanString(subjects[j].text().toString()); newItem.tags.push(subjectValue); } } if (citation.dc_identifier.length()) { var identifiers = citation.dc_identifier; for (var j=0; j<identifiers.length(); j++) { var identifier = Zotero.Utilities.cleanString(identifiers[j].text().toString()); if (identifier.substr(0, 4) == "doi:") { newItem.DOI = identifier; } else if (identifier.substr(0, 7) == "http://") { newItem.url = identifier; } else { newItem.extra = identifier; } } } var articleID = ""; if (xml.GetRecord.record.header.identifier.length()) { articleID = xml.GetRecord.record.header.identifier.text().toString(); articleID = articleID.substr(14); newItem.publicationTitle = articleID; }// TODO add "arXiv.org" to bib data? newItem.attachments.push({url:newItem.url, title:"arXiv.org Snapshot", mimeType:"text/html"}); newItem.attachments.push(getPDF(articleID)); if (newItem.notes[0]['note']) { newItem.abstractNote = newItem.notes[0]['note']; newItem.notes = new Array(); } newItem.complete(); }, function() {Zotero.done();}, null);
var identifier = Zotero.Utilities.cleanString(identifiers[j].text().toString());
var identifier = Zotero.Utilities.trimInternal(identifiers[j].text().toString());
Zotero.Utilities.HTTP.doGet(newURIs, function(text) { var newItem = new Zotero.Item("journalArticle"); // remove header text = text.replace(/<!DOCTYPE[^>]*>/, "").replace(/<\?xml[^>]*\?>/, ""); // fix non-compliant XML tags (colons) text = text.replace(/<dc:/g, "<dc_").replace(/<\/dc:/g, "</dc_"); text = text.replace(/<oai_dc:dc/g, "<oai_dc_dc").replace(/<\/oai_dc:dc/g, "</oai_dc_dc"); text = text.replace(/<OAI-PMH[^>]*>/, "").replace(/<\/OAI-PMH[^>]*>/, ""); text = "<zotero>" + text + "</zotero>"; var xml = new XML(text); var title; var citation = xml.GetRecord.record.metadata.oai_dc_dc; var test = xml..responseDate.text().toString(); if (citation.dc_title.length()){ title = Zotero.Utilities.cleanString(citation.dc_title.text().toString()); newItem.title = title; } Zotero.debug("article title: " + title); var type = ""; if(citation.dc_creator.length()) { var authors = citation.dc_creator; for(var j=0; j<authors.length(); j++) { Zotero.debug("author: " + authors[j]); newItem.creators.push(Zotero.Utilities.cleanAuthor(authors[j].text().toString(),type,true)); } } if (citation.dc_date.length()) { var dates = citation.dc_date; newItem.date = Zotero.Utilities.cleanString(dates[0].text().toString()); } if (citation.dc_description.length()) { var descriptions = citation.dc_description; for (var j=0; j<descriptions.length(); j++) { var noteStr = Zotero.Utilities.cleanString(descriptions[j].text().toString()); newItem.notes.push({note:noteStr}); } } if (citation.dc_subject.length()) { var subjects = citation.dc_subject; for (var j=0; j<subjects.length(); j++) { var subjectValue = Zotero.Utilities.cleanString(subjects[j].text().toString()); newItem.tags.push(subjectValue); } } if (citation.dc_identifier.length()) { var identifiers = citation.dc_identifier; for (var j=0; j<identifiers.length(); j++) { var identifier = Zotero.Utilities.cleanString(identifiers[j].text().toString()); if (identifier.substr(0, 4) == "doi:") { newItem.DOI = identifier; } else if (identifier.substr(0, 7) == "http://") { newItem.url = identifier; } else { newItem.extra = identifier; } } } var articleID = ""; if (xml.GetRecord.record.header.identifier.length()) { articleID = xml.GetRecord.record.header.identifier.text().toString(); articleID = articleID.substr(14); newItem.publicationTitle = articleID; }// TODO add "arXiv.org" to bib data? newItem.attachments.push({url:newItem.url, title:"arXiv.org Snapshot", mimeType:"text/html"}); newItem.attachments.push(getPDF(articleID)); if (newItem.notes[0]['note']) { newItem.abstractNote = newItem.notes[0]['note']; newItem.notes = new Array(); } newItem.complete(); }, function() {Zotero.done();}, null);
var biblink = doc.evaluate('
var biblink = 'http:
Zotero.Utilities.processDocuments(arts, function(doc) { var biblink = doc.evaluate('//a[contains(text(), "BibTex")]', doc, ns, XPathResult.ANY_TYPE, null).iterateNext().href; var newurl = doc.location.href; var tags = new Array(); if (doc.evaluate('//a[@class="keyword"]', doc, ns, XPathResult.ANY_TYPE, null).iterateNext()) { var kws = doc.evaluate('//a[@class="keyword"]', doc, ns, XPathResult.ANY_TYPE, null); var kw; while (kw = kws.iterateNext()) { tags.push(Zotero.Utilities.trimInternal(kw.textContent)); } } Zotero.Utilities.HTTP.doGet(biblink, function(text) { var trans = Zotero.loadTranslator("import"); trans.setTranslator("9cb70025-a888-4a29-a210-93ec52da40d4"); trans.setString(text); trans.setHandler("itemDone", function(obj, item) { item.url = newurl; item.attachments = [{url:item.url, title:item.title + " Snapshot", mimeType:"text/html"}]; item.tags = tags; item.complete(); }); trans.translate(); }); }, function() {Zotero.done();});
item.complete();
item.abstractNote = abstractNote; item.complete();
Zotero.Utilities.processDocuments(arts, function(doc) { var biblink = doc.evaluate('//a[contains(text(), "BibTex")]', doc, ns, XPathResult.ANY_TYPE, null).iterateNext().href; var newurl = doc.location.href; var tags = new Array(); if (doc.evaluate('//a[@class="keyword"]', doc, ns, XPathResult.ANY_TYPE, null).iterateNext()) { var kws = doc.evaluate('//a[@class="keyword"]', doc, ns, XPathResult.ANY_TYPE, null); var kw; while (kw = kws.iterateNext()) { tags.push(Zotero.Utilities.trimInternal(kw.textContent)); } } Zotero.Utilities.HTTP.doGet(biblink, function(text) { var trans = Zotero.loadTranslator("import"); trans.setTranslator("9cb70025-a888-4a29-a210-93ec52da40d4"); trans.setString(text); trans.setHandler("itemDone", function(obj, item) { item.url = newurl; item.attachments = [{url:item.url, title:item.title + " Snapshot", mimeType:"text/html"}]; item.tags = tags; item.complete(); }); trans.translate(); }); }, function() {Zotero.done();});
var ajax = new XMLHttpRequest(),
var ajax = new window.XMLHttpRequest(),
return function (path, context, timeout, retry) { var ajax = new XMLHttpRequest(), include_timeout; /** * Send the Ajax requst and start timeout timer. * * @return NULL. * @note This code is a separate function to reduce code duplication. * @note Called by the parent function. */ function begin_include() { ajax.send(); if (timeout) { /// Begin the timeout timer to ensure that the download does not freeze. include_timeout = window.setTimeout(function () { ajax.abort(); if (retry) { begin_include(); } }, timeout); } } /// Determine if arguments were passed to the last two parameters. If not, set the defaults. if (typeof timeout == "undefined") { /// Default to 10 seconds. ///TODO: This should be dynamic based on the quality of the connection to the server. timeout = 10000; } if (typeof retry == "undefined") { retry = true; } ///TODO: determine if the first parameter should be different. ajax.open("GET", path); ajax.onreadystatechange = function () { if (ajax.readyState == 4) { /// Stop the timeout timer that may be running so it does not try again. clearTimeout(include_timeout); /// Was the request successful? if (ajax.status == 200) { /// Load and run the new code. eval(ajax.responseText)(context); } else if (retry) { begin_include(); } } }; begin_include(); };
WT_DECLARE_WT_MEMBER(2,"StdLayout.prototype.initResize",function(a,s,h){function p(e,k){if(e.offsetWidth>0)return e.offsetWidth;else{e=l.firstChild.rows[0];var m,n,r,u;r=n=0;for(u=e.childNodes.length;n<u;++n){m=e.childNodes[n];if(m.className!="Wt-vrh"){if(r==k)return m.offsetWidth;r+=m.colSpan}}return 0}}function c(e,k){var m=a.getElement(s).firstChild;b(e).style.width=k+"px";var n,r,u,v;r=n=0;for(u=m.rows.length;n<u;n++){v=m.rows[n];if(v.className!="Wt-hrh"){var w,B,D,F;D=B=0;for(F=v.childNodes.length;B< F;++B){w=v.childNodes[B];if(w.className!="Wt-vrh"){if(w.colSpan==1&&D==e&&w.childNodes.length==1){v=w.firstChild;w=k-d.marginH(v);v.style.width=w+"px";break}D+=w.colSpan}}++r}}}function f(e,k,m){var n=e.firstChild;new a.SizeHandle(a,"v",n.offsetHeight,n.offsetWidth,-e.parentNode.previousSibling.offsetHeight,e.parentNode.nextSibling.offsetHeight,"Wt-vsh",function(r){j(e,k,r)},n,l,m,0,0)}function i(e,k,m){var n=-e.previousSibling.offsetWidth,r=e.nextSibling.offsetWidth,u=e.firstChild,v=a.pxself(t.rows[0].childNodes[0], "paddingTop"),w=a.pxself(t.rows[t.rows.length-1].childNodes[0],"paddingBottom");new a.SizeHandle(a,"h",u.offsetWidth,t.offsetHeight-v-w,n,r,"Wt-hsh",function(B){q(e,k,B)},u,l,m,0,-e.offsetTop+v-a.pxself(e,"paddingTop"))}function j(e,k,m){var n=e.parentNode.previousSibling;e=e.parentNode.nextSibling;var r=n.offsetHeight,u=e.offsetHeight;if(h.stretch[k]>0&&h.stretch[k+1]>0)h.stretch[k]=-1;if(h.stretch[k+1]==0)h.stretch[k+1]=-1;h.stretch[k]<=0&&d.adjustRow(n,r+m);h.stretch[k+1]<=0&&d.adjustRow(e,u-m); a.getElement(s).dirty=true;window.onresize()}function g(){var e,k=0;for(e=0;;++e){var m=b(e);if(m)k+=a.pctself(m,"width");else break}if(k!=0)for(e=0;;++e)if(m=b(e)){var n=a.pctself(m,"width");if(n)m.style.width=n*100/k+"%"}else break}function q(e,k,m){e=b(k);var n=p(e,k),r=b(k+1),u=p(r,k+1);if(a.pctself(e,"width")>0&&a.pctself(r,"width")>0){e.style.width="";g()}a.pctself(e,"width")==0&&c(k,n+m);a.pctself(r,"width")==0&&c(k+1,u-m);window.onresize()}var d=this,b=d.getColumn,l=a.getElement(s);if(l)if(!d.resizeInitialized){var t= l.firstChild,o,y,A,z;y=o=0;for(A=t.rows.length;o<A;o++){z=t.rows[o];if(z.className=="Wt-hrh"){var x=z.firstChild;x.ri=y-1;x.onmousedown=x.ontouchstart=function(e){f(this,this.ri,e||window.event)}}else{var C,E,G;E=C=0;for(G=z.childNodes.length;C<G;++C){x=z.childNodes[C];if(x.className=="Wt-vrh"){x.ci=E-1;x.onmousedown=x.ontouchstart=function(e){i(this,this.ci,e||window.event)}}else E+=x.colSpan}++y}}d.resizeInitialized=true}});
WT_DECLARE_WT_MEMBER(2,"StdLayout.prototype.initResize",function(a,s,i){function o(e,k){if(e.offsetWidth>0)return e.offsetWidth;else{e=l.firstChild.rows[0];var m,n,r,u;r=n=0;for(u=e.childNodes.length;n<u;++n){m=e.childNodes[n];if(m.className!="Wt-vrh"){if(r==k)return m.offsetWidth;r+=m.colSpan}}return 0}}function b(e,k){var m=a.getElement(s).firstChild;c(e).style.width=k+"px";var n,r,u,v;r=n=0;for(u=m.rows.length;n<u;n++){v=m.rows[n];if(v.className!="Wt-hrh"){var w,B,D,F;D=B=0;for(F=v.childNodes.length;B< F;++B){w=v.childNodes[B];if(w.className!="Wt-vrh"){if(w.colSpan==1&&D==e&&w.childNodes.length==1){v=w.firstChild;w=k-d.marginH(v);v.style.width=w+"px";break}D+=w.colSpan}}++r}}}function f(e,k,m){var n=e.firstChild;new a.SizeHandle(a,"v",n.offsetHeight,n.offsetWidth,-e.parentNode.previousSibling.offsetHeight,e.parentNode.nextSibling.offsetHeight,"Wt-vsh",function(r){j(e,k,r)},n,l,m,0,0)}function g(e,k,m){var n=-e.previousSibling.offsetWidth,r=e.nextSibling.offsetWidth,u=e.firstChild,v=a.pxself(t.rows[0].childNodes[0], "paddingTop"),w=a.pxself(t.rows[t.rows.length-1].childNodes[0],"paddingBottom");new a.SizeHandle(a,"h",u.offsetWidth,t.offsetHeight-v-w,n,r,"Wt-hsh",function(B){q(e,k,B)},u,l,m,0,-e.offsetTop+v-a.pxself(e,"paddingTop"))}function j(e,k,m){var n=e.parentNode.previousSibling;e=e.parentNode.nextSibling;var r=n.offsetHeight,u=e.offsetHeight;if(i.stretch[k]>0&&i.stretch[k+1]>0)i.stretch[k]=-1;if(i.stretch[k+1]==0)i.stretch[k+1]=-1;i.stretch[k]<=0&&d.adjustRow(n,r+m);i.stretch[k+1]<=0&&d.adjustRow(e,u-m); a.getElement(s).dirty=true;window.onresize()}function h(){var e,k=0;for(e=0;;++e){var m=c(e);if(m)k+=a.pctself(m,"width");else break}if(k!=0)for(e=0;;++e)if(m=c(e)){var n=a.pctself(m,"width");if(n)m.style.width=n*100/k+"%"}else break}function q(e,k,m){e=c(k);var n=o(e,k),r=c(k+1),u=o(r,k+1);if(a.pctself(e,"width")>0&&a.pctself(r,"width")>0){e.style.width="";h()}a.pctself(e,"width")==0&&b(k,n+m);a.pctself(r,"width")==0&&b(k+1,u-m);window.onresize()}var d=this,c=d.getColumn,l=a.getElement(s);if(l)if(!d.resizeInitialized){var t= l.firstChild,p,y,A,z;y=p=0;for(A=t.rows.length;p<A;p++){z=t.rows[p];if(z.className=="Wt-hrh"){var x=z.firstChild;x.ri=y-1;x.onmousedown=x.ontouchstart=function(e){f(this,this.ri,e||window.event)}}else{var C,E,G;E=C=0;for(G=z.childNodes.length;C<G;++C){x=z.childNodes[C];if(x.className=="Wt-vrh"){x.ci=E-1;x.onmousedown=x.ontouchstart=function(e){g(this,this.ci,e||window.event)}}else E+=x.colSpan}++y}}d.resizeInitialized=true}});
WT_DECLARE_WT_MEMBER(2,"StdLayout.prototype.initResize",function(a,s,h){function p(e,k){if(e.offsetWidth>0)return e.offsetWidth;else{e=l.firstChild.rows[0];var m,n,r,u;r=n=0;for(u=e.childNodes.length;n<u;++n){m=e.childNodes[n];if(m.className!="Wt-vrh"){if(r==k)return m.offsetWidth;r+=m.colSpan}}return 0}}function c(e,k){var m=a.getElement(s).firstChild;b(e).style.width=k+"px";var n,r,u,v;r=n=0;for(u=m.rows.length;n<u;n++){v=m.rows[n];if(v.className!="Wt-hrh"){var w,B,D,F;D=B=0;for(F=v.childNodes.length;B<F;++B){w=v.childNodes[B];if(w.className!="Wt-vrh"){if(w.colSpan==1&&D==e&&w.childNodes.length==1){v=w.firstChild;w=k-d.marginH(v);v.style.width=w+"px";break}D+=w.colSpan}}++r}}}function f(e,k,m){var n=e.firstChild;new a.SizeHandle(a,"v",n.offsetHeight,n.offsetWidth,-e.parentNode.previousSibling.offsetHeight,e.parentNode.nextSibling.offsetHeight,"Wt-vsh",function(r){j(e,k,r)},n,l,m,0,0)}function i(e,k,m){var n=-e.previousSibling.offsetWidth,r=e.nextSibling.offsetWidth,u=e.firstChild,v=a.pxself(t.rows[0].childNodes[0],"paddingTop"),w=a.pxself(t.rows[t.rows.length-1].childNodes[0],"paddingBottom");new a.SizeHandle(a,"h",u.offsetWidth,t.offsetHeight-v-w,n,r,"Wt-hsh",function(B){q(e,k,B)},u,l,m,0,-e.offsetTop+v-a.pxself(e,"paddingTop"))}function j(e,k,m){var n=e.parentNode.previousSibling;e=e.parentNode.nextSibling;var r=n.offsetHeight,u=e.offsetHeight;if(h.stretch[k]>0&&h.stretch[k+1]>0)h.stretch[k]=-1;if(h.stretch[k+1]==0)h.stretch[k+1]=-1;h.stretch[k]<=0&&d.adjustRow(n,r+m);h.stretch[k+1]<=0&&d.adjustRow(e,u-m);a.getElement(s).dirty=true;window.onresize()}function g(){var e,k=0;for(e=0;;++e){var m=b(e);if(m)k+=a.pctself(m,"width");else break}if(k!=0)for(e=0;;++e)if(m=b(e)){var n=a.pctself(m,"width");if(n)m.style.width=n*100/k+"%"}else break}function q(e,k,m){e=b(k);var n=p(e,k),r=b(k+1),u=p(r,k+1);if(a.pctself(e,"width")>0&&a.pctself(r,"width")>0){e.style.width="";g()}a.pctself(e,"width")==0&&c(k,n+m);a.pctself(r,"width")==0&&c(k+1,u-m);window.onresize()}var d=this,b=d.getColumn,l=a.getElement(s);if(l)if(!d.resizeInitialized){var t=l.firstChild,o,y,A,z;y=o=0;for(A=t.rows.length;o<A;o++){z=t.rows[o];if(z.className=="Wt-hrh"){var x=z.firstChild;x.ri=y-1;x.onmousedown=x.ontouchstart=function(e){f(this,this.ri,e||window.event)}}else{var C,E,G;E=C=0;for(G=z.childNodes.length;C<G;++C){x=z.childNodes[C];if(x.className=="Wt-vrh"){x.ci=E-1;x.onmousedown=x.ontouchstart=function(e){i(this,this.ci,e||window.event)}}else E+=x.colSpan}++y}}d.resizeInitialized=true}});
&& repoRecord.get( 'repoType' ) != 'virtual' ) {
&& repoRecord.data['repoType'] != 'virtual' ) {
function( menu, repoRecord, contentRecord ) { if ( Sonatype.lib.Permissions.checkPermission( 'nexus:index', Sonatype.lib.Permissions.DELETE ) && repoRecord.get( 'repoType' ) != 'virtual' ) { menu.add({ text: 'ReIndex', handler: function( rec ) { REINDEX_ACTION( rec, true ); }, scope: this }); menu.add( { text: 'Incremental ReIndex', handler: function( rec ) { REINDEX_ACTION( rec, false ); }, scope: this }); } }
var submit_params = $.param(Pfs.UI.browserInfo()); $(this).attr('href', $(this).attr('href') + '?' + submit_params);
$(this).attr('href', $(this).attr('href'));
$(document).ready(function () { // Tweak the body tag to indicate JS is working. $(document.body).removeClass('noJS').addClass('hasJS'); // Wire up the advanced search toggle. $('#advanced_search_toggle > a').click(function () { $('#advanced_search').toggle(); return false; }); // Wire up the status selector to hide/show vulnerability // fields, also setting up the initial state. $('.contribute select#status').each(function () { var status = $(this), fn = function () { $('#vulnerability_url, #vulnerability_description') .parent() .toggle('vulnerable' == status.val()); }; fn(); status.change(fn); }); // Append 'create sandbox plugin' link on sandbox tab with // detected browser info. $('.listing a.new_plugin').each(function () { var submit_params = $.param(Pfs.UI.browserInfo()); $(this).attr('href', $(this).attr('href') + '?' + submit_params); }); // Set up toggle-all checkboxes $('form .toggle_all').each(function () { var parent = $(this); parent.find('.toggler').click(function () { var toggler = $(this); parent.find('.toggled') .attr('checked', toggler.attr('checked')); }); }); // Cheap zebra striping for static tables $("tr:not(.template):nth-child(odd)").addClass("odd"); $("tr:not(.template):nth-child(even)").addClass("even"); });
WT_DECLARE_WT_MEMBER(2,"StdLayout.prototype.initResize",function(a,s,i){function p(e,k){if(e.offsetWidth>0)return e.offsetWidth;else{e=l.firstChild.rows[0];var m,n,r,u;r=n=0;for(u=e.childNodes.length;n<u;++n){m=e.childNodes[n];if(m.className!="Wt-vrh"){if(r==k)return m.offsetWidth;r+=m.colSpan}}return 0}}function c(e,k){var m=a.getElement(s).firstChild;b(e).style.width=k+"px";var n,r,u,v;r=n=0;for(u=m.rows.length;n<u;n++){v=m.rows[n];if(v.className!="Wt-hrh"){var w,B,D,F;D=B=0;for(F=v.childNodes.length;B< F;++B){w=v.childNodes[B];if(w.className!="Wt-vrh"){if(w.colSpan==1&&D==e&&w.childNodes.length==1){v=w.firstChild;w=k-d.marginH(v);v.style.width=w+"px";break}D+=w.colSpan}}++r}}}function h(e,k,m){var n=e.firstChild;new a.SizeHandle(a,"v",n.offsetHeight,n.offsetWidth,-e.parentNode.previousSibling.offsetHeight,e.parentNode.nextSibling.offsetHeight,"Wt-vsh",function(r){j(e,k,r)},n,l,m,0,0)}function g(e,k,m){var n=-e.previousSibling.offsetWidth,r=e.nextSibling.offsetWidth,u=e.firstChild,v=a.pxself(t.rows[0].childNodes[0], "paddingTop"),w=a.pxself(t.rows[t.rows.length-1].childNodes[0],"paddingBottom");new a.SizeHandle(a,"h",u.offsetWidth,t.offsetHeight-v-w,n,r,"Wt-hsh",function(B){q(e,k,B)},u,l,m,0,-e.offsetTop+v-a.pxself(e,"paddingTop"))}function j(e,k,m){var n=e.parentNode.previousSibling;e=e.parentNode.nextSibling;var r=n.offsetHeight,u=e.offsetHeight;if(i.stretch[k]>0&&i.stretch[k+1]>0)i.stretch[k]=-1;if(i.stretch[k+1]==0)i.stretch[k+1]=-1;i.stretch[k]<=0&&d.adjustRow(n,r+m);i.stretch[k+1]<=0&&d.adjustRow(e,u-m); a.getElement(s).dirty=true;window.onresize()}function f(){var e,k=0;for(e=0;;++e){var m=b(e);if(m)k+=a.pctself(m,"width");else break}if(k!=0)for(e=0;;++e)if(m=b(e)){var n=a.pctself(m,"width");if(n)m.style.width=n*100/k+"%"}else break}function q(e,k,m){e=b(k);var n=p(e,k),r=b(k+1),u=p(r,k+1);if(a.pctself(e,"width")>0&&a.pctself(r,"width")>0){e.style.width="";f()}a.pctself(e,"width")==0&&c(k,n+m);a.pctself(r,"width")==0&&c(k+1,u-m);window.onresize()}var d=this,b=d.getColumn,l=a.getElement(s);if(l)if(!d.resizeInitialized){var t= l.firstChild,o,y,A,z;y=o=0;for(A=t.rows.length;o<A;o++){z=t.rows[o];if(z.className=="Wt-hrh"){var x=z.firstChild;x.ri=y-1;x.onmousedown=x.ontouchstart=function(e){h(this,this.ri,e||window.event)}}else{var C,E,G;E=C=0;for(G=z.childNodes.length;C<G;++C){x=z.childNodes[C];if(x.className=="Wt-vrh"){x.ci=E-1;x.onmousedown=x.ontouchstart=function(e){g(this,this.ci,e||window.event)}}else E+=x.colSpan}++y}}d.resizeInitialized=true}});
WT_DECLARE_WT_MEMBER(2,"StdLayout.prototype.initResize",function(a,s,h){function p(e,k){if(e.offsetWidth>0)return e.offsetWidth;else{e=l.firstChild.rows[0];var m,n,r,u;r=n=0;for(u=e.childNodes.length;n<u;++n){m=e.childNodes[n];if(m.className!="Wt-vrh"){if(r==k)return m.offsetWidth;r+=m.colSpan}}return 0}}function c(e,k){var m=a.getElement(s).firstChild;b(e).style.width=k+"px";var n,r,u,v;r=n=0;for(u=m.rows.length;n<u;n++){v=m.rows[n];if(v.className!="Wt-hrh"){var w,B,D,F;D=B=0;for(F=v.childNodes.length;B< F;++B){w=v.childNodes[B];if(w.className!="Wt-vrh"){if(w.colSpan==1&&D==e&&w.childNodes.length==1){v=w.firstChild;w=k-d.marginH(v);v.style.width=w+"px";break}D+=w.colSpan}}++r}}}function f(e,k,m){var n=e.firstChild;new a.SizeHandle(a,"v",n.offsetHeight,n.offsetWidth,-e.parentNode.previousSibling.offsetHeight,e.parentNode.nextSibling.offsetHeight,"Wt-vsh",function(r){j(e,k,r)},n,l,m,0,0)}function i(e,k,m){var n=-e.previousSibling.offsetWidth,r=e.nextSibling.offsetWidth,u=e.firstChild,v=a.pxself(t.rows[0].childNodes[0], "paddingTop"),w=a.pxself(t.rows[t.rows.length-1].childNodes[0],"paddingBottom");new a.SizeHandle(a,"h",u.offsetWidth,t.offsetHeight-v-w,n,r,"Wt-hsh",function(B){q(e,k,B)},u,l,m,0,-e.offsetTop+v-a.pxself(e,"paddingTop"))}function j(e,k,m){var n=e.parentNode.previousSibling;e=e.parentNode.nextSibling;var r=n.offsetHeight,u=e.offsetHeight;if(h.stretch[k]>0&&h.stretch[k+1]>0)h.stretch[k]=-1;if(h.stretch[k+1]==0)h.stretch[k+1]=-1;h.stretch[k]<=0&&d.adjustRow(n,r+m);h.stretch[k+1]<=0&&d.adjustRow(e,u-m); a.getElement(s).dirty=true;window.onresize()}function g(){var e,k=0;for(e=0;;++e){var m=b(e);if(m)k+=a.pctself(m,"width");else break}if(k!=0)for(e=0;;++e)if(m=b(e)){var n=a.pctself(m,"width");if(n)m.style.width=n*100/k+"%"}else break}function q(e,k,m){e=b(k);var n=p(e,k),r=b(k+1),u=p(r,k+1);if(a.pctself(e,"width")>0&&a.pctself(r,"width")>0){e.style.width="";g()}a.pctself(e,"width")==0&&c(k,n+m);a.pctself(r,"width")==0&&c(k+1,u-m);window.onresize()}var d=this,b=d.getColumn,l=a.getElement(s);if(l)if(!d.resizeInitialized){var t= l.firstChild,o,y,A,z;y=o=0;for(A=t.rows.length;o<A;o++){z=t.rows[o];if(z.className=="Wt-hrh"){var x=z.firstChild;x.ri=y-1;x.onmousedown=x.ontouchstart=function(e){f(this,this.ri,e||window.event)}}else{var C,E,G;E=C=0;for(G=z.childNodes.length;C<G;++C){x=z.childNodes[C];if(x.className=="Wt-vrh"){x.ci=E-1;x.onmousedown=x.ontouchstart=function(e){i(this,this.ci,e||window.event)}}else E+=x.colSpan}++y}}d.resizeInitialized=true}});
WT_DECLARE_WT_MEMBER(2,"StdLayout.prototype.initResize",function(a,s,i){function p(e,k){if(e.offsetWidth>0)return e.offsetWidth;else{e=l.firstChild.rows[0];var m,n,r,u;r=n=0;for(u=e.childNodes.length;n<u;++n){m=e.childNodes[n];if(m.className!="Wt-vrh"){if(r==k)return m.offsetWidth;r+=m.colSpan}}return 0}}function c(e,k){var m=a.getElement(s).firstChild;b(e).style.width=k+"px";var n,r,u,v;r=n=0;for(u=m.rows.length;n<u;n++){v=m.rows[n];if(v.className!="Wt-hrh"){var w,B,D,F;D=B=0;for(F=v.childNodes.length;B<F;++B){w=v.childNodes[B];if(w.className!="Wt-vrh"){if(w.colSpan==1&&D==e&&w.childNodes.length==1){v=w.firstChild;w=k-d.marginH(v);v.style.width=w+"px";break}D+=w.colSpan}}++r}}}function h(e,k,m){var n=e.firstChild;new a.SizeHandle(a,"v",n.offsetHeight,n.offsetWidth,-e.parentNode.previousSibling.offsetHeight,e.parentNode.nextSibling.offsetHeight,"Wt-vsh",function(r){j(e,k,r)},n,l,m,0,0)}function g(e,k,m){var n=-e.previousSibling.offsetWidth,r=e.nextSibling.offsetWidth,u=e.firstChild,v=a.pxself(t.rows[0].childNodes[0],"paddingTop"),w=a.pxself(t.rows[t.rows.length-1].childNodes[0],"paddingBottom");new a.SizeHandle(a,"h",u.offsetWidth,t.offsetHeight-v-w,n,r,"Wt-hsh",function(B){q(e,k,B)},u,l,m,0,-e.offsetTop+v-a.pxself(e,"paddingTop"))}function j(e,k,m){var n=e.parentNode.previousSibling;e=e.parentNode.nextSibling;var r=n.offsetHeight,u=e.offsetHeight;if(i.stretch[k]>0&&i.stretch[k+1]>0)i.stretch[k]=-1;if(i.stretch[k+1]==0)i.stretch[k+1]=-1;i.stretch[k]<=0&&d.adjustRow(n,r+m);i.stretch[k+1]<=0&&d.adjustRow(e,u-m);a.getElement(s).dirty=true;window.onresize()}function f(){var e,k=0;for(e=0;;++e){var m=b(e);if(m)k+=a.pctself(m,"width");else break}if(k!=0)for(e=0;;++e)if(m=b(e)){var n=a.pctself(m,"width");if(n)m.style.width=n*100/k+"%"}else break}function q(e,k,m){e=b(k);var n=p(e,k),r=b(k+1),u=p(r,k+1);if(a.pctself(e,"width")>0&&a.pctself(r,"width")>0){e.style.width="";f()}a.pctself(e,"width")==0&&c(k,n+m);a.pctself(r,"width")==0&&c(k+1,u-m);window.onresize()}var d=this,b=d.getColumn,l=a.getElement(s);if(l)if(!d.resizeInitialized){var t=l.firstChild,o,y,A,z;y=o=0;for(A=t.rows.length;o<A;o++){z=t.rows[o];if(z.className=="Wt-hrh"){var x=z.firstChild;x.ri=y-1;x.onmousedown=x.ontouchstart=function(e){h(this,this.ri,e||window.event)}}else{var C,E,G;E=C=0;for(G=z.childNodes.length;C<G;++C){x=z.childNodes[C];if(x.className=="Wt-vrh"){x.ci=E-1;x.onmousedown=x.ontouchstart=function(e){g(this,this.ci,e||window.event)}}else E+=x.colSpan}++y}}d.resizeInitialized=true}});
panel.showArtifact(null);
panel.showArtifact(null, artifactContainer);
Sonatype.Events.addListener('fileContainerUpdate', function(artifactContainer, data) { var panel = artifactContainer.find('name', 'artifactInformationPanel')[0]; if (data == null || !data.leaf) { panel.showArtifact(null); } else { panel.showArtifact(data); } });