rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
multilineVars.barNumbers = tokens[0].token;
multilineVars.barNumbers = parseInt(tokens[0].token);
var addDirective = function(str) { var tokens = tokenizer.tokenize(str, 0, str.length); // 3 or more % in a row, or just spaces after %% is just a comment if (tokens.length === 0 || tokens[0].type !== 'alpha') return null; var restOfString = str.substring(str.indexOf(tokens[0])); var cmd = tokens.shift().token.toLowerCase();// var s = tokenizer.stripComment(str).strip();// if (s.length === 0) // 3 or more % in a row, or just spaces after %% is just a comment// return null;// var i = s.indexOf(' ');// var cmd = (i > 0) ? s.substring(0, i) : s; var num; var scratch = "";// cmd = cmd.toLowerCase(); switch (cmd) { case "bagpipes":tune.formatting.bagpipes = true;break; case "stretchlast":tune.formatting.stretchlast = true;break; case "staffwidth": if (tokens.length !== 1 || tokens[0].type != 'number') return "Directive \"" + cmd + "\" requires a number as a parameter."; tune.formatting.staffwidth = parseInt(tokens[0].token); break; case "scale": scratch = ""; tokens.each(function(tok) { scratch += tok.token; }); num = parseFloat(scratch); if (isNaN(num) || num === 0) return "Directive \"" + cmd + "\" requires a number as a parameter."; tune.formatting.scale = num; break; case "sep": // TODO-PER: This actually goes into the stream, it is not global if (tokens.length === 0) return "Directive \"" + cmd + "\" requires a string as a parameter."; tune.formatting.sep = tokens[0].token; break; case "barnumbers": if (tokens.length !== 1 || tokens[0].type != 'number') return "Directive \"" + cmd + "\" requires a number as a parameter."; multilineVars.barNumbers = tokens[0].token; break; case "begintext": multilineVars.inTextBlock = true; break; case "text": tune.addText(tokenizer.translateString(restOfString)); // display secondary title break; case "vocalfont": multilineVars.fontVocal = {}; var token = tokens.last(); if (token.type === 'number') { multilineVars.fontVocal.size = parseInt(token.token); tokens.pop(); } if (tokens.length > 0) { scratch = ""; tokens.each(function(tok) { if (tok.token === '-') scratch += ' '; else scratch += tok.token; }); multilineVars.fontVocal.font = scratch; } break; case "score": case "indent": case "voicefont": case "titlefont": case "barlabelfont": case "barnumfont": case "barnumberfont": case "topmargin": case "botmargin": case "topspace": case "titlespace": case "subtitlespace": case "composerspace": case "musicspace": case "partsspace": case "wordsspace": case "textspace": case "vocalspace": case "staffsep": case "linesep": case "midi": case "titlecaps": case "titlefont": case "composerfont": case "indent": case "playtempo": case "auquality": case "systemsep": case "sysstaffsep": case "landscape": case "gchordfont": case "leftmargin": case "partsfont": case "staves": case "slurgraces": case "titleleft": case "subtitlefont": case "tempofont": case "continuous": case "botspace": case "nobarcheck": // TODO-PER: Actually handle the parameters of these tune.formatting[cmd] = restOfString; break; default: return "Unknown directive: " + cmd; break; } return null; };
var addVoice = function(id, newStaff, bracket, brace, continueBar) { if (newStaff || multilineVars.staves.length === 0) { multilineVars.staves.push({ index: multilineVars.staves.length, numVoices: 0 }); } var staff = multilineVars.staves.last(); if (bracket !== undefined) staff.bracket = bracket; if (brace !== undefined) staff.brace = brace; if (continueBar) staff.bar = 'end'; if (multilineVars.voices[id] === undefined) { multilineVars.voices[id] = { staffNum: staff.index, index: staff.numVoices}; staff.numVoices++; } }; var openParen = false; var openBracket = false; var openBrace = false; var justOpenParen = false; var justOpenBracket = false; var justOpenBrace = false; var continueBar = false; var lastVoice = undefined; while (tokens.length) { var t = tokens.shift(); switch (t.token) { case '(': if (openParen) warn("Can't nest parenthesis in %%score", str, t.start); else { openParen = true; justOpenParen = true; } break; case ')': if (!openParen || justOpenParen) warn("Unexpected close parenthesis in %%score", str, t.start); else openParen = false; break; case '[': if (openBracket) warn("Can't nest brackets in %%score", str, t.start); else { openBracket = true; justOpenBracket = true; } break; case ']': if (!openBracket || justOpenBracket) warn("Unexpected close bracket in %%score", str, t.start); else { openBracket = false; multilineVars.staves[lastVoice.staffNum].bracket = 'end'; } break; case '{': if (openBrace ) warn("Can't nest braces in %%score", str, t.start); else { openBrace = true; justOpenBrace = true; } break; case '}': if (!openBrace || justOpenBrace) warn("Unexpected close brace in %%score", str, t.start); else { openBrace = false; multilineVars.staves[lastVoice.staffNum].brace = 'end'; } break; case '|': continueBar = true; if (lastVoice) multilineVars.staves[lastVoice.staffNum].bar = 'start'; break; default: var vc = ""; while (t.type === 'alpha' || t.type === 'number') { vc += t.token; if (t.continueId) t = tokens.shift(); else break; } var newStaff = !openParen || justOpenParen; var bracket = justOpenBracket ? 'start' : openBracket ? 'continue' : undefined; var brace = justOpenBrace ? 'start' : openBrace ? 'continue' : undefined; addVoice(vc, newStaff, bracket, brace, continueBar); justOpenParen = false; justOpenBracket = false; justOpenBrace = false; continueBar = false; lastVoice = multilineVars.voices[vc]; break; } } break;
var addDirective = function(str) { var tokens = tokenizer.tokenize(str, 0, str.length); // 3 or more % in a row, or just spaces after %% is just a comment if (tokens.length === 0 || tokens[0].type !== 'alpha') return null; var restOfString = str.substring(str.indexOf(tokens[0])); var cmd = tokens.shift().token.toLowerCase();// var s = tokenizer.stripComment(str).strip();// if (s.length === 0) // 3 or more % in a row, or just spaces after %% is just a comment// return null;// var i = s.indexOf(' ');// var cmd = (i > 0) ? s.substring(0, i) : s; var num; var scratch = "";// cmd = cmd.toLowerCase(); switch (cmd) { case "bagpipes":tune.formatting.bagpipes = true;break; case "stretchlast":tune.formatting.stretchlast = true;break; case "staffwidth": if (tokens.length !== 1 || tokens[0].type != 'number') return "Directive \"" + cmd + "\" requires a number as a parameter."; tune.formatting.staffwidth = parseInt(tokens[0].token); break; case "scale": scratch = ""; tokens.each(function(tok) { scratch += tok.token; }); num = parseFloat(scratch); if (isNaN(num) || num === 0) return "Directive \"" + cmd + "\" requires a number as a parameter."; tune.formatting.scale = num; break; case "sep": // TODO-PER: This actually goes into the stream, it is not global if (tokens.length === 0) return "Directive \"" + cmd + "\" requires a string as a parameter."; tune.formatting.sep = tokens[0].token; break; case "barnumbers": if (tokens.length !== 1 || tokens[0].type != 'number') return "Directive \"" + cmd + "\" requires a number as a parameter."; multilineVars.barNumbers = tokens[0].token; break; case "begintext": multilineVars.inTextBlock = true; break; case "text": tune.addText(tokenizer.translateString(restOfString)); // display secondary title break; case "vocalfont": multilineVars.fontVocal = {}; var token = tokens.last(); if (token.type === 'number') { multilineVars.fontVocal.size = parseInt(token.token); tokens.pop(); } if (tokens.length > 0) { scratch = ""; tokens.each(function(tok) { if (tok.token === '-') scratch += ' '; else scratch += tok.token; }); multilineVars.fontVocal.font = scratch; } break; case "score": case "indent": case "voicefont": case "titlefont": case "barlabelfont": case "barnumfont": case "barnumberfont": case "topmargin": case "botmargin": case "topspace": case "titlespace": case "subtitlespace": case "composerspace": case "musicspace": case "partsspace": case "wordsspace": case "textspace": case "vocalspace": case "staffsep": case "linesep": case "midi": case "titlecaps": case "titlefont": case "composerfont": case "indent": case "playtempo": case "auquality": case "systemsep": case "sysstaffsep": case "landscape": case "gchordfont": case "leftmargin": case "partsfont": case "staves": case "slurgraces": case "titleleft": case "subtitlefont": case "tempofont": case "continuous": case "botspace": case "nobarcheck": // TODO-PER: Actually handle the parameters of these tune.formatting[cmd] = restOfString; break; default: return "Unknown directive: " + cmd; break; } return null; };
var addEndSlur = function(obj, num) {
var addEndSlur = function(obj, num, chordPos) {
var addEndSlur = function(obj, num) { obj.endSlur = []; for (var i = 0; i < num; i++) { obj.endSlur.push(currSlur); if (currSlur > 0) --currSlur; } };
obj.endSlur.push(currSlur); if (currSlur > 0) --currSlur;
obj.endSlur.push(currSlur[chordPos]); if (currSlur[chordPos] > 0) --currSlur[chordPos];
var addEndSlur = function(obj, num) { obj.endSlur = []; for (var i = 0; i < num; i++) { obj.endSlur.push(currSlur); if (currSlur > 0) --currSlur; } };
if (currSlur[chordPos] === undefined) currSlur[chordPos] = chordPos*100;
if (currSlur[chordPos] === undefined) { for (x = 0; x < currSlur.length; x++) { if (currSlur[x] !== undefined) { chordPos = x; break; } } if (currSlur[chordPos] === undefined) currSlur[chordPos] = [chordPos*100]; } var slurNum = currSlur[chordPos].pop();
var addEndSlur = function(obj, num, chordPos) { obj.endSlur = []; if (currSlur[chordPos] === undefined) currSlur[chordPos] = chordPos*100; for (var i = 0; i < num; i++) { obj.endSlur.push(currSlur[chordPos]); if (currSlur[chordPos] > 0) --currSlur[chordPos]; } };
obj.endSlur.push(currSlur[chordPos]); if (currSlur[chordPos] > 0) --currSlur[chordPos];
obj.endSlur.push(slurNum);
var addEndSlur = function(obj, num, chordPos) { obj.endSlur = []; if (currSlur[chordPos] === undefined) currSlur[chordPos] = chordPos*100; for (var i = 0; i < num; i++) { obj.endSlur.push(currSlur[chordPos]); if (currSlur[chordPos] > 0) --currSlur[chordPos]; } };
if (currSlur[chordPos].length === 0) delete currSlur[chordPos]; return slurNum;
var addEndSlur = function(obj, num, chordPos) { obj.endSlur = []; if (currSlur[chordPos] === undefined) currSlur[chordPos] = chordPos*100; for (var i = 0; i < num; i++) { obj.endSlur.push(currSlur[chordPos]); if (currSlur[chordPos] > 0) --currSlur[chordPos]; } };
m.setAttribute('type','text/javascript');m.appendText(l);m.appendTo(a.document.getHead());}};})();a.resourceManager=function(j,k){var l=this;l.basePath=j;l.fileName=k;l.registered={};l.loaded={};l.externals={};l._={waitingList:{}};};a.resourceManager.prototype={add:function(j,k){if(this.registered[j])throw '[CKEDITOR.resourceManager.add] The resource name "'+j+'" is already registered.';a.fire(j+e.capitalize(this.fileName)+'Ready',this.registered[j]=k||{});},get:function(j){return this.registered[j]||null;},getPath:function(j){var k=this.externals[j];return a.getUrl(k&&k.dir||this.basePath+j+'/');},getFilePath:function(j){var k=this.externals[j];return a.getUrl(this.getPath(j)+(k&&typeof k.file=='string'?k.file:this.fileName+'.js'));},addExternal:function(j,k,l){j=j.split(',');for(var m=0;m<j.length;m++){var n=j[m];this.externals[n]={dir:k,file:l};}},load:function(j,k,l){if(!e.isArray(j))j=j?[j]:[];var m=this.loaded,n=this.registered,o=[],p={},q={};for(var r=0;r<j.length;r++){var s=j[r];if(!s)continue;if(!m[s]&&!n[s]){var t=this.getFilePath(s);o.push(t);if(!(t in p))p[t]=[];p[t].push(s);}else q[s]=this.get(s);}a.scriptLoader.load(o,function(u,v){if(v.length)throw '[CKEDITOR.resourceManager.load] Resource name "'+p[v[0]].join(',')+'" was not found at "'+v[0]+'".';for(var w=0;w<u.length;w++){var x=p[u[w]];for(var y=0;y<x.length;y++){var z=x[y];q[z]=this.get(z);m[z]=1;}}k.call(l,q);},this);}};a.plugins=new a.resourceManager('plugins/','plugin');var j=a.plugins;j.load=e.override(j.load,function(k){return function(l,m,n){var o={},p=function(q){k.call(this,q,function(r){e.extend(o,r);var s=[];for(var t in r){var u=r[t],v=u&&u.requires;if(v)for(var w=0;w<v.length;w++){if(!o[v[w]])s.push(v[w]);}}if(s.length)p.call(this,s);else{for(t in o){u=o[t];if(u.onLoad&&!u.onLoad._called){u.onLoad();u.onLoad._called=1;}}if(m)m.call(n||window,o);}},this);};p.call(this,l);};});j.setLang=function(k,l,m){var n=this.get(k),o=n.lang||(n.lang={});o[l]=m;};(function(){var k={},l=function(m,n){var o=function(){p.removeAllListeners();k[m]=1;n();},p=new h('img');p.on('load',o);p.on('error',o);p.setAttribute('src',m);};a.imageCacher={load:function(m,n){var o=m.length,p=function(){if(--o===0)n();};for(var q=0;q<m.length;q++){var r=m[q];if(k[r])p();else l(r,p);}}};})();a.skins=(function(){var k={},l={},m={},n=function(o,p,q,r){var s=k[p];if(!o.skin){o.skin=s;if(s.init)s.init(o);}var t=function(D){for(var E=0;E<D.length;E++)D[E]=a.getUrl(m[p]+D[E]);};function u(D,E){return D.replace(/url\s*\(([\s'"]*)(.*?)([\s"']*)\)/g,function(F,G,H,I){if(/^\/|^\w?:/.test(H))return F;
},getPath:function(j){var k=this.externals[j];return a.getUrl(k&&k.dir||this.basePath+j+'/');},getFilePath:function(j){var k=this.externals[j];return a.getUrl(this.getPath(j)+(k&&typeof k.file=='string'?k.file:this.fileName+'.js'));},addExternal:function(j,k,l){j=j.split(',');for(var m=0;m<j.length;m++){var n=j[m];this.externals[n]={dir:k,file:l};}},load:function(j,k,l){if(!e.isArray(j))j=j?[j]:[];var m=this.loaded,n=this.registered,o=[],p={},q={};for(var r=0;r<j.length;r++){var s=j[r];if(!s)continue;if(!m[s]&&!n[s]){var t=this.getFilePath(s);o.push(t);if(!(t in p))p[t]=[];p[t].push(s);}else q[s]=this.get(s);}a.scriptLoader.load(o,function(u,v){if(v.length)throw '[CKEDITOR.resourceManager.load] Resource name "'+p[v[0]].join(',')+'" was not found at "'+v[0]+'".';for(var w=0;w<u.length;w++){var x=p[u[w]];for(var y=0;y<x.length;y++){var z=x[y];q[z]=this.get(z);m[z]=1;}}k.call(l,q);},this);}};a.plugins=new a.resourceManager('plugins/','plugin');var j=a.plugins;j.load=e.override(j.load,function(k){return function(l,m,n){var o={},p=function(q){k.call(this,q,function(r){e.extend(o,r);var s=[];for(var t in r){var u=r[t],v=u&&u.requires;if(v)for(var w=0;w<v.length;w++){if(!o[v[w]])s.push(v[w]);}}if(s.length)p.call(this,s);else{for(t in o){u=o[t];if(u.onLoad&&!u.onLoad._called){u.onLoad();u.onLoad._called=1;}}if(m)m.call(n||window,o);}},this);};p.call(this,l);};});j.setLang=function(k,l,m){var n=this.get(k),o=n.lang||(n.lang={});o[l]=m;};(function(){var k={},l=function(m,n){var o=function(){p.removeAllListeners();k[m]=1;n();},p=new h('img');p.on('load',o);p.on('error',o);p.setAttribute('src',m);};a.imageCacher={load:function(m,n){var o=m.length,p=function(){if(--o===0)n();};for(var q=0;q<m.length;q++){var r=m[q];if(k[r])p();else l(r,p);}}};})();a.skins=(function(){var k={},l={},m={},n=function(o,p,q,r){var s=k[p];if(!o.skin){o.skin=s;if(s.init)s.init(o);}var t=function(D){for(var E=0;E<D.length;E++)D[E]=a.getUrl(m[p]+D[E]);};function u(D,E){return D.replace(/url\s*\(([\s'"]*)(.*?)([\s"']*)\)/g,function(F,G,H,I){if(/^\/|^\w?:/.test(H))return F;else return 'url('+E+G+H+I+')';});};if(!l[p]){var v=s.preload;if(v&&v.length>0){t(v);a.imageCacher.load(v,function(){l[p]=1;n(o,p,q,r);});return;}l[p]=1;}q=s[q];var w=!q||!!q._isLoaded;if(w)r&&r();else{var x=q._pending||(q._pending=[]);x.push(r);if(x.length>1)return;var y=!q.css||!q.css.length,z=!q.js||!q.js.length,A=function(){if(y&&z){q._isLoaded=1;for(var D=0;D<x.length;D++){if(x[D])x[D]();}}};if(!y){var B=q.css;if(e.isArray(B)){t(B);
m.setAttribute('type','text/javascript');m.appendText(l);m.appendTo(a.document.getHead());}};})();a.resourceManager=function(j,k){var l=this;l.basePath=j;l.fileName=k;l.registered={};l.loaded={};l.externals={};l._={waitingList:{}};};a.resourceManager.prototype={add:function(j,k){if(this.registered[j])throw '[CKEDITOR.resourceManager.add] The resource name "'+j+'" is already registered.';a.fire(j+e.capitalize(this.fileName)+'Ready',this.registered[j]=k||{});},get:function(j){return this.registered[j]||null;},getPath:function(j){var k=this.externals[j];return a.getUrl(k&&k.dir||this.basePath+j+'/');},getFilePath:function(j){var k=this.externals[j];return a.getUrl(this.getPath(j)+(k&&typeof k.file=='string'?k.file:this.fileName+'.js'));},addExternal:function(j,k,l){j=j.split(',');for(var m=0;m<j.length;m++){var n=j[m];this.externals[n]={dir:k,file:l};}},load:function(j,k,l){if(!e.isArray(j))j=j?[j]:[];var m=this.loaded,n=this.registered,o=[],p={},q={};for(var r=0;r<j.length;r++){var s=j[r];if(!s)continue;if(!m[s]&&!n[s]){var t=this.getFilePath(s);o.push(t);if(!(t in p))p[t]=[];p[t].push(s);}else q[s]=this.get(s);}a.scriptLoader.load(o,function(u,v){if(v.length)throw '[CKEDITOR.resourceManager.load] Resource name "'+p[v[0]].join(',')+'" was not found at "'+v[0]+'".';for(var w=0;w<u.length;w++){var x=p[u[w]];for(var y=0;y<x.length;y++){var z=x[y];q[z]=this.get(z);m[z]=1;}}k.call(l,q);},this);}};a.plugins=new a.resourceManager('plugins/','plugin');var j=a.plugins;j.load=e.override(j.load,function(k){return function(l,m,n){var o={},p=function(q){k.call(this,q,function(r){e.extend(o,r);var s=[];for(var t in r){var u=r[t],v=u&&u.requires;if(v)for(var w=0;w<v.length;w++){if(!o[v[w]])s.push(v[w]);}}if(s.length)p.call(this,s);else{for(t in o){u=o[t];if(u.onLoad&&!u.onLoad._called){u.onLoad();u.onLoad._called=1;}}if(m)m.call(n||window,o);}},this);};p.call(this,l);};});j.setLang=function(k,l,m){var n=this.get(k),o=n.lang||(n.lang={});o[l]=m;};(function(){var k={},l=function(m,n){var o=function(){p.removeAllListeners();k[m]=1;n();},p=new h('img');p.on('load',o);p.on('error',o);p.setAttribute('src',m);};a.imageCacher={load:function(m,n){var o=m.length,p=function(){if(--o===0)n();};for(var q=0;q<m.length;q++){var r=m[q];if(k[r])p();else l(r,p);}}};})();a.skins=(function(){var k={},l={},m={},n=function(o,p,q,r){var s=k[p];if(!o.skin){o.skin=s;if(s.init)s.init(o);}var t=function(D){for(var E=0;E<D.length;E++)D[E]=a.getUrl(m[p]+D[E]);};function u(D,E){return D.replace(/url\s*\(([\s'"]*)(.*?)([\s"']*)\)/g,function(F,G,H,I){if(/^\/|^\w?:/.test(H))return F;
},isArray:function(f){return!!f&&f instanceof Array;},isEmpty:function(f){for(var g in f){if(f.hasOwnProperty(g))return false;}return true;},cssStyleToDomStyle:(function(){var f=document.createElement('div').style,g=typeof f.cssFloat!='undefined'?'cssFloat':typeof f.styleFloat!='undefined'?'styleFloat':'float';return function(h){if(h=='float')return g;else return h.replace(/-./g,function(i){return i.substr(1).toUpperCase();});};})(),buildStyleHtml:function(f){f=[].concat(f);var g,h=[];for(var i=0;i<f.length;i++){g=f[i];if(/@import|[{}]/.test(g))h.push('<style>'+g+'</style>');else h.push('<link type="text/css" rel=stylesheet href="'+g+'">');}return h.join('');},htmlEncode:function(f){var g=function(k){var l=new d.element('span');l.setText(k);return l.getHtml();},h=g('\n').toLowerCase()=='<br>'?function(k){return g(k).replace(/<br>/gi,'\n');}:g,i=g('>')=='>'?function(k){return h(k).replace(/>/g,'&gt;');}:h,j=g(' ')=='&nbsp; '?function(k){return i(k).replace(/&nbsp;/g,' ');}:i;this.htmlEncode=j;return this.htmlEncode(f);},htmlEncodeAttr:function(f){return f.replace(/"/g,'&quot;').replace(/</g,'&lt;').replace(/>/,'&gt;');},escapeCssSelector:function(f){return f.replace(/[\s#:.,$*^\[\]()~=+>]/g,'\\$&');},getNextNumber:(function(){var f=0;return function(){return++f;};})(),override:function(f,g){return g(f);},setTimeout:function(f,g,h,i,j){if(!j)j=window;if(!h)h=j;return j.setTimeout(function(){if(i)f.apply(h,[].concat(i));else f.apply(h);},g||0);},trim:(function(){var f=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(g){return g.replace(f,'');};})(),ltrim:(function(){var f=/^[ \t\n\r]+/g;return function(g){return g.replace(f,'');};})(),rtrim:(function(){var f=/[ \t\n\r]+$/g;return function(g){return g.replace(f,'');};})(),indexOf:Array.prototype.indexOf?function(f,g){return f.indexOf(g);}:function(f,g){for(var h=0,i=f.length;h<i;h++){if(f[h]===g)return h;}return-1;},bind:function(f,g){return function(){return f.apply(g,arguments);};},createClass:function(f){var g=f.$,h=f.base,i=f.privates||f._,j=f.proto,k=f.statics;if(i){var l=g;g=function(){var p=this;var m=p._||(p._={});for(var n in i){var o=i[n];m[n]=typeof o=='function'?a.tools.bind(o,p):o;}l.apply(p,arguments);};}if(h){g.prototype=this.prototypedCopy(h.prototype);g.prototype['constructor']=g;g.prototype.base=function(){this.base=h.prototype.base;h.apply(this,arguments);this.base=arguments.callee;};}if(j)this.extend(g.prototype,j,true);if(k)this.extend(g,k,true);return g;},addFunction:function(f,g){return e.push(function(){f.apply(g||this,arguments); })-1;},removeFunction:function(f){e[f]=null;},callFunction:function(f){var g=e[f];return g&&g.apply(window,Array.prototype.slice.call(arguments,1));},cssLength:(function(){var f=/^\d+(?:\.\d+)?$/;return function(g){return g+(f.test(g)?'px':'');};})(),repeat:function(f,g){return new Array(g+1).join(f);},tryThese:function(){var f;for(var g=0,h=arguments.length;g<h;g++){var i=arguments[g];try{f=i();break;}catch(j){}}return f;}};})();var e=a.tools;a.dtd=(function(){var f=e.extend,g={isindex:1,fieldset:1},h={input:1,button:1,select:1,textarea:1,label:1},i=f({a:1},h),j=f({iframe:1},i),k={hr:1,ul:1,menu:1,div:1,blockquote:1,noscript:1,table:1,center:1,address:1,dir:1,pre:1,h5:1,dl:1,h4:1,noframes:1,h6:1,ol:1,h1:1,h3:1,h2:1},l={ins:1,del:1,script:1,style:1},m=f({b:1,acronym:1,bdo:1,'var':1,'#':1,abbr:1,code:1,br:1,i:1,cite:1,kbd:1,u:1,strike:1,s:1,tt:1,strong:1,q:1,samp:1,em:1,dfn:1,span:1},l),n=f({sub:1,img:1,object:1,sup:1,basefont:1,map:1,applet:1,font:1,big:1,small:1},m),o=f({p:1},n),p=f({iframe:1},n,h),q={img:1,noscript:1,br:1,kbd:1,center:1,button:1,basefont:1,h5:1,h4:1,samp:1,h6:1,ol:1,h1:1,h3:1,h2:1,form:1,font:1,'#':1,select:1,menu:1,ins:1,abbr:1,label:1,code:1,table:1,script:1,cite:1,input:1,iframe:1,strong:1,textarea:1,noframes:1,big:1,small:1,span:1,hr:1,sub:1,bdo:1,'var':1,div:1,object:1,sup:1,strike:1,dir:1,map:1,dl:1,applet:1,del:1,isindex:1,fieldset:1,ul:1,b:1,acronym:1,a:1,blockquote:1,i:1,u:1,s:1,tt:1,address:1,q:1,pre:1,p:1,em:1,dfn:1},r=f({a:1},p),s={tr:1},t={'#':1},u=f({param:1},q),v=f({form:1},g,j,k,o),w={li:1},x={style:1,script:1},y={base:1,link:1,meta:1,title:1},z=f(y,x),A={head:1,body:1},B={html:1},C={address:1,blockquote:1,center:1,dir:1,div:1,dl:1,fieldset:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,isindex:1,menu:1,noframes:1,ol:1,p:1,pre:1,table:1,ul:1};return{$nonBodyContent:f(B,A,y),$block:C,$blockLimit:{body:1,div:1,td:1,th:1,caption:1,form:1},$inline:r,$body:f({script:1,style:1},C),$cdata:{script:1,style:1},$empty:{area:1,base:1,br:1,col:1,hr:1,img:1,input:1,link:1,meta:1,param:1},$listItem:{dd:1,dt:1,li:1},$list:{ul:1,ol:1,dl:1},$nonEditable:{applet:1,button:1,embed:1,iframe:1,map:1,object:1,option:1,script:1,textarea:1,param:1},$removeEmpty:{abbr:1,acronym:1,address:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,s:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1},$tabIndex:{a:1,area:1,button:1,input:1,object:1,select:1,textarea:1},$tableContent:{caption:1,col:1,colgroup:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1},html:A,head:z,style:t,script:t,body:v,base:{},link:{},meta:{},title:t,col:{},tr:{td:1,th:1},img:{},colgroup:{col:1},noscript:v,td:v,br:{},th:v,center:v,kbd:r,button:f(o,k),basefont:{},h5:r,h4:r,samp:r,h6:r,ol:w,h1:r,h3:r,option:t,h2:r,form:f(g,j,k,o),select:{optgroup:1,option:1},font:r,ins:r,menu:w,abbr:r,label:r,table:{thead:1,col:1,tbody:1,tr:1,colgroup:1,caption:1,tfoot:1},code:r,script:t,tfoot:s,cite:r,li:v,input:{},iframe:v,strong:r,textarea:t,noframes:v,big:r,small:r,span:r,hr:{},dt:r,sub:r,optgroup:{option:1},param:{},bdo:r,'var':r,div:v,object:u,sup:r,dd:v,strike:r,area:{},dir:w,map:f({area:1,form:1,p:1},g,l,k),applet:u,dl:{dt:1,dd:1},del:r,isindex:{},fieldset:f({legend:1},q),thead:s,ul:w,acronym:r,b:r,a:p,blockquote:v,caption:r,i:r,u:r,tbody:s,s:r,address:f(j,o),tt:r,legend:r,q:r,pre:f(m,i),p:r,em:r,dfn:r};
if(k)this.extend(g,k,true);return g;},addFunction:function(f,g){return e.push(function(){f.apply(g||this,arguments);})-1;},removeFunction:function(f){e[f]=null;},callFunction:function(f){var g=e[f];return g&&g.apply(window,Array.prototype.slice.call(arguments,1));},cssLength:(function(){var f=/^\d+(?:\.\d+)?$/;return function(g){return g+(f.test(g)?'px':'');};})(),repeat:function(f,g){return new Array(g+1).join(f);},tryThese:function(){var f;for(var g=0,h=arguments.length;g<h;g++){var i=arguments[g];try{f=i();break;}catch(j){}}return f;},genKey:function(){return Array.prototype.slice.call(arguments).join('-');}};})();var e=a.tools;a.dtd=(function(){var f=e.extend,g={isindex:1,fieldset:1},h={input:1,button:1,select:1,textarea:1,label:1},i=f({a:1},h),j=f({iframe:1},i),k={hr:1,ul:1,menu:1,div:1,blockquote:1,noscript:1,table:1,center:1,address:1,dir:1,pre:1,h5:1,dl:1,h4:1,noframes:1,h6:1,ol:1,h1:1,h3:1,h2:1},l={ins:1,del:1,script:1,style:1},m=f({b:1,acronym:1,bdo:1,'var':1,'#':1,abbr:1,code:1,br:1,i:1,cite:1,kbd:1,u:1,strike:1,s:1,tt:1,strong:1,q:1,samp:1,em:1,dfn:1,span:1},l),n=f({sub:1,img:1,object:1,sup:1,basefont:1,map:1,applet:1,font:1,big:1,small:1},m),o=f({p:1},n),p=f({iframe:1},n,h),q={img:1,noscript:1,br:1,kbd:1,center:1,button:1,basefont:1,h5:1,h4:1,samp:1,h6:1,ol:1,h1:1,h3:1,h2:1,form:1,font:1,'#':1,select:1,menu:1,ins:1,abbr:1,label:1,code:1,table:1,script:1,cite:1,input:1,iframe:1,strong:1,textarea:1,noframes:1,big:1,small:1,span:1,hr:1,sub:1,bdo:1,'var':1,div:1,object:1,sup:1,strike:1,dir:1,map:1,dl:1,applet:1,del:1,isindex:1,fieldset:1,ul:1,b:1,acronym:1,a:1,blockquote:1,i:1,u:1,s:1,tt:1,address:1,q:1,pre:1,p:1,em:1,dfn:1},r=f({a:1},p),s={tr:1},t={'#':1},u=f({param:1},q),v=f({form:1},g,j,k,o),w={li:1},x={style:1,script:1},y={base:1,link:1,meta:1,title:1},z=f(y,x),A={head:1,body:1},B={html:1},C={address:1,blockquote:1,center:1,dir:1,div:1,dl:1,fieldset:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,isindex:1,menu:1,noframes:1,ol:1,p:1,pre:1,table:1,ul:1};return{$nonBodyContent:f(B,A,y),$block:C,$blockLimit:{body:1,div:1,td:1,th:1,caption:1,form:1},$inline:r,$body:f({script:1,style:1},C),$cdata:{script:1,style:1},$empty:{area:1,base:1,br:1,col:1,hr:1,img:1,input:1,link:1,meta:1,param:1},$listItem:{dd:1,dt:1,li:1},$list:{ul:1,ol:1,dl:1},$nonEditable:{applet:1,button:1,embed:1,iframe:1,map:1,object:1,option:1,script:1,textarea:1,param:1},$removeEmpty:{abbr:1,acronym:1,address:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,s:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1},$tabIndex:{a:1,area:1,button:1,input:1,object:1,select:1,textarea:1},$tableContent:{caption:1,col:1,colgroup:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1},html:A,head:z,style:t,script:t,body:v,base:{},link:{},meta:{},title:t,col:{},tr:{td:1,th:1},img:{},colgroup:{col:1},noscript:v,td:v,br:{},th:v,center:v,kbd:r,button:f(o,k),basefont:{},h5:r,h4:r,samp:r,h6:r,ol:w,h1:r,h3:r,option:t,h2:r,form:f(g,j,k,o),select:{optgroup:1,option:1},font:r,ins:r,menu:w,abbr:r,label:r,table:{thead:1,col:1,tbody:1,tr:1,colgroup:1,caption:1,tfoot:1},code:r,script:t,tfoot:s,cite:r,li:v,input:{},iframe:v,strong:r,textarea:t,noframes:v,big:r,small:r,span:r,hr:{},dt:r,sub:r,optgroup:{option:1},param:{},bdo:r,'var':r,div:v,object:u,sup:r,dd:v,strike:r,area:{},dir:w,map:f({area:1,form:1,p:1},g,l,k),applet:u,dl:{dt:1,dd:1},del:r,isindex:{},fieldset:f({legend:1},q),thead:s,ul:w,acronym:r,b:r,a:p,blockquote:v,caption:r,i:r,u:r,tbody:s,s:r,address:f(j,o),tt:r,legend:r,q:r,pre:f(m,i),p:r,em:r,dfn:r};
},isArray:function(f){return!!f&&f instanceof Array;},isEmpty:function(f){for(var g in f){if(f.hasOwnProperty(g))return false;}return true;},cssStyleToDomStyle:(function(){var f=document.createElement('div').style,g=typeof f.cssFloat!='undefined'?'cssFloat':typeof f.styleFloat!='undefined'?'styleFloat':'float';return function(h){if(h=='float')return g;else return h.replace(/-./g,function(i){return i.substr(1).toUpperCase();});};})(),buildStyleHtml:function(f){f=[].concat(f);var g,h=[];for(var i=0;i<f.length;i++){g=f[i];if(/@import|[{}]/.test(g))h.push('<style>'+g+'</style>');else h.push('<link type="text/css" rel=stylesheet href="'+g+'">');}return h.join('');},htmlEncode:function(f){var g=function(k){var l=new d.element('span');l.setText(k);return l.getHtml();},h=g('\n').toLowerCase()=='<br>'?function(k){return g(k).replace(/<br>/gi,'\n');}:g,i=g('>')=='>'?function(k){return h(k).replace(/>/g,'&gt;');}:h,j=g(' ')=='&nbsp; '?function(k){return i(k).replace(/&nbsp;/g,' ');}:i;this.htmlEncode=j;return this.htmlEncode(f);},htmlEncodeAttr:function(f){return f.replace(/"/g,'&quot;').replace(/</g,'&lt;').replace(/>/,'&gt;');},escapeCssSelector:function(f){return f.replace(/[\s#:.,$*^\[\]()~=+>]/g,'\\$&');},getNextNumber:(function(){var f=0;return function(){return++f;};})(),override:function(f,g){return g(f);},setTimeout:function(f,g,h,i,j){if(!j)j=window;if(!h)h=j;return j.setTimeout(function(){if(i)f.apply(h,[].concat(i));else f.apply(h);},g||0);},trim:(function(){var f=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(g){return g.replace(f,'');};})(),ltrim:(function(){var f=/^[ \t\n\r]+/g;return function(g){return g.replace(f,'');};})(),rtrim:(function(){var f=/[ \t\n\r]+$/g;return function(g){return g.replace(f,'');};})(),indexOf:Array.prototype.indexOf?function(f,g){return f.indexOf(g);}:function(f,g){for(var h=0,i=f.length;h<i;h++){if(f[h]===g)return h;}return-1;},bind:function(f,g){return function(){return f.apply(g,arguments);};},createClass:function(f){var g=f.$,h=f.base,i=f.privates||f._,j=f.proto,k=f.statics;if(i){var l=g;g=function(){var p=this;var m=p._||(p._={});for(var n in i){var o=i[n];m[n]=typeof o=='function'?a.tools.bind(o,p):o;}l.apply(p,arguments);};}if(h){g.prototype=this.prototypedCopy(h.prototype);g.prototype['constructor']=g;g.prototype.base=function(){this.base=h.prototype.base;h.apply(this,arguments);this.base=arguments.callee;};}if(j)this.extend(g.prototype,j,true);if(k)this.extend(g,k,true);return g;},addFunction:function(f,g){return e.push(function(){f.apply(g||this,arguments);})-1;},removeFunction:function(f){e[f]=null;},callFunction:function(f){var g=e[f];return g&&g.apply(window,Array.prototype.slice.call(arguments,1));},cssLength:(function(){var f=/^\d+(?:\.\d+)?$/;return function(g){return g+(f.test(g)?'px':'');};})(),repeat:function(f,g){return new Array(g+1).join(f);},tryThese:function(){var f;for(var g=0,h=arguments.length;g<h;g++){var i=arguments[g];try{f=i();break;}catch(j){}}return f;}};})();var e=a.tools;a.dtd=(function(){var f=e.extend,g={isindex:1,fieldset:1},h={input:1,button:1,select:1,textarea:1,label:1},i=f({a:1},h),j=f({iframe:1},i),k={hr:1,ul:1,menu:1,div:1,blockquote:1,noscript:1,table:1,center:1,address:1,dir:1,pre:1,h5:1,dl:1,h4:1,noframes:1,h6:1,ol:1,h1:1,h3:1,h2:1},l={ins:1,del:1,script:1,style:1},m=f({b:1,acronym:1,bdo:1,'var':1,'#':1,abbr:1,code:1,br:1,i:1,cite:1,kbd:1,u:1,strike:1,s:1,tt:1,strong:1,q:1,samp:1,em:1,dfn:1,span:1},l),n=f({sub:1,img:1,object:1,sup:1,basefont:1,map:1,applet:1,font:1,big:1,small:1},m),o=f({p:1},n),p=f({iframe:1},n,h),q={img:1,noscript:1,br:1,kbd:1,center:1,button:1,basefont:1,h5:1,h4:1,samp:1,h6:1,ol:1,h1:1,h3:1,h2:1,form:1,font:1,'#':1,select:1,menu:1,ins:1,abbr:1,label:1,code:1,table:1,script:1,cite:1,input:1,iframe:1,strong:1,textarea:1,noframes:1,big:1,small:1,span:1,hr:1,sub:1,bdo:1,'var':1,div:1,object:1,sup:1,strike:1,dir:1,map:1,dl:1,applet:1,del:1,isindex:1,fieldset:1,ul:1,b:1,acronym:1,a:1,blockquote:1,i:1,u:1,s:1,tt:1,address:1,q:1,pre:1,p:1,em:1,dfn:1},r=f({a:1},p),s={tr:1},t={'#':1},u=f({param:1},q),v=f({form:1},g,j,k,o),w={li:1},x={style:1,script:1},y={base:1,link:1,meta:1,title:1},z=f(y,x),A={head:1,body:1},B={html:1},C={address:1,blockquote:1,center:1,dir:1,div:1,dl:1,fieldset:1,form:1,h1:1,h2:1,h3:1,h4:1,h5:1,h6:1,hr:1,isindex:1,menu:1,noframes:1,ol:1,p:1,pre:1,table:1,ul:1};return{$nonBodyContent:f(B,A,y),$block:C,$blockLimit:{body:1,div:1,td:1,th:1,caption:1,form:1},$inline:r,$body:f({script:1,style:1},C),$cdata:{script:1,style:1},$empty:{area:1,base:1,br:1,col:1,hr:1,img:1,input:1,link:1,meta:1,param:1},$listItem:{dd:1,dt:1,li:1},$list:{ul:1,ol:1,dl:1},$nonEditable:{applet:1,button:1,embed:1,iframe:1,map:1,object:1,option:1,script:1,textarea:1,param:1},$removeEmpty:{abbr:1,acronym:1,address:1,b:1,bdo:1,big:1,cite:1,code:1,del:1,dfn:1,em:1,font:1,i:1,ins:1,label:1,kbd:1,q:1,s:1,samp:1,small:1,span:1,strike:1,strong:1,sub:1,sup:1,tt:1,u:1,'var':1},$tabIndex:{a:1,area:1,button:1,input:1,object:1,select:1,textarea:1},$tableContent:{caption:1,col:1,colgroup:1,tbody:1,td:1,tfoot:1,th:1,thead:1,tr:1},html:A,head:z,style:t,script:t,body:v,base:{},link:{},meta:{},title:t,col:{},tr:{td:1,th:1},img:{},colgroup:{col:1},noscript:v,td:v,br:{},th:v,center:v,kbd:r,button:f(o,k),basefont:{},h5:r,h4:r,samp:r,h6:r,ol:w,h1:r,h3:r,option:t,h2:r,form:f(g,j,k,o),select:{optgroup:1,option:1},font:r,ins:r,menu:w,abbr:r,label:r,table:{thead:1,col:1,tbody:1,tr:1,colgroup:1,caption:1,tfoot:1},code:r,script:t,tfoot:s,cite:r,li:v,input:{},iframe:v,strong:r,textarea:t,noframes:v,big:r,small:r,span:r,hr:{},dt:r,sub:r,optgroup:{option:1},param:{},bdo:r,'var':r,div:v,object:u,sup:r,dd:v,strike:r,area:{},dir:w,map:f({area:1,form:1,p:1},g,l,k),applet:u,dl:{dt:1,dd:1},del:r,isindex:{},fieldset:f({legend:1},q),thead:s,ul:w,acronym:r,b:r,a:p,blockquote:v,caption:r,i:r,u:r,tbody:s,s:r,address:f(j,o),tt:r,legend:r,q:r,pre:f(m,i),p:r,em:r,dfn:r};
for (var i=0; i<numEvents; i++){
for (var i=0; i<numEvents; i += 1){
addListener: function(listener){ var events = listener.events; if (_isUndefined(events)){ Xmla.Exception._newError( "NO_EVENTS_SPECIFIED", "Xmla.addListener", listener )._throw(); } if (_isString(events)){ if (events==="all"){ events = Xmla.EVENT_ALL; } else { events = events.split(","); } } if (!(events instanceof Array)){ Xmla.Exception._newError( "WRONG_EVENTS_FORMAT", "Xmla.addListener", listener )._throw(); } var numEvents = events.length; var eventName, myListeners; for (var i=0; i<numEvents; i++){ eventName = events[i].replace(/\s+/g,""); myListeners = this.listeners[eventName]; if (!myListeners) { Xmla.Exception._newError( "UNKNOWN_EVENT", "Xmla.addListener", listener )._throw(); } if (_isFunction(listener.handler)){ if (!_isObject(listener.scope)) { listener.scope = window; } myListeners.push(listener); } else { Xmla.Exception._newError( "INVALID_EVENT_HANDLER", "Xmla.addListener", listener )._throw(); } } },
"Content";Xmla.PROP_CONTENT_DATA="Data";Xmla.PROP_CONTENT_NONE="None";Xmla.PROP_CONTENT_SCHEMA="Schema";Xmla.PROP_CONTENT_SCHEMADATA="SchemaData";Xmla.prototype={listeners:null,soapMessage:null,response:null,responseText:null,responseXml:null,setOptions:function(a){h(this.options,a,true)},addListener:function(a){var b=a.events;j(b)&&Xmla.Exception._newError("NO_EVENTS_SPECIFIED","Xmla.addListener",a)._throw();if(N(b))b=b==="all"?Xmla.EVENT_ALL:b.split(",");b instanceof Array||Xmla.Exception._newError("WRONG_EVENTS_FORMAT", "Xmla.addListener",a)._throw();for(var d=b.length,c,e=0;e<d;e++){c=b[e].replace(/\s+/g,"");(c=this.listeners[c])||Xmla.Exception._newError("UNKNOWN_EVENT","Xmla.addListener",a)._throw();if(t(a.handler)){if(!P(a.scope))a.scope=window;c.push(a)}else Xmla.Exception._newError("INVALID_EVENT_HANDLER","Xmla.addListener",a)._throw()}},_fireEvent:function(a,b,d){var c=this.listeners[a];c||Xmla.Exception._newError("UNKNOWN_EVENT","Xmla._fireEvent",a)._throw();var e=c.length,f=true;if(e)for(var g,i=0;i<e;i++){g=
"CustomFormat";Xmla.PROP_CONTENT="Content";Xmla.PROP_CONTENT_DATA="Data";Xmla.PROP_CONTENT_NONE="None";Xmla.PROP_CONTENT_SCHEMA="Schema";Xmla.PROP_CONTENT_SCHEMADATA="SchemaData";Xmla.prototype={listeners:null,soapMessage:null,response:null,responseText:null,responseXml:null,setOptions:function(a){g(this.options,a,true)},addListener:function(a){var b=a.events;j(b)&&Xmla.Exception._newError("NO_EVENTS_SPECIFIED","Xmla.addListener",a)._throw();if(N(b))b=b==="all"?Xmla.EVENT_ALL:b.split(",");b instanceof Array||Xmla.Exception._newError("WRONG_EVENTS_FORMAT","Xmla.addListener",a)._throw();for(var d=b.length,c,e=0;e<d;e+=1){c=b[e].replace(/\s+/g,"");(c=this.listeners[c])||Xmla.Exception._newError("UNKNOWN_EVENT","Xmla.addListener",a)._throw();if(M(a.handler)){if(!P(a.scope))a.scope=window;c.push(a)}else Xmla.Exception._newError("INVALID_EVENT_HANDLER","Xmla.addListener",a)._throw()}},_fireEvent:function(a,b,d){var c=this.listeners[a];c||Xmla.Exception._newError("UNKNOWN_EVENT","Xmla._fireEvent",a)._throw();
"Content";Xmla.PROP_CONTENT_DATA="Data";Xmla.PROP_CONTENT_NONE="None";Xmla.PROP_CONTENT_SCHEMA="Schema";Xmla.PROP_CONTENT_SCHEMADATA="SchemaData";Xmla.prototype={listeners:null,soapMessage:null,response:null,responseText:null,responseXml:null,setOptions:function(a){h(this.options,a,true)},addListener:function(a){var b=a.events;j(b)&&Xmla.Exception._newError("NO_EVENTS_SPECIFIED","Xmla.addListener",a)._throw();if(N(b))b=b==="all"?Xmla.EVENT_ALL:b.split(",");b instanceof Array||Xmla.Exception._newError("WRONG_EVENTS_FORMAT","Xmla.addListener",a)._throw();for(var d=b.length,c,e=0;e<d;e++){c=b[e].replace(/\s+/g,"");(c=this.listeners[c])||Xmla.Exception._newError("UNKNOWN_EVENT","Xmla.addListener",a)._throw();if(t(a.handler)){if(!P(a.scope))a.scope=window;c.push(a)}else Xmla.Exception._newError("INVALID_EVENT_HANDLER","Xmla.addListener",a)._throw()}},_fireEvent:function(a,b,d){var c=this.listeners[a];c||Xmla.Exception._newError("UNKNOWN_EVENT","Xmla._fireEvent",a)._throw();var e=c.length,f=true;if(e)for(var g,i=0;i<e;i++){g=
var self = this;
try { var self = this;
addListeners : function() { var self = this; this.handle_current_view_check_status_setup = function(event) { self.onCurrentViewCheckStatus(event); }; this.handle_view_closed_setup = function(event) { self.onViewClosed(event); }; window.addEventListener('current_view_check_status', this.handle_current_view_check_status_setup, false); window.addEventListener('view_closed', this.handle_view_closed_setup, false); },
this.handle_current_view_check_status_setup = function(event) { self.onCurrentViewCheckStatus(event); };
this.handle_current_view_check_status_setup = function(event) {
addListeners : function() { var self = this; this.handle_current_view_check_status_setup = function(event) { self.onCurrentViewCheckStatus(event); }; this.handle_view_closed_setup = function(event) { self.onViewClosed(event); }; window.addEventListener('current_view_check_status', this.handle_current_view_check_status_setup, false); window.addEventListener('view_closed', this.handle_view_closed_setup, false); },
this.handle_view_closed_setup = function(event) { self.onViewClosed(event); };
self.pushEdit(); };
addListeners : function() { var self = this; this.handle_current_view_check_status_setup = function(event) { self.onCurrentViewCheckStatus(event); }; this.handle_view_closed_setup = function(event) { self.onViewClosed(event); }; window.addEventListener('current_view_check_status', this.handle_current_view_check_status_setup, false); window.addEventListener('view_closed', this.handle_view_closed_setup, false); },
window.addEventListener('current_view_check_status', this.handle_current_view_check_status_setup, false); window.addEventListener('view_closed', this.handle_view_closed_setup, false);
this.handle_view_opened_setup = function(event) { self.viewOpened(event.originalTarget); }; this.handle_view_closed_setup = function(event) { self.viewClosed(event.originalTarget); }; if (this.prefs.editCompatibility) { window.addEventListener('current_view_check_status', this.handle_current_view_check_status_setup, false); }; window.addEventListener('view_opened', this.handle_view_opened_setup, false); window.addEventListener('view_closed', this.handle_view_closed_setup, false); } catch (err) { DafizillaCommon.exception(err); }
addListeners : function() { var self = this; this.handle_current_view_check_status_setup = function(event) { self.onCurrentViewCheckStatus(event); }; this.handle_view_closed_setup = function(event) { self.onViewClosed(event); }; window.addEventListener('current_view_check_status', this.handle_current_view_check_status_setup, false); window.addEventListener('view_closed', this.handle_view_closed_setup, false); },
this._KFLog.debug("Log in Last.fm");
addLogin: function(login, parentUUID) { try { this._KFLog.debug("Log in Last.fm"); return this.KeePassRPC.addLogin(login, parentUUID); } catch (e) { this._KFLog.error("Unexpected exception while connecting to KeePassRPC. Please inform the KeeFox team that they should be handling this exception: " + e); throw e; } },
if (logins.some(function(l) { return login.matches(l, false, false, false, false); }))
if (logins.some(function(l) { return login.matches(l, false, true, false, false); }))
addLogin : function (login, parentUUID) { // Sanity check the login if (login.URLs == null || login.URLs.length == 0) throw "Can't add a login with a null or empty list of hostnames / URLs."; // For logins w/o a username, set to "", not null. //if (login.username == null) // throw "Can't add a login with a null username."; if (login.passwords == null || login.passwords.length <= 0) throw "Can't add a login with a null or empty list of passwords."; if (login.formActionURL || login.formActionURL == "") { // We have a form submit URL. Can't have a HTTP realm. if (login.httpRealm != null) throw "Can't add a login with both a httpRealm and formSubmitURL."; } else if (login.httpRealm) { // We have a HTTP realm. Can't have a form submit URL. if (login.formActionURL != null) throw "Can't add a login with both a httpRealm and formSubmitURL."; } else { // Need one or the other! throw "Can't add a login without a httpRealm or formSubmitURL."; } var primaryURL = ""; // Look for an existing entry. // NB: maybe not ideal - would be nice to search for all URLs in // one go but in practice this will affect performance only rarely for (i = 0; i < login.URLs.length; i++) { var loginURL = login.URLs[i]; var logins = this.findLogins(loginURL, login.formActionURL, login.httpRealm); //TODO 0.8: Test this - I changed it during KeePassRPC migration if (logins.some(function(l) { return login.matches(l, false, false, false, false); })) { KFLog.info("This login already exists."); return "This login already exists."; } if (i == 0) primaryURL = loginURL; } if (this._kf._keeFoxExtension.prefs.getValue("saveFavicons",false)) { try { login.iconImageData = this._kf.loadFavicon(primaryURL); } catch (ex) { // something failed so we can't get the favicon. We don't really mind too much... } } KFLog.info("Adding login to group: " + parentUUID); return this._kf.addLogin(login, parentUUID); },
var result = this.syncRequest(this, "AddLogin", [jslogin, parentUUID]);
this.request(this, "AddLogin", [jslogin, parentUUID], null, ++this.requestId);
this.addLogin = function(login, parentUUID) { var jslogin = login.asEntry(); var result = this.syncRequest(this, "AddLogin", [jslogin, parentUUID]); return; }
addMetaText: function(key, value) {
this.addMetaText = function(key, value) {
addMetaText: function(key, value) { if (this.metaText[key] === undefined) this.metaText[key] = value; else this.metaText[key] += "\n" + value; }
}
};
addMetaText: function(key, value) { if (this.metaText[key] === undefined) this.metaText[key] = value; else this.metaText[key] += "\n" + value; }
else if (attr.token.length === 0)
else if (attr.token.length === 0 && line[start] !== '"')
var addNextTokenToStaffInfo = function(name) { var attr = tokenizer.getVoiceToken(line, start, end); if (attr.warn !== undefined) warn("Expected value for " + name + " in voice: " + attr.warn, line, start); else if (attr.token.length === 0) warn("Expected value for " + name + " in voice", line, start); else staffInfo[name] = attr.token; start += attr.len; };
addPositionToStack : function(toStack) { var currView = ko.views.manager.currentView; var scimoz = currView.scintilla.scimoz; var currentPos = scimoz.currentPos;
addPositionToStack : function(toStack, view, position) { try { var cleared = false; if (this.editClearNextStack) { if (this.nextEditStack.length > 0) { this.nextEditStack.clear(); cleared = true; } }
addPositionToStack : function(toStack) { var currView = ko.views.manager.currentView; var scimoz = currView.scintilla.scimoz; var currentPos = scimoz.currentPos; toStack.push({ view : currView, position : currentPos, line: scimoz.lineFromPosition(currentPos), col: scimoz.getColumn(currentPos)}); if (this.prefs.editClearNextStack) { this.nextEditStack.clear(); } this.updateCommands(); },
toStack.push({ view : currView, position : currentPos, line: scimoz.lineFromPosition(currentPos), col: scimoz.getColumn(currentPos)});
var scimoz = view.scimoz; var line = scimoz.lineFromPosition(position); var marker = scimoz.markerAdd(line, MARKNUM_EDITPOSLOC);
addPositionToStack : function(toStack) { var currView = ko.views.manager.currentView; var scimoz = currView.scintilla.scimoz; var currentPos = scimoz.currentPos; toStack.push({ view : currView, position : currentPos, line: scimoz.lineFromPosition(currentPos), col: scimoz.getColumn(currentPos)}); if (this.prefs.editClearNextStack) { this.nextEditStack.clear(); } this.updateCommands(); },
if (this.prefs.editClearNextStack) { this.nextEditStack.clear();
toStack.push({ view : view, position : position, line: line, col: scimoz.getColumn(position), marker: marker}); if (toStack.length == 1 || cleared) { this.updateCommands(); } } catch (err) { DafizillaCommon.exception(err);
addPositionToStack : function(toStack) { var currView = ko.views.manager.currentView; var scimoz = currView.scintilla.scimoz; var currentPos = scimoz.currentPos; toStack.push({ view : currView, position : currentPos, line: scimoz.lineFromPosition(currentPos), col: scimoz.getColumn(currentPos)}); if (this.prefs.editClearNextStack) { this.nextEditStack.clear(); } this.updateCommands(); },
this.updateCommands();
addPositionToStack : function(toStack) { var currView = ko.views.manager.currentView; var scimoz = currView.scintilla.scimoz; var currentPos = scimoz.currentPos; toStack.push({ view : currView, position : currentPos, line: scimoz.lineFromPosition(currentPos), col: scimoz.getColumn(currentPos)}); if (this.prefs.editClearNextStack) { this.nextEditStack.clear(); } this.updateCommands(); },
var mid = calcMiddle(clef.type, 0);
var mid = clef.verticalPos;
this.addPosToKey = function(clef, key) { var mid = calcMiddle(clef.type, 0); key.accidentals.each(function(acc) { var pitch = pitches[acc.note]; pitch = pitch - mid; acc.verticalPos = pitch % 14; // Always keep this on the two octaves on the staff }); };
acc.verticalPos = pitch % 14;
acc.verticalPos = pitch;
this.addPosToKey = function(clef, key) { var mid = calcMiddle(clef.type, 0); key.accidentals.each(function(acc) { var pitch = pitches[acc.note]; pitch = pitch - mid; acc.verticalPos = pitch % 14; // Always keep this on the two octaves on the staff }); };
if (mid < -10) { key.accidentals.each(function(acc) { acc.verticalPos -= 14; }); } else if (mid < -4) { key.accidentals.each(function(acc) { acc.verticalPos -= 7; }); }
this.addPosToKey = function(clef, key) { var mid = calcMiddle(clef.type, 0); key.accidentals.each(function(acc) { var pitch = pitches[acc.note]; pitch = pitch - mid; acc.verticalPos = pitch % 14; // Always keep this on the two octaves on the staff }); };
acc.verticalPos -= 14;
acc.verticalPos -= 7; if (acc.verticalPos >= 11 || (acc.verticalPos === 10 && acc.acc === 'flat')) acc.verticalPos -= 7;
this.addPosToKey = function(clef, key) { // Shift the key signature from the treble positions to whatever position is needed for the clef. // This may put the key signature unnaturally high or low, so if it does, then shift it. var mid = clef.verticalPos; key.accidentals.each(function(acc) { var pitch = pitches[acc.note]; pitch = pitch - mid; acc.verticalPos = pitch; }); if (mid < -10) { key.accidentals.each(function(acc) { acc.verticalPos -= 14; }); } else if (mid < -4) { key.accidentals.each(function(acc) { acc.verticalPos -= 7; }); } };
var mid = calcMiddle(clef.type, 0); key.extraAccidentals.each(function(acc) { var pitch = pitches[acc.note]; pitch = pitch + 6 - mid; acc.verticalPos = pitch % 14; }) };
var mid = calcMiddle(clef.type, 0); key.extraAccidentals.each(function(acc) { var pitch = pitches[acc.note]; pitch = pitch + 6 - mid; acc.verticalPos = pitch % 14; }); };
this.addPosToKey = function(clef, key) { var mid = calcMiddle(clef.type, 0); key.extraAccidentals.each(function(acc) { var pitch = pitches[acc.note]; pitch = pitch + 6 - mid; acc.verticalPos = pitch % 14; // Always keep this on the two octaves on the staff }) };
} else if (mid >= 7) { key.accidentals.each(function(acc) { acc.verticalPos += 7; });
this.addPosToKey = function(clef, key) { // Shift the key signature from the treble positions to whatever position is needed for the clef. // This may put the key signature unnaturally high or low, so if it does, then shift it. var mid = clef.verticalPos; key.accidentals.each(function(acc) { var pitch = pitches[acc.note]; pitch = pitch - mid; acc.verticalPos = pitch; }); if (mid < -10) { key.accidentals.each(function(acc) { acc.verticalPos -= 7; if (acc.verticalPos >= 11 || (acc.verticalPos === 10 && acc.acc === 'flat')) acc.verticalPos -= 7; }); } else if (mid < -4) { key.accidentals.each(function(acc) { acc.verticalPos -= 7; }); } };
addSeparator: function(spaceAbove, spaceBelow, lineLength) {
this.addSeparator = function(spaceAbove, spaceBelow, lineLength) {
addSeparator: function(spaceAbove, spaceBelow, lineLength) { this.lines.push({separator: {spaceAbove: spaceAbove, spaceBelow: spaceBelow, lineLength: lineLength}}); },
},
};
addSeparator: function(spaceAbove, spaceBelow, lineLength) { this.lines.push({separator: {spaceAbove: spaceAbove, spaceBelow: spaceBelow, lineLength: lineLength}}); },
var addStartSlur = function(obj, num) {
var addStartSlur = function(obj, num, chordPos) {
var addStartSlur = function(obj, num) { obj.startSlur = []; for (var i = 0; i < num; i++) { ++currSlur; obj.startSlur.push(currSlur); } };
++currSlur; obj.startSlur.push(currSlur);
++currSlur[chordPos]; obj.startSlur.push(currSlur[chordPos]);
var addStartSlur = function(obj, num) { obj.startSlur = []; for (var i = 0; i < num; i++) { ++currSlur; obj.startSlur.push(currSlur); } };
var addStartSlur = function(obj, num, chordPos) {
var addStartSlur = function(obj, num, chordPos, usedNums) {
var addStartSlur = function(obj, num, chordPos) { obj.startSlur = []; if (currSlur[chordPos] === undefined) currSlur[chordPos] = chordPos*100; for (var i = 0; i < num; i++) { ++currSlur[chordPos]; obj.startSlur.push(currSlur[chordPos]); } };
if (currSlur[chordPos] === undefined) currSlur[chordPos] = chordPos*100;
if (currSlur[chordPos] === undefined) { currSlur[chordPos] = []; } var nextNum = chordPos*100+1;
var addStartSlur = function(obj, num, chordPos) { obj.startSlur = []; if (currSlur[chordPos] === undefined) currSlur[chordPos] = chordPos*100; for (var i = 0; i < num; i++) { ++currSlur[chordPos]; obj.startSlur.push(currSlur[chordPos]); } };
++currSlur[chordPos]; obj.startSlur.push(currSlur[chordPos]);
if (usedNums) { usedNums.each(function(x) { if (nextNum === x) ++nextNum; }) } currSlur[chordPos].push(nextNum); obj.startSlur.push(nextNum); nextNum++;
var addStartSlur = function(obj, num, chordPos) { obj.startSlur = []; if (currSlur[chordPos] === undefined) currSlur[chordPos] = chordPos*100; for (var i = 0; i < num; i++) { ++currSlur[chordPos]; obj.startSlur.push(currSlur[chordPos]); } };
a)if(b=="delete"){l.cssRules?l.deleteRule(n):l.removeRule(n);return true}else return o;++n}while(o)}return false};this.removeCssRule=function(a){return g.getCssRule(a,"delete")};this.addStyleSheet=function(a,b){if(document.createStyleSheet)setTimeout(function(){document.createStyleSheet(a)},15);else{var f=document.createElement("link");f.setAttribute("type","text/css");f.setAttribute("href",a);f.setAttribute("type","text/css");f.setAttribute("rel","stylesheet");b!=""&&b!="all"&&f.setAttribute("media", b);document.getElementsByTagName("head")[0].appendChild(f)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,f,l,n){var o=g.windowSize(),L=document.body.scrollLeft+document.documentElement.scrollLeft,u=document.body.scrollTop+document.documentElement.scrollTop,q=g.widgetPageCoordinates(a.offsetParent),
do{o=null;if(l.cssRules)o=l.cssRules[n];else if(l.rules)o=l.rules[n];if(o&&o.selectorText)if(o.selectorText.toLowerCase()==a)if(b=="delete"){l.cssRules?l.deleteRule(n):l.removeRule(n);return true}else return o;++n}while(o)}return false};this.removeCssRule=function(a){return g.getCssRule(a,"delete")};this.addStyleSheet=function(a,b){if(document.createStyleSheet)setTimeout(function(){document.createStyleSheet(a)},15);else{var f=document.createElement("link");f.setAttribute("type","text/css");f.setAttribute("href", a);f.setAttribute("type","text/css");f.setAttribute("rel","stylesheet");b!=""&&b!="all"&&f.setAttribute("media",b);document.getElementsByTagName("head")[0].appendChild(f)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,f,l,n){var o=g.windowSize(),L=document.body.scrollLeft+document.documentElement.scrollLeft,
a)if(b=="delete"){l.cssRules?l.deleteRule(n):l.removeRule(n);return true}else return o;++n}while(o)}return false};this.removeCssRule=function(a){return g.getCssRule(a,"delete")};this.addStyleSheet=function(a,b){if(document.createStyleSheet)setTimeout(function(){document.createStyleSheet(a)},15);else{var f=document.createElement("link");f.setAttribute("type","text/css");f.setAttribute("href",a);f.setAttribute("type","text/css");f.setAttribute("rel","stylesheet");b!=""&&b!="all"&&f.setAttribute("media",b);document.getElementsByTagName("head")[0].appendChild(f)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,f,l,n){var o=g.windowSize(),L=document.body.scrollLeft+document.documentElement.scrollLeft,u=document.body.scrollTop+document.documentElement.scrollTop,q=g.widgetPageCoordinates(a.offsetParent),
"stylesheet");b!=""&&b!="all"&&f.setAttribute("media",b);document.getElementsByTagName("head")[0].appendChild(f)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,f,k,h){var o=g.windowSize(),E=document.body.scrollLeft+document.documentElement.scrollLeft,u=document.body.scrollTop+document.documentElement.scrollTop,
"stylesheet");b!=""&&b!="all"&&f.setAttribute("media",b);document.getElementsByTagName("head")[0].appendChild(f)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,f,k,h){var o=g.windowSize(),E=document.body.scrollLeft+document.documentElement.scrollLeft,v=document.body.scrollTop+document.documentElement.scrollTop,
k.rules[h];if(o&&o.selectorText)if(o.selectorText.toLowerCase()==a)if(b=="delete"){k.cssRules?k.deleteRule(h):k.removeRule(h);return true}else return o;++h}while(o)}return false};this.removeCssRule=function(a){return g.getCssRule(a,"delete")};this.addStyleSheet=function(a,b){if(document.createStyleSheet)setTimeout(function(){document.createStyleSheet(a)},15);else{var f=document.createElement("link");f.setAttribute("type","text/css");f.setAttribute("href",a);f.setAttribute("type","text/css");f.setAttribute("rel","stylesheet");b!=""&&b!="all"&&f.setAttribute("media",b);document.getElementsByTagName("head")[0].appendChild(f)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,f,k,h){var o=g.windowSize(),E=document.body.scrollLeft+document.documentElement.scrollLeft,u=document.body.scrollTop+document.documentElement.scrollTop,
a}else{a=document.createTextNode(a);b.appendChild(a)}};this.getCssRule=function(a,b){a=a.toLowerCase();if(document.styleSheets)for(var e=0;e<document.styleSheets.length;e++){var k=document.styleSheets[e],i=0,n=false;do{if((n=k.cssRules?k.cssRules[i]:k.rules[i])&&n.selectorText)if(n.selectorText.toLowerCase()==a)if(b=="delete"){k.cssRules?k.deleteRule(i):k.removeRule(i);return true}else return n;++i}while(n)}return false};this.removeCssRule=function(a){return h.getCssRule(a,"delete")};this.addStyleSheet= function(a,b){if(document.createStyleSheet)setTimeout(function(){document.createStyleSheet(a)},15);else{var e=document.createElement("link");e.setAttribute("type","text/css");e.setAttribute("href",a);e.setAttribute("type","text/css");e.setAttribute("rel","stylesheet");b!=""&&b!="all"&&e.setAttribute("media",b);document.getElementsByTagName("head")[0].appendChild(e)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;
this.addStyleSheet=function(a,b){if(document.createStyleSheet)setTimeout(function(){document.createStyleSheet(a)},15);else{var e=document.createElement("link");e.setAttribute("type","text/css");e.setAttribute("href",a);e.setAttribute("type","text/css");e.setAttribute("rel","stylesheet");b!=""&&b!="all"&&e.setAttribute("media",b);document.getElementsByTagName("head")[0].appendChild(e)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=
a}else{a=document.createTextNode(a);b.appendChild(a)}};this.getCssRule=function(a,b){a=a.toLowerCase();if(document.styleSheets)for(var e=0;e<document.styleSheets.length;e++){var k=document.styleSheets[e],i=0,n=false;do{if((n=k.cssRules?k.cssRules[i]:k.rules[i])&&n.selectorText)if(n.selectorText.toLowerCase()==a)if(b=="delete"){k.cssRules?k.deleteRule(i):k.removeRule(i);return true}else return n;++i}while(n)}return false};this.removeCssRule=function(a){return h.getCssRule(a,"delete")};this.addStyleSheet=function(a,b){if(document.createStyleSheet)setTimeout(function(){document.createStyleSheet(a)},15);else{var e=document.createElement("link");e.setAttribute("type","text/css");e.setAttribute("href",a);e.setAttribute("type","text/css");e.setAttribute("rel","stylesheet");b!=""&&b!="all"&&e.setAttribute("media",b);document.getElementsByTagName("head")[0].appendChild(e)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;
if(document.styleSheets)for(var e=0;e<document.styleSheets.length;e++){var k=document.styleSheets[e],i=0,n=false;do{if((n=k.cssRules?k.cssRules[i]:k.rules[i])&&n.selectorText)if(n.selectorText.toLowerCase()==a)if(b=="delete"){k.cssRules?k.deleteRule(i):k.removeRule(i);return true}else return n;++i}while(n)}return false};this.removeCssRule=function(a){return g.getCssRule(a,"delete")};this.addStyleSheet=function(a,b){if(document.createStyleSheet)setTimeout(function(){document.createStyleSheet(a)},15);
if(document.styleSheets)for(var e=0;e<document.styleSheets.length;e++){var k=document.styleSheets[e],i=0,n=false;do{if((n=k.cssRules?k.cssRules[i]:k.rules[i])&&n.selectorText)if(n.selectorText.toLowerCase()==a)if(b=="delete"){k.cssRules?k.deleteRule(i):k.removeRule(i);return true}else return n;++i}while(n)}return false};this.removeCssRule=function(a){return h.getCssRule(a,"delete")};this.addStyleSheet=function(a,b){if(document.createStyleSheet)setTimeout(function(){document.createStyleSheet(a)},15);
if(document.styleSheets)for(var e=0;e<document.styleSheets.length;e++){var k=document.styleSheets[e],i=0,n=false;do{if((n=k.cssRules?k.cssRules[i]:k.rules[i])&&n.selectorText)if(n.selectorText.toLowerCase()==a)if(b=="delete"){k.cssRules?k.deleteRule(i):k.removeRule(i);return true}else return n;++i}while(n)}return false};this.removeCssRule=function(a){return g.getCssRule(a,"delete")};this.addStyleSheet=function(a,b){if(document.createStyleSheet)setTimeout(function(){document.createStyleSheet(a)},15);else{var e=document.createElement("link");e.setAttribute("type","text/css");e.setAttribute("href",a);e.setAttribute("type","text/css");e.setAttribute("rel","stylesheet");b!=""&&b!="all"&&e.setAttribute("media",b);document.getElementsByTagName("head")[0].appendChild(e)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=
++k}while(o)}return false};this.removeCssRule=function(a){return g.getCssRule(a,"delete")};this.addStyleSheet=function(a,b){if(document.createStyleSheet)setTimeout(function(){document.createStyleSheet(a)},15);else{var f=document.createElement("link");f.setAttribute("type","text/css");f.setAttribute("href",a);f.setAttribute("type","text/css");f.setAttribute("rel","stylesheet");b!=""&&b!="all"&&f.setAttribute("media",b);document.getElementsByTagName("head")[0].appendChild(f)}};this.windowSize=function(){var a,
do{o=null;if(h.cssRules)o=h.cssRules[k];else if(h.rules)o=h.rules[k];if(o&&o.selectorText)if(o.selectorText.toLowerCase()==a)if(b=="delete"){h.cssRules?h.deleteRule(k):h.removeRule(k);return true}else return o;++k}while(o)}return false};this.removeCssRule=function(a){return g.getCssRule(a,"delete")};this.addStyleSheet=function(a,b){if(document.createStyleSheet)setTimeout(function(){document.createStyleSheet(a)},15);else{var f=document.createElement("link");f.setAttribute("type","text/css");f.setAttribute("href", a);f.setAttribute("type","text/css");f.setAttribute("rel","stylesheet");b!=""&&b!="all"&&f.setAttribute("media",b);document.getElementsByTagName("head")[0].appendChild(f)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,f,h,k){var o=g.windowSize(),E=document.body.scrollLeft+document.documentElement.scrollLeft,
++k}while(o)}return false};this.removeCssRule=function(a){return g.getCssRule(a,"delete")};this.addStyleSheet=function(a,b){if(document.createStyleSheet)setTimeout(function(){document.createStyleSheet(a)},15);else{var f=document.createElement("link");f.setAttribute("type","text/css");f.setAttribute("href",a);f.setAttribute("type","text/css");f.setAttribute("rel","stylesheet");b!=""&&b!="all"&&f.setAttribute("media",b);document.getElementsByTagName("head")[0].appendChild(f)}};this.windowSize=function(){var a,
false;do{if((o=m.cssRules?m.cssRules[l]:m.rules[l])&&o.selectorText)if(o.selectorText.toLowerCase()==a)if(b=="delete"){m.cssRules?m.deleteRule(l):m.removeRule(l);return true}else return o;++l}while(o)}return false};this.removeCssRule=function(a){return k.getCssRule(a,"delete")};this.addStyleSheet=function(a){if(document.createStyleSheet)setTimeout(function(){document.createStyleSheet(a)},15);else{var b=document.createElement("link");b.setAttribute("type","text/css");b.setAttribute("href",a);b.setAttribute("type", "text/css");b.setAttribute("rel","stylesheet");document.getElementsByTagName("head")[0].appendChild(b)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,f,m,l){var o=k.windowSize(),B=document.body.scrollLeft+document.documentElement.scrollLeft,r=document.body.scrollTop+document.documentElement.scrollTop;
m.deleteRule(l):m.removeRule(l);return true}else return n;++l}while(n)}return false};this.removeCssRule=function(a){return k.getCssRule(a,"delete")};this.addStyleSheet=function(a){if(document.createStyleSheet)setTimeout(function(){document.createStyleSheet(a)},15);else{var b=document.createElement("link");b.setAttribute("type","text/css");b.setAttribute("href",a);b.setAttribute("type","text/css");b.setAttribute("rel","stylesheet");document.getElementsByTagName("head")[0].appendChild(b)}};this.windowSize=
false;do{if((o=m.cssRules?m.cssRules[l]:m.rules[l])&&o.selectorText)if(o.selectorText.toLowerCase()==a)if(b=="delete"){m.cssRules?m.deleteRule(l):m.removeRule(l);return true}else return o;++l}while(o)}return false};this.removeCssRule=function(a){return k.getCssRule(a,"delete")};this.addStyleSheet=function(a){if(document.createStyleSheet)setTimeout(function(){document.createStyleSheet(a)},15);else{var b=document.createElement("link");b.setAttribute("type","text/css");b.setAttribute("href",a);b.setAttribute("type","text/css");b.setAttribute("rel","stylesheet");document.getElementsByTagName("head")[0].appendChild(b)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,f,m,l){var o=k.windowSize(),B=document.body.scrollLeft+document.documentElement.scrollLeft,r=document.body.scrollTop+document.documentElement.scrollTop;
addSubtitle: function(str) {
this.addSubtitle = function(str) {
addSubtitle: function(str) { this.lines.push({subtitle: str}); },
},
};
addSubtitle: function(str) { this.lines.push({subtitle: str}); },
H=H.getParent();}return null;});},getSelectedCells:n};j.add('tabletools',j.tabletools);})();j.add('specialchar',{init:function(l){var m='specialchar';a.dialog.add(m,this.path+'dialogs/specialchar.js');l.addCommand(m,new a.dialogCommand(m));l.ui.addButton('SpecialChar',{label:l.lang.specialChar.toolbar,command:m});}});(function(){var l={editorFocus:false,modes:{wysiwyg:1,source:1}},m={exec:function(o){o.container.focusNext(true,o.tabIndex);}},n={exec:function(o){o.container.focusPrevious(true,o.tabIndex);}};j.add('tab',{requires:['keystrokes'],init:function(o){var p=o.config.tabSpaces||0,q='';while(p--)q+='\xa0';if(q)o.on('key',function(r){if(r.data.keyCode==9){o.insertHtml(q);r.cancel();}});if(b.webkit)o.on('key',function(r){var s=r.data.keyCode;if(s==9&&!q){r.cancel();o.execCommand('blur');}if(s==2000+9){o.execCommand('blurBack');r.cancel();}});o.addCommand('blur',e.extend(m,l));o.addCommand('blurBack',e.extend(n,l));}});})();h.prototype.focusNext=function(l,m){var v=this;var n=v.$,o=m===undefined?v.getTabIndex():m,p,q,r,s,t,u;if(o<=0){t=v.getNextSourceNode(l,1);while(t){if(t.isVisible()&&t.getTabIndex()===0){r=t;break;}t=t.getNextSourceNode(false,1);}}else{t=v.getDocument().getBody().getFirst();while(t=t.getNextSourceNode(false,1)){if(!p)if(!q&&t.equals(v)){q=true;if(l){if(!(t=t.getNextSourceNode(true,1)))break;p=1;}}else if(q&&!v.contains(t))p=1;if(!t.isVisible()||(u=t.getTabIndex())<0)continue;if(p&&u==o){r=t;break;}if(u>o&&(!r||!s||u<s)){r=t;s=u;}else if(!r&&u===0){r=t;s=u;}}}if(r)r.focus();};h.prototype.focusPrevious=function(l,m){var v=this;var n=v.$,o=m===undefined?v.getTabIndex():m,p,q,r,s=0,t,u=v.getDocument().getBody().getLast();while(u=u.getPreviousSourceNode(false,1)){if(!p)if(!q&&u.equals(v)){q=true;if(l){if(!(u=u.getPreviousSourceNode(true,1)))break;p=1;}}else if(q&&!v.contains(u))p=1;if(!u.isVisible()||(t=u.getTabIndex())<0)continue;if(o<=0){if(p&&t===0){r=u;break;}if(t>s){r=u;s=t;}}else{if(p&&t==o){r=u;break;}if(t<o&&(!r||t>s)){r=u;s=t;}}}if(r)r.focus();};(function(){j.add('templates',{requires:['dialog'],init:function(n){a.dialog.add('templates',a.getUrl(this.path+'dialogs/templates.js'));n.addCommand('templates',new a.dialogCommand('templates'));n.ui.addButton('Templates',{label:n.lang.templates.button,command:'templates'});}});var l={},m={};a.addTemplates=function(n,o){l[n]=o;};a.getTemplates=function(n){return l[n];};a.loadTemplates=function(n,o){var p=[];for(var q=0;q<n.length;q++){if(!m[n[q]]){p.push(n[q]);m[n[q]]=1;}}if(p.length>0)a.scriptLoader.load(p,o);
!c&&B.appendBogus();}u.moveToElementEditStart(y);}else if(v){v=new h(v);u.moveToElementEditStart(v);if(!(u.checkStartOfBlock()&&u.checkEndOfBlock()))u.selectNodeContents(v);}else return true;u.select(true);return true;}}return false;}};};j.add('tab',{requires:['keystrokes'],init:function(p){var q=p.config.enableTabKeyTools!==false,r=p.config.tabSpaces||0,s='';while(r--)s+='\xa0';if(s)p.on('key',function(t){if(t.data.keyCode==9){p.insertHtml(s);t.cancel();}});if(q)p.on('key',function(t){if(t.data.keyCode==9&&p.execCommand('selectNextCell')||t.data.keyCode==2000+9&&p.execCommand('selectPreviousCell'))t.cancel();});if(b.webkit||b.gecko)p.on('key',function(t){var u=t.data.keyCode;if(u==9&&!s){t.cancel();p.execCommand('blur');}if(u==2000+9){p.execCommand('blurBack');t.cancel();}});p.addCommand('blur',e.extend(m,l));p.addCommand('blurBack',e.extend(n,l));p.addCommand('selectNextCell',o());p.addCommand('selectPreviousCell',o(true));}});})();h.prototype.focusNext=function(l,m){var v=this;var n=v.$,o=m===undefined?v.getTabIndex():m,p,q,r,s,t,u;if(o<=0){t=v.getNextSourceNode(l,1);while(t){if(t.isVisible()&&t.getTabIndex()===0){r=t;break;}t=t.getNextSourceNode(false,1);}}else{t=v.getDocument().getBody().getFirst();while(t=t.getNextSourceNode(false,1)){if(!p)if(!q&&t.equals(v)){q=true;if(l){if(!(t=t.getNextSourceNode(true,1)))break;p=1;}}else if(q&&!v.contains(t))p=1;if(!t.isVisible()||(u=t.getTabIndex())<0)continue;if(p&&u==o){r=t;break;}if(u>o&&(!r||!s||u<s)){r=t;s=u;}else if(!r&&u===0){r=t;s=u;}}}if(r)r.focus();};h.prototype.focusPrevious=function(l,m){var v=this;var n=v.$,o=m===undefined?v.getTabIndex():m,p,q,r,s=0,t,u=v.getDocument().getBody().getLast();while(u=u.getPreviousSourceNode(false,1)){if(!p)if(!q&&u.equals(v)){q=true;if(l){if(!(u=u.getPreviousSourceNode(true,1)))break;p=1;}}else if(q&&!v.contains(u))p=1;if(!u.isVisible()||(t=u.getTabIndex())<0)continue;if(o<=0){if(p&&t===0){r=u;break;}if(t>s){r=u;s=t;}}else{if(p&&t==o){r=u;break;}if(t<o&&(!r||t>s)){r=u;s=t;}}}if(r)r.focus();};(function(){j.add('templates',{requires:['dialog'],init:function(n){a.dialog.add('templates',a.getUrl(this.path+'dialogs/templates.js'));n.addCommand('templates',new a.dialogCommand('templates'));n.ui.addButton('Templates',{label:n.lang.templates.button,command:'templates'});}});var l={},m={};a.addTemplates=function(n,o){l[n]=o;};a.getTemplates=function(n){return l[n];};a.loadTemplates=function(n,o){var p=[];for(var q=0;q<n.length;q++){if(!m[n[q]]){p.push(n[q]);m[n[q]]=1;}}if(p.length>0)a.scriptLoader.load(p,o);
H=H.getParent();}return null;});},getSelectedCells:n};j.add('tabletools',j.tabletools);})();j.add('specialchar',{init:function(l){var m='specialchar';a.dialog.add(m,this.path+'dialogs/specialchar.js');l.addCommand(m,new a.dialogCommand(m));l.ui.addButton('SpecialChar',{label:l.lang.specialChar.toolbar,command:m});}});(function(){var l={editorFocus:false,modes:{wysiwyg:1,source:1}},m={exec:function(o){o.container.focusNext(true,o.tabIndex);}},n={exec:function(o){o.container.focusPrevious(true,o.tabIndex);}};j.add('tab',{requires:['keystrokes'],init:function(o){var p=o.config.tabSpaces||0,q='';while(p--)q+='\xa0';if(q)o.on('key',function(r){if(r.data.keyCode==9){o.insertHtml(q);r.cancel();}});if(b.webkit)o.on('key',function(r){var s=r.data.keyCode;if(s==9&&!q){r.cancel();o.execCommand('blur');}if(s==2000+9){o.execCommand('blurBack');r.cancel();}});o.addCommand('blur',e.extend(m,l));o.addCommand('blurBack',e.extend(n,l));}});})();h.prototype.focusNext=function(l,m){var v=this;var n=v.$,o=m===undefined?v.getTabIndex():m,p,q,r,s,t,u;if(o<=0){t=v.getNextSourceNode(l,1);while(t){if(t.isVisible()&&t.getTabIndex()===0){r=t;break;}t=t.getNextSourceNode(false,1);}}else{t=v.getDocument().getBody().getFirst();while(t=t.getNextSourceNode(false,1)){if(!p)if(!q&&t.equals(v)){q=true;if(l){if(!(t=t.getNextSourceNode(true,1)))break;p=1;}}else if(q&&!v.contains(t))p=1;if(!t.isVisible()||(u=t.getTabIndex())<0)continue;if(p&&u==o){r=t;break;}if(u>o&&(!r||!s||u<s)){r=t;s=u;}else if(!r&&u===0){r=t;s=u;}}}if(r)r.focus();};h.prototype.focusPrevious=function(l,m){var v=this;var n=v.$,o=m===undefined?v.getTabIndex():m,p,q,r,s=0,t,u=v.getDocument().getBody().getLast();while(u=u.getPreviousSourceNode(false,1)){if(!p)if(!q&&u.equals(v)){q=true;if(l){if(!(u=u.getPreviousSourceNode(true,1)))break;p=1;}}else if(q&&!v.contains(u))p=1;if(!u.isVisible()||(t=u.getTabIndex())<0)continue;if(o<=0){if(p&&t===0){r=u;break;}if(t>s){r=u;s=t;}}else{if(p&&t==o){r=u;break;}if(t<o&&(!r||t>s)){r=u;s=t;}}}if(r)r.focus();};(function(){j.add('templates',{requires:['dialog'],init:function(n){a.dialog.add('templates',a.getUrl(this.path+'dialogs/templates.js'));n.addCommand('templates',new a.dialogCommand('templates'));n.ui.addButton('Templates',{label:n.lang.templates.button,command:'templates'});}});var l={},m={};a.addTemplates=function(n,o){l[n]=o;};a.getTemplates=function(n){return l[n];};a.loadTemplates=function(n,o){var p=[];for(var q=0;q<n.length;q++){if(!m[n[q]]){p.push(n[q]);m[n[q]]=1;}}if(p.length>0)a.scriptLoader.load(p,o);
addText: function(str) {
this.addText = function(str) {
addText: function(str) { this.lines.push({text: str}); },
},
};
addText: function(str) { this.lines.push({text: str}); },
if (el) {
if (el && el.pitches && el.pitches.length > 0) {
this.addTieToLastNote = function() { // TODO-PER: if this is a chord, which note? var el = this.getLastNote(); if (el) { el.pitches[0].startTie = true; return true; } return false; };
addTieToLastNote: function() {
this.addTieToLastNote = function() {
addTieToLastNote: function() { // TODO-PER: if this is a chord, which note? var el = this.getLastNote(); if (el) { el.pitches[0].startTie = true; return true; } return false; },
},
};
addTieToLastNote: function() { // TODO-PER: if this is a chord, which note? var el = this.getLastNote(); if (el) { el.pitches[0].startTie = true; return true; } return false; },
obj.onclick();
if (obj.onclick) obj.onclick();
function addTimerEvent(timerid, msec, repeat) { var tm = function() { var obj = WT.getElement(timerid); if (obj) { if (repeat) obj.timer = setTimeout(obj.tm, msec); else { obj.timer = null; obj.tm = null; } obj.onclick(); } }; var obj = WT.getElement(timerid); obj.timer = setTimeout(tm, msec); obj.tm = tm;}
if (continueBar) staff.bar = 'end';
if (continueBar) staff.connectBarLines = 'end';
var addVoice = function(id, newStaff, bracket, brace, continueBar) { if (newStaff || multilineVars.staves.length === 0) { multilineVars.staves.push({ index: multilineVars.staves.length, numVoices: 0 }); } var staff = multilineVars.staves.last(); if (bracket !== undefined) staff.bracket = bracket; if (brace !== undefined) staff.brace = brace; if (continueBar) staff.bar = 'end'; if (multilineVars.voices[id] === undefined) { multilineVars.voices[id] = { staffNum: staff.index, index: staff.numVoices}; staff.numVoices++; } };
if (!line) { warn("Can't add words before the first line of mulsic", line, 0); return; } words = words.strip(); if (words[words.length-1] !== '-') words = words + ' '; var word_list = []; var last_divider = 0; var replace = false; var addWord = function(i) { var word = words.substring(last_divider, i).strip(); last_divider = i+1; if (word.length > 0) { if (replace) word = word.gsub('~', ' '); var div = words[i]; if (div !== '_' && div !== '-') div = ' '; word_list.push({syllable: tokenizer.translateString(word), divider: div}); replace = false; return true;
if (!line) { warn("Can't add words before the first line of mulsic", line, 0); return; } words = words.strip(); if (words[words.length-1] !== '-') words = words + ' '; var word_list = []; var last_divider = 0; var replace = false; var addWord = function(i) { var word = words.substring(last_divider, i).strip(); last_divider = i+1; if (word.length > 0) { if (replace) word = word.gsub('~', ' '); var div = words[i]; if (div !== '_' && div !== '-') div = ' '; word_list.push({syllable: tokenizer.translateString(word), divider: div}); replace = false; return true; } return false; }; for (var i = 0; i < words.length; i++) { switch (words[i]) { case ' ': case '\x12': addWord(i); break; case '-': if (!addWord(i) && word_list.length > 0) { word_list.last().divider = '-'; word_list.push({skip: true, to: 'next'}); } break; case '_': addWord(i); word_list.push({skip: true, to: 'slur'}); break; case '*': addWord(i); word_list.push({skip: true, to: 'next'}); break; case '|': addWord(i); word_list.push({skip: true, to: 'bar'}); break; case '~': replace = true; break; } } var inSlur = false; 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.pitches !== null && !inSlur) word_list.shift(); break; case 'slur': if (el.el_type === 'note' && el.pitches !== null) word_list.shift(); break; case 'bar': if (el.el_type === 'bar') word_list.shift(); break; } } else { if (el.el_type === 'note' && el.rest === undefined && !inSlur) { var lyric = word_list.shift(); if (el.lyric === undefined) el.lyric = [ lyric ]; else el.lyric.push(lyric); }
var addWords = function(line, words) { if (!line) { warn("Can't add words before the first line of mulsic", line, 0); return; } words = words.strip(); if (words[words.length-1] !== '-') words = words + ' '; // Just makes it easier to parse below, since every word has a divider after it. var word_list = []; // first make a list of words from the string we are passed. A word is divided on either a space or dash. var last_divider = 0; var replace = false; var addWord = function(i) { var word = words.substring(last_divider, i).strip(); last_divider = i+1; if (word.length > 0) { if (replace) word = word.gsub('~', ' '); var div = words[i]; if (div !== '_' && div !== '-') div = ' '; word_list.push({syllable: tokenizer.translateString(word), divider: div}); replace = false; return true; } return false; }; for (var i = 0; i < words.length; i++) { switch (words[i]) { case ' ': case '\x12': addWord(i); break; case '-': if (!addWord(i) && word_list.length > 0) { word_list.last().divider = '-'; word_list.push({skip: true, to: 'next'}); } break; case '_': addWord(i); word_list.push({skip: true, to: 'slur'}); break; case '*': addWord(i); word_list.push({skip: true, to: 'next'}); break; case '|': addWord(i); word_list.push({skip: true, to: 'bar'}); break; case '~': replace = true; break; } } var inSlur = false; 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.pitches !== null && !inSlur) word_list.shift(); break; case 'slur': if (el.el_type === 'note' && el.pitches !== null) word_list.shift(); break; case 'bar': if (el.el_type === 'bar') word_list.shift(); break; } } else { if (el.el_type === 'note' && el.rest === undefined && !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; } }); };
return false; }; for (var i = 0; i < words.length; i++) { switch (words[i]) { case ' ': case '\x12': addWord(i); break; case '-': if (!addWord(i) && word_list.length > 0) { word_list.last().divider = '-'; word_list.push({skip: true, to: 'next'}); } break; case '_': addWord(i); word_list.push({skip: true, to: 'slur'}); break; case '*': addWord(i); word_list.push({skip: true, to: 'next'}); break; case '|': addWord(i); word_list.push({skip: true, to: 'bar'}); break; case '~': replace = true; break; } } var inSlur = false; 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.pitches !== null && !inSlur) word_list.shift(); break; case 'slur': if (el.el_type === 'note' && el.pitches !== null) word_list.shift(); break; case 'bar': if (el.el_type === 'bar') word_list.shift(); break; } } else { if (el.el_type === 'note' && el.rest === undefined && !inSlur) { var lyric = word_list.shift(); if (el.lyric === undefined) el.lyric = [ lyric ]; else el.lyric.push(lyric); } }
var addWords = function(line, words) { if (!line) { warn("Can't add words before the first line of mulsic", line, 0); return; } words = words.strip(); if (words[words.length-1] !== '-') words = words + ' '; // Just makes it easier to parse below, since every word has a divider after it. var word_list = []; // first make a list of words from the string we are passed. A word is divided on either a space or dash. var last_divider = 0; var replace = false; var addWord = function(i) { var word = words.substring(last_divider, i).strip(); last_divider = i+1; if (word.length > 0) { if (replace) word = word.gsub('~', ' '); var div = words[i]; if (div !== '_' && div !== '-') div = ' '; word_list.push({syllable: tokenizer.translateString(word), divider: div}); replace = false; return true; } return false; }; for (var i = 0; i < words.length; i++) { switch (words[i]) { case ' ': case '\x12': addWord(i); break; case '-': if (!addWord(i) && word_list.length > 0) { word_list.last().divider = '-'; word_list.push({skip: true, to: 'next'}); } break; case '_': addWord(i); word_list.push({skip: true, to: 'slur'}); break; case '*': addWord(i); word_list.push({skip: true, to: 'next'}); break; case '|': addWord(i); word_list.push({skip: true, to: 'bar'}); break; case '~': replace = true; break; } } var inSlur = false; 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.pitches !== null && !inSlur) word_list.shift(); break; case 'slur': if (el.el_type === 'note' && el.pitches !== null) word_list.shift(); break; case 'bar': if (el.el_type === 'bar') word_list.shift(); break; } } else { if (el.el_type === 'note' && el.rest === undefined && !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; } }); };
case '\x12':
var addWords = function(line, words) { if (!line) { warn("Can't add words before the first line of mulsic", line, 0); return; } words = words.strip(); if (words[words.length-1] !== '-') words = words + ' '; // Just makes it easier to parse below, since every word has a divider after it. var word_list = []; // first make a list of words from the string we are passed. A word is divided on either a space or dash. var last_divider = 0; var replace = false; var addWord = function(i) { var word = words.substring(last_divider, i).strip(); last_divider = i+1; if (word.length > 0) { if (replace) word = word.gsub('~', ' '); var div = words[i]; if (div !== '_' && div !== '-') div = ' '; word_list.push({syllable: tokenizer.translateString(word), divider: div}); replace = false; return true; } return false; }; for (var i = 0; i < words.length; i++) { switch (words[i]) { case ' ': addWord(i); break; case '-': if (!addWord(i) && word_list.length > 0) { word_list.last().divider = '-'; word_list.push({skip: true, to: 'next'}); } break; case '_': addWord(i); word_list.push({skip: true, to: 'slur'}); break; case '*': addWord(i); word_list.push({skip: true, to: 'next'}); break; case '|': addWord(i); word_list.push({skip: true, to: 'bar'}); break; case '~': replace = true; break; } } var inSlur = false; 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; } }); };
e.parentNode.offsetWidth-u.marginH(e);e.wtResize(e,m,d)}else if(e.style.height!=d+"px"){e.style.height=d+"px";if(e.className=="Wt-wrapdiv")if(a.isIE&&a.hasTag(e.firstChild,"TEXTAREA"))e.firstChild.style.height=d-a.pxself(e,"marginBottom")+"px"}}}};this.adjust=function(){var b=a.getElement(s);if(!b)return false;u.initResize&&u.initResize(a,s,r);if(a.isHidden(b))return true;var i=b.firstChild;if(i.style.height!="")i.style.height="";if(!(b.dirty||i.w!=b.clientWidth||i.h!=b.clientHeight))return true; b.dirty=null;var j=a.pxself(b.parentNode,"height");if(j==0){j=b.parentNode.clientHeight;j+=-a.px(b.parentNode,"paddingTop")-a.px(b.parentNode,"paddingBottom")}j+=-a.px(b,"marginTop")-a.px(b,"marginBottom");var k,m;if(b.parentNode.children){k=0;for(m=b.parentNode.children.length;k<m;++k){var d=b.parentNode.children[k];if(d!=b)j-=$(d).outerHeight()}}var e=0,p=0,l,t;l=k=0;for(m=i.rows.length;k<m;k++){d=i.rows[k];if(d.className=="Wt-hrh")j-=d.offsetHeight;else{p+=r.minheight[l];if(r.stretch[l]<=0)j-= d.offsetHeight;else e+=r.stretch[l];++l}}j=j>p?j:p;if(e!=0&&j>0){p=j;var n;l=k=0;for(m=i.rows.length;k<m;k++)if(i.rows[k].className!="Wt-hrh"){d=i.rows[k];if(r.stretch[l]!=0){if(r.stretch[l]!=-1){n=j*r.stretch[l]/e;n=p>n?n:p;n=Math.round(r.minheight[l]>n?r.minheight[l]:n);p-=n}else n=d.offsetHeight;this.adjustRow(d,n)}++l}}i.w=b.clientWidth;i.h=b.clientHeight;if(i.style.tableLayout!="fixed")return true;e=0;l=i.childNodes;b=0;for(j=l.length;b<j;b++){p=l[b];var x,z,y;if(a.hasTag(p,"COLGROUP")){b=-1; l=p.childNodes;j=l.length}if(a.hasTag(p,"COL")){if(a.pctself(p,"width")==0){k=n=0;for(m=i.rows.length;k<m;k++){d=i.rows[k];d=d.childNodes;z=x=0;for(y=d.length;z<y;z++){t=d[z];if(t.colSpan==1&&x==e&&t.childNodes.length==1){d=t.firstChild;d=d.offsetWidth+u.marginH(d);n=Math.max(n,d);break}x+=t.colSpan;if(x>e)break}}if(n>0&&a.pxself(p,"width")!=n)p.style.width=n+"px"}++e}}return true}});
WT_DECLARE_APP_MEMBER(1,"layouts",new (function(){var a=[],u=false;this.add=function(h){var t,b;t=0;for(b=a.length;t<b;++t)if(a[t].getId()==h.getId()){a[t]=h;return}a.push(h)};this.adjust=function(h){if(h){if(h=$("#"+h).get(0))h.dirty=true}else if(!u){u=true;for(i=0;i<a.length;++i){h=a[i];if(!h.adjust()){this.WT.arrayRemove(a,i);--i}}u=false}}}));
e.parentNode.offsetWidth-u.marginH(e);e.wtResize(e,m,d)}else if(e.style.height!=d+"px"){e.style.height=d+"px";if(e.className=="Wt-wrapdiv")if(a.isIE&&a.hasTag(e.firstChild,"TEXTAREA"))e.firstChild.style.height=d-a.pxself(e,"marginBottom")+"px"}}}};this.adjust=function(){var b=a.getElement(s);if(!b)return false;u.initResize&&u.initResize(a,s,r);if(a.isHidden(b))return true;var i=b.firstChild;if(i.style.height!="")i.style.height="";if(!(b.dirty||i.w!=b.clientWidth||i.h!=b.clientHeight))return true;b.dirty=null;var j=a.pxself(b.parentNode,"height");if(j==0){j=b.parentNode.clientHeight;j+=-a.px(b.parentNode,"paddingTop")-a.px(b.parentNode,"paddingBottom")}j+=-a.px(b,"marginTop")-a.px(b,"marginBottom");var k,m;if(b.parentNode.children){k=0;for(m=b.parentNode.children.length;k<m;++k){var d=b.parentNode.children[k];if(d!=b)j-=$(d).outerHeight()}}var e=0,p=0,l,t;l=k=0;for(m=i.rows.length;k<m;k++){d=i.rows[k];if(d.className=="Wt-hrh")j-=d.offsetHeight;else{p+=r.minheight[l];if(r.stretch[l]<=0)j-=d.offsetHeight;else e+=r.stretch[l];++l}}j=j>p?j:p;if(e!=0&&j>0){p=j;var n;l=k=0;for(m=i.rows.length;k<m;k++)if(i.rows[k].className!="Wt-hrh"){d=i.rows[k];if(r.stretch[l]!=0){if(r.stretch[l]!=-1){n=j*r.stretch[l]/e;n=p>n?n:p;n=Math.round(r.minheight[l]>n?r.minheight[l]:n);p-=n}else n=d.offsetHeight;this.adjustRow(d,n)}++l}}i.w=b.clientWidth;i.h=b.clientHeight;if(i.style.tableLayout!="fixed")return true;e=0;l=i.childNodes;b=0;for(j=l.length;b<j;b++){p=l[b];var x,z,y;if(a.hasTag(p,"COLGROUP")){b=-1;l=p.childNodes;j=l.length}if(a.hasTag(p,"COL")){if(a.pctself(p,"width")==0){k=n=0;for(m=i.rows.length;k<m;k++){d=i.rows[k];d=d.childNodes;z=x=0;for(y=d.length;z<y;z++){t=d[z];if(t.colSpan==1&&x==e&&t.childNodes.length==1){d=t.firstChild;d=d.offsetWidth+u.marginH(d);n=Math.max(n,d);break}x+=t.colSpan;if(x>e)break}}if(n>0&&a.pxself(p,"width")!=n)p.style.width=n+"px"}++e}}return true}});
document.getElementById('t_scrollbody').style.width=(div_width-19)+diff+"px";
if (document.getElementById('t_scrollbody') != null) { document.getElementById('t_scrollbody').style.width=(div_width-19)+diff+"px"; }
function adjust_width(e) { /* Get event ... it seems to be unused here ...*/ if (!e) { e=window.event; } // Known to not work with IE if(document.defaultView && document.getElementById("t_scrolltable")) { // Get current width of divlist var div_width = parseInt(document.defaultView.getComputedStyle(document.getElementById("t_scrolltable"),"").getPropertyValue('width')); // Get window width var width= parseInt(window.innerWidth); // Resize the body cells, 470 represents the info box and the navigation part var save= 470; if(document.getElementById('d_save')) { save= document.getElementById('d_save').value; } var space= 600; if(document.getElementById('d_space')) { space= document.getElementById('d_space').value; } var diff= width - div_width - save; // window has been upscaled if(div_width+diff>=space) { if (width - save > space) { document.getElementById('d_scrollbody').style.width=div_width+diff+"px"; document.getElementById('t_scrollbody').style.width=(div_width-19)+diff+"px"; // Resize the Header cells (only the relative-width ones) document.getElementById('t_scrollhead').style.width=div_width+diff+"px"; } else { document.getElementById('d_scrollbody').style.width=div_width+"px"; document.getElementById('t_scrollbody').style.width=(div_width-19)+"px"; // Resize the Header cells (only the relative-width ones) document.getElementById('t_scrollhead').style.width=div_width+"px"; } // window has been downscaled, we must reset the div to 600px } else if (width < 1200) { // Reset layout (set width to 600px) div_width=space; document.getElementById('d_scrollbody').style.width=div_width+"px"; document.getElementById('t_scrollbody').style.width=(div_width-19)+"px"; // Resize the Header cells (only the relative-width ones) document.getElementById('t_scrollhead').style.width=div_width+"px"; } } else if(document.defaultView && document.getElementById("t_scrolltable_onlywidth")){ // Resize the div var div_width=parseInt(document.defaultView.getComputedStyle(document.getElementById("t_scrolltable_onlywidth"),"").getPropertyValue('width')); var width= parseInt(window.innerWidth); // Resize the body cells var diff= width-div_width-200; // window has been upscaled if(div_width+diff>=600) { if(document.getElementById('d_scrollbody_onlywidth')){ document.getElementById('d_scrollbody_onlywidth').style.width=div_width+diff+"px"; } document.getElementById('t_scrollbody_onlywidth').style.width=(div_width-19)+diff+"px"; // Resize the Header cells (only the relative-width ones) document.getElementById('t_scrollhead_onlywidth').style.width=div_width+diff+"px"; // window has been downscaled, we must reset the div to 600px } else if (width < 930) { // Reset layout (set width to 600px) div_width=600; if(document.getElementById('d_scrollbody_onlywidth')){ document.getElementById('d_scrollbody_onlywidth').style.width=div_width+"px"; } document.getElementById('t_scrollbody_onlywidth').style.width=(div_width-19)+"px"; // Resize the Header cells (only the relative-width ones) document.getElementById('t_scrollhead_onlywidth').style.width=div_width+"px"; } } else { // IE }}
document.getElementById('t_scrollhead').style.width=div_width+diff+"px";
if (document.getElementById('t_scrollhead') != null) { document.getElementById('t_scrollhead').style.width=div_width+diff+"px"; }
function adjust_width(e) { /* Get event ... it seems to be unused here ...*/ if (!e) { e=window.event; } // Known to not work with IE if(document.defaultView && document.getElementById("t_scrolltable")) { // Get current width of divlist var div_width = parseInt(document.defaultView.getComputedStyle(document.getElementById("t_scrolltable"),"").getPropertyValue('width')); // Get window width var width= parseInt(window.innerWidth); // Resize the body cells, 470 represents the info box and the navigation part var save= 470; if(document.getElementById('d_save')) { save= document.getElementById('d_save').value; } var space= 600; if(document.getElementById('d_space')) { space= document.getElementById('d_space').value; } var diff= width - div_width - save; // window has been upscaled if(div_width+diff>=space) { if (width - save > space) { document.getElementById('d_scrollbody').style.width=div_width+diff+"px"; document.getElementById('t_scrollbody').style.width=(div_width-19)+diff+"px"; // Resize the Header cells (only the relative-width ones) document.getElementById('t_scrollhead').style.width=div_width+diff+"px"; } else { document.getElementById('d_scrollbody').style.width=div_width+"px"; document.getElementById('t_scrollbody').style.width=(div_width-19)+"px"; // Resize the Header cells (only the relative-width ones) document.getElementById('t_scrollhead').style.width=div_width+"px"; } // window has been downscaled, we must reset the div to 600px } else if (width < 1200) { // Reset layout (set width to 600px) div_width=space; document.getElementById('d_scrollbody').style.width=div_width+"px"; document.getElementById('t_scrollbody').style.width=(div_width-19)+"px"; // Resize the Header cells (only the relative-width ones) document.getElementById('t_scrollhead').style.width=div_width+"px"; } } else if(document.defaultView && document.getElementById("t_scrolltable_onlywidth")){ // Resize the div var div_width=parseInt(document.defaultView.getComputedStyle(document.getElementById("t_scrolltable_onlywidth"),"").getPropertyValue('width')); var width= parseInt(window.innerWidth); // Resize the body cells var diff= width-div_width-200; // window has been upscaled if(div_width+diff>=600) { if(document.getElementById('d_scrollbody_onlywidth')){ document.getElementById('d_scrollbody_onlywidth').style.width=div_width+diff+"px"; } document.getElementById('t_scrollbody_onlywidth').style.width=(div_width-19)+diff+"px"; // Resize the Header cells (only the relative-width ones) document.getElementById('t_scrollhead_onlywidth').style.width=div_width+diff+"px"; // window has been downscaled, we must reset the div to 600px } else if (width < 930) { // Reset layout (set width to 600px) div_width=600; if(document.getElementById('d_scrollbody_onlywidth')){ document.getElementById('d_scrollbody_onlywidth').style.width=div_width+"px"; } document.getElementById('t_scrollbody_onlywidth').style.width=(div_width-19)+"px"; // Resize the Header cells (only the relative-width ones) document.getElementById('t_scrollhead_onlywidth').style.width=div_width+"px"; } } else { // IE }}
document.getElementById('t_scrollbody').style.width=(div_width-19)+"px";
if (document.getElementById('t_scrollbody') != null) { document.getElementById('t_scrollbody').style.width=(div_width-19)+"px"; }
function adjust_width(e) { /* Get event ... it seems to be unused here ...*/ if (!e) { e=window.event; } // Known to not work with IE if(document.defaultView && document.getElementById("t_scrolltable")) { // Get current width of divlist var div_width = parseInt(document.defaultView.getComputedStyle(document.getElementById("t_scrolltable"),"").getPropertyValue('width')); // Get window width var width= parseInt(window.innerWidth); // Resize the body cells, 470 represents the info box and the navigation part var save= 470; if(document.getElementById('d_save')) { save= document.getElementById('d_save').value; } var space= 600; if(document.getElementById('d_space')) { space= document.getElementById('d_space').value; } var diff= width - div_width - save; // window has been upscaled if(div_width+diff>=space) { if (width - save > space) { document.getElementById('d_scrollbody').style.width=div_width+diff+"px"; document.getElementById('t_scrollbody').style.width=(div_width-19)+diff+"px"; // Resize the Header cells (only the relative-width ones) document.getElementById('t_scrollhead').style.width=div_width+diff+"px"; } else { document.getElementById('d_scrollbody').style.width=div_width+"px"; document.getElementById('t_scrollbody').style.width=(div_width-19)+"px"; // Resize the Header cells (only the relative-width ones) document.getElementById('t_scrollhead').style.width=div_width+"px"; } // window has been downscaled, we must reset the div to 600px } else if (width < 1200) { // Reset layout (set width to 600px) div_width=space; document.getElementById('d_scrollbody').style.width=div_width+"px"; document.getElementById('t_scrollbody').style.width=(div_width-19)+"px"; // Resize the Header cells (only the relative-width ones) document.getElementById('t_scrollhead').style.width=div_width+"px"; } } else if(document.defaultView && document.getElementById("t_scrolltable_onlywidth")){ // Resize the div var div_width=parseInt(document.defaultView.getComputedStyle(document.getElementById("t_scrolltable_onlywidth"),"").getPropertyValue('width')); var width= parseInt(window.innerWidth); // Resize the body cells var diff= width-div_width-200; // window has been upscaled if(div_width+diff>=600) { if(document.getElementById('d_scrollbody_onlywidth')){ document.getElementById('d_scrollbody_onlywidth').style.width=div_width+diff+"px"; } document.getElementById('t_scrollbody_onlywidth').style.width=(div_width-19)+diff+"px"; // Resize the Header cells (only the relative-width ones) document.getElementById('t_scrollhead_onlywidth').style.width=div_width+diff+"px"; // window has been downscaled, we must reset the div to 600px } else if (width < 930) { // Reset layout (set width to 600px) div_width=600; if(document.getElementById('d_scrollbody_onlywidth')){ document.getElementById('d_scrollbody_onlywidth').style.width=div_width+"px"; } document.getElementById('t_scrollbody_onlywidth').style.width=(div_width-19)+"px"; // Resize the Header cells (only the relative-width ones) document.getElementById('t_scrollhead_onlywidth').style.width=div_width+"px"; } } else { // IE }}
document.getElementById('t_scrollhead').style.width=div_width+"px";
if (document.getElementById('t_scrollhead') != null) { document.getElementById('t_scrollhead').style.width=div_width+"px"; }
function adjust_width(e) { /* Get event ... it seems to be unused here ...*/ if (!e) { e=window.event; } // Known to not work with IE if(document.defaultView && document.getElementById("t_scrolltable")) { // Get current width of divlist var div_width = parseInt(document.defaultView.getComputedStyle(document.getElementById("t_scrolltable"),"").getPropertyValue('width')); // Get window width var width= parseInt(window.innerWidth); // Resize the body cells, 470 represents the info box and the navigation part var save= 470; if(document.getElementById('d_save')) { save= document.getElementById('d_save').value; } var space= 600; if(document.getElementById('d_space')) { space= document.getElementById('d_space').value; } var diff= width - div_width - save; // window has been upscaled if(div_width+diff>=space) { if (width - save > space) { document.getElementById('d_scrollbody').style.width=div_width+diff+"px"; document.getElementById('t_scrollbody').style.width=(div_width-19)+diff+"px"; // Resize the Header cells (only the relative-width ones) document.getElementById('t_scrollhead').style.width=div_width+diff+"px"; } else { document.getElementById('d_scrollbody').style.width=div_width+"px"; document.getElementById('t_scrollbody').style.width=(div_width-19)+"px"; // Resize the Header cells (only the relative-width ones) document.getElementById('t_scrollhead').style.width=div_width+"px"; } // window has been downscaled, we must reset the div to 600px } else if (width < 1200) { // Reset layout (set width to 600px) div_width=space; document.getElementById('d_scrollbody').style.width=div_width+"px"; document.getElementById('t_scrollbody').style.width=(div_width-19)+"px"; // Resize the Header cells (only the relative-width ones) document.getElementById('t_scrollhead').style.width=div_width+"px"; } } else if(document.defaultView && document.getElementById("t_scrolltable_onlywidth")){ // Resize the div var div_width=parseInt(document.defaultView.getComputedStyle(document.getElementById("t_scrolltable_onlywidth"),"").getPropertyValue('width')); var width= parseInt(window.innerWidth); // Resize the body cells var diff= width-div_width-200; // window has been upscaled if(div_width+diff>=600) { if(document.getElementById('d_scrollbody_onlywidth')){ document.getElementById('d_scrollbody_onlywidth').style.width=div_width+diff+"px"; } document.getElementById('t_scrollbody_onlywidth').style.width=(div_width-19)+diff+"px"; // Resize the Header cells (only the relative-width ones) document.getElementById('t_scrollhead_onlywidth').style.width=div_width+diff+"px"; // window has been downscaled, we must reset the div to 600px } else if (width < 930) { // Reset layout (set width to 600px) div_width=600; if(document.getElementById('d_scrollbody_onlywidth')){ document.getElementById('d_scrollbody_onlywidth').style.width=div_width+"px"; } document.getElementById('t_scrollbody_onlywidth').style.width=(div_width-19)+"px"; // Resize the Header cells (only the relative-width ones) document.getElementById('t_scrollhead_onlywidth').style.width=div_width+"px"; } } else { // IE }}
this.adjustCell = function(td, height) {
this.adjustCell = function(td, height, col) {
this.adjustCell = function(td, height) { var shallow = height == 0; height -= WT.pxself(td, 'paddingTop'); height -= WT.pxself(td, 'paddingBottom'); if (height <= 0) height = 0; td.style.height = height+'px'; if (td.style['verticalAlign'] || td.childNodes.length == 0) return; var ch = td.childNodes[0]; // 'ch' is cell contents if (height <= 0) height = 0; if (ch.className == 'Wt-hcenter') { ch.style.height = height+'px'; var itd = ch.firstChild.firstChild; if (!WT.hasTag(itd, 'TD')) itd = itd.firstChild; if (itd.style.height != height+'px') itd.style.height = height+'px'; ch = itd.firstChild; } if (td.childNodes.length == 1) height -= this.marginV(ch); if (height <= 0) height = 0; if (WT.hasTag(ch, 'TABLE')) return; if (!shallow && ch.wtResize) { var p = ch.parentNode, w = p.offsetWidth - self.marginH(ch); if (self.getColumn(col).style.width != '') { ch.style.position = 'absolute'; ch.style.width = w+'px'; } ch.wtResize(ch, w, height); } else if (ch.style.height != height+'px') { ch.style.height = height+'px'; if (ch.className == 'Wt-wrapdiv') { if (WT.isIE && WT.hasTag(ch.firstChild, 'TEXTAREA')) { ch.firstChild.style.height = (height - WT.pxself(ch, 'marginBottom')) + 'px'; } } } };
if (self.getColumn(col).style.width != '') {
if (col != -1 && self.getColumn(col).style.width != '') {
this.adjustCell = function(td, height) { var shallow = height == 0; height -= WT.pxself(td, 'paddingTop'); height -= WT.pxself(td, 'paddingBottom'); if (height <= 0) height = 0; td.style.height = height+'px'; if (td.style['verticalAlign'] || td.childNodes.length == 0) return; var ch = td.childNodes[0]; // 'ch' is cell contents if (height <= 0) height = 0; if (ch.className == 'Wt-hcenter') { ch.style.height = height+'px'; var itd = ch.firstChild.firstChild; if (!WT.hasTag(itd, 'TD')) itd = itd.firstChild; if (itd.style.height != height+'px') itd.style.height = height+'px'; ch = itd.firstChild; } if (td.childNodes.length == 1) height -= this.marginV(ch); if (height <= 0) height = 0; if (WT.hasTag(ch, 'TABLE')) return; if (!shallow && ch.wtResize) { var p = ch.parentNode, w = p.offsetWidth - self.marginH(ch); if (self.getColumn(col).style.width != '') { ch.style.position = 'absolute'; ch.style.width = w+'px'; } ch.wtResize(ch, w, height); } else if (ch.style.height != height+'px') { ch.style.height = height+'px'; if (ch.className == 'Wt-wrapdiv') { if (WT.isIE && WT.hasTag(ch.firstChild, 'TEXTAREA')) { ch.firstChild.style.height = (height - WT.pxself(ch, 'marginBottom')) + 'px'; } } } };
c+=a.px(b,"paddingTop");c+=a.px(b,"paddingBottom");return c};this.getColumn=function(b){var c,f,d,i=a.getElement(t).firstChild.childNodes;f=c=0;for(d=i.length;f<d;f++){var k=i[f];if(a.hasTag(k,"COLGROUP")){f=-1;i=k.childNodes;d=i.length}if(a.hasTag(k,"COL"))if(k.className!="Wt-vrh")if(c==b)return k;else++c}return null};this.adjustCell=function(b,c){var f=c==0;c-=a.pxself(b,"paddingTop");c-=a.pxself(b,"paddingBottom");if(c<=0)c=0;b.style.height=c+"px";if(!(b.style.verticalAlign||b.childNodes.length== 0)){var d=b.childNodes[0];if(c<=0)c=0;if(d.className=="Wt-hcenter"){d.style.height=c+"px";d=d.firstChild.firstChild;if(!a.hasTag(d,"TD"))d=d.firstChild;if(d.style.height!=c+"px")d.style.height=c+"px";d=d.firstChild}if(b.childNodes.length==1)c-=this.marginV(d);if(c<=0)c=0;if(!a.hasTag(d,"TABLE"))if(!f&&d.wtResize){b=d.parentNode.offsetWidth-o.marginH(d);if(o.getColumn(col).style.width!=""){d.style.position="absolute";d.style.width=b+"px"}d.wtResize(d,b,c)}else if(d.style.height!=c+"px"){d.style.height= c+"px";if(d.className=="Wt-wrapdiv")if(a.isIE&&a.hasTag(d.firstChild,"TEXTAREA"))d.firstChild.style.height=c-a.pxself(d,"marginBottom")+"px"}}};this.adjustRow=function(b,c){var f=[];if(b.style.height!=c+"px")b.style.height=c+"px";b=b.childNodes;var d,i,k,g;d=0;g=-1;for(i=b.length;d<i;++d){k=b[d];k.className!="Wt-vrh"&&++g;if(k.rowSpan!=1){this.adjustCell(k,0);f.push(k)}else this.adjustCell(k,c)}return f};this.adjust=function(){var b=a.getElement(t);if(!b)return false;o.initResize&&o.initResize(a,
c+=a.px(b,"paddingTop");c+=a.px(b,"paddingBottom");return c};this.getColumn=function(b){var c,f,i,d=a.getElement(t).firstChild.childNodes;f=c=0;for(i=d.length;f<i;f++){var k=d[f];if(a.hasTag(k,"COLGROUP")){f=-1;d=k.childNodes;i=d.length}if(a.hasTag(k,"COL"))if(k.className!="Wt-vrh")if(c==b)return k;else++c}return null};this.adjustCell=function(b,c,f){var i=c==0;c-=a.pxself(b,"paddingTop");c-=a.pxself(b,"paddingBottom");if(c<=0)c=0;b.style.height=c+"px";if(!(b.style.verticalAlign||b.childNodes.length== 0)){var d=b.childNodes[0];if(c<=0)c=0;if(d.className=="Wt-hcenter"){d.style.height=c+"px";d=d.firstChild.firstChild;if(!a.hasTag(d,"TD"))d=d.firstChild;if(d.style.height!=c+"px")d.style.height=c+"px";d=d.firstChild}if(b.childNodes.length==1)c-=this.marginV(d);if(c<=0)c=0;if(!a.hasTag(d,"TABLE"))if(!i&&d.wtResize){b=d.parentNode.offsetWidth-o.marginH(d);if(f!=-1&&o.getColumn(f).style.width!=""){d.style.position="absolute";d.style.width=b+"px"}d.wtResize(d,b,c)}else if(d.style.height!=c+"px"){d.style.height= c+"px";if(d.className=="Wt-wrapdiv")if(a.isIE&&a.hasTag(d.firstChild,"TEXTAREA"))d.firstChild.style.height=c-a.pxself(d,"marginBottom")+"px"}}};this.adjustRow=function(b,c){var f=[];if(b.style.height!=c+"px")b.style.height=c+"px";b=b.childNodes;var i,d,k,g;i=0;g=-1;for(d=b.length;i<d;++i){k=b[i];k.className!="Wt-vrh"&&++g;if(k.rowSpan!=1){this.adjustCell(k,0,-1);f.push(k)}else this.adjustCell(k,c,-1)}return f};this.adjust=function(){var b=a.getElement(t);if(!b)return false;o.initResize&&o.initResize(a,
c+=a.px(b,"paddingTop");c+=a.px(b,"paddingBottom");return c};this.getColumn=function(b){var c,f,d,i=a.getElement(t).firstChild.childNodes;f=c=0;for(d=i.length;f<d;f++){var k=i[f];if(a.hasTag(k,"COLGROUP")){f=-1;i=k.childNodes;d=i.length}if(a.hasTag(k,"COL"))if(k.className!="Wt-vrh")if(c==b)return k;else++c}return null};this.adjustCell=function(b,c){var f=c==0;c-=a.pxself(b,"paddingTop");c-=a.pxself(b,"paddingBottom");if(c<=0)c=0;b.style.height=c+"px";if(!(b.style.verticalAlign||b.childNodes.length==0)){var d=b.childNodes[0];if(c<=0)c=0;if(d.className=="Wt-hcenter"){d.style.height=c+"px";d=d.firstChild.firstChild;if(!a.hasTag(d,"TD"))d=d.firstChild;if(d.style.height!=c+"px")d.style.height=c+"px";d=d.firstChild}if(b.childNodes.length==1)c-=this.marginV(d);if(c<=0)c=0;if(!a.hasTag(d,"TABLE"))if(!f&&d.wtResize){b=d.parentNode.offsetWidth-o.marginH(d);if(o.getColumn(col).style.width!=""){d.style.position="absolute";d.style.width=b+"px"}d.wtResize(d,b,c)}else if(d.style.height!=c+"px"){d.style.height=c+"px";if(d.className=="Wt-wrapdiv")if(a.isIE&&a.hasTag(d.firstChild,"TEXTAREA"))d.firstChild.style.height=c-a.pxself(d,"marginBottom")+"px"}}};this.adjustRow=function(b,c){var f=[];if(b.style.height!=c+"px")b.style.height=c+"px";b=b.childNodes;var d,i,k,g;d=0;g=-1;for(i=b.length;d<i;++d){k=b[d];k.className!="Wt-vrh"&&++g;if(k.rowSpan!=1){this.adjustCell(k,0);f.push(k)}else this.adjustCell(k,c)}return f};this.adjust=function(){var b=a.getElement(t);if(!b)return false;o.initResize&&o.initResize(a,
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 ."+
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 ."+e).css("width",h.style.width);else h.style.width=i.offsetWidth-a.offsetWidth-8+"px";e=b+f.pxself(h,"width")+(f.isIE6?10:8);if(p){j=f.getCssRule("#"+d.id+" .Wt-tv-rowc");j.style.width=b+"px";$(d).find(".Wt-tv-rowc").css("width",b+"px").css("width","");d.changed=true;this.autoJavaScript()}else{i.style.width=c.style.width=e+"px";a.style.width=b+"px"}}};var n=null;d.handleDragDrop=function(c,a,b,e,h){if(n){n.className=n.classNameOrig;n=null}if(c!="end"){var g=o(b);if(!g.selected&&g.drop&&g.columnId!=
var e=c.parentNode.parentNode;b=Math.max(f.x-b,-e.offsetWidth);if(e=e.className.split(" ")[0]){e=g.getCssRule("#"+d.id+" ."+e);var h=g.pxself(e,"width");e.style.width=Math.max(0,h+b)+"px"}this.adjustColumns();c.setAttribute("dsx",f.x);g.cancelEvent(a)}};this.resizeHandleMUp=function(c,a){c.removeAttribute("dsx");g.cancelEvent(a)};this.adjustColumns=function(){var c=o.firstChild,a=j.firstChild,b=0,f=0;f=j.lastChild.className.split(" ")[0];f=g.getCssRule("#"+d.id+" ."+f);if(q)a=a.firstChild;if(!g.isHidden(d)){for(var e= 0,h=a.childNodes.length;e<h;++e)if(a.childNodes[e].className){var m=a.childNodes[e].className.split(" ")[0];m=g.getCssRule("#"+d.id+" ."+m);b+=g.pxself(m,"width")+7}if(!f.style.width)f.style.width=j.offsetWidth-a.offsetWidth-8+"px";f=b+g.pxself(f,"width")+(g.isIE6?10:8);if(q){m=g.getCssRule("#"+d.id+" .Wt-tv-rowc");m.style.width=b+"px";$(d).find(" .Wt-tv-rowc").css("width",b+"px").css("width","");d.changed=true;this.autoJavaScript()}else{j.style.width=c.style.width=f+"px";a.style.width=b+"px"}}};
var f=c.parentNode.parentNode;b=Math.max(e.x-b,-f.offsetWidth);if(f=f.className.split(" ")[0]){f=g.getCssRule("#"+d.id+" ."+f);var j=g.pxself(f,"width");f.style.width=Math.max(0,j+b)+"px"}this.adjustColumns();c.setAttribute("dsx",e.x);g.cancelEvent(a)}};this.resizeHandleMUp=function(c,a){c.removeAttribute("dsx");g.cancelEvent(a)};this.adjustColumns=function(){var c=o.firstChild,a=k.firstChild,b=0,e=0;e=k.lastChild.className.split(" ")[0];e=g.getCssRule("#"+d.id+" ."+e);if(q)a=a.firstChild;if(!g.isHidden(d)){for(var f= 0,j=a.childNodes.length;f<j;++f)if(a.childNodes[f].className){var h=a.childNodes[f].className.split(" ")[0];h=g.getCssRule("#"+d.id+" ."+h);b+=g.pxself(h,"width")+7}if(!e.style.width)e.style.width=k.offsetWidth-a.offsetWidth-8+"px";e=b+g.pxself(e,"width")+(g.isIE6?10:8);if(q){h=g.getCssRule("#"+d.id+" .Wt-tv-rowc");h.style.width=b+"px";$(d).find(" .Wt-tv-rowc").css("width",b+"px").css("width","");d.changed=true;this.autoJavaScript()}else{k.style.width=c.style.width=e+"px";a.style.width=b+"px"}}};
var e=c.parentNode.parentNode;b=Math.max(f.x-b,-e.offsetWidth);if(e=e.className.split(" ")[0]){e=g.getCssRule("#"+d.id+" ."+e);var h=g.pxself(e,"width");e.style.width=Math.max(0,h+b)+"px"}this.adjustColumns();c.setAttribute("dsx",f.x);g.cancelEvent(a)}};this.resizeHandleMUp=function(c,a){c.removeAttribute("dsx");g.cancelEvent(a)};this.adjustColumns=function(){var c=o.firstChild,a=j.firstChild,b=0,f=0;f=j.lastChild.className.split(" ")[0];f=g.getCssRule("#"+d.id+" ."+f);if(q)a=a.firstChild;if(!g.isHidden(d)){for(var e=0,h=a.childNodes.length;e<h;++e)if(a.childNodes[e].className){var m=a.childNodes[e].className.split(" ")[0];m=g.getCssRule("#"+d.id+" ."+m);b+=g.pxself(m,"width")+7}if(!f.style.width)f.style.width=j.offsetWidth-a.offsetWidth-8+"px";f=b+g.pxself(f,"width")+(g.isIE6?10:8);if(q){m=g.getCssRule("#"+d.id+" .Wt-tv-rowc");m.style.width=b+"px";$(d).find(" .Wt-tv-rowc").css("width",b+"px").css("width","");d.changed=true;this.autoJavaScript()}else{j.style.width=c.style.width=f+"px";a.style.width=b+"px"}}};
this.adjustCell(td, 0);
this.adjustCell(td, 0, -1);
this.adjustRow = function(row, height) { var rowspan_tds = []; if (row.style.height != height + 'px') row.style.height = height + 'px'; var tds = row.childNodes, j, jl, td, col; for (j=0, col=-1, jl = tds.length; j<jl; ++j) { td=tds[j]; if (td.className != 'Wt-vrh') ++col; if (td.rowSpan != 1) { this.adjustCell(td, 0); rowspan_tds.push(td); continue; } this.adjustCell(td, height); } return rowspan_tds; };
this.adjustCell(td, height);
this.adjustCell(td, height, -1);
this.adjustRow = function(row, height) { var rowspan_tds = []; if (row.style.height != height + 'px') row.style.height = height + 'px'; var tds = row.childNodes, j, jl, td, col; for (j=0, col=-1, jl = tds.length; j<jl; ++j) { td=tds[j]; if (td.className != 'Wt-vrh') ++col; if (td.rowSpan != 1) { this.adjustCell(td, 0); rowspan_tds.push(td); continue; } this.adjustCell(td, height); } return rowspan_tds; };
var tds = row.childNodes, j, jl, td; for (j=0, jl = tds.length; j<jl; ++j) {
var tds = row.childNodes, j, jl, td, col; for (j=0, col=-1, jl = tds.length; j<jl; ++j) {
this.adjustRow = function(row, height) { if (row.style.height != height+'px') row.style.height = height+'px'; var tds = row.childNodes, j, jl, td; for (j=0, jl = tds.length; j<jl; ++j) { td=tds[j]; var k = height; k -= WT.pxself(td, 'paddingTop'); k -= WT.pxself(td, 'paddingBottom'); if (k <= 0) k=0; td.style.height = k+'px'; if (td.style['verticalAlign'] || td.childNodes.length == 0) continue; var ch = td.childNodes[0]; // 'ch' is cell contents if (k <= 0) k=0; if (ch.className == 'Wt-hcenter') { ch.style.height = k+'px'; var itd = ch.firstChild.firstChild; if (!WT.hasTag(itd, 'TD')) itd = itd.firstChild; if (itd.style.height != k+'px') itd.style.height = k+'px'; ch = itd.firstChild; } if (td.childNodes.length == 1) k -= this.marginV(ch); if (k <= 0) k=0; if (WT.hasTag(ch, 'TABLE')) continue; if (ch.wtResize) { var p = ch.parentNode, w = p.offsetWidth - self.marginH(ch); ch.style.position = 'absolute'; ch.style.width = w+'px'; ch.wtResize(ch, w, k); } else if (ch.style.height != k+'px') { ch.style.height = k+'px'; if (ch.className == 'Wt-wrapdiv') { if (WT.isIE && WT.hasTag(ch.firstChild, 'TEXTAREA')) { ch.firstChild.style.height = (k - WT.pxself(ch, 'marginBottom')) + 'px'; } } } } };
ch.style.position = 'absolute'; ch.style.width = w+'px';
if (self.getColumn(col).style.width != '') { ch.style.position = 'absolute'; ch.style.width = w+'px'; }
this.adjustRow = function(row, height) { if (row.style.height != height+'px') row.style.height = height+'px'; var tds = row.childNodes, j, jl, td; for (j=0, jl = tds.length; j<jl; ++j) { td=tds[j]; var k = height; k -= WT.pxself(td, 'paddingTop'); k -= WT.pxself(td, 'paddingBottom'); if (k <= 0) k=0; td.style.height = k+'px'; if (td.style['verticalAlign'] || td.childNodes.length == 0) continue; var ch = td.childNodes[0]; // 'ch' is cell contents if (k <= 0) k=0; if (ch.className == 'Wt-hcenter') { ch.style.height = k+'px'; var itd = ch.firstChild.firstChild; if (!WT.hasTag(itd, 'TD')) itd = itd.firstChild; if (itd.style.height != k+'px') itd.style.height = k+'px'; ch = itd.firstChild; } if (td.childNodes.length == 1) k -= this.marginV(ch); if (k <= 0) k=0; if (WT.hasTag(ch, 'TABLE')) continue; if (ch.wtResize) { var p = ch.parentNode, w = p.offsetWidth - self.marginH(ch); ch.style.position = 'absolute'; ch.style.width = w+'px'; ch.wtResize(ch, w, k); } else if (ch.style.height != k+'px') { ch.style.height = k+'px'; if (ch.className == 'Wt-wrapdiv') { if (WT.isIE && WT.hasTag(ch.firstChild, 'TEXTAREA')) { ch.firstChild.style.height = (k - WT.pxself(ch, 'marginBottom')) + 'px'; } } } } };
WT_DECLARE_WT_MEMBER(1,"StdLayout",function(a,t,g){var n=this;this.getId=function(){return t};this.WT=a;this.marginH=function(d){var k=d.parentNode;return a.px(d,"marginLeft")+a.px(d,"marginRight")+a.px(d,"borderLeftWidth")+a.px(d,"borderRightWidth")+a.px(k,"paddingLeft")+a.px(k,"paddingRight")};this.marginV=function(d){return a.px(d,"marginTop")+a.px(d,"marginBottom")+a.px(d,"borderTopWidth")+a.px(d,"borderBottomWidth")+a.px(d,"paddingTop")+a.px(d,"paddingBottom")};this.adjustRow=function(d,k){if(d.style.height!= k+"px")d.style.height=k+"px";d=d.childNodes;var l,o,f;l=0;for(o=d.length;l<o;++l){f=d[l];var j=k-a.pxself(f,"paddingTop")-a.pxself(f,"paddingBottom");if(j<=0)j=0;f.style.height=j+"px";if(!(f.style.verticalAlign||f.childNodes.length==0)){var b=f.childNodes[0];if(j<=0)j=0;if(b.className=="Wt-hcenter"){b.style.height=j+"px";b=b.firstChild.firstChild;if(!a.hasTag(b,"TD"))b=b.firstChild;if(b.style.height!=j+"px")b.style.height=j+"px";b=b.firstChild}if(f.childNodes.length==1)j+=-this.marginV(b);if(j<=0)j= 0;if(!a.hasTag(b,"TABLE"))if(b.wtResize){f=b.parentNode.offsetWidth-n.marginH(b);b.wtResize(b,f,j)}else if(b.style.height!=j+"px"){b.style.height=j+"px";if(b.className=="Wt-wrapdiv")if(a.isIE&&a.hasTag(b.firstChild,"TEXTAREA"))b.firstChild.style.height=j-a.pxself(b,"marginBottom")+"px"}}}};this.adjust=function(){var d=a.getElement(t);if(!d)return false;n.initResize&&n.initResize(a,t,g);if(a.isHidden(d))return true;var k=d.firstChild,l=d.parentNode;if(k.style.height!="")k.style.height="";if(!(d.dirty||
return e};this.adjustRow=function(d,e){if(d.style.height!=e+"px")d.style.height=e+"px";d=d.childNodes;var g,m,h;g=0;for(m=d.length;g<m;++g){h=d[g];var k=e;k-=a.pxself(h,"paddingTop");k-=a.pxself(h,"paddingBottom");if(k<=0)k=0;h.style.height=k+"px";if(!(h.style.verticalAlign||h.childNodes.length==0)){var b=h.childNodes[0];if(k<=0)k=0;if(b.className=="Wt-hcenter"){b.style.height=k+"px";b=b.firstChild.firstChild;if(!a.hasTag(b,"TD"))b=b.firstChild;if(b.style.height!=k+"px")b.style.height=k+"px";b=b.firstChild}if(h.childNodes.length== 1)k-=this.marginV(b);if(k<=0)k=0;if(!a.hasTag(b,"TABLE"))if(b.wtResize){h=b.parentNode.offsetWidth-o.marginH(b);b.wtResize(b,h,k)}else if(b.style.height!=k+"px"){b.style.height=k+"px";if(b.className=="Wt-wrapdiv")if(a.isIE&&a.hasTag(b.firstChild,"TEXTAREA"))b.firstChild.style.height=k-a.pxself(b,"marginBottom")+"px"}}}};this.adjust=function(){var d=a.getElement(t);if(!d)return false;o.initResize&&o.initResize(a,t,i);if(a.isHidden(d))return true;var e=d.firstChild,g=d.parentNode;if(e.style.height!=
WT_DECLARE_WT_MEMBER(1,"StdLayout",function(a,t,g){var n=this;this.getId=function(){return t};this.WT=a;this.marginH=function(d){var k=d.parentNode;return a.px(d,"marginLeft")+a.px(d,"marginRight")+a.px(d,"borderLeftWidth")+a.px(d,"borderRightWidth")+a.px(k,"paddingLeft")+a.px(k,"paddingRight")};this.marginV=function(d){return a.px(d,"marginTop")+a.px(d,"marginBottom")+a.px(d,"borderTopWidth")+a.px(d,"borderBottomWidth")+a.px(d,"paddingTop")+a.px(d,"paddingBottom")};this.adjustRow=function(d,k){if(d.style.height!=k+"px")d.style.height=k+"px";d=d.childNodes;var l,o,f;l=0;for(o=d.length;l<o;++l){f=d[l];var j=k-a.pxself(f,"paddingTop")-a.pxself(f,"paddingBottom");if(j<=0)j=0;f.style.height=j+"px";if(!(f.style.verticalAlign||f.childNodes.length==0)){var b=f.childNodes[0];if(j<=0)j=0;if(b.className=="Wt-hcenter"){b.style.height=j+"px";b=b.firstChild.firstChild;if(!a.hasTag(b,"TD"))b=b.firstChild;if(b.style.height!=j+"px")b.style.height=j+"px";b=b.firstChild}if(f.childNodes.length==1)j+=-this.marginV(b);if(j<=0)j=0;if(!a.hasTag(b,"TABLE"))if(b.wtResize){f=b.parentNode.offsetWidth-n.marginH(b);b.wtResize(b,f,j)}else if(b.style.height!=j+"px"){b.style.height=j+"px";if(b.className=="Wt-wrapdiv")if(a.isIE&&a.hasTag(b.firstChild,"TEXTAREA"))b.firstChild.style.height=j-a.pxself(b,"marginBottom")+"px"}}}};this.adjust=function(){var d=a.getElement(t);if(!d)return false;n.initResize&&n.initResize(a,t,g);if(a.isHidden(d))return true;var k=d.firstChild,l=d.parentNode;if(k.style.height!="")k.style.height="";if(!(d.dirty||
function(c){var f,i,j,g=a.getElement(s).firstChild.childNodes;i=f=0;for(j=g.length;i<j;i++){var q=g[i];if(a.hasTag(q,"COLGROUP")){i=-1;g=q.childNodes;j=g.length}if(a.hasTag(q,"COL"))if(q.className!="Wt-vrh")if(f==c)return q;else++f}return null};this.adjustRow=function(c,f){if(c.style.height!=f+"px")c.style.height=f+"px";c=c.childNodes;var i,j,g,q;i=0;q=-1;for(j=c.length;i<j;++i){g=c[i];var d=f;d-=a.pxself(g,"paddingTop");d-=a.pxself(g,"paddingBottom");if(d<=0)d=0;g.className!="Wt-vrh"&&++q;g.style.height= d+"px";if(!(g.style.verticalAlign||g.childNodes.length==0)){var b=g.childNodes[0];if(d<=0)d=0;if(b.className=="Wt-hcenter"){b.style.height=d+"px";b=b.firstChild.firstChild;if(!a.hasTag(b,"TD"))b=b.firstChild;if(b.style.height!=d+"px")b.style.height=d+"px";b=b.firstChild}if(g.childNodes.length==1)d-=this.marginV(b);if(d<=0)d=0;if(!a.hasTag(b,"TABLE"))if(b.wtResize){g=b.parentNode.offsetWidth-p.marginH(b);if(p.getColumn(q).style.width!=""){b.style.position="absolute";b.style.width=g+"px"}b.wtResize(b, g,d)}else if(b.style.height!=d+"px"){b.style.height=d+"px";if(b.className=="Wt-wrapdiv")if(a.isIE&&a.hasTag(b.firstChild,"TEXTAREA"))b.firstChild.style.height=d-a.pxself(b,"marginBottom")+"px"}}}};this.adjust=function(){var c=a.getElement(s);if(!c)return false;p.initResize&&p.initResize(a,s,h);if(a.isHidden(c))return true;var f=c.firstChild,i=c.parentNode;if(f.style.height!="")f.style.height="";if(!(c.dirty||f.w!=i.clientWidth||f.h!=i.clientHeight))return true;c.dirty=null;var j=a.pxself(i,"height");
f+=a.px(b,"paddingTop");f+=a.px(b,"paddingBottom");return f};this.getColumn=function(b){var f,g,j,h=a.getElement(s).firstChild.childNodes;g=f=0;for(j=h.length;g<j;g++){var q=h[g];if(a.hasTag(q,"COLGROUP")){g=-1;h=q.childNodes;j=h.length}if(a.hasTag(q,"COL"))if(q.className!="Wt-vrh")if(f==b)return q;else++f}return null};this.adjustRow=function(b,f){if(b.style.height!=f+"px")b.style.height=f+"px";b=b.childNodes;var g,j,h,q;g=0;q=-1;for(j=b.length;g<j;++g){h=b[g];var d=f;d-=a.pxself(h,"paddingTop"); d-=a.pxself(h,"paddingBottom");if(d<=0)d=0;h.className!="Wt-vrh"&&++q;h.style.height=d+"px";if(!(h.style.verticalAlign||h.childNodes.length==0)){var c=h.childNodes[0];if(d<=0)d=0;if(c.className=="Wt-hcenter"){c.style.height=d+"px";c=c.firstChild.firstChild;if(!a.hasTag(c,"TD"))c=c.firstChild;if(c.style.height!=d+"px")c.style.height=d+"px";c=c.firstChild}if(h.childNodes.length==1)d-=this.marginV(c);if(d<=0)d=0;if(!a.hasTag(c,"TABLE"))if(c.wtResize){h=c.parentNode.offsetWidth-o.marginH(c);if(o.getColumn(q).style.width!= ""){c.style.position="absolute";c.style.width=h+"px"}c.wtResize(c,h,d)}else if(c.style.height!=d+"px"){c.style.height=d+"px";if(c.className=="Wt-wrapdiv")if(a.isIE&&a.hasTag(c.firstChild,"TEXTAREA"))c.firstChild.style.height=d-a.pxself(c,"marginBottom")+"px"}}}};this.adjust=function(){var b=a.getElement(s);if(!b)return false;o.initResize&&o.initResize(a,s,i);if(a.isHidden(b))return true;var f=b.firstChild,g=b.parentNode;if(f.style.height!="")f.style.height="";if(!(b.dirty||f.w!=g.clientWidth||f.h!=
function(c){var f,i,j,g=a.getElement(s).firstChild.childNodes;i=f=0;for(j=g.length;i<j;i++){var q=g[i];if(a.hasTag(q,"COLGROUP")){i=-1;g=q.childNodes;j=g.length}if(a.hasTag(q,"COL"))if(q.className!="Wt-vrh")if(f==c)return q;else++f}return null};this.adjustRow=function(c,f){if(c.style.height!=f+"px")c.style.height=f+"px";c=c.childNodes;var i,j,g,q;i=0;q=-1;for(j=c.length;i<j;++i){g=c[i];var d=f;d-=a.pxself(g,"paddingTop");d-=a.pxself(g,"paddingBottom");if(d<=0)d=0;g.className!="Wt-vrh"&&++q;g.style.height=d+"px";if(!(g.style.verticalAlign||g.childNodes.length==0)){var b=g.childNodes[0];if(d<=0)d=0;if(b.className=="Wt-hcenter"){b.style.height=d+"px";b=b.firstChild.firstChild;if(!a.hasTag(b,"TD"))b=b.firstChild;if(b.style.height!=d+"px")b.style.height=d+"px";b=b.firstChild}if(g.childNodes.length==1)d-=this.marginV(b);if(d<=0)d=0;if(!a.hasTag(b,"TABLE"))if(b.wtResize){g=b.parentNode.offsetWidth-p.marginH(b);if(p.getColumn(q).style.width!=""){b.style.position="absolute";b.style.width=g+"px"}b.wtResize(b,g,d)}else if(b.style.height!=d+"px"){b.style.height=d+"px";if(b.className=="Wt-wrapdiv")if(a.isIE&&a.hasTag(b.firstChild,"TEXTAREA"))b.firstChild.style.height=d-a.pxself(b,"marginBottom")+"px"}}}};this.adjust=function(){var c=a.getElement(s);if(!c)return false;p.initResize&&p.initResize(a,s,h);if(a.isHidden(c))return true;var f=c.firstChild,i=c.parentNode;if(f.style.height!="")f.style.height="";if(!(c.dirty||f.w!=i.clientWidth||f.h!=i.clientHeight))return true;c.dirty=null;var j=a.pxself(i,"height");
return h};this.getColumn=function(c){var h,g,j,f=a.getElement(s).firstChild.childNodes;g=h=0;for(j=f.length;g<j;g++){var q=f[g];if(a.hasTag(q,"COLGROUP")){g=-1;f=q.childNodes;j=f.length}if(a.hasTag(q,"COL"))if(q.className!="Wt-vrh")if(h==c)return q;else++h}return null};this.adjustRow=function(c,h){if(c.style.height!=h+"px")c.style.height=h+"px";c=c.childNodes;var g,j,f,q;g=0;q=-1;for(j=c.length;g<j;++g){f=c[g];var d=h;d-=a.pxself(f,"paddingTop");d-=a.pxself(f,"paddingBottom");if(d<=0)d=0;f.className!= "Wt-vrh"&&++q;f.style.height=d+"px";if(!(f.style.verticalAlign||f.childNodes.length==0)){var b=f.childNodes[0];if(d<=0)d=0;if(b.className=="Wt-hcenter"){b.style.height=d+"px";b=b.firstChild.firstChild;if(!a.hasTag(b,"TD"))b=b.firstChild;if(b.style.height!=d+"px")b.style.height=d+"px";b=b.firstChild}if(f.childNodes.length==1)d-=this.marginV(b);if(d<=0)d=0;if(!a.hasTag(b,"TABLE"))if(b.wtResize){f=b.parentNode.offsetWidth-p.marginH(b);if(p.getColumn(q).style.width!=""){b.style.position="absolute";b.style.width= f+"px"}b.wtResize(b,f,d)}else if(b.style.height!=d+"px"){b.style.height=d+"px";if(b.className=="Wt-wrapdiv")if(a.isIE&&a.hasTag(b.firstChild,"TEXTAREA"))b.firstChild.style.height=d-a.pxself(b,"marginBottom")+"px"}}}};this.adjust=function(){var c=a.getElement(s);if(!c)return false;p.initResize&&p.initResize(a,s,i);if(a.isHidden(c))return true;var h=c.firstChild,g=c.parentNode;if(h.style.height!="")h.style.height="";if(!(c.dirty||h.w!=g.clientWidth||h.h!=g.clientHeight))return true;c.dirty=null;var j=
function(c){var f,i,j,g=a.getElement(s).firstChild.childNodes;i=f=0;for(j=g.length;i<j;i++){var q=g[i];if(a.hasTag(q,"COLGROUP")){i=-1;g=q.childNodes;j=g.length}if(a.hasTag(q,"COL"))if(q.className!="Wt-vrh")if(f==c)return q;else++f}return null};this.adjustRow=function(c,f){if(c.style.height!=f+"px")c.style.height=f+"px";c=c.childNodes;var i,j,g,q;i=0;q=-1;for(j=c.length;i<j;++i){g=c[i];var d=f;d-=a.pxself(g,"paddingTop");d-=a.pxself(g,"paddingBottom");if(d<=0)d=0;g.className!="Wt-vrh"&&++q;g.style.height= d+"px";if(!(g.style.verticalAlign||g.childNodes.length==0)){var b=g.childNodes[0];if(d<=0)d=0;if(b.className=="Wt-hcenter"){b.style.height=d+"px";b=b.firstChild.firstChild;if(!a.hasTag(b,"TD"))b=b.firstChild;if(b.style.height!=d+"px")b.style.height=d+"px";b=b.firstChild}if(g.childNodes.length==1)d-=this.marginV(b);if(d<=0)d=0;if(!a.hasTag(b,"TABLE"))if(b.wtResize){g=b.parentNode.offsetWidth-p.marginH(b);if(p.getColumn(q).style.width!=""){b.style.position="absolute";b.style.width=g+"px"}b.wtResize(b, g,d)}else if(b.style.height!=d+"px"){b.style.height=d+"px";if(b.className=="Wt-wrapdiv")if(a.isIE&&a.hasTag(b.firstChild,"TEXTAREA"))b.firstChild.style.height=d-a.pxself(b,"marginBottom")+"px"}}}};this.adjust=function(){var c=a.getElement(s);if(!c)return false;p.initResize&&p.initResize(a,s,h);if(a.isHidden(c))return true;var f=c.firstChild,i=c.parentNode;if(f.style.height!="")f.style.height="";if(!(c.dirty||f.w!=i.clientWidth||f.h!=i.clientHeight))return true;c.dirty=null;var j=a.pxself(i,"height");
return h};this.getColumn=function(c){var h,g,j,f=a.getElement(s).firstChild.childNodes;g=h=0;for(j=f.length;g<j;g++){var q=f[g];if(a.hasTag(q,"COLGROUP")){g=-1;f=q.childNodes;j=f.length}if(a.hasTag(q,"COL"))if(q.className!="Wt-vrh")if(h==c)return q;else++h}return null};this.adjustRow=function(c,h){if(c.style.height!=h+"px")c.style.height=h+"px";c=c.childNodes;var g,j,f,q;g=0;q=-1;for(j=c.length;g<j;++g){f=c[g];var d=h;d-=a.pxself(f,"paddingTop");d-=a.pxself(f,"paddingBottom");if(d<=0)d=0;f.className!="Wt-vrh"&&++q;f.style.height=d+"px";if(!(f.style.verticalAlign||f.childNodes.length==0)){var b=f.childNodes[0];if(d<=0)d=0;if(b.className=="Wt-hcenter"){b.style.height=d+"px";b=b.firstChild.firstChild;if(!a.hasTag(b,"TD"))b=b.firstChild;if(b.style.height!=d+"px")b.style.height=d+"px";b=b.firstChild}if(f.childNodes.length==1)d-=this.marginV(b);if(d<=0)d=0;if(!a.hasTag(b,"TABLE"))if(b.wtResize){f=b.parentNode.offsetWidth-p.marginH(b);if(p.getColumn(q).style.width!=""){b.style.position="absolute";b.style.width=f+"px"}b.wtResize(b,f,d)}else if(b.style.height!=d+"px"){b.style.height=d+"px";if(b.className=="Wt-wrapdiv")if(a.isIE&&a.hasTag(b.firstChild,"TEXTAREA"))b.firstChild.style.height=d-a.pxself(b,"marginBottom")+"px"}}}};this.adjust=function(){var c=a.getElement(s);if(!c)return false;p.initResize&&p.initResize(a,s,i);if(a.isHidden(c))return true;var h=c.firstChild,g=c.parentNode;if(h.style.height!="")h.style.height="";if(!(c.dirty||h.w!=g.clientWidth||h.h!=g.clientHeight))return true;c.dirty=null;var j=
c+"px";if(d.className=="Wt-wrapdiv")if(a.isIE&&a.hasTag(d.firstChild,"TEXTAREA"))d.firstChild.style.height=c-a.pxself(d,"marginBottom")+"px"}}};this.adjustRow=function(b,c){var f=[];if(b.style.height!=c+"px")b.style.height=c+"px";b=b.childNodes;var d,i,k,g;d=0;g=-1;for(i=b.length;d<i;++d){k=b[d];k.className!="Wt-vrh"&&++g;if(k.rowSpan!=1){this.adjustCell(k,0);f.push(k)}else this.adjustCell(k,c)}return f};this.adjust=function(){var b=a.getElement(t);if(!b)return false;o.initResize&&o.initResize(a,
c+"px";if(d.className=="Wt-wrapdiv")if(a.isIE&&a.hasTag(d.firstChild,"TEXTAREA"))d.firstChild.style.height=c-a.pxself(d,"marginBottom")+"px"}}};this.adjustRow=function(b,c){var f=[];if(b.style.height!=c+"px")b.style.height=c+"px";b=b.childNodes;var i,d,k,g;i=0;g=-1;for(d=b.length;i<d;++i){k=b[i];k.className!="Wt-vrh"&&++g;if(k.rowSpan!=1){this.adjustCell(k,0,-1);f.push(k)}else this.adjustCell(k,c,-1)}return f};this.adjust=function(){var b=a.getElement(t);if(!b)return false;o.initResize&&o.initResize(a,
c+"px";if(d.className=="Wt-wrapdiv")if(a.isIE&&a.hasTag(d.firstChild,"TEXTAREA"))d.firstChild.style.height=c-a.pxself(d,"marginBottom")+"px"}}};this.adjustRow=function(b,c){var f=[];if(b.style.height!=c+"px")b.style.height=c+"px";b=b.childNodes;var d,i,k,g;d=0;g=-1;for(i=b.length;d<i;++d){k=b[d];k.className!="Wt-vrh"&&++g;if(k.rowSpan!=1){this.adjustCell(k,0);f.push(k)}else this.adjustCell(k,c)}return f};this.adjust=function(){var b=a.getElement(t);if(!b)return false;o.initResize&&o.initResize(a,
WT_DECLARE_WT_MEMBER(1,"StdLayout",function(a,s,r){var u=this;this.marginH=function(b){var i=b.parentNode;return a.px(b,"marginLeft")+a.px(b,"marginRight")+a.px(b,"borderLeftWidth")+a.px(b,"borderRightWidth")+a.px(i,"paddingLeft")+a.px(i,"paddingRight")};this.marginV=function(b){return a.px(b,"marginTop")+a.px(b,"marginBottom")+a.px(b,"borderTopWidth")+a.px(b,"borderBottomWidth")+a.px(b,"paddingTop")+a.px(b,"paddingBottom")};this.adjustRow=function(b,i){if(b.style.height!=i+"px")b.style.height=i+ "px";b=b.childNodes;var j,k,m;j=0;for(k=b.length;j<k;++j){m=b[j];var d=i-a.pxself(m,"paddingTop")-a.pxself(m,"paddingBottom");if(d<=0)d=0;m.style.height=d+"px";if(!(m.style.verticalAlign||m.childNodes.length==0)){var e=m.childNodes[0];if(d<=0)d=0;if(e.className=="Wt-hcenter"){e.style.height=d+"px";e=e.firstChild.firstChild;if(!a.hasTag(e,"TD"))e=e.firstChild;if(e.style.height!=d+"px")e.style.height=d+"px";e=e.firstChild}if(m.childNodes.length==1)d+=-this.marginV(e);if(d<=0)d=0;if(!a.hasTag(e,"TABLE"))if(e.wtResize){m= e.parentNode.offsetWidth-u.marginH(e);e.wtResize(e,m,d)}else if(e.style.height!=d+"px"){e.style.height=d+"px";if(e.className=="Wt-wrapdiv")if(a.isIE&&a.hasTag(e.firstChild,"TEXTAREA"))e.firstChild.style.height=d-a.pxself(e,"marginBottom")+"px"}}}};this.adjust=function(){var b=a.getElement(s);if(!b)return false;u.initResize&&u.initResize(a,s,r);if(a.isHidden(b))return true;var i=b.firstChild;if(i.style.height!="")i.style.height="";if(!(b.dirty||i.w!=b.clientWidth||i.h!=b.clientHeight))return true;
WT_DECLARE_WT_MEMBER(1,"StdLayout",function(a,u,h){var t=this;this.getId=function(){return u};this.marginH=function(b){var k=b.parentNode;return a.px(b,"marginLeft")+a.px(b,"marginRight")+a.px(b,"borderLeftWidth")+a.px(b,"borderRightWidth")+a.px(k,"paddingLeft")+a.px(k,"paddingRight")};this.marginV=function(b){return a.px(b,"marginTop")+a.px(b,"marginBottom")+a.px(b,"borderTopWidth")+a.px(b,"borderBottomWidth")+a.px(b,"paddingTop")+a.px(b,"paddingBottom")};this.adjustRow=function(b,k){if(b.style.height!= k+"px")b.style.height=k+"px";b=b.childNodes;var l,m,o;l=0;for(m=b.length;l<m;++l){o=b[l];var d=k-a.pxself(o,"paddingTop")-a.pxself(o,"paddingBottom");if(d<=0)d=0;o.style.height=d+"px";if(!(o.style.verticalAlign||o.childNodes.length==0)){var e=o.childNodes[0];if(d<=0)d=0;if(e.className=="Wt-hcenter"){e.style.height=d+"px";e=e.firstChild.firstChild;if(!a.hasTag(e,"TD"))e=e.firstChild;if(e.style.height!=d+"px")e.style.height=d+"px";e=e.firstChild}if(o.childNodes.length==1)d+=-this.marginV(e);if(d<=0)d= 0;if(!a.hasTag(e,"TABLE"))if(e.wtResize){o=e.parentNode.offsetWidth-t.marginH(e);e.wtResize(e,o,d)}else if(e.style.height!=d+"px"){e.style.height=d+"px";if(e.className=="Wt-wrapdiv")if(a.isIE&&a.hasTag(e.firstChild,"TEXTAREA"))e.firstChild.style.height=d-a.pxself(e,"marginBottom")+"px"}}}};this.adjust=function(){var b=a.getElement(u);if(!b)return false;t.initResize&&t.initResize(a,u,h);if(a.isHidden(b))return true;var k=b.firstChild;if(k.style.height!="")k.style.height="";if(b.dirty||k.w!=b.clientWidth||
WT_DECLARE_WT_MEMBER(1,"StdLayout",function(a,s,r){var u=this;this.marginH=function(b){var i=b.parentNode;return a.px(b,"marginLeft")+a.px(b,"marginRight")+a.px(b,"borderLeftWidth")+a.px(b,"borderRightWidth")+a.px(i,"paddingLeft")+a.px(i,"paddingRight")};this.marginV=function(b){return a.px(b,"marginTop")+a.px(b,"marginBottom")+a.px(b,"borderTopWidth")+a.px(b,"borderBottomWidth")+a.px(b,"paddingTop")+a.px(b,"paddingBottom")};this.adjustRow=function(b,i){if(b.style.height!=i+"px")b.style.height=i+"px";b=b.childNodes;var j,k,m;j=0;for(k=b.length;j<k;++j){m=b[j];var d=i-a.pxself(m,"paddingTop")-a.pxself(m,"paddingBottom");if(d<=0)d=0;m.style.height=d+"px";if(!(m.style.verticalAlign||m.childNodes.length==0)){var e=m.childNodes[0];if(d<=0)d=0;if(e.className=="Wt-hcenter"){e.style.height=d+"px";e=e.firstChild.firstChild;if(!a.hasTag(e,"TD"))e=e.firstChild;if(e.style.height!=d+"px")e.style.height=d+"px";e=e.firstChild}if(m.childNodes.length==1)d+=-this.marginV(e);if(d<=0)d=0;if(!a.hasTag(e,"TABLE"))if(e.wtResize){m=e.parentNode.offsetWidth-u.marginH(e);e.wtResize(e,m,d)}else if(e.style.height!=d+"px"){e.style.height=d+"px";if(e.className=="Wt-wrapdiv")if(a.isIE&&a.hasTag(e.firstChild,"TEXTAREA"))e.firstChild.style.height=d-a.pxself(e,"marginBottom")+"px"}}}};this.adjust=function(){var b=a.getElement(s);if(!b)return false;u.initResize&&u.initResize(a,s,r);if(a.isHidden(b))return true;var i=b.firstChild;if(i.style.height!="")i.style.height="";if(!(b.dirty||i.w!=b.clientWidth||i.h!=b.clientHeight))return true;
var k = height - WT.pxself(td, 'paddingTop') - WT.pxself(td, 'paddingBottom');
var k = height; k -= WT.pxself(td, 'paddingTop'); k -= WT.pxself(td, 'paddingBottom');
this.adjustRow = function(row, height) { if (row.style.height != height+'px') row.style.height = height+'px'; var tds = row.childNodes, j, jl, td; for (j=0, jl = tds.length; j<jl; ++j) { td=tds[j]; var k = height - WT.pxself(td, 'paddingTop') - WT.pxself(td, 'paddingBottom'); if (k <= 0) k=0; td.style.height = k+'px'; if (td.style['verticalAlign'] || td.childNodes.length == 0) continue; var ch = td.childNodes[0]; // 'ch' is cell contents if (k <= 0) k=0; if (ch.className == 'Wt-hcenter') { ch.style.height = k+'px'; var itd = ch.firstChild.firstChild; if (!WT.hasTag(itd, 'TD')) itd = itd.firstChild; if (itd.style.height != k+'px') itd.style.height = k+'px'; ch = itd.firstChild; } if (td.childNodes.length == 1) k += -this.marginV(ch); if (k <= 0) k=0; if (WT.hasTag(ch, 'TABLE')) continue; if (ch.wtResize) { var p = ch.parentNode, w = p.offsetWidth - self.marginH(ch); ch.wtResize(ch, w, k); } else if (ch.style.height != k+'px') { ch.style.height = k+'px'; if (ch.className == 'Wt-wrapdiv') { if (WT.isIE && WT.hasTag(ch.firstChild, 'TEXTAREA')) { ch.firstChild.style.height = (k - WT.pxself(ch, 'marginBottom')) + 'px'; } } } } };
k += -this.marginV(ch);
k -= this.marginV(ch);
this.adjustRow = function(row, height) { if (row.style.height != height+'px') row.style.height = height+'px'; var tds = row.childNodes, j, jl, td; for (j=0, jl = tds.length; j<jl; ++j) { td=tds[j]; var k = height - WT.pxself(td, 'paddingTop') - WT.pxself(td, 'paddingBottom'); if (k <= 0) k=0; td.style.height = k+'px'; if (td.style['verticalAlign'] || td.childNodes.length == 0) continue; var ch = td.childNodes[0]; // 'ch' is cell contents if (k <= 0) k=0; if (ch.className == 'Wt-hcenter') { ch.style.height = k+'px'; var itd = ch.firstChild.firstChild; if (!WT.hasTag(itd, 'TD')) itd = itd.firstChild; if (itd.style.height != k+'px') itd.style.height = k+'px'; ch = itd.firstChild; } if (td.childNodes.length == 1) k += -this.marginV(ch); if (k <= 0) k=0; if (WT.hasTag(ch, 'TABLE')) continue; if (ch.wtResize) { var p = ch.parentNode, w = p.offsetWidth - self.marginH(ch); ch.wtResize(ch, w, k); } else if (ch.style.height != k+'px') { ch.style.height = k+'px'; if (ch.className == 'Wt-wrapdiv') { if (WT.isIE && WT.hasTag(ch.firstChild, 'TEXTAREA')) { ch.firstChild.style.height = (k - WT.pxself(ch, 'marginBottom')) + 'px'; } } } } };
return e};this.adjustRow=function(d,e){if(d.style.height!=e+"px")d.style.height=e+"px";d=d.childNodes;var h,m,f;h=0;for(m=d.length;h<m;++h){f=d[h];var k=e;k-=a.pxself(f,"paddingTop");k-=a.pxself(f,"paddingBottom");if(k<=0)k=0;f.style.height=k+"px";if(!(f.style.verticalAlign||f.childNodes.length==0)){var b=f.childNodes[0];if(k<=0)k=0;if(b.className=="Wt-hcenter"){b.style.height=k+"px";b=b.firstChild.firstChild;if(!a.hasTag(b,"TD"))b=b.firstChild;if(b.style.height!=k+"px")b.style.height=k+"px";b=b.firstChild}if(f.childNodes.length== 1)k-=this.marginV(b);if(k<=0)k=0;if(!a.hasTag(b,"TABLE"))if(b.wtResize){f=b.parentNode.offsetWidth-o.marginH(b);b.style.position="absolute";b.style.width=f+"px";b.wtResize(b,f,k)}else if(b.style.height!=k+"px"){b.style.height=k+"px";if(b.className=="Wt-wrapdiv")if(a.isIE&&a.hasTag(b.firstChild,"TEXTAREA"))b.firstChild.style.height=k-a.pxself(b,"marginBottom")+"px"}}}};this.adjust=function(){var d=a.getElement(t);if(!d)return false;o.initResize&&o.initResize(a,t,i);if(a.isHidden(d))return true;var e=
return h};this.getColumn=function(c){var h,g,j,f=a.getElement(s).firstChild.childNodes;g=h=0;for(j=f.length;g<j;g++){var q=f[g];if(a.hasTag(q,"COLGROUP")){g=-1;f=q.childNodes;j=f.length}if(a.hasTag(q,"COL"))if(q.className!="Wt-vrh")if(h==c)return q;else++h}return null};this.adjustRow=function(c,h){if(c.style.height!=h+"px")c.style.height=h+"px";c=c.childNodes;var g,j,f,q;g=0;q=-1;for(j=c.length;g<j;++g){f=c[g];var d=h;d-=a.pxself(f,"paddingTop");d-=a.pxself(f,"paddingBottom");if(d<=0)d=0;f.className!= "Wt-vrh"&&++q;f.style.height=d+"px";if(!(f.style.verticalAlign||f.childNodes.length==0)){var b=f.childNodes[0];if(d<=0)d=0;if(b.className=="Wt-hcenter"){b.style.height=d+"px";b=b.firstChild.firstChild;if(!a.hasTag(b,"TD"))b=b.firstChild;if(b.style.height!=d+"px")b.style.height=d+"px";b=b.firstChild}if(f.childNodes.length==1)d-=this.marginV(b);if(d<=0)d=0;if(!a.hasTag(b,"TABLE"))if(b.wtResize){f=b.parentNode.offsetWidth-p.marginH(b);if(p.getColumn(q).style.width!=""){b.style.position="absolute";b.style.width= f+"px"}b.wtResize(b,f,d)}else if(b.style.height!=d+"px"){b.style.height=d+"px";if(b.className=="Wt-wrapdiv")if(a.isIE&&a.hasTag(b.firstChild,"TEXTAREA"))b.firstChild.style.height=d-a.pxself(b,"marginBottom")+"px"}}}};this.adjust=function(){var c=a.getElement(s);if(!c)return false;p.initResize&&p.initResize(a,s,i);if(a.isHidden(c))return true;var h=c.firstChild,g=c.parentNode;if(h.style.height!="")h.style.height="";if(!(c.dirty||h.w!=g.clientWidth||h.h!=g.clientHeight))return true;c.dirty=null;var j=
return e};this.adjustRow=function(d,e){if(d.style.height!=e+"px")d.style.height=e+"px";d=d.childNodes;var h,m,f;h=0;for(m=d.length;h<m;++h){f=d[h];var k=e;k-=a.pxself(f,"paddingTop");k-=a.pxself(f,"paddingBottom");if(k<=0)k=0;f.style.height=k+"px";if(!(f.style.verticalAlign||f.childNodes.length==0)){var b=f.childNodes[0];if(k<=0)k=0;if(b.className=="Wt-hcenter"){b.style.height=k+"px";b=b.firstChild.firstChild;if(!a.hasTag(b,"TD"))b=b.firstChild;if(b.style.height!=k+"px")b.style.height=k+"px";b=b.firstChild}if(f.childNodes.length==1)k-=this.marginV(b);if(k<=0)k=0;if(!a.hasTag(b,"TABLE"))if(b.wtResize){f=b.parentNode.offsetWidth-o.marginH(b);b.style.position="absolute";b.style.width=f+"px";b.wtResize(b,f,k)}else if(b.style.height!=k+"px"){b.style.height=k+"px";if(b.className=="Wt-wrapdiv")if(a.isIE&&a.hasTag(b.firstChild,"TEXTAREA"))b.firstChild.style.height=k-a.pxself(b,"marginBottom")+"px"}}}};this.adjust=function(){var d=a.getElement(t);if(!d)return false;o.initResize&&o.initResize(a,t,i);if(a.isHidden(d))return true;var e=
append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=d(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&& this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,d(arguments[0]).toArray());return a}},clone:function(a){var b=this.map(function(){if(!d.support.noCloneEvent&&!d.isXMLDoc(this)){var e=this.outerHTML,g=this.ownerDocument;if(!e){e=g.createElement("div");e.appendChild(this.cloneNode(true));e=e.innerHTML}return d.clean([e.replace(ka,"").replace(R,
c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var e=this.outerHTML,f=this.ownerDocument;if(!e){e=
append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=d(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,d(arguments[0]).toArray());return a}},clone:function(a){var b=this.map(function(){if(!d.support.noCloneEvent&&!d.isXMLDoc(this)){var e=this.outerHTML,g=this.ownerDocument;if(!e){e=g.createElement("div");e.appendChild(this.cloneNode(true));e=e.innerHTML}return d.clean([e.replace(ka,"").replace(R,
(function(){var l='.%2 p,.%2 div,.%2 pre,.%2 address,.%2 blockquote,.%2 h1,.%2 h2,.%2 h3,.%2 h4,.%2 h5,.%2 h6{background-repeat: no-repeat;border: 1px dotted gray;padding-top: 8px;padding-left: 8px;}.%2 p{%1p.png);}.%2 div{%1div.png);}.%2 pre{%1pre.png);}.%2 address{%1address.png);}.%2 blockquote{%1blockquote.png);}.%2 h1{%1h1.png);}.%2 h2{%1h2.png);}.%2 h3{%1h3.png);}.%2 h4{%1h4.png);}.%2 h5{%1h5.png);}.%2 h6{%1h6.png);}',m=/%1/g,n=/%2/g,o={preserveState:true,editorFocus:false,exec:function(p){this.toggleState();this.refresh(p);},refresh:function(p){var q=this.state==1?'addClass':'removeClass';p.document.getBody()[q]('cke_show_blocks');}};j.add('showblocks',{requires:['wysiwygarea'],init:function(p){var q=p.addCommand('showblocks',o);q.canUndo=false;if(p.config.startupOutlineBlocks)q.setState(1);p.addCss(l.replace(m,'background-image: url('+a.getUrl(this.path)+'images/block_').replace(n,'cke_show_blocks '));p.ui.addButton('ShowBlocks',{label:p.lang.showBlocks,command:'showblocks'});p.on('mode',function(){if(q.state!=0)q.refresh(p);});p.on('contentDom',function(){if(q.state!=0)q.refresh(p);});}});})();i.startupOutlineBlocks=false;(function(){var l='cke_show_border',m,n=(b.ie6Compat?['.%1 table.%2,','.%1 table.%2 td, .%1 table.%2 th,','{','border : #d3d3d3 1px dotted','}']:['.%1 table.%2,','.%1 table.%2 > tr > td, .%1 table.%2 > tr > th,','.%1 table.%2 > tbody > tr > td, .%1 table.%2 > tbody > tr > th,','.%1 table.%2 > thead > tr > td, .%1 table.%2 > thead > tr > th,','.%1 table.%2 > tfoot > tr > td, .%1 table.%2 > tfoot > tr > th','{','border : #d3d3d3 1px dotted','}']).join('');m=n.replace(/%2/g,l).replace(/%1/g,'cke_show_borders ');var o={preserveState:true,editorFocus:false,exec:function(p){this.toggleState();this.refresh(p);},refresh:function(p){var q=this.state==1?'addClass':'removeClass';p.document.getBody()[q]('cke_show_borders');}};j.add('showborders',{requires:['wysiwygarea'],modes:{wysiwyg:1},init:function(p){var q=p.addCommand('showborders',o);q.canUndo=false;if(p.config.startupShowBorders!==false)q.setState(1);p.addCss(m);p.on('mode',function(){if(q.state!=0)q.refresh(p);},null,null,100);p.on('contentDom',function(){if(q.state!=0)q.refresh(p);});},afterInit:function(p){var q=p.dataProcessor,r=q&&q.dataFilter,s=q&&q.htmlFilter;if(r)r.addRules({elements:{table:function(t){var u=t.attributes,v=u['class'],w=parseInt(u.border,10);if(!w||w<=0)u['class']=(v||'')+' '+l;}}});if(s)s.addRules({elements:{table:function(t){var u=t.attributes,v=u['class'];v&&(u['class']=v.replace(l,'').replace(/\s{2}/,' ').replace(/^\s+|\s+$/,'')); }}});}});a.on('dialogDefinition',function(p){var q=p.data.name;if(q=='table'||q=='tableProperties'){var r=p.data.definition,s=r.getContents('info'),t=s.get('txtBorder'),u=t.commit;t.commit=e.override(u,function(v){return function(w,x){v.apply(this,arguments);var y=parseInt(this.getValue(),10);x[!y||y<=0?'addClass':'removeClass'](l);};});}});})();j.add('sourcearea',{requires:['editingblock'],init:function(l){var m=j.sourcearea,n=a.document.getWindow();l.on('editingBlockReady',function(){var o,p;l.addMode('source',{load:function(q,r){if(c&&b.version<8)q.setStyle('position','relative');l.textarea=o=new h('textarea');o.setAttributes({dir:'ltr',tabIndex:l.tabIndex,role:'textbox','aria-label':l.lang.editorTitle.replace('%1',l.name)});o.addClass('cke_source');o.addClass('cke_enable_context_menu');var s={width:b.ie7Compat?'99%':'100%',height:'100%',resize:'none',outline:'none','text-align':'left'};if(c){p=function(){o.hide();o.setStyle('height',q.$.clientHeight+'px');o.setStyle('width',q.$.clientWidth+'px');o.show();};l.on('resize',p);n.on('resize',p);setTimeout(p,0);}else o.on('mousedown',function(u){u.data.stopPropagation();});q.setHtml('');q.append(o);o.setStyles(s);l.fire('ariaWidget',o);o.on('blur',function(){l.focusManager.blur();});o.on('focus',function(){l.focusManager.focus();});l.mayBeDirty=true;this.loadData(r);var t=l.keystrokeHandler;if(t)t.attach(o);setTimeout(function(){l.mode='source';l.fire('mode');},b.gecko||b.webkit?100:0);},loadData:function(q){o.setValue(q);l.fire('dataReady');},getData:function(){return o.getValue();},getSnapshotData:function(){return o.getValue();},unload:function(q){o.clearCustomData();l.textarea=o=null;if(p){l.removeListener('resize',p);n.removeListener('resize',p);}if(c&&b.version<8)q.removeStyle('position');},focus:function(){o.focus();}});});l.addCommand('source',m.commands.source);if(l.ui.addButton)l.ui.addButton('Source',{label:l.lang.source,command:'source'});l.on('mode',function(){l.getCommand('source').setState(l.mode=='source'?1:2);});}});j.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},exec:function(l){if(l.mode=='wysiwyg')l.fire('saveSnapshot');l.getCommand('source').setState(0);l.setMode(l.mode=='source'?'wysiwyg':'source');},canUndo:false}}};(function(){j.add('stylescombo',{requires:['richcombo','styles'],init:function(m){var n=m.config,o=m.lang.stylesCombo,p={},q=[];function r(s){m.getStylesSet(function(t){if(!q.length){var u,v;for(var w=0;w<t.length;w++){var x=t[w];v=x.name;u=p[v]=new a.style(x);u._name=v;
p.document.getBody()[q]('cke_show_borders');}};j.add('showborders',{requires:['wysiwygarea'],modes:{wysiwyg:1},init:function(p){var q=p.addCommand('showborders',o);q.canUndo=false;if(p.config.startupShowBorders!==false)q.setState(1);p.addCss(m);p.on('mode',function(){if(q.state!=0)q.refresh(p);},null,null,100);p.on('contentDom',function(){if(q.state!=0)q.refresh(p);});p.on('removeFormatCleanup',function(r){var s=r.data;if(p.getCommand('showborders').state==1&&s.is('table')&&(!s.hasAttribute('border')||parseInt(s.getAttribute('border'),10)<=0))s.addClass(l);});},afterInit:function(p){var q=p.dataProcessor,r=q&&q.dataFilter,s=q&&q.htmlFilter;if(r)r.addRules({elements:{table:function(t){var u=t.attributes,v=u['class'],w=parseInt(u.border,10);if(!w||w<=0)u['class']=(v||'')+' '+l;}}});if(s)s.addRules({elements:{table:function(t){var u=t.attributes,v=u['class'];v&&(u['class']=v.replace(l,'').replace(/\s{2}/,' ').replace(/^\s+|\s+$/,''));}}});}});a.on('dialogDefinition',function(p){var q=p.data.name;if(q=='table'||q=='tableProperties'){var r=p.data.definition,s=r.getContents('info'),t=s.get('txtBorder'),u=t.commit;t.commit=e.override(u,function(x){return function(y,z){x.apply(this,arguments);var A=parseInt(this.getValue(),10);z[!A||A<=0?'addClass':'removeClass'](l);};});var v=r.getContents('advanced'),w=v&&v.get('advCSSClasses');if(w){w.setup=e.override(w.setup,function(x){return function(){x.apply(this,arguments);this.setValue(this.getValue().replace(/cke_show_border/,''));};});w.commit=e.override(w.commit,function(x){return function(y,z){x.apply(this,arguments);if(!parseInt(z.getAttribute('border'),10))z.addClass('cke_show_border');};});}}});})();j.add('sourcearea',{requires:['editingblock'],init:function(l){var m=j.sourcearea,n=a.document.getWindow();l.on('editingBlockReady',function(){var o,p;l.addMode('source',{load:function(q,r){if(c&&b.version<8)q.setStyle('position','relative');l.textarea=o=new h('textarea');o.setAttributes({dir:'ltr',tabIndex:b.webkit?-1:l.tabIndex,role:'textbox','aria-label':l.lang.editorTitle.replace('%1',l.name)});o.addClass('cke_source');o.addClass('cke_enable_context_menu');var s={width:b.ie7Compat?'99%':'100%',height:'100%',resize:'none',outline:'none','text-align':'left'};if(c){p=function(){o.hide();o.setStyle('height',q.$.clientHeight+'px');o.setStyle('width',q.$.clientWidth+'px');o.show();};l.on('resize',p);n.on('resize',p);setTimeout(p,0);}else o.on('mousedown',function(u){u.data.stopPropagation();});q.setHtml('');q.append(o);o.setStyles(s);
(function(){var l='.%2 p,.%2 div,.%2 pre,.%2 address,.%2 blockquote,.%2 h1,.%2 h2,.%2 h3,.%2 h4,.%2 h5,.%2 h6{background-repeat: no-repeat;border: 1px dotted gray;padding-top: 8px;padding-left: 8px;}.%2 p{%1p.png);}.%2 div{%1div.png);}.%2 pre{%1pre.png);}.%2 address{%1address.png);}.%2 blockquote{%1blockquote.png);}.%2 h1{%1h1.png);}.%2 h2{%1h2.png);}.%2 h3{%1h3.png);}.%2 h4{%1h4.png);}.%2 h5{%1h5.png);}.%2 h6{%1h6.png);}',m=/%1/g,n=/%2/g,o={preserveState:true,editorFocus:false,exec:function(p){this.toggleState();this.refresh(p);},refresh:function(p){var q=this.state==1?'addClass':'removeClass';p.document.getBody()[q]('cke_show_blocks');}};j.add('showblocks',{requires:['wysiwygarea'],init:function(p){var q=p.addCommand('showblocks',o);q.canUndo=false;if(p.config.startupOutlineBlocks)q.setState(1);p.addCss(l.replace(m,'background-image: url('+a.getUrl(this.path)+'images/block_').replace(n,'cke_show_blocks '));p.ui.addButton('ShowBlocks',{label:p.lang.showBlocks,command:'showblocks'});p.on('mode',function(){if(q.state!=0)q.refresh(p);});p.on('contentDom',function(){if(q.state!=0)q.refresh(p);});}});})();i.startupOutlineBlocks=false;(function(){var l='cke_show_border',m,n=(b.ie6Compat?['.%1 table.%2,','.%1 table.%2 td, .%1 table.%2 th,','{','border : #d3d3d3 1px dotted','}']:['.%1 table.%2,','.%1 table.%2 > tr > td, .%1 table.%2 > tr > th,','.%1 table.%2 > tbody > tr > td, .%1 table.%2 > tbody > tr > th,','.%1 table.%2 > thead > tr > td, .%1 table.%2 > thead > tr > th,','.%1 table.%2 > tfoot > tr > td, .%1 table.%2 > tfoot > tr > th','{','border : #d3d3d3 1px dotted','}']).join('');m=n.replace(/%2/g,l).replace(/%1/g,'cke_show_borders ');var o={preserveState:true,editorFocus:false,exec:function(p){this.toggleState();this.refresh(p);},refresh:function(p){var q=this.state==1?'addClass':'removeClass';p.document.getBody()[q]('cke_show_borders');}};j.add('showborders',{requires:['wysiwygarea'],modes:{wysiwyg:1},init:function(p){var q=p.addCommand('showborders',o);q.canUndo=false;if(p.config.startupShowBorders!==false)q.setState(1);p.addCss(m);p.on('mode',function(){if(q.state!=0)q.refresh(p);},null,null,100);p.on('contentDom',function(){if(q.state!=0)q.refresh(p);});},afterInit:function(p){var q=p.dataProcessor,r=q&&q.dataFilter,s=q&&q.htmlFilter;if(r)r.addRules({elements:{table:function(t){var u=t.attributes,v=u['class'],w=parseInt(u.border,10);if(!w||w<=0)u['class']=(v||'')+' '+l;}}});if(s)s.addRules({elements:{table:function(t){var u=t.attributes,v=u['class'];v&&(u['class']=v.replace(l,'').replace(/\s{2}/,' ').replace(/^\s+|\s+$/,''));}}});}});a.on('dialogDefinition',function(p){var q=p.data.name;if(q=='table'||q=='tableProperties'){var r=p.data.definition,s=r.getContents('info'),t=s.get('txtBorder'),u=t.commit;t.commit=e.override(u,function(v){return function(w,x){v.apply(this,arguments);var y=parseInt(this.getValue(),10);x[!y||y<=0?'addClass':'removeClass'](l);};});}});})();j.add('sourcearea',{requires:['editingblock'],init:function(l){var m=j.sourcearea,n=a.document.getWindow();l.on('editingBlockReady',function(){var o,p;l.addMode('source',{load:function(q,r){if(c&&b.version<8)q.setStyle('position','relative');l.textarea=o=new h('textarea');o.setAttributes({dir:'ltr',tabIndex:l.tabIndex,role:'textbox','aria-label':l.lang.editorTitle.replace('%1',l.name)});o.addClass('cke_source');o.addClass('cke_enable_context_menu');var s={width:b.ie7Compat?'99%':'100%',height:'100%',resize:'none',outline:'none','text-align':'left'};if(c){p=function(){o.hide();o.setStyle('height',q.$.clientHeight+'px');o.setStyle('width',q.$.clientWidth+'px');o.show();};l.on('resize',p);n.on('resize',p);setTimeout(p,0);}else o.on('mousedown',function(u){u.data.stopPropagation();});q.setHtml('');q.append(o);o.setStyles(s);l.fire('ariaWidget',o);o.on('blur',function(){l.focusManager.blur();});o.on('focus',function(){l.focusManager.focus();});l.mayBeDirty=true;this.loadData(r);var t=l.keystrokeHandler;if(t)t.attach(o);setTimeout(function(){l.mode='source';l.fire('mode');},b.gecko||b.webkit?100:0);},loadData:function(q){o.setValue(q);l.fire('dataReady');},getData:function(){return o.getValue();},getSnapshotData:function(){return o.getValue();},unload:function(q){o.clearCustomData();l.textarea=o=null;if(p){l.removeListener('resize',p);n.removeListener('resize',p);}if(c&&b.version<8)q.removeStyle('position');},focus:function(){o.focus();}});});l.addCommand('source',m.commands.source);if(l.ui.addButton)l.ui.addButton('Source',{label:l.lang.source,command:'source'});l.on('mode',function(){l.getCommand('source').setState(l.mode=='source'?1:2);});}});j.sourcearea={commands:{source:{modes:{wysiwyg:1,source:1},exec:function(l){if(l.mode=='wysiwyg')l.fire('saveSnapshot');l.getCommand('source').setState(0);l.setMode(l.mode=='source'?'wysiwyg':'source');},canUndo:false}}};(function(){j.add('stylescombo',{requires:['richcombo','styles'],init:function(m){var n=m.config,o=m.lang.stylesCombo,p={},q=[];function r(s){m.getStylesSet(function(t){if(!q.length){var u,v;for(var w=0;w<t.length;w++){var x=t[w];v=x.name;u=p[v]=new a.style(x);u._name=v;
$(yesId).observe("click", function() {
$(yesId).observe("click", function(event) { event.stop();
afterLoad : function() { $(noId).observe("click", Modalbox.hide.bindAsEventListener(Modalbox)); $(yesId).observe("click", function() { Modalbox.hide(); proceed.defer(); }); }
$(noId).observe("click", Modalbox.hide.bindAsEventListener(Modalbox)); $(yesId).observe("click", function(event) { event.stop(); Modalbox.hide(); proceed.defer(); }); }
$(noId).observe("click", function(event) { Modalbox.hide(); }); $(yesId).observe("click", function(event) { event.stop(); Modalbox.hide(); proceed.defer(); }); }
afterLoad : function() { $(noId).observe("click", Modalbox.hide.bindAsEventListener(Modalbox)); $(yesId).observe("click", function(event) { event.stop(); Modalbox.hide(); proceed.defer(); }); }
AGAIN:function(result) { if($type(result)) this.result = result;
AGAIN:function() {
AGAIN:function(result) { if($type(result)) this.result = result; this.next = 'again'; return this; },
AGAIN:function() {
AGAIN:function(result) { if($type(result)) this.result = result;
AGAIN:function() { this.next = 'again'; return this; },
w.ownerDocument&&w!==b;){if(p?p.index(w)>-1:d(w).is(a))return w;w=w.parentNode}return null})},index:function(a){if(!a||typeof a==="string")return d.inArray(this[0],a?d(a):this.parent().children());return d.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?d(a,b||this.context):d.makeArray(a);b=d.merge(this.get(),a);return this.pushStack(a[0]&&(a[0].setInterval||a[0].nodeType===9||a[0].parentNode&&a[0].parentNode.nodeType!==11)?d.unique(b):b)},andSelf:function(){return this.add(this.prevObject)}});
a);return this.pushStack(a[0]&&(a[0].setInterval||a[0].nodeType===9||a[0].parentNode&&a[0].parentNode.nodeType!==11)?c.unique(b):b)},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,e){return c.dir(a,"parentNode",e)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,
w.ownerDocument&&w!==b;){if(p?p.index(w)>-1:d(w).is(a))return w;w=w.parentNode}return null})},index:function(a){if(!a||typeof a==="string")return d.inArray(this[0],a?d(a):this.parent().children());return d.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?d(a,b||this.context):d.makeArray(a);b=d.merge(this.get(),a);return this.pushStack(a[0]&&(a[0].setInterval||a[0].nodeType===9||a[0].parentNode&&a[0].parentNode.nodeType!==11)?d.unique(b):b)},andSelf:function(){return this.add(this.prevObject)}});
appendElement: function(type, startChar, endChar, hashParams)
this.appendElement = function(type, startChar, endChar, hashParams)
appendElement: function(type, startChar, endChar, hashParams) { var This = this; var pushNote = function(hp) { if (hp.pitches !== undefined) { var mid = This.lines[This.lineNum].staff[This.staffNum].clef.middle; hp.pitches.each(function(p) { p.verticalPos = p.pitch + 6 - mid; }); // the -6 is because the pitches start at C=0. } if (hp.gracenotes !== undefined) { var mid2 = This.lines[This.lineNum].staff[This.staffNum].clef.middle; hp.gracenotes.each(function(p) { p.verticalPos = p.pitch + 6 - mid2; }); // the -6 is because the pitches start at C=0. } This.lines[This.lineNum].staff[This.staffNum].voices[This.voiceNum].push(hp); }; hashParams.el_type = type; hashParams.startChar = startChar; hashParams.endChar = endChar; if (type === 'note' && (hashParams.rest !== undefined || hashParams.end_beam === undefined)) { // Now, add the end_beam where it is needed. // end_beam goes on all notes which are followed by a space. (This case is already done by the parser.) // end_beam goes on all notes that are 1/4 or longer (regardless of spacing). var dur = this.getDuration(hashParams); if (dur >= 0.25) { hashParams.end_beam = true; // end_beam goes on notes which _precede_ a note which is 1/4 or longer. var el = this.getLastNote(); if (el) el.end_beam = true; } // end_beam goes on rests and notes which precede rests _except_ when a rest (or set of adjacent rests) has normal notes on both sides (no spaces) if (hashParams.rest !== undefined) { hashParams.end_beam = true; var el2 = this.getLastNote(); if (el2) el2.end_beam = true; // TODO-PER: implement exception mentioned in the comment. } } pushNote(hashParams); },
},
};
appendElement: function(type, startChar, endChar, hashParams) { var This = this; var pushNote = function(hp) { if (hp.pitches !== undefined) { var mid = This.lines[This.lineNum].staff[This.staffNum].clef.middle; hp.pitches.each(function(p) { p.verticalPos = p.pitch + 6 - mid; }); // the -6 is because the pitches start at C=0. } if (hp.gracenotes !== undefined) { var mid2 = This.lines[This.lineNum].staff[This.staffNum].clef.middle; hp.gracenotes.each(function(p) { p.verticalPos = p.pitch + 6 - mid2; }); // the -6 is because the pitches start at C=0. } This.lines[This.lineNum].staff[This.staffNum].voices[This.voiceNum].push(hp); }; hashParams.el_type = type; hashParams.startChar = startChar; hashParams.endChar = endChar; if (type === 'note' && (hashParams.rest !== undefined || hashParams.end_beam === undefined)) { // Now, add the end_beam where it is needed. // end_beam goes on all notes which are followed by a space. (This case is already done by the parser.) // end_beam goes on all notes that are 1/4 or longer (regardless of spacing). var dur = this.getDuration(hashParams); if (dur >= 0.25) { hashParams.end_beam = true; // end_beam goes on notes which _precede_ a note which is 1/4 or longer. var el = this.getLastNote(); if (el) el.end_beam = true; } // end_beam goes on rests and notes which precede rests _except_ when a rest (or set of adjacent rests) has normal notes on both sides (no spaces) if (hashParams.rest !== undefined) { hashParams.end_beam = true; var el2 = this.getLastNote(); if (el2) el2.end_beam = true; // TODO-PER: implement exception mentioned in the comment. } } pushNote(hashParams); },
}
};
var appendPositioning = function(properties) { var ret = Object.clone(properties); ret.startChar = { type: 'number', output: 'hidden' }; ret.endChar = { type: 'number', output: 'hidden' }; return ret; }
appendStartingElement: function(type, startChar, endChar, hashParams2)
this.appendStartingElement = function(type, startChar, endChar, hashParams2)
appendStartingElement: function(type, startChar, endChar, hashParams2) { // Clone the object because it will be sticking around for the next line and we don't want the extra fields in it. var hashParams = Object.clone(hashParams2); // These elements should not be added twice, so if the element exists on this line without a note or bar before it, just replace the staff version. var voice = this.lines[this.lineNum].staff[this.staffNum].voices[this.voiceNum]; for (var i = 0; i < voice.length; i++) { if (voice[i].el_type === 'note' || voice[i].el_type === 'bar') { hashParams.el_type = type; hashParams.startChar = startChar; hashParams.endChar = endChar; voice.push(hashParams); return; } if (voice[i].el_type === type) { hashParams.el_type = type; hashParams.startChar = startChar; hashParams.endChar = endChar; voice[i] = hashParams; return; } } // We didn't see either that type or a note, so replace the element to the staff. this.lines[this.lineNum].staff[this.staffNum][type] = hashParams2; },
},
};
appendStartingElement: function(type, startChar, endChar, hashParams2) { // Clone the object because it will be sticking around for the next line and we don't want the extra fields in it. var hashParams = Object.clone(hashParams2); // These elements should not be added twice, so if the element exists on this line without a note or bar before it, just replace the staff version. var voice = this.lines[this.lineNum].staff[this.staffNum].voices[this.voiceNum]; for (var i = 0; i < voice.length; i++) { if (voice[i].el_type === 'note' || voice[i].el_type === 'bar') { hashParams.el_type = type; hashParams.startChar = startChar; hashParams.endChar = endChar; voice.push(hashParams); return; } if (voice[i].el_type === type) { hashParams.el_type = type; hashParams.startChar = startChar; hashParams.endChar = endChar; voice[i] = hashParams; return; } } // We didn't see either that type or a note, so replace the element to the staff. this.lines[this.lineNum].staff[this.staffNum][type] = hashParams2; },
this.$.focus();},getViewPaneSize:function(){var g=this.$.document,h=g.compatMode=='CSS1Compat';return{width:(h?g.documentElement.clientWidth:g.body.clientWidth)||0,height:(h?g.documentElement.clientHeight:g.body.clientHeight)||0};},getScrollPosition:function(){var g=this.$;if('pageXOffset' in g)return{x:g.pageXOffset||0,y:g.pageYOffset||0};else{var h=g.document;return{x:h.documentElement.scrollLeft||h.body.scrollLeft||0,y:h.documentElement.scrollTop||h.body.scrollTop||0};}}});d.document=function(g){d.domObject.call(this,g);};var g=d.document;g.prototype=new d.domObject();e.extend(g.prototype,{appendStyleSheet:function(h){if(this.$.createStyleSheet)this.$.createStyleSheet(h);else{var i=new d.element('link');i.setAttributes({rel:'stylesheet',type:'text/css',href:h});this.getHead().append(i);}},appendStyleText:function(h){var k=this;if(k.$.createStyleSheet){var i=k.$.createStyleSheet('');i.cssText=h;}else{var j=new d.element('style',k);j.append(new d.text(h,k));k.getHead().append(j);}},createElement:function(h,i){var j=new d.element(h,this);if(i){if(i.attributes)j.setAttributes(i.attributes);if(i.styles)j.setStyles(i.styles);}return j;},createText:function(h){return new d.text(h,this);},focus:function(){this.getWindow().focus();},getById:function(h){var i=this.$.getElementById(h);return i?new d.element(i):null;},getByAddress:function(h,i){var j=this.$.documentElement;for(var k=0;j&&k<h.length;k++){var l=h[k];if(!i){j=j.childNodes[l];continue;}var m=-1;for(var n=0;n<j.childNodes.length;n++){var o=j.childNodes[n];if(i===true&&o.nodeType==3&&o.previousSibling&&o.previousSibling.nodeType==3)continue;m++;if(m==l){j=o;break;}}}return j?new d.node(j):null;},getElementsByTag:function(h,i){if(!c&&i)h=i+':'+h;return new d.nodeList(this.$.getElementsByTagName(h));},getHead:function(){var h=this.$.getElementsByTagName('head')[0];h=new d.element(h);return(this.getHead=function(){return h;})();},getBody:function(){var h=new d.element(this.$.body);return(this.getBody=function(){return h;})();},getDocumentElement:function(){var h=new d.element(this.$.documentElement);return(this.getDocumentElement=function(){return h;})();},getWindow:function(){var h=new d.window(this.$.parentWindow||this.$.defaultView);return(this.getWindow=function(){return h;})();}});d.node=function(h){if(h){switch(h.nodeType){case 9:return new g(h);case 1:return new d.element(h);case 3:return new d.text(h);}d.domObject.call(this,h);}return this;};d.node.prototype=new d.domObject();a.NODE_ELEMENT=1;a.NODE_DOCUMENT=9;
e.extend(d.window.prototype,{focus:function(){if(b.webkit&&this.$.parent)this.$.parent.focus();this.$.focus();},getViewPaneSize:function(){var g=this.$.document,h=g.compatMode=='CSS1Compat';return{width:(h?g.documentElement.clientWidth:g.body.clientWidth)||0,height:(h?g.documentElement.clientHeight:g.body.clientHeight)||0};},getScrollPosition:function(){var g=this.$;if('pageXOffset' in g)return{x:g.pageXOffset||0,y:g.pageYOffset||0};else{var h=g.document;return{x:h.documentElement.scrollLeft||h.body.scrollLeft||0,y:h.documentElement.scrollTop||h.body.scrollTop||0};}}});d.document=function(g){d.domObject.call(this,g);};var g=d.document;g.prototype=new d.domObject();e.extend(g.prototype,{appendStyleSheet:function(h){if(this.$.createStyleSheet)this.$.createStyleSheet(h);else{var i=new d.element('link');i.setAttributes({rel:'stylesheet',type:'text/css',href:h});this.getHead().append(i);}},appendStyleText:function(h){var k=this;if(k.$.createStyleSheet){var i=k.$.createStyleSheet('');i.cssText=h;}else{var j=new d.element('style',k);j.append(new d.text(h,k));k.getHead().append(j);}},createElement:function(h,i){var j=new d.element(h,this);if(i){if(i.attributes)j.setAttributes(i.attributes);if(i.styles)j.setStyles(i.styles);}return j;},createText:function(h){return new d.text(h,this);},focus:function(){this.getWindow().focus();},getById:function(h){var i=this.$.getElementById(h);return i?new d.element(i):null;},getByAddress:function(h,i){var j=this.$.documentElement;for(var k=0;j&&k<h.length;k++){var l=h[k];if(!i){j=j.childNodes[l];continue;}var m=-1;for(var n=0;n<j.childNodes.length;n++){var o=j.childNodes[n];if(i===true&&o.nodeType==3&&o.previousSibling&&o.previousSibling.nodeType==3)continue;m++;if(m==l){j=o;break;}}}return j?new d.node(j):null;},getElementsByTag:function(h,i){if(!c&&i)h=i+':'+h;return new d.nodeList(this.$.getElementsByTagName(h));},getHead:function(){var h=this.$.getElementsByTagName('head')[0];h=new d.element(h);return(this.getHead=function(){return h;})();},getBody:function(){var h=new d.element(this.$.body);return(this.getBody=function(){return h;})();},getDocumentElement:function(){var h=new d.element(this.$.documentElement);return(this.getDocumentElement=function(){return h;})();},getWindow:function(){var h=new d.window(this.$.parentWindow||this.$.defaultView);return(this.getWindow=function(){return h;})();}});d.node=function(h){if(h){switch(h.nodeType){case 9:return new g(h);case 1:return new d.element(h);case 3:return new d.text(h);}d.domObject.call(this,h);
this.$.focus();},getViewPaneSize:function(){var g=this.$.document,h=g.compatMode=='CSS1Compat';return{width:(h?g.documentElement.clientWidth:g.body.clientWidth)||0,height:(h?g.documentElement.clientHeight:g.body.clientHeight)||0};},getScrollPosition:function(){var g=this.$;if('pageXOffset' in g)return{x:g.pageXOffset||0,y:g.pageYOffset||0};else{var h=g.document;return{x:h.documentElement.scrollLeft||h.body.scrollLeft||0,y:h.documentElement.scrollTop||h.body.scrollTop||0};}}});d.document=function(g){d.domObject.call(this,g);};var g=d.document;g.prototype=new d.domObject();e.extend(g.prototype,{appendStyleSheet:function(h){if(this.$.createStyleSheet)this.$.createStyleSheet(h);else{var i=new d.element('link');i.setAttributes({rel:'stylesheet',type:'text/css',href:h});this.getHead().append(i);}},appendStyleText:function(h){var k=this;if(k.$.createStyleSheet){var i=k.$.createStyleSheet('');i.cssText=h;}else{var j=new d.element('style',k);j.append(new d.text(h,k));k.getHead().append(j);}},createElement:function(h,i){var j=new d.element(h,this);if(i){if(i.attributes)j.setAttributes(i.attributes);if(i.styles)j.setStyles(i.styles);}return j;},createText:function(h){return new d.text(h,this);},focus:function(){this.getWindow().focus();},getById:function(h){var i=this.$.getElementById(h);return i?new d.element(i):null;},getByAddress:function(h,i){var j=this.$.documentElement;for(var k=0;j&&k<h.length;k++){var l=h[k];if(!i){j=j.childNodes[l];continue;}var m=-1;for(var n=0;n<j.childNodes.length;n++){var o=j.childNodes[n];if(i===true&&o.nodeType==3&&o.previousSibling&&o.previousSibling.nodeType==3)continue;m++;if(m==l){j=o;break;}}}return j?new d.node(j):null;},getElementsByTag:function(h,i){if(!c&&i)h=i+':'+h;return new d.nodeList(this.$.getElementsByTagName(h));},getHead:function(){var h=this.$.getElementsByTagName('head')[0];h=new d.element(h);return(this.getHead=function(){return h;})();},getBody:function(){var h=new d.element(this.$.body);return(this.getBody=function(){return h;})();},getDocumentElement:function(){var h=new d.element(this.$.documentElement);return(this.getDocumentElement=function(){return h;})();},getWindow:function(){var h=new d.window(this.$.parentWindow||this.$.defaultView);return(this.getWindow=function(){return h;})();}});d.node=function(h){if(h){switch(h.nodeType){case 9:return new g(h);case 1:return new d.element(h);case 3:return new d.text(h);}d.domObject.call(this,h);}return this;};d.node.prototype=new d.domObject();a.NODE_ELEMENT=1;a.NODE_DOCUMENT=9;
this.selectBookmarkedItem(bookmark); }, this, { single : true }); this.groupStore.on('loadexception', function(store, recs, options) {
applyBookmark : function(bookmark) { this.updatingBookmark = true; if (this.groupStore.lastOptions == null) { this.groupStore.on('load', function(store, recs, options) { this.selectBookmarkedItem(bookmark); }, this, { single : true }); } else { this.selectBookmarkedItem(bookmark); } },
if (!this.privilegesFilter.pressed || !this.showPrivileges)
if (!this.privilegesFilter.pressed || !this.usePrivileges)
applyFilter : function() { this.storeProxy.conn.jsonData.data.name = this.textFilter.getValue(); if (this.selectedFilter.pressed) { this.storeProxy.conn.jsonData.data.selectedRoleIds = this.selectedRoleIds; this.storeProxy.conn.jsonData.data.selectedPrivilegeIds = this.selectedPrivilegeIds; } else { this.storeProxy.conn.jsonData.data.selectedRoleIds = []; this.storeProxy.conn.jsonData.data.selectedPrivilegeIds = []; } if (!this.rolesFilter.pressed) { this.storeProxy.conn.jsonData.data.noRoles = true; } else { this.storeProxy.conn.jsonData.data.noRoles = false; } if (!this.privilegesFilter.pressed || !this.showPrivileges) { this.storeProxy.conn.jsonData.data.noPrivileges = true; } else { this.storeProxy.conn.jsonData.data.noPrivileges = false; } this.store.load({ params : { start : 0, limit : 25 } }); },
argToPref: function (arg) [k for ([k, v] in values(Sanitizer.prefArgList)) if (v == arg)][0] || arg }, {
argToPref: function (arg) ["commandLine", "offlineApps", "siteSettings"].filter(function (pref) pref.toLowerCase() == arg)[0] || arg,
argToPref: function (arg) [k for ([k, v] in values(Sanitizer.prefArgList)) if (v == arg)][0] || arg}, {
true;if(document.body.addEventListener){var a=document.body;a.addEventListener("mousemove",t,true);a.addEventListener("mouseup",B,true);h.isGecko&&window.addEventListener("mouseout",function(b){!b.relatedTarget&&h.hasTag(b.target,"HTML")&&B(b)},true)}else{a=document.body;a.attachEvent("onmousemove",t);a.attachEvent("onmouseup",B)}}}var h=this;this.buttons=0;this.mouseDown=function(a){h.buttons|=h.button(a)};this.mouseUp=function(a){h.buttons^=h.button(a)};this.arrayRemove=function(a,b,e){e=a.slice((e||
true;if(document.body.addEventListener){var a=document.body;a.addEventListener("mousemove",t,true);a.addEventListener("mouseup",A,true);g.isGecko&&window.addEventListener("mouseout",function(b){!b.relatedTarget&&g.hasTag(b.target,"HTML")&&A(b)},true)}else{a=document.body;a.attachEvent("onmousemove",t);a.attachEvent("onmouseup",A)}}}var g=this;this.buttons=0;this.mouseDown=function(a){g.buttons|=g.button(a)};this.mouseUp=function(a){g.buttons^=g.button(a)};this.arrayRemove=function(a,b,e){e=a.slice((e||
true;if(document.body.addEventListener){var a=document.body;a.addEventListener("mousemove",t,true);a.addEventListener("mouseup",B,true);h.isGecko&&window.addEventListener("mouseout",function(b){!b.relatedTarget&&h.hasTag(b.target,"HTML")&&B(b)},true)}else{a=document.body;a.attachEvent("onmousemove",t);a.attachEvent("onmouseup",B)}}}var h=this;this.buttons=0;this.mouseDown=function(a){h.buttons|=h.button(a)};this.mouseUp=function(a){h.buttons^=h.button(a)};this.arrayRemove=function(a,b,e){e=a.slice((e||b)+1||a.length);a.length=b<0?a.length+b:b;return a.push.apply(a,e)};this.isIE6=(this.isIE=navigator.userAgent.toLowerCase().indexOf("msie")!=-1&&navigator.userAgent.toLowerCase().indexOf("opera")==-1)&&navigator.userAgent.toLowerCase().indexOf("msie 6")!=-1;this.isGecko=navigator.userAgent.toLowerCase().indexOf("gecko")!=-1;this.isIEMobile=navigator.userAgent.toLowerCase().indexOf("msie 4")!=-1||navigator.userAgent.toLowerCase().indexOf("msie 5")!=-1;this.isOpera=typeof window.opera!=="undefined";
true;if(document.body.addEventListener){var a=document.body;a.addEventListener("mousemove",t,true);a.addEventListener("mouseup",B,true);g.isGecko&&window.addEventListener("mouseout",function(b){!b.relatedTarget&&g.hasTag(b.target,"HTML")&&B(b)},true)}else{a=document.body;a.attachEvent("onmousemove",t);a.attachEvent("onmouseup",B)}}}var g=this;this.buttons=0;this.mouseDown=function(a){g.buttons|=g.button(a)};this.mouseUp=function(a){g.buttons^=g.button(a)};this.arrayRemove=function(a,b,e){e=a.slice((e||
true;if(document.body.addEventListener){var a=document.body;a.addEventListener("mousemove",t,true);a.addEventListener("mouseup",B,true);h.isGecko&&window.addEventListener("mouseout",function(b){!b.relatedTarget&&h.hasTag(b.target,"HTML")&&B(b)},true)}else{a=document.body;a.attachEvent("onmousemove",t);a.attachEvent("onmouseup",B)}}}var h=this;this.buttons=0;this.mouseDown=function(a){h.buttons|=h.button(a)};this.mouseUp=function(a){h.buttons^=h.button(a)};this.arrayRemove=function(a,b,e){e=a.slice((e||
true;if(document.body.addEventListener){var a=document.body;a.addEventListener("mousemove",t,true);a.addEventListener("mouseup",B,true);g.isGecko&&window.addEventListener("mouseout",function(b){!b.relatedTarget&&g.hasTag(b.target,"HTML")&&B(b)},true)}else{a=document.body;a.attachEvent("onmousemove",t);a.attachEvent("onmouseup",B)}}}var g=this;this.buttons=0;this.mouseDown=function(a){g.buttons|=g.button(a)};this.mouseUp=function(a){g.buttons^=g.button(a)};this.arrayRemove=function(a,b,e){e=a.slice((e||b)+1||a.length);a.length=b<0?a.length+b:b;return a.push.apply(a,e)};this.isIE6=(this.isIE=navigator.userAgent.toLowerCase().indexOf("msie")!=-1&&navigator.userAgent.toLowerCase().indexOf("opera")==-1)&&navigator.userAgent.toLowerCase().indexOf("msie 6")!=-1;this.isGecko=navigator.userAgent.toLowerCase().indexOf("gecko")!=-1;this.isIEMobile=navigator.userAgent.toLowerCase().indexOf("msie 4")!=-1||navigator.userAgent.toLowerCase().indexOf("msie 5")!=-1;this.isOpera=typeof window.opera!=="undefined";
l.on('selectionChange',function(m){var n=l.getCommand('unlink'),o=m.data.path.lastElement.getAscendant('a',true);if(o&&o.getName()=='a'&&o.getAttribute('href'))n.setState(2);else n.setState(0);});if(l.addMenuItems)l.addMenuItems({anchor:{label:l.lang.anchor.menu,command:'anchor',group:'anchor'},link:{label:l.lang.link.menu,command:'link',group:'link',order:1},unlink:{label:l.lang.unlink,command:'unlink',group:'link',order:5}});if(l.contextMenu)l.contextMenu.addListener(function(m,n){if(!m)return null;var o=m.is('img')&&m.getAttribute('_cke_real_element_type')=='anchor';if(!o){if(!(m=j.link.getSelectedLink(l)))return null;o=m.getAttribute('name')&&!m.getAttribute('href');}return o?{anchor:2}:{link:2,unlink:2};});},afterInit:function(l){var m=l.dataProcessor,n=m&&m.dataFilter;if(n)n.addRules({elements:{a:function(o){var p=o.attributes;if(p.name&&!p.href)return l.createFakeParserElement(o,'cke_anchor','anchor');}}});},requires:['fakeobjects']});j.link={getSelectedLink:function(l){var m;try{m=l.getSelection().getRanges()[0];}catch(o){return null;}m.shrink(a.SHRINK_TEXT);var n=m.getCommonAncestor();return n.getAscendant('a',true);}};a.unlinkCommand=function(){};a.unlinkCommand.prototype={exec:function(l){var m=l.getSelection(),n=m.createBookmarks(),o=m.getRanges(),p,q;for(var r=0;r<o.length;r++){p=o[r].getCommonAncestor(true);q=p.getAscendant('a',true);if(!q)continue;o[r].selectNodeContents(q);}m.selectRanges(o);l.document.$.execCommand('unlink',false,null);m.selectBookmarks(n);},startDisabled:true};e.extend(i,{linkShowAdvancedTab:true,linkShowTargetTab:true});(function(){var l={ol:1,ul:1},m=/^[\n\r\t ]*$/;j.list={listToArray:function(A,B,C,D,E){if(!l[A.getName()])return[];if(!D)D=0;if(!C)C=[];for(var F=0,G=A.getChildCount();F<G;F++){var H=A.getChild(F);if(H.$.nodeName.toLowerCase()!='li')continue;var I={parent:A,indent:D,element:H,contents:[]};if(!E){I.grandparent=A.getParent();if(I.grandparent&&I.grandparent.$.nodeName.toLowerCase()=='li')I.grandparent=I.grandparent.getParent();}else I.grandparent=E;if(B)h.setMarker(B,H,'listarray_index',C.length);C.push(I);for(var J=0,K=H.getChildCount(),L;J<K;J++){L=H.getChild(J);if(L.type==1&&l[L.getName()])j.list.listToArray(L,B,C,D+1,I.grandparent);else I.contents.push(L);}}return C;},arrayToList:function(A,B,C,D){if(!C)C=0;if(!A||A.length<C+1)return null;var E=A[C].parent.getDocument(),F=new d.documentFragment(E),G=null,H=C,I=Math.max(A[C].indent,0),J=null,K=D==1?'p':'div';for(;;){var L=A[H];if(L.indent==I){if(!G||A[H].parent.getName()!=G.getName()){G=A[H].parent.clone(false,true); F.append(G);}J=G.append(L.element.clone(false,true));for(var M=0;M<L.contents.length;M++)J.append(L.contents[M].clone(true,true));H++;}else if(L.indent==Math.max(I,0)+1){var N=j.list.arrayToList(A,null,H,D);J.append(N.listNode);H=N.nextIndex;}else if(L.indent==-1&&!C&&L.grandparent){J;if(l[L.grandparent.getName()])J=L.element.clone(false,true);else if(D!=2&&L.grandparent.getName()!='td')J=E.createElement(K);else J=new d.documentFragment(E);for(M=0;M<L.contents.length;M++)J.append(L.contents[M].clone(true,true));if(J.type==11&&H!=A.length-1){if(J.getLast()&&J.getLast().type==1&&J.getLast().getAttribute('type')=='_moz')J.getLast().remove();J.appendBogus();}if(J.type==1&&J.getName()==K&&J.$.firstChild){J.trim();var O=J.getFirst();if(O.type==1&&O.isBlockBoundary()){var P=new d.documentFragment(E);J.moveChildren(P);J=P;}}var Q=J.$.nodeName.toLowerCase();if(!c&&(Q=='div'||Q=='p'))J.appendBogus();F.append(J);G=null;H++;}else return null;if(A.length<=H||Math.max(A[H].indent,0)<I)break;}if(B){var R=F.getFirst();while(R){if(R.type==1)h.clearMarkers(B,R);R=R.getNextSourceNode();}}return{listNode:F,nextIndex:H};}};function n(A,B){A.getCommand(this.name).setState(B);};function o(A){var B=A.data.path,C=B.blockLimit,D=B.elements,E;for(var F=0;F<D.length&&(E=D[F])&&!E.equals(C);F++){if(l[D[F].getName()])return n.call(this,A.editor,this.type==D[F].getName()?1:2);}return n.call(this,A.editor,2);};function p(A,B,C,D){var E=j.list.listToArray(B.root,C),F=[];for(var G=0;G<B.contents.length;G++){var H=B.contents[G];H=H.getAscendant('li',true);if(!H||H.getCustomData('list_item_processed'))continue;F.push(H);h.setMarker(C,H,'list_item_processed',true);}var I=B.root.getDocument().createElement(this.type);for(G=0;G<F.length;G++){var J=F[G].getCustomData('listarray_index');E[J].parent=I;}var K=j.list.arrayToList(E,C,null,A.config.enterMode),L,M=K.listNode.getChildCount();for(G=0;G<M&&(L=K.listNode.getChild(G));G++){if(L.getName()==this.type)D.push(L);}K.listNode.replace(B.root);};function q(A,B,C){var D=B.contents,E=B.root.getDocument(),F=[];if(D.length==1&&D[0].equals(B.root)){var G=E.createElement('div');D[0].moveChildren&&D[0].moveChildren(G);D[0].append(G);D[0]=G;}var H=B.contents[0].getParent();for(var I=0;I<D.length;I++)H=H.getCommonAncestor(D[I].getParent());for(I=0;I<D.length;I++){var J=D[I],K;while(K=J.getParent()){if(K.equals(H)){F.push(J);break;}J=K;}}if(F.length<1)return;var L=F[F.length-1].getNext(),M=E.createElement(this.type);C.push(M);while(F.length){var N=F.shift(),O=E.createElement('li');
for(var r=0;r<o.length;r++){p=o[r].getCommonAncestor(true);q=p.getAscendant('a',true);if(!q)continue;o[r].selectNodeContents(q);}m.selectRanges(o);l.document.$.execCommand('unlink',false,null);m.selectBookmarks(n);},startDisabled:true};e.extend(i,{linkShowAdvancedTab:true,linkShowTargetTab:true});(function(){var l={ol:1,ul:1},m=/^[\n\r\t ]*$/;j.list={listToArray:function(B,C,D,E,F){if(!l[B.getName()])return[];if(!E)E=0;if(!D)D=[];for(var G=0,H=B.getChildCount();G<H;G++){var I=B.getChild(G);if(I.$.nodeName.toLowerCase()!='li')continue;var J={parent:B,indent:E,element:I,contents:[]};if(!F){J.grandparent=B.getParent();if(J.grandparent&&J.grandparent.$.nodeName.toLowerCase()=='li')J.grandparent=J.grandparent.getParent();}else J.grandparent=F;if(C)h.setMarker(C,I,'listarray_index',D.length);D.push(J);for(var K=0,L=I.getChildCount(),M;K<L;K++){M=I.getChild(K);if(M.type==1&&l[M.getName()])j.list.listToArray(M,C,D,E+1,J.grandparent);else J.contents.push(M);}}return D;},arrayToList:function(B,C,D,E,F){if(!D)D=0;if(!B||B.length<D+1)return null;var G=B[D].parent.getDocument(),H=new d.documentFragment(G),I=null,J=D,K=Math.max(B[D].indent,0),L=null,M=E==1?'p':'div';for(;;){var N=B[J];if(N.indent==K){if(!I||B[J].parent.getName()!=I.getName()){I=B[J].parent.clone(false,true);H.append(I);}L=I.append(N.element.clone(false,true));for(var O=0;O<N.contents.length;O++)L.append(N.contents[O].clone(true,true));J++;}else if(N.indent==Math.max(K,0)+1){var P=j.list.arrayToList(B,null,J,E);L.append(P.listNode);J=P.nextIndex;}else if(N.indent==-1&&!D&&N.grandparent){L;if(l[N.grandparent.getName()])L=N.element.clone(false,true);else if(F||E!=2&&N.grandparent.getName()!='td'){L=G.createElement(M);if(F)L.setAttribute('dir',F);}else L=new d.documentFragment(G);for(O=0;O<N.contents.length;O++)L.append(N.contents[O].clone(true,true));if(L.type==11&&J!=B.length-1){if(L.getLast()&&L.getLast().type==1&&L.getLast().getAttribute('type')=='_moz')L.getLast().remove();L.appendBogus();}if(L.type==1&&L.getName()==M&&L.$.firstChild){L.trim();var Q=L.getFirst();if(Q.type==1&&Q.isBlockBoundary()){var R=new d.documentFragment(G);L.moveChildren(R);L=R;}}var S=L.$.nodeName.toLowerCase();if(!c&&(S=='div'||S=='p'))L.appendBogus();H.append(L);I=null;J++;}else return null;if(B.length<=J||Math.max(B[J].indent,0)<K)break;}if(C){var T=H.getFirst();while(T){if(T.type==1)h.clearMarkers(C,T);T=T.getNextSourceNode();}}return{listNode:H,nextIndex:J};}};function n(B,C){B.getCommand(this.name).setState(C);};function o(B){var C=B.data.path,D=C.blockLimit,E=C.elements,F;
l.on('selectionChange',function(m){var n=l.getCommand('unlink'),o=m.data.path.lastElement.getAscendant('a',true);if(o&&o.getName()=='a'&&o.getAttribute('href'))n.setState(2);else n.setState(0);});if(l.addMenuItems)l.addMenuItems({anchor:{label:l.lang.anchor.menu,command:'anchor',group:'anchor'},link:{label:l.lang.link.menu,command:'link',group:'link',order:1},unlink:{label:l.lang.unlink,command:'unlink',group:'link',order:5}});if(l.contextMenu)l.contextMenu.addListener(function(m,n){if(!m)return null;var o=m.is('img')&&m.getAttribute('_cke_real_element_type')=='anchor';if(!o){if(!(m=j.link.getSelectedLink(l)))return null;o=m.getAttribute('name')&&!m.getAttribute('href');}return o?{anchor:2}:{link:2,unlink:2};});},afterInit:function(l){var m=l.dataProcessor,n=m&&m.dataFilter;if(n)n.addRules({elements:{a:function(o){var p=o.attributes;if(p.name&&!p.href)return l.createFakeParserElement(o,'cke_anchor','anchor');}}});},requires:['fakeobjects']});j.link={getSelectedLink:function(l){var m;try{m=l.getSelection().getRanges()[0];}catch(o){return null;}m.shrink(a.SHRINK_TEXT);var n=m.getCommonAncestor();return n.getAscendant('a',true);}};a.unlinkCommand=function(){};a.unlinkCommand.prototype={exec:function(l){var m=l.getSelection(),n=m.createBookmarks(),o=m.getRanges(),p,q;for(var r=0;r<o.length;r++){p=o[r].getCommonAncestor(true);q=p.getAscendant('a',true);if(!q)continue;o[r].selectNodeContents(q);}m.selectRanges(o);l.document.$.execCommand('unlink',false,null);m.selectBookmarks(n);},startDisabled:true};e.extend(i,{linkShowAdvancedTab:true,linkShowTargetTab:true});(function(){var l={ol:1,ul:1},m=/^[\n\r\t ]*$/;j.list={listToArray:function(A,B,C,D,E){if(!l[A.getName()])return[];if(!D)D=0;if(!C)C=[];for(var F=0,G=A.getChildCount();F<G;F++){var H=A.getChild(F);if(H.$.nodeName.toLowerCase()!='li')continue;var I={parent:A,indent:D,element:H,contents:[]};if(!E){I.grandparent=A.getParent();if(I.grandparent&&I.grandparent.$.nodeName.toLowerCase()=='li')I.grandparent=I.grandparent.getParent();}else I.grandparent=E;if(B)h.setMarker(B,H,'listarray_index',C.length);C.push(I);for(var J=0,K=H.getChildCount(),L;J<K;J++){L=H.getChild(J);if(L.type==1&&l[L.getName()])j.list.listToArray(L,B,C,D+1,I.grandparent);else I.contents.push(L);}}return C;},arrayToList:function(A,B,C,D){if(!C)C=0;if(!A||A.length<C+1)return null;var E=A[C].parent.getDocument(),F=new d.documentFragment(E),G=null,H=C,I=Math.max(A[C].indent,0),J=null,K=D==1?'p':'div';for(;;){var L=A[H];if(L.indent==I){if(!G||A[H].parent.getName()!=G.getName()){G=A[H].parent.clone(false,true);F.append(G);}J=G.append(L.element.clone(false,true));for(var M=0;M<L.contents.length;M++)J.append(L.contents[M].clone(true,true));H++;}else if(L.indent==Math.max(I,0)+1){var N=j.list.arrayToList(A,null,H,D);J.append(N.listNode);H=N.nextIndex;}else if(L.indent==-1&&!C&&L.grandparent){J;if(l[L.grandparent.getName()])J=L.element.clone(false,true);else if(D!=2&&L.grandparent.getName()!='td')J=E.createElement(K);else J=new d.documentFragment(E);for(M=0;M<L.contents.length;M++)J.append(L.contents[M].clone(true,true));if(J.type==11&&H!=A.length-1){if(J.getLast()&&J.getLast().type==1&&J.getLast().getAttribute('type')=='_moz')J.getLast().remove();J.appendBogus();}if(J.type==1&&J.getName()==K&&J.$.firstChild){J.trim();var O=J.getFirst();if(O.type==1&&O.isBlockBoundary()){var P=new d.documentFragment(E);J.moveChildren(P);J=P;}}var Q=J.$.nodeName.toLowerCase();if(!c&&(Q=='div'||Q=='p'))J.appendBogus();F.append(J);G=null;H++;}else return null;if(A.length<=H||Math.max(A[H].indent,0)<I)break;}if(B){var R=F.getFirst();while(R){if(R.type==1)h.clearMarkers(B,R);R=R.getNextSourceNode();}}return{listNode:F,nextIndex:H};}};function n(A,B){A.getCommand(this.name).setState(B);};function o(A){var B=A.data.path,C=B.blockLimit,D=B.elements,E;for(var F=0;F<D.length&&(E=D[F])&&!E.equals(C);F++){if(l[D[F].getName()])return n.call(this,A.editor,this.type==D[F].getName()?1:2);}return n.call(this,A.editor,2);};function p(A,B,C,D){var E=j.list.listToArray(B.root,C),F=[];for(var G=0;G<B.contents.length;G++){var H=B.contents[G];H=H.getAscendant('li',true);if(!H||H.getCustomData('list_item_processed'))continue;F.push(H);h.setMarker(C,H,'list_item_processed',true);}var I=B.root.getDocument().createElement(this.type);for(G=0;G<F.length;G++){var J=F[G].getCustomData('listarray_index');E[J].parent=I;}var K=j.list.arrayToList(E,C,null,A.config.enterMode),L,M=K.listNode.getChildCount();for(G=0;G<M&&(L=K.listNode.getChild(G));G++){if(L.getName()==this.type)D.push(L);}K.listNode.replace(B.root);};function q(A,B,C){var D=B.contents,E=B.root.getDocument(),F=[];if(D.length==1&&D[0].equals(B.root)){var G=E.createElement('div');D[0].moveChildren&&D[0].moveChildren(G);D[0].append(G);D[0]=G;}var H=B.contents[0].getParent();for(var I=0;I<D.length;I++)H=H.getCommonAncestor(D[I].getParent());for(I=0;I<D.length;I++){var J=D[I],K;while(K=J.getParent()){if(K.equals(H)){F.push(J);break;}J=K;}}if(F.length<1)return;var L=F[F.length-1].getNext(),M=E.createElement(this.type);C.push(M);while(F.length){var N=F.shift(),O=E.createElement('li');
log.info("TITLEAS: " + this.title);
asEntry : function () { log.info("TITLEAS: " + this.title); var entry = {}; entry.parent = this.parentGroup; entry.iconImageData = this.iconImageData; entry.alwaysAutoFill = this.alwaysAutoFill; entry.alwaysAutoSubmit = this.alwaysAutoSubmit; entry.neverAutoFill = this.neverAutoFill; entry.neverAutoSubmit = this.neverAutoSubmit; entry.priority = this.priority; entry.uRLs = this.URLs; entry.formActionURL = this.formActionURL; entry.hTTPRealm = this.httpRealm; entry.uniqueID = this.uniqueID; entry.title = this.title; entry.formFieldList = []; //log.debug("gg:"+this.passwords.length); //log.debug("gg:"+this.otherFields.length); for (var i in this.passwords) entry.formFieldList.push(this.passwords[i].asFormField(false)); for (var i in this.otherFields) if (this.usernameIndex == i) entry.formFieldList.push(this.otherFields[i].asFormField(true)); else entry.formFieldList.push(this.otherFields[i].asFormField(false)); return entry; }
newItem[zoteroField] = Zotero.Utilities.cleanString(metaTags.namedItem(field).getAttribute("content"));
newItem[zoteroField] = Zotero.Utilities.trimInternal(metaTags.namedItem(field).getAttribute("content"));
function associateMeta(newItem, metaTags, field, zoteroField) { if(metaTags.namedItem(field)) { newItem[zoteroField] = Zotero.Utilities.cleanString(metaTags.namedItem(field).getAttribute("content")); }}