rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
l++;
m=line[l].text.match(/^(.{1,79}\s+)([^\s].*?)$/); if(m==null) { m=line[l].text.match(/^(.{1,79})(.*?)$/); line[l].kludged=true; } if(m!=null) { if(line[l+1]==undefined) line.push(new Line); line[l+1].text=m[2]+line[l+1].text; line[l+1].attr=line[l].attr.substr(m[1].length)+line[l+1].attr; line[l].text=m[1]; line[l].attr=line[l].attr.substr(0,line[l].text.length); draw_line(l); if(ret==-1) ret=m[2].length; l++; } else { alert("The impossible happened."); console.pause(); exit(); }
function wrap_line(l){ var ret=0; var nline; while(line[l].text.length>79) { if(line[l+1]==undefined || line[l].hardcr) add_new_line_below(l); nline=line[l].text.replace(/^(.*)\s+(.*?)$/,function (str, start, end, pos, s) { line[l+1].text=end+" "+line[l+1].text; /* Copy attributes */ line[l+1].attr.splice(0,0,line[l+1].attr.slice(line[l].text.length-end.length,end.length).toSource()); /* Add an attribute for the space */ line[l+1].attr.splice(end.length+1,0,curattr); /* Trim whitespace from end */ line[l+1].text=line[l+1].text.replace(/\s+$/,''); /* Move the hardcr */ line[l+1].hardcr=line[l].hardcr; line[l].hardcr=false; if(!ret) ret=end.length+1; return(start); }); if(nline != line[l].text) { line[l].text=nline; redraw_line(l); } l++; } redraw_line(l); return(ret);}
redraw_line(l);
function wrap_line(l){ var ret=0; var nline; while(line[l].text.length>79) { if(line[l+1]==undefined || line[l].hardcr) add_new_line_below(l); nline=line[l].text.replace(/^(.*)\s+(.*?)$/,function (str, start, end, pos, s) { line[l+1].text=end+" "+line[l+1].text; /* Copy attributes */ line[l+1].attr.splice(0,0,line[l+1].attr.slice(line[l].text.length-end.length,end.length).toSource()); /* Add an attribute for the space */ line[l+1].attr.splice(end.length+1,0,curattr); /* Trim whitespace from end */ line[l+1].text=line[l+1].text.replace(/\s+$/,''); /* Move the hardcr */ line[l+1].hardcr=line[l].hardcr; line[l].hardcr=false; if(!ret) ret=end.length+1; return(start); }); if(nline != line[l].text) { line[l].text=nline; redraw_line(l); } l++; } redraw_line(l); return(ret);}
log(format("rsp: %s",str));
log("rsp: " + str);
function write(str){ if(0 && debug) log(format("rsp: %s",str)); client.socket.send(str);}
if(0 && debug)
if(debug)
function write(str){ if(0 && debug) log("rsp: " + str); client.socket.send(str);}
if(debug) log(format("rsp: %s",str));
function write(str){ if(debug) log(format("rsp: %s",str)); client.socket.send(str);}
user_file.rewind();
function write_user_list(user_list, user_file){ user_file.length = 0; for(var u in user_list) { user_file.writeln("[" + user_list[u].name + "]"); for(var p in user_list[u]) user_file.writeln(p + " = " + user_list[u][p]); }}
return null;
function writeBufferLabel(parentNode, n) { if (! parentNode) return null; // parentNode is a table body var rowNode = document.createElement('tr'); var cellNode = document.createElement('td'); // set the text contents to label the new cell cellNode.appendChild(getLabel(n)); rowNode.appendChild(cellNode); parentNode.appendChild(rowNode);}
function writeBufferLabel(n) { var theTable = document.getElementById(g_cq_bufferlist_id); if (theTable.childNodes.length < 1) { theTable.appendChild(document.createElement('tbody')); } if (theTable) { var theTableBody = theTable.firstChild; var theRow = theTable.rows[n]; if (! theRow) { theRow = document.createElement('tr'); theTableBody.appendChild(theRow); } while (theRow.hasChildNodes()) { theRow.removeChild(theRow.firstChild); } var theCell = document.createElement('td'); while (theCell.hasChildNodes()) { theCell.removeChild(theCell.firstChild); } theRow.appendChild(theCell); if (g_cq_buffer_current == n) { theCell.setAttribute('bgcolor', '#aaddff'); theCell.style.background = '#aaddff'; } theCell.appendChild(getLabel(n)); }
function writeBufferLabel(parentNode, n) { if (! parentNode) return null; var rowNode = document.createElement('tr'); var cellNode = document.createElement('td'); cellNode.appendChild(getLabel(n)); rowNode.appendChild(cellNode); parentNode.appendChild(rowNode);
function writeBufferLabel(n) { // labels are stored in a table, one per row var theTable = document.getElementById(g_cq_bufferlist_id); // make sure the table has a tbody if (theTable.childNodes.length < 1) { // create an explicit tbody for the DOM (Mozilla needs this) theTable.appendChild(document.createElement('tbody')); } if (theTable) { var theTableBody = theTable.firstChild; var theRow = theTable.rows[n]; if (! theRow) { //alert("writeBufferLabel: appending at " + n); theRow = document.createElement('tr'); theTableBody.appendChild(theRow); } //alert("writeBufferLabel("+n+"): was=" + theCell); while (theRow.hasChildNodes()) { theRow.removeChild(theRow.firstChild); } var theCell = document.createElement('td'); while (theCell.hasChildNodes()) { theCell.removeChild(theCell.firstChild); } theRow.appendChild(theCell); // highlight the if (g_cq_buffer_current == n) { theCell.setAttribute('bgcolor', '#aaddff'); // gecko theCell.style.background = '#aaddff'; // ie } theCell.appendChild(getLabel(n)); } // if theTable} // writeBufferLabel
write(str + "\r\n");
if(str) write(str + "\r\n"); else write("\r\n");
function writeln(str) { write(str + "\r\n"); }
if(debug) log(format("rsp: %s",str));
function writeln(str){ write(str + "\r\n");}
log(format("rsp: %s",str));
log("rsp: " + str);
function writeln(str){ if(debug) log(format("rsp: %s",str)); write(str + "\r\n");}
printf("cmd: %s",str);
printf("cmd: %s\r\n",str);
function writeln(str){ if(debug) printf("cmd: %s",str); write(str + "\r\n");}
log(format("rsp: %s",str));
printf("cmd: %s",str);
function writeln(str){ if(debug) log(format("rsp: %s",str)); write(str + "\r\n");}
var a = this.val; if (a.length === 0)
if (this.length === 0)
sc_Vector.prototype.writeOrDisplay = function(p, writeOrDisplay) { var a = this.val; if (a.length === 0) p.appendJSString("#()"); p.appendJSString("#("); writeOrDisplay(p, a[0]); for (var i = 1; i < a.length; i++) { p.appendJSString(" "); writeOrDisplay(p, a[i]); } p.appendJSString(")");};
writeOrDisplay(p, a[0]); for (var i = 1; i < a.length; i++) {
writeOrDisplay(p, this[0]); for (var i = 1; i < this.length; i++) {
sc_Vector.prototype.writeOrDisplay = function(p, writeOrDisplay) { var a = this.val; if (a.length === 0) p.appendJSString("#()"); p.appendJSString("#("); writeOrDisplay(p, a[0]); for (var i = 1; i < a.length; i++) { p.appendJSString(" "); writeOrDisplay(p, a[i]); } p.appendJSString(")");};
writeOrDisplay(p, a[i]);
writeOrDisplay(p, this[i]);
sc_Vector.prototype.writeOrDisplay = function(p, writeOrDisplay) { var a = this.val; if (a.length === 0) p.appendJSString("#()"); p.appendJSString("#("); writeOrDisplay(p, a[0]); for (var i = 1; i < a.length; i++) { p.appendJSString(" "); writeOrDisplay(p, a[i]); } p.appendJSString(")");};
if (this.length === 0)
if (this.length === 0) {
sc_Vector.prototype.writeOrDisplay = function(p, writeOrDisplay) { if (this.length === 0) p.appendJSString("#()"); p.appendJSString("#("); writeOrDisplay(p, this[0]); for (var i = 1; i < this.length; i++) { p.appendJSString(" "); writeOrDisplay(p, this[i]); } p.appendJSString(")");};
return; }
sc_Vector.prototype.writeOrDisplay = function(p, writeOrDisplay) { if (this.length === 0) p.appendJSString("#()"); p.appendJSString("#("); writeOrDisplay(p, this[0]); for (var i = 1; i < this.length; i++) { p.appendJSString(" "); writeOrDisplay(p, this[i]); } p.appendJSString(")");};
if(last_cwd != '') {
var old_cwd=cwd; if(cwd != '') {
function xjs_load(filename) { if(last_cwd != '') { if(filename.search(/^((\/)|([A-Za-z]:[\/\\]))/)==-1) filename=last_cwd+'/'+filename; } var cwd=filename; cwd=cwd.replace(/[^\\\/]*$/,''); var ssjs_filename=filename+".ssjs"; // Probably a race condition on Win32 if(file_exists(ssjs_filename)) { if(file_date(ssjs_filename)<=file_date(filename)) { file_remove(ssjs_filename); } } if(!file_exists(ssjs_filename)) { var file = new File(filename); if(!file.open("r",true,8192)) { writeln("!ERROR " + file.error + " opening " + filename); exit(); } var text = file.readAll(8192); file.close(); var script=""; var in_xjs=false; for (line in text) { var str=text[line]; while(str != '') { if(!in_xjs) { if(str=='<?xjs' || str=='<?') { in_xjs=true; str=''; } else { if(str.search(/<\?(xjs)?\s+/)==-1) { script += "writeln("+escape_quotes(str)+");"; str=''; } else { str=str.replace(/^(.*?)<\?(xjs)?\s+/, function (str, p1, p2, offset, s) { if(p1 != '') script += "write("+escape_quotes(p1)+");"; in_xjs=true; return ''; } ); } } } else { if(str.search(/\?>/)==-1) { script += str; str=''; } else { str=str.replace(/^(.*?)\?>/, function (str, p1, offset, s) { script += p1+";"; in_xjs=false; return ''; } ); } } } script += '\n'; } var f=new File(ssjs_filename); if(f.open("w",false)) { f.write(script); f.close(); } } last_cwd=cwd; load(ssjs_filename);}
filename=last_cwd+'/'+filename;
filename=cwd+filename;
function xjs_load(filename) { if(last_cwd != '') { if(filename.search(/^((\/)|([A-Za-z]:[\/\\]))/)==-1) filename=last_cwd+'/'+filename; } var cwd=filename; cwd=cwd.replace(/[^\\\/]*$/,''); var ssjs_filename=filename+".ssjs"; // Probably a race condition on Win32 if(file_exists(ssjs_filename)) { if(file_date(ssjs_filename)<=file_date(filename)) { file_remove(ssjs_filename); } } if(!file_exists(ssjs_filename)) { var file = new File(filename); if(!file.open("r",true,8192)) { writeln("!ERROR " + file.error + " opening " + filename); exit(); } var text = file.readAll(8192); file.close(); var script=""; var in_xjs=false; for (line in text) { var str=text[line]; while(str != '') { if(!in_xjs) { if(str=='<?xjs' || str=='<?') { in_xjs=true; str=''; } else { if(str.search(/<\?(xjs)?\s+/)==-1) { script += "writeln("+escape_quotes(str)+");"; str=''; } else { str=str.replace(/^(.*?)<\?(xjs)?\s+/, function (str, p1, p2, offset, s) { if(p1 != '') script += "write("+escape_quotes(p1)+");"; in_xjs=true; return ''; } ); } } } else { if(str.search(/\?>/)==-1) { script += str; str=''; } else { str=str.replace(/^(.*?)\?>/, function (str, p1, offset, s) { script += p1+";"; in_xjs=false; return ''; } ); } } } script += '\n'; } var f=new File(ssjs_filename); if(f.open("w",false)) { f.write(script); f.close(); } } last_cwd=cwd; load(ssjs_filename);}
var cwd=filename; cwd=cwd.replace(/[^\\\/]*$/,'');
cwd=filename; cwd=backslash(cwd.replace(/[^\\\/]*$/,''));
function xjs_load(filename) { if(last_cwd != '') { if(filename.search(/^((\/)|([A-Za-z]:[\/\\]))/)==-1) filename=last_cwd+'/'+filename; } var cwd=filename; cwd=cwd.replace(/[^\\\/]*$/,''); var ssjs_filename=filename+".ssjs"; // Probably a race condition on Win32 if(file_exists(ssjs_filename)) { if(file_date(ssjs_filename)<=file_date(filename)) { file_remove(ssjs_filename); } } if(!file_exists(ssjs_filename)) { var file = new File(filename); if(!file.open("r",true,8192)) { writeln("!ERROR " + file.error + " opening " + filename); exit(); } var text = file.readAll(8192); file.close(); var script=""; var in_xjs=false; for (line in text) { var str=text[line]; while(str != '') { if(!in_xjs) { if(str=='<?xjs' || str=='<?') { in_xjs=true; str=''; } else { if(str.search(/<\?(xjs)?\s+/)==-1) { script += "writeln("+escape_quotes(str)+");"; str=''; } else { str=str.replace(/^(.*?)<\?(xjs)?\s+/, function (str, p1, p2, offset, s) { if(p1 != '') script += "write("+escape_quotes(p1)+");"; in_xjs=true; return ''; } ); } } } else { if(str.search(/\?>/)==-1) { script += str; str=''; } else { str=str.replace(/^(.*?)\?>/, function (str, p1, offset, s) { script += p1+";"; in_xjs=false; return ''; } ); } } } script += '\n'; } var f=new File(ssjs_filename); if(f.open("w",false)) { f.write(script); f.close(); } } last_cwd=cwd; load(ssjs_filename);}
last_cwd=cwd;
function xjs_load(filename) { if(last_cwd != '') { if(filename.search(/^((\/)|([A-Za-z]:[\/\\]))/)==-1) filename=last_cwd+'/'+filename; } var cwd=filename; cwd=cwd.replace(/[^\\\/]*$/,''); var ssjs_filename=filename+".ssjs"; // Probably a race condition on Win32 if(file_exists(ssjs_filename)) { if(file_date(ssjs_filename)<=file_date(filename)) { file_remove(ssjs_filename); } } if(!file_exists(ssjs_filename)) { var file = new File(filename); if(!file.open("r",true,8192)) { writeln("!ERROR " + file.error + " opening " + filename); exit(); } var text = file.readAll(8192); file.close(); var script=""; var in_xjs=false; for (line in text) { var str=text[line]; while(str != '') { if(!in_xjs) { if(str=='<?xjs' || str=='<?') { in_xjs=true; str=''; } else { if(str.search(/<\?(xjs)?\s+/)==-1) { script += "writeln("+escape_quotes(str)+");"; str=''; } else { str=str.replace(/^(.*?)<\?(xjs)?\s+/, function (str, p1, p2, offset, s) { if(p1 != '') script += "write("+escape_quotes(p1)+");"; in_xjs=true; return ''; } ); } } } else { if(str.search(/\?>/)==-1) { script += str; str=''; } else { str=str.replace(/^(.*?)\?>/, function (str, p1, offset, s) { script += p1+";"; in_xjs=false; return ''; } ); } } } script += '\n'; } var f=new File(ssjs_filename); if(f.open("w",false)) { f.write(script); f.close(); } } last_cwd=cwd; load(ssjs_filename);}
cwd=old_cwd;
function xjs_load(filename) { if(last_cwd != '') { if(filename.search(/^((\/)|([A-Za-z]:[\/\\]))/)==-1) filename=last_cwd+'/'+filename; } var cwd=filename; cwd=cwd.replace(/[^\\\/]*$/,''); var ssjs_filename=filename+".ssjs"; // Probably a race condition on Win32 if(file_exists(ssjs_filename)) { if(file_date(ssjs_filename)<=file_date(filename)) { file_remove(ssjs_filename); } } if(!file_exists(ssjs_filename)) { var file = new File(filename); if(!file.open("r",true,8192)) { writeln("!ERROR " + file.error + " opening " + filename); exit(); } var text = file.readAll(8192); file.close(); var script=""; var in_xjs=false; for (line in text) { var str=text[line]; while(str != '') { if(!in_xjs) { if(str=='<?xjs' || str=='<?') { in_xjs=true; str=''; } else { if(str.search(/<\?(xjs)?\s+/)==-1) { script += "writeln("+escape_quotes(str)+");"; str=''; } else { str=str.replace(/^(.*?)<\?(xjs)?\s+/, function (str, p1, p2, offset, s) { if(p1 != '') script += "write("+escape_quotes(p1)+");"; in_xjs=true; return ''; } ); } } } else { if(str.search(/\?>/)==-1) { script += str; str=''; } else { str=str.replace(/^(.*?)\?>/, function (str, p1, offset, s) { script += p1+";"; in_xjs=false; return ''; } ); } } } script += '\n'; } var f=new File(ssjs_filename); if(f.open("w",false)) { f.write(script); f.close(); } } last_cwd=cwd; load(ssjs_filename);}
var start = 0; var list = []; for (var i = 0; i < value.length; i++) { if (value.charAt(i) == ',') { list.push(value.substring(start, i).replace(/\\(.)/, "$1")); start = i + 1; } else if (value.charAt(i) == '\\') { i++; } } list.push(value.substring(start, value.length).replace(/\\(.)/, "$1")); return array(list);
return array(parseArray(value));
function xlateValue(type, value) { if (type == 'String[]') { var start = 0; var list = []; for (var i = 0; i < value.length; i++) { if (value.charAt(i) == ',') { list.push(value.substring(start, i).replace(/\\(.)/, "$1")); start = i + 1; } else if (value.charAt(i) == '\\') { i++; } } list.push(value.substring(start, value.length).replace(/\\(.)/, "$1")); return array(list); } else { return xlateArgument(value); }}
var i, l, e, o = '', c;
var cl = this;
xmlEncode : function(s) { var i, l, e, o = '', c; this._setupEntities(); // Will intialize lookup table switch (this.settings.entity_encoding) { case "raw": return tinyMCE.xmlEncode(s); case "named": for (i=0, l=s.length; i<l; i++) { c = s.charCodeAt(i); e = this.entities[c]; if (e && e != '') o += '&' + e + ';'; else o += String.fromCharCode(c); } return o; case "numeric": for (i=0, l=s.length; i<l; i++) { c = s.charCodeAt(i); if (c > 127 || c == 60 || c == 62 || c == 38 || c == 39 || c == 34) o += '&#' + c + ";"; else o += String.fromCharCode(c); } return o; } return s; },
for (i=0, l=s.length; i<l; i++) { c = s.charCodeAt(i); e = this.entities[c];
return s.replace(new RegExp('[\u007F-\uFFFF<>&"\']', 'g'), function (c, b) { b = cl.entities[c.charCodeAt(0)];
xmlEncode : function(s) { var i, l, e, o = '', c; this._setupEntities(); // Will intialize lookup table switch (this.settings.entity_encoding) { case "raw": return tinyMCE.xmlEncode(s); case "named": for (i=0, l=s.length; i<l; i++) { c = s.charCodeAt(i); e = this.entities[c]; if (e && e != '') o += '&' + e + ';'; else o += String.fromCharCode(c); } return o; case "numeric": for (i=0, l=s.length; i<l; i++) { c = s.charCodeAt(i); if (c > 127 || c == 60 || c == 62 || c == 38 || c == 39 || c == 34) o += '&#' + c + ";"; else o += String.fromCharCode(c); } return o; } return s; },
if (e && e != '') o += '&' + e + ';'; else o += String.fromCharCode(c); } return o;
return b ? '&' + b + ';' : c; });
xmlEncode : function(s) { var i, l, e, o = '', c; this._setupEntities(); // Will intialize lookup table switch (this.settings.entity_encoding) { case "raw": return tinyMCE.xmlEncode(s); case "named": for (i=0, l=s.length; i<l; i++) { c = s.charCodeAt(i); e = this.entities[c]; if (e && e != '') o += '&' + e + ';'; else o += String.fromCharCode(c); } return o; case "numeric": for (i=0, l=s.length; i<l; i++) { c = s.charCodeAt(i); if (c > 127 || c == 60 || c == 62 || c == 38 || c == 39 || c == 34) o += '&#' + c + ";"; else o += String.fromCharCode(c); } return o; } return s; },
for (i=0, l=s.length; i<l; i++) { c = s.charCodeAt(i); if (c > 127 || c == 60 || c == 62 || c == 38 || c == 39 || c == 34) o += '&#' + c + ";"; else o += String.fromCharCode(c); } return o;
return s.replace(new RegExp('[\u007F-\uFFFF<>&"\']', 'g'), function (c, b) { return b ? '&#' + c.charCodeAt(0) + ';' : c; });
xmlEncode : function(s) { var i, l, e, o = '', c; this._setupEntities(); // Will intialize lookup table switch (this.settings.entity_encoding) { case "raw": return tinyMCE.xmlEncode(s); case "named": for (i=0, l=s.length; i<l; i++) { c = s.charCodeAt(i); e = this.entities[c]; if (e && e != '') o += '&' + e + ';'; else o += String.fromCharCode(c); } return o; case "numeric": for (i=0, l=s.length; i<l; i++) { c = s.charCodeAt(i); if (c > 127 || c == 60 || c == 62 || c == 38 || c == 39 || c == 34) o += '&#' + c + ";"; else o += String.fromCharCode(c); } return o; } return s; },
throw new Error("No XML component installed!")
throw new Error("No XML component installed!");
XMLHttpRequest = function () { var msxmls = ['MSXML3', 'MSXML2', 'Microsoft'] for (var i=0; i < msxmls.length; i++) { try { return new ActiveXObject(msxmls[i]+'.XMLHTTP') } catch (e) { } } throw new Error("No XML component installed!") }
function xref(msgbase, hdr)
function xref(hdr)
function xref(msgbase, hdr){ return(format("%s %s:%u",system.local_host_name, msgbase.cfg.newsgroup, hdr.number));}
return(format("%s %s:%u",system.local_host_name, msgbase.cfg.newsgroup, hdr.number));
return(format("%s %s:%u" ,system.local_host_name ,selected.newsgroup ,hdr.number));
function xref(msgbase, hdr){ return(format("%s %s:%u",system.local_host_name, msgbase.cfg.newsgroup, hdr.number));}
this.hotkeys=KEY_RIGHT+KEY_LEFT+"\b\x7f\x1b";
this.hotkeys=KEY_RIGHT+KEY_LEFT+"\b\x7f\x1b"+ctrl('O')+ctrl('U')+ctrl('T')+ctrl('K')+ctrl('P');
function Xtrnsec(sec){ var hotkeys="1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*():;<>"; this.items=new Array(); var j=0; xtrnsecprogwidth=0; this.hotkeys=KEY_RIGHT+KEY_LEFT+"\b\x7f\x1b"; // Figure out the correct width for(j=0; j<xtrn_area.sec_list[sec].prog_list.length; j++) { if(xtrn_area.sec_list[sec].prog_list[j].name.length > xtrnsecprogwidth) xtrnsecprogwidth=xtrn_area.sec_list[sec].prog_list[j].name.length; } xtrnsecprogwidth+=2; if(xtrnsecprogwidth>37) xtrnsecprogwidth=37; if(xtrn_area.sec_list[sec].prog_list.length+3+sec <= console.screen_rows) this.ypos=sec+2; else this.ypos=console.screen_rows-j-1; this.xpos=40-xtrnsecprogwidth-2; this.lpadding="\xb3"; this.rpadding="\xb3"; this.add("\xda"+bars80.substr(0,xtrnsecprogwidth)+"\xbf",undefined,undefined,"",""); for(j=0; j<xtrn_area.sec_list[sec].prog_list.length && j<console.screen_rows-3; j++) this.add("|"+hotkeys.substr(j,1)+" "+xtrn_area.sec_list[sec].prog_list[j].name,j.toString(),xtrnsecprogwidth); this.add("\xc0"+bars80.substr(0,xtrnsecprogwidth)+"\xd9",undefined,undefined,"",""); this.timeout=100; this.callback=message_callback;}
this.hotkeys=KEY_LEFT+KEY_RIGHT+"\b\x7f\x1b";
this.hotkeys=KEY_LEFT+KEY_RIGHT+"\b\x7f\x1b"+ctrl('O')+ctrl('U')+ctrl('T')+ctrl('K')+ctrl('P');
function Xtrnsecs(){ var hotkeys="1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*():;<>"; this.items=new Array(); this.xpos=40; this.ypos=2; this.lpadding="\xb3"; this.rpadding="\xb3"; this.hotkeys=KEY_LEFT+KEY_RIGHT+"\b\x7f\x1b"; var xtrnsecwidth=0; var j; for(j=0; j<xtrn_area.sec_list.length && j<console.screen_rows-2; j++) { if(xtrn_area.sec_list[j].name.length > xtrnsecwidth) xtrnsecwidth=xtrn_area.sec_list[j].name.length; } xtrnsecwidth += 4; if(xtrnsecwidth>37) xtrnsecwidth=37; this.add("\xda"+bars80.substr(0,xtrnsecwidth)+"\xbf",undefined,undefined,"",""); for(j=0; j<xtrn_area.sec_list.length; j++) this.add("< |"+hotkeys.substr(j,1)+" "+xtrn_area.sec_list[j].name,j.toString(),xtrnsecwidth); this.add("\xc0"+bars80.substr(0,xtrnsecwidth)+"\xd9",undefined,undefined,"",""); this.timeout=100; this.callback=message_callback;}
var __cell=document.createElement("TD");
var __cell=document.createElement("td");
function y_add_plain_cell_to_row(_row, _name){ var __cell=document.createElement("TD"); __cell.setAttribute("name", _name); _row.appendChild(__cell); return __cell;}
var __row=document.createElement("TR");
var __row=document.createElement("tr");
function y_add_row_to_table(_table, _class){ var __row=document.createElement("TR"); var __class = document.createAttribute("class"); __class.nodeValue = _class; __row.setAttributeNode(__class); _table.appendChild(__row); return __row;}
value.replace('\\s*$','');
value.replace(new RegExp('\\s*$',''),'');
function yaml_parse_implicit (value) { value.replace('\\s*$',''); if (value == '') return ''; if (value.match('^-?\\d+$')) return 0 + value; if (value.match('^[+-]?(\\d*)(\\.\\d*|)?([Ee][+-]?\\d+)?$')) return 1 * value; if (value.match('^\\d{4}\-\\d{2}\-\\d{2}(T\\d{2}:\\d{2}:\\d{2}(\\.\\d*[1-9])?(Z|[-+]\\d{2}(:\\d{2})?))?$') || value.match('^\\w')) return "" + value; if (value == '~') return undefined; if (value == '+') return 1; if (value == '-') return 0; return this.error("Parse Error bad implicit value ("+value+")");}
this.inline = this.inline.replace('^\\s+','').replace('\\s+$','');
this.inline = this.inline.replace('^\\s+','').replace(new RegExp('\\s+$',''),'');
function yaml_parse_inline (top, top_implicit, top_explicit, top_class) { this.inline = this.inline.replace('^\\s+','').replace('\\s+$',''); var info = this.parse_qualifiers(this.inline); var anchor = info[0]; var alias = info[1]; var explicit = info[2]; var implicit = info[3]; var yclass = info[4]; this.inline = info[5]; var node; var m; // copy the reference if (alias) { if (! this.anchors[alias]) return this.error("Parse error - missing alias: "+alias); node = this.anchors[alias]; // new key based array } else if (m = this.inline.match('^\\{')) { this.inline = this.inline.substring(m[0].length); node = new Array (); while (! (m = this.inline.match('^\\}'))) { var key = this.parse_inline(); if (! (m = this.inline.match('^:\\s+'))) return this.error("Parse error - bad map element "+this.inline); this.inline = this.inline.substring(m[0].length); var value = this.parse_inline(); if (node[key]) this.warn("Warn - duplicate key found: "+key); else node[key] = value; if (this.inline.match('^\\}')) break; if (! (m = this.inline.match('^,\\s*'))) return this.error("Parse error - missing map comma "+this.inline); this.inline = this.inline.substring(m[0].length); } this.inline = this.inline.substring(m[0].length); // new array } else if (m = this.inline.match('^\\[\\s*')) { this.inline = this.inline.substring(m[0].length); node = new Array (); while (! (m = this.inline.match('^\\]'))) { node.push(this.parse_inline()); if (m = this.inline.match('^\\]')) break; if (! (m = this.inline.match('^,\\s*'))) return this.error("Parse error - missing seq comma "+this.inline); this.inline = this.inline.substring(m[0].length); } this.inline = this.inline.substring(m[0].length); // double quoted } else if (this.inline.match('^"')) { if (m = this.inline.match('^"((?:"|[^"])*)"\\s*(.*)$')) { this.inline = m[2]; m[1].replace(new RegExp('"','g'),'"'); node = m[1]; } else { return this.error("Bad double quote "+this.inline); } node = unescape(node); // built in if (implicit || top_implicit) node = this.parse_implicit(node); // single quoted } else if (this.inline.match("^'")) { if (m = this.inline.match("^'((?:''|[^'])*)'\\s*(.*)$")) { this.inline = m[2]; m[1].replace(new RegExp("''",'g'),"'"); node = m[1]; } else { return this.error("Bad single quote "+this.inline); } node = unescape(node); // built in if (implicit || top_implicit) node = this.parse_implicit(node); // simple } else { if (top) { node = this.inline; this.inline = ''; } else { if (m = this.inline.match('^([^!@#%^&*,\\[\\]{}\\:]*)')) { this.inline = this.inline.substring(m[1].length); node = m[1]; } else { return this.error ("Bad simple match "+this.inline); } if (! explicit && ! top_explicit) node = this.parse_implicit(node); } } if (explicit || top_explicit) { if (! explicit) explicit = top_explicit; if (yclass) return this.error("Parse error - classes not supported"); else node = this.parse_explicit(node, explicit); } if (anchor) this.anchors[anchor] = node; return node;}
m[1].replace(new RegExp('"','g'),'"');
m[1] = m[1].replace(new RegExp('\\\\"','g'),'"');
function yaml_parse_inline (top, top_implicit, top_explicit, top_class) { this.inline = this.inline.replace('^\\s+','').replace('\\s+$',''); var info = this.parse_qualifiers(this.inline); var anchor = info[0]; var alias = info[1]; var explicit = info[2]; var implicit = info[3]; var yclass = info[4]; this.inline = info[5]; var node; var m; // copy the reference if (alias) { if (! this.anchors[alias]) return this.error("Parse error - missing alias: "+alias); node = this.anchors[alias]; // new key based array } else if (m = this.inline.match('^\\{')) { this.inline = this.inline.substring(m[0].length); node = new Array (); while (! (m = this.inline.match('^\\}'))) { var key = this.parse_inline(); if (! (m = this.inline.match('^:\\s+'))) return this.error("Parse error - bad map element "+this.inline); this.inline = this.inline.substring(m[0].length); var value = this.parse_inline(); if (node[key]) this.warn("Warn - duplicate key found: "+key); else node[key] = value; if (this.inline.match('^\\}')) break; if (! (m = this.inline.match('^,\\s*'))) return this.error("Parse error - missing map comma "+this.inline); this.inline = this.inline.substring(m[0].length); } this.inline = this.inline.substring(m[0].length); // new array } else if (m = this.inline.match('^\\[\\s*')) { this.inline = this.inline.substring(m[0].length); node = new Array (); while (! (m = this.inline.match('^\\]'))) { node.push(this.parse_inline()); if (m = this.inline.match('^\\]')) break; if (! (m = this.inline.match('^,\\s*'))) return this.error("Parse error - missing seq comma "+this.inline); this.inline = this.inline.substring(m[0].length); } this.inline = this.inline.substring(m[0].length); // double quoted } else if (this.inline.match('^"')) { if (m = this.inline.match('^"((?:"|[^"])*)"\\s*(.*)$')) { this.inline = m[2]; m[1].replace(new RegExp('"','g'),'"'); node = m[1]; } else { return this.error("Bad double quote "+this.inline); } node = unescape(node); // built in if (implicit || top_implicit) node = this.parse_implicit(node); // single quoted } else if (this.inline.match("^'")) { if (m = this.inline.match("^'((?:''|[^'])*)'\\s*(.*)$")) { this.inline = m[2]; m[1].replace(new RegExp("''",'g'),"'"); node = m[1]; } else { return this.error("Bad single quote "+this.inline); } node = unescape(node); // built in if (implicit || top_implicit) node = this.parse_implicit(node); // simple } else { if (top) { node = this.inline; this.inline = ''; } else { if (m = this.inline.match('^([^!@#%^&*,\\[\\]{}\\:]*)')) { this.inline = this.inline.substring(m[1].length); node = m[1]; } else { return this.error ("Bad simple match "+this.inline); } if (! explicit && ! top_explicit) node = this.parse_implicit(node); } } if (explicit || top_explicit) { if (! explicit) explicit = top_explicit; if (yclass) return this.error("Parse error - classes not supported"); else node = this.parse_explicit(node, explicit); } if (anchor) this.anchors[anchor] = node; return node;}
m[1].replace(new RegExp("''",'g'),"'");
m[1] = m[1].replace(new RegExp("''",'g'),"'");
function yaml_parse_inline (top, top_implicit, top_explicit, top_class) { this.inline = this.inline.replace('^\\s+','').replace('\\s+$',''); var info = this.parse_qualifiers(this.inline); var anchor = info[0]; var alias = info[1]; var explicit = info[2]; var implicit = info[3]; var yclass = info[4]; this.inline = info[5]; var node; var m; // copy the reference if (alias) { if (! this.anchors[alias]) return this.error("Parse error - missing alias: "+alias); node = this.anchors[alias]; // new key based array } else if (m = this.inline.match('^\\{')) { this.inline = this.inline.substring(m[0].length); node = new Array (); while (! (m = this.inline.match('^\\}'))) { var key = this.parse_inline(); if (! (m = this.inline.match('^:\\s+'))) return this.error("Parse error - bad map element "+this.inline); this.inline = this.inline.substring(m[0].length); var value = this.parse_inline(); if (node[key]) this.warn("Warn - duplicate key found: "+key); else node[key] = value; if (this.inline.match('^\\}')) break; if (! (m = this.inline.match('^,\\s*'))) return this.error("Parse error - missing map comma "+this.inline); this.inline = this.inline.substring(m[0].length); } this.inline = this.inline.substring(m[0].length); // new array } else if (m = this.inline.match('^\\[\\s*')) { this.inline = this.inline.substring(m[0].length); node = new Array (); while (! (m = this.inline.match('^\\]'))) { node.push(this.parse_inline()); if (m = this.inline.match('^\\]')) break; if (! (m = this.inline.match('^,\\s*'))) return this.error("Parse error - missing seq comma "+this.inline); this.inline = this.inline.substring(m[0].length); } this.inline = this.inline.substring(m[0].length); // double quoted } else if (this.inline.match('^"')) { if (m = this.inline.match('^"((?:"|[^"])*)"\\s*(.*)$')) { this.inline = m[2]; m[1].replace(new RegExp('"','g'),'"'); node = m[1]; } else { return this.error("Bad double quote "+this.inline); } node = unescape(node); // built in if (implicit || top_implicit) node = this.parse_implicit(node); // single quoted } else if (this.inline.match("^'")) { if (m = this.inline.match("^'((?:''|[^'])*)'\\s*(.*)$")) { this.inline = m[2]; m[1].replace(new RegExp("''",'g'),"'"); node = m[1]; } else { return this.error("Bad single quote "+this.inline); } node = unescape(node); // built in if (implicit || top_implicit) node = this.parse_implicit(node); // simple } else { if (top) { node = this.inline; this.inline = ''; } else { if (m = this.inline.match('^([^!@#%^&*,\\[\\]{}\\:]*)')) { this.inline = this.inline.substring(m[1].length); node = m[1]; } else { return this.error ("Bad simple match "+this.inline); } if (! explicit && ! top_explicit) node = this.parse_implicit(node); } } if (explicit || top_explicit) { if (! explicit) explicit = top_explicit; if (yclass) return this.error("Parse error - classes not supported"); else node = this.parse_explicit(node, explicit); } if (anchor) this.anchors[anchor] = node; return node;}
if (this.content.match('^?\\s*')) {
if (this.content.match('^\\?\\s*')) {
function yaml_parse_map (anchor) { var m; var node = new Array (); if (anchor) this.anchors[anchor] = node; while (! this.done && this.indent == this.offset[this.level]) { var key; if (this.content.match('^?\\s*')) { this.preface = this.content; key = '' + this.parse_node(); } else if (m = this.content.match('^=\\s*')) { this.content = this.content.substring(m[0].length); key = "\x07YAML\x07VALUE\x07"; } else if (m = this.content.match('^//\\s*')) { this.content = this.content.substring(m[0].length); key = "\x07YAML\x07COMMENT\x07"; } else { this.inline = this.content; key = this.parse_inline(); this.content = this.inline; this.inline = ''; } if (! (m = this.content.match('^:\\s*'))) return this.error("Parse error - bad map element "+this.content); this.content = this.content.substring(m[0].length); this.preface = this.content; var value = this.parse_node(); if (node[key]) this.warn('Warn - duplicate key '+key); else node[key] = value; } return node;}
} else if (m = this.lines[0].match('^( *)\\S') && m[1].length > offset) {
} else if ((m = this.lines[0].match('^( *)\\S')) && m[1].length > offset) {
function yaml_parse_next_line (type) { var m; var level = this.level; var offset = this.offset[level]; if (offset == undefined) return this.error("Parse error - Bad level " + level); // done with the current line - get the next // remove following commented lines this.lines.shift(); this.line ++; this.eoy = this.done = ! this.lines.length; if (this.eoy) return; this.parse_throwaway(); if (this.eoy) return; // Determine the offset for a new leaf node if (this.preface && (m = this.preface.match('[>\\|][+\\-]?(\\d*)\\s*$'))) { if (m[1].length && m[1] == '0') return this.error("Parse error zero indent"); type = 1; if (m[1].length) { this.offset[level + 1] = offset + m[1]; } else if (m = this.lines[0].match('^( *)\\S') && m[1].length > offset) { this.offset[level + 1] = m[1].length; } else { this.offset[level + 1] = offset + 1; } level ++; offset = this.offset[level]; } // COLLECTION if (type == 2 && this.preface.match('^\\s*(!\\S*|&\\S+)*\\s*$')) { m = this.lines[0].match('^( *)\\S'); if (! m) return this.error("Missing leading space on line "+this.lines[0]); this.offset[level + 1] = (m[1].length > offset) ? m[1].length : offset + 1; offset = this.offset[++ level]; // LEAF } else if (type == 1) { // skip blank lines and comment lines while (this.lines.length && this.lines[0].match('^\\s*(#|$)')) { m = this.lines[0].match('^( *)'); if (! m) return this.error("Missing leading space on comment " + this.lines[0]); if (m[1].length > offset) break; this.lines.shift(); this.line ++; } this.eoy = this.done = ! this.lines.length; } else { this.parse_throwaway(); } if (this.eoy) return; if (this.lines[0].match('^---(\\s|$)')) { this.done = 1; return; } if (type == 1 && (m = this.lines[0].match('^ {'+offset+'}(.*)$'))) { this.indent = offset; this.content = m[1]; } else if (this.lines[0].match('^\\s*$')) { this.indent = offset; this.content = ''; } else { m = this.lines[0].match('^( *)(\\S.*)$'); // # yaml.warn(" indent(${\length($1)}) offsets(@{$o->{offset}}) \n"); var len = (m) ? m[1].length : 0; while (this.offset[level] > len) level --; if (this.offset[level] != len) return this.error("Parse error inconsitent indentation:\n" + '(this.lines[0]: '+this.lines[0]+', len: '+len+', level: '+level+', this.offset[level]: '+this.offset[level]+')\n'); this.indent = len; this.content = m ? m[2] : ''; } if (this.indent - offset > 1) return this.error("Parse error - indentation"); return;}
node = node.replace(new RegExp('^(\\S.*)\n(\n+\\S)','gm'), '$1$2');
node = node.replace(new RegExp('[ \\t]*\n[ \\t]*','gm'), ' ');
function yaml_parse_node (no_next) { if (! no_next) this.parse_next_line(2); // COLLECTION var preface = this.preface; this.preface = ''; var node = ''; var type = ''; var indicator = ''; var escape = ''; var chomp = ''; var info = this.parse_qualifiers(preface); var anchor = info[0]; var alias = info[1]; var explicit = info[2]; var implicit = info[3]; var yclass = info[4]; preface = info[5]; if (alias) { if (! this.anchors[alias]) return this.error("Parse error - missing alias: "+alias); return this.anchors[alias]; } // see if this is a literal or an unfold block this.inline = ''; if (preface.length) { m = preface.match('^([>\\|])([+\\-]?)\\d*\\s*'); if (m) { indicator = m[1]; chomp = m[2]; preface = preface.substring(0,m[0].length); } else { this.inline = preface; preface = ''; } } if (this.inline.length) { node = this.parse_inline(1, implicit, explicit, yclass); if (this.inline.length) return this.error("Parse error - must be single line ("+this.inline+')'); } else { this.level ++; // block items if (indicator) { node = ''; while (! this.done && this.indent == this.offset[this.level]) { node += this.content + '\n'; this.parse_next_line(1); // LEAF } if (indicator == '>') { // node = node.replace(new RegExp('^(\\S.*)\n(?=\\S)', 'gm'), '$1'); node = node.replace(new RegExp('^(\\S.*)\n(\n+\\S)','gm'), '$1$2'); } if (! chomp || chomp == '-') node = node.replace('\n+$',''); if (chomp && chomp == '+') node += '\n'; if (implicit) node = this.parse_implicit(node); } else { if (! this.offset[this.level]) this.offset[this.level] = 0; if (this.indent == this.offset[this.level]) { if (this.content.match('^-( |$)')) { node = this.parse_seq(anchor); } else if (this.content.match('(^\\?|:( |$))')) { node = this.parse_map(anchor); } else if (preface.match('^\\s*$')) { node = ''; //this.parse_implicit(''); } else { return this.error('Parse error - bad node +('+this.content+')('+preface+')'); } } else { node = ''; } } this.level -- } this.offset = this.offset.splice(0, this.level + 1); if (explicit) { if (yclass) return this.error("Parse error - classes not supported"); else node = this.parse_explicit(node, explicit); } if (anchor) this.anchors[anchor] = node; return node;}
if (! chomp || chomp == '-') node = node.replace('\n+$',''); if (chomp && chomp == '+') node += '\n';
if (! chomp || chomp == '-') node = node.replace(new RegExp('\n$',''),'');
function yaml_parse_node (no_next) { if (! no_next) this.parse_next_line(2); // COLLECTION var preface = this.preface; this.preface = ''; var node = ''; var type = ''; var indicator = ''; var escape = ''; var chomp = ''; var info = this.parse_qualifiers(preface); var anchor = info[0]; var alias = info[1]; var explicit = info[2]; var implicit = info[3]; var yclass = info[4]; preface = info[5]; if (alias) { if (! this.anchors[alias]) return this.error("Parse error - missing alias: "+alias); return this.anchors[alias]; } // see if this is a literal or an unfold block this.inline = ''; if (preface.length) { m = preface.match('^([>\\|])([+\\-]?)\\d*\\s*'); if (m) { indicator = m[1]; chomp = m[2]; preface = preface.substring(0,m[0].length); } else { this.inline = preface; preface = ''; } } if (this.inline.length) { node = this.parse_inline(1, implicit, explicit, yclass); if (this.inline.length) return this.error("Parse error - must be single line ("+this.inline+')'); } else { this.level ++; // block items if (indicator) { node = ''; while (! this.done && this.indent == this.offset[this.level]) { node += this.content + '\n'; this.parse_next_line(1); // LEAF } if (indicator == '>') { // node = node.replace(new RegExp('^(\\S.*)\n(?=\\S)', 'gm'), '$1'); node = node.replace(new RegExp('^(\\S.*)\n(\n+\\S)','gm'), '$1$2'); } if (! chomp || chomp == '-') node = node.replace('\n+$',''); if (chomp && chomp == '+') node += '\n'; if (implicit) node = this.parse_implicit(node); } else { if (! this.offset[this.level]) this.offset[this.level] = 0; if (this.indent == this.offset[this.level]) { if (this.content.match('^-( |$)')) { node = this.parse_seq(anchor); } else if (this.content.match('(^\\?|:( |$))')) { node = this.parse_map(anchor); } else if (preface.match('^\\s*$')) { node = ''; //this.parse_implicit(''); } else { return this.error('Parse error - bad node +('+this.content+')('+preface+')'); } } else { node = ''; } } this.level -- } this.offset = this.offset.splice(0, this.level + 1); if (explicit) { if (yclass) return this.error("Parse error - classes not supported"); else node = this.parse_explicit(node, explicit); } if (anchor) this.anchors[anchor] = node; return node;}
node = node.replace(new RegExp('[ \\t]*\n[ \\t]*','gm'), ' ');
node = node.replace(new RegExp('[ \\t]*\n[ \\t]*(\\S)','gm'), ' $1');
function yaml_parse_node (no_next) { if (! no_next) this.parse_next_line(2); // COLLECTION var preface = this.preface; this.preface = ''; var node = ''; var type = ''; var indicator = ''; var escape = ''; var chomp = ''; var info = this.parse_qualifiers(preface); var anchor = info[0]; var alias = info[1]; var explicit = info[2]; var implicit = info[3]; var yclass = info[4]; preface = info[5]; if (alias) { if (! this.anchors[alias]) return this.error("Parse error - missing alias: "+alias); return this.anchors[alias]; } // see if this is a literal or an unfold block this.inline = ''; if (preface.length) { m = preface.match('^([>\\|])([+\\-]?)\\d*\\s*'); if (m) { indicator = m[1]; chomp = m[2]; preface = preface.substring(0,m[0].length); } else { this.inline = preface; preface = ''; } } if (this.inline.length) { node = this.parse_inline(1, implicit, explicit, yclass); if (this.inline.length) return this.error("Parse error - must be single line ("+this.inline+')'); } else { this.level ++; // block items if (indicator) { node = ''; while (! this.done && this.indent == this.offset[this.level]) { node += this.content + '\n'; this.parse_next_line(1); // LEAF } if (indicator == '>') { node = node.replace(new RegExp('[ \\t]*\n[ \\t]*','gm'), ' '); } if (! chomp || chomp == '-') node = node.replace(new RegExp('\n$',''),''); if (implicit) node = this.parse_implicit(node); } else { if (! this.offset[this.level]) this.offset[this.level] = 0; if (this.indent == this.offset[this.level]) { if (this.content.match('^-( |$)')) { node = this.parse_seq(anchor); } else if (this.content.match('(^\\?|:( |$))')) { node = this.parse_map(anchor); } else if (preface.match('^\\s*$')) { node = ''; //this.parse_implicit(''); } else { return this.error('Parse error - bad node +('+this.content+')('+preface+')'); } } else { node = ''; } } this.level -- } this.offset = this.offset.splice(0, this.level + 1); if (explicit) { if (yclass) return this.error("Parse error - classes not supported"); else node = this.parse_explicit(node, explicit); } if (anchor) this.anchors[anchor] = node; return node;}
}
},
zip: function() { var iterator = Prototype.K, args = $A(arguments); if (typeof args.last() == 'function') iterator = args.pop(); var collections = [this].concat(args).map($A); return this.map(function(value, index) { iterator(value = collections.pluck(index)); return value; }); }
iterator(value = collections.pluck(index)); return value;
return iterator(collections.pluck(index));
zip: function() { var iterator = Prototype.K, args = $A(arguments); if (typeof args.last() == 'function') iterator = args.pop(); var collections = [this].concat(args).map($A); return this.map(function(value, index) { iterator(value = collections.pluck(index)); return value; }); },
if (!Event.isLeftClick(evt)) return;
zoomBarDown:function(evt) { this.map.events.register("mousemove", this, this.passEventToSlider); this.map.events.register("mouseup", this, this.passEventToSlider); this.mouseDragStart = evt.xy.copyOf(); this.zoomStart = evt.xy.copyOf(); this.div.style.cursor = "move"; Event.stop(evt); },
if (!Event.isLeftClick(evt)) return;
zoomBarUp:function(evt) { if (this.zoomStart) { this.div.style.cursor="default"; this.map.events.remove("mousemove"); this.map.events.remove("mouseup"); var deltaY = this.zoomStart.y - evt.xy.y this.map.zoomTo(this.map.zoom + Math.round(deltaY/this.zoomStopHeight)); this.moveZoomBar(); this.mouseDragStart = null; Event.stop(evt); } },
this.map.viewPortDiv.removeChild(this.zoomBox); this.zoomBox = null; }
this.removeZoomBox(); }
zoomBoxEnd: function(evt) { if (this.mouseDragStart != null) { if (Math.abs(this.mouseDragStart.x - evt.xy.x) > 5 || Math.abs(this.mouseDragStart.y - evt.xy.y) > 5) { var start = this.map.getLonLatFromViewPortPx( this.mouseDragStart ); var end = this.map.getLonLatFromViewPortPx( evt.xy ); var top = Math.max(start.lat, end.lat); var bottom = Math.min(start.lat, end.lat); var left = Math.min(start.lon, end.lon); var right = Math.max(start.lon, end.lon); var bounds = new OpenLayers.Bounds(left, bottom, right, top); var zoom = this.map.getZoomForExtent(bounds); this.map.setCenter(new OpenLayers.LonLat( (start.lon + end.lon) / 2, (start.lat + end.lat) / 2 ), zoom); } else { var end = this.map.getLonLatFromViewPortPx( evt.xy ); this.map.setCenter(new OpenLayers.LonLat( (end.lon), (end.lat) ), this.map.getZoom() + 1); } this.map.viewPortDiv.removeChild(this.zoomBox); this.zoomBox = null; } },
this.map.viewPortDiv.removeChild(document.getElementById("zoomBox"));
this.map.viewPortDiv.removeChild(this.zoomBox);
zoomBoxEnd: function(evt) { if (this.mouseDragStart != null) { if (Math.abs(this.mouseDragStart.x - evt.xy.x) > 5 || Math.abs(this.mouseDragStart.y - evt.xy.y) > 5) { var start = this.map.getLonLatFromViewPortPx( this.mouseDragStart ); var end = this.map.getLonLatFromViewPortPx( evt.xy ); var top = Math.max(start.lat, end.lat); var bottom = Math.min(start.lat, end.lat); var left = Math.min(start.lon, end.lon); var right = Math.max(start.lon, end.lon); var bounds = new OpenLayers.Bounds(left, bottom, right, top); var zoom = this.map.getZoomForExtent(bounds); this.map.setCenter(new OpenLayers.LonLat( (start.lon + end.lon) / 2, (start.lat + end.lat) / 2 ), zoom); } else { var end = this.map.getLonLatFromViewPortPx( evt.xy ); this.map.setCenter(new OpenLayers.LonLat( (end.lon), (end.lat) ), this.map.getZoom() + 1); } this.map.viewPortDiv.removeChild(document.getElementById("zoomBox")); this.zoomBox = null; } },
var oldZoom = this.zoom;
zoomExtent: function() { var fullExtent = this.getFullExtent(); this.zoom = this.getZoomForExtent( fullExtent ); this.setCenter( new OpenLayers.LatLon( (fullExtent.minlat+fullExtent.maxlat)/2, (fullExtent.minlon+fullExtent.maxlon)/2 ) ); this.moveToNewExtent(true); },
this.moveToNewExtent(true);
zoomExtent: function() { var fullExtent = this.getFullExtent(); this.zoom = this.getZoomForExtent( fullExtent ); this.setCenter( new OpenLayers.LatLon( (fullExtent.minlat+fullExtent.maxlat)/2, (fullExtent.minlon+fullExtent.maxlon)/2 ) ); this.moveToNewExtent(true); },
this.zoom = this.getZoomForExtent( fullExtent );
zoomExtent: function() { var fullExtent = this.getFullExtent(); var oldZoom = this.zoom; this.zoom = this.getZoomForExtent( fullExtent ); this.setCenter( new OpenLayers.LonLat((fullExtent.left+fullExtent.right)/2, (fullExtent.bottom+fullExtent.top)/2) ); },
(fullExtent.bottom+fullExtent.top)/2)
(fullExtent.bottom+fullExtent.top)/2), 0
zoomExtent: function() { var fullExtent = this.getFullExtent(); var oldZoom = this.zoom; this.zoom = this.getZoomForExtent( fullExtent ); this.setCenter( new OpenLayers.LonLat((fullExtent.left+fullExtent.right)/2, (fullExtent.bottom+fullExtent.top)/2) ); },
this.moveToNewExtent(true); this.events.triggerEvent("zoomend", {oldZoom: oldZoom, newZoom: this.zoom});
this.moveToNewExtent(oldZoom);
zoomTo: function(zoom) { if (zoom >= 0 && zoom <= this.getZoomLevels()) { var oldZoom = this.zoom; this.zoom = zoom; this.moveToNewExtent(true); this.events.triggerEvent("zoomend", {oldZoom: oldZoom, newZoom: this.zoom}); } },
var oldZoom = this.zoom;
zoomToFullExtent: function() { var fullExtent = this.getFullExtent(); var oldZoom = this.zoom; this.setCenter( new OpenLayers.LonLat((fullExtent.left+fullExtent.right)/2, (fullExtent.bottom+fullExtent.top)/2), 0 ); },
0 );
this.getZoomForExtent(fullExtent) );
zoomToFullExtent: function() { var fullExtent = this.getFullExtent(); var oldZoom = this.zoom; this.setCenter( new OpenLayers.LonLat((fullExtent.left+fullExtent.right)/2, (fullExtent.bottom+fullExtent.top)/2), 0 ); },
if ( c == null ) this.className = ''; else
this.className = c == null ? '' :
function $(a,c) { var $a = a || $.context || document; var $c = c && c.$jquery && c.get(0) || c; // Since we're using Prototype's $ function, // be nice and have backwards compatability if ( typeof Prototype != "undefined" ) { if ( $a.constructor == String ) { var re = new RegExp( "[^a-zA-Z0-9_-]" ); if ( !re.test($a) ) { $c = $c && $c.documentElement || document; if ( $c.getElementsByTagName($a).length == 0 ) { var obj = $c.getElementById($a); if ( obj != null ) return obj; } } } else if ( $a.constructor == Array ) { return $.map( $a, function(b){ if ( b.constructor == String ) return document.getElementById(b); return b; }); } } // Load Dynamic Function List var self = { cur: $.Select($a,$c), $jquery: "$Rev$", // The only two getters size: function() {return this.get().length}, get: function(i) { return i == null ? this.cur : this.cur[i]; }, each: function(f) { for ( var i = 0; i < this.size(); i++ ) $.apply( this.get(i), f, [i] ); return this; }, set: function(a,b) { return this.each(function(){ if ( b == null ) for ( var j in a ) $.attr(this,j,a[j]); else $.attr(this,a,b); }); }, html: function(h) { return h == null && this.size() ? this.get(0).innerHTML : this.set( "innerHTML", h ); }, val: function(h) { return h == null && this.size() ? this.get(0).value : this.set( "value", h ); }, css: function(a,b) { return a.constructor != String || b ? this.each(function(){ if ( !b ) for ( var j in a ) $.attr(this.style,j,a[j]); else $.attr(this.style,a,b); }) : $.css( this.get(0), a ); }, toggle: function() { return this.each(function(){ var d = $.getCSS(this,"display"); if ( d == "none" || d == '' ) $(this).show(); else $(this).hide(); }); }, show: function(a) { return this.each(function(){ this.style.display = this.$$oldblock ? this.$$oldblock : ''; if ( $.getCSS(this,"display") == "none" ) this.style.display = 'block'; }); }, hide: function(a) { return this.each(function(){ this.$$oldblock = $.getCSS(this,"display"); if ( this.$$oldblock == "none" ) this.$$oldblock = 'block'; this.style.display = 'none'; }); }, addClass: function(c) { return this.each(function(){ if ($.hasWord(this,c)) return; this.className += ( this.className.length > 0 ? " " : "" ) + c; }); }, removeClass: function(c) { return this.each(function(){ if ( c == null ) this.className = ''; else this.className.replace( new RegExp('(^|\\s*\\b[^-])'+c+'($|\\b(?=[^-]))', 'g'), ''); }); }, // TODO: Optomize toggleClass: function(c) { return this.each(function(){ if ($.hasWord(this,c)) this.className = this.className.replace( new RegExp('(\\s*\\b[^-])'+c+'($|\\b(?=[^-]))', 'g'), ''); else this.className += ( this.className.length > 0 ? " " : "" ) + c; }); }, remove: function() { this.each(function(){this.parentNode.removeChild( this );}); this.cur = []; return this; }, wrap: function() { var a = $.clean(arguments); return this.each(function(){ var b = a[0].cloneNode(true); this.parentNode.insertBefore( b, this ); while ( b.firstChild ) b = b.firstChild; b.appendChild( this ); }); }, append: function() { var clone = this.size() > 1; var a = $.clean(arguments); return this.each(function(){ for ( var i = 0; i < a.length; i++ ) this.appendChild( clone ? a[i].cloneNode(true) : a[i] ); }); }, appendTo: function() { var a = arguments; return this.each(function(){ for ( var i = 0; i < a.length; i++ ) $(a[i]).append( this ); }); }, prepend: function() { var clone = this.size() > 1; var a = $.clean(arguments); return this.each(function(){ for ( var i = a.length - 1; i >= 0; i-- ) this.insertBefore( clone ? a[i].cloneNode(true) : a[i], this.firstChild ); }); }, before: function() { var clone = this.size() > 1; var a = $.clean(arguments); return this.each(function(){ for ( var i = 0; i < a.length; i++ ) this.parentNode.insertBefore( clone ? a[i].cloneNode(true) : a[i], this ); }); }, after: function() { var clone = this.size() > 1; var a = $.clean(arguments); return this.each(function(){ for ( var i = a.length - 1; i >= 0; i-- ) this.parentNode.insertBefore( clone ? a[i].cloneNode(true) : a[i], this.nextSibling ); }); }, empty: function() { return this.each(function(){ while ( this.firstChild ) this.removeChild( this.firstChild ); }); }, bind: function(t,f) { return this.each(function(){addEvent(this,t,f);}); }, unbind: function(t,f) { return this.each(function(){removeEvent(this,t,f);}); }, trigger: function(t) { return this.each(function(){triggerEvent(this,t);}); }, find: function(t) { var old = [], ret = []; this.each(function(){ old[old.length] = this; ret = $.merge( ret, $.Select(t,this) ); }); this.old = old; this.cur = ret; return this; }, end: function() { this.cur = this.old; return this; }, parent: function(a) { this.cur = $.map(this.cur,function(d){ return d.parentNode; }); if ( a ) this.cur = $.filter(a,this.cur).r; return this; }, parents: function(a) { this.cur = $.map(this.cur,$.parents); if ( a ) this.cur = $.filter(a,this.cur).r; return this; }, siblings: function(a) { // Incorrect, need to exclude current element this.cur = $.map(this.cur,$.sibling); if ( a ) this.cur = $.filter(a,this.cur).r; return this; }, filter: function(t) { this.cur = $.filter(t,this.cur).r; return this; }, not: function(t) { this.cur = t.constructor == String ? $.filter(t,this.cur,false).r : $.grep(this.cur,function(a){return a != t;}); return this; }, add: function(t) { this.cur = $.merge( this.cur, t.constructor == String ? $.Select(t) : t.constructor == Array ? t : [t] ); return this; }, is: function(t) { return $.filter(t,this.cur).r.length > 0; }, isNot: function(t) { return !this.s(t); } }; // TODO: Remove need to return this for ( var i in $.fn ) { if ( self[i] != null ) self["_"+i] = self[i]; self[i] = $.fn[i]; } if ( typeof Prototype != "undefined" && $a.constructor != String ) { if ( $c ) $a = self.get(); for ( var i in self ) {(function(j){ try { if ( $a[j] == null ) { $a[j] = function() { return $.apply(self,self[j],arguments); }; } } catch(e) {} })(i);} return $a; } return self;}
for (var i = 0; i < arguments.length; i++) { var element = arguments[i]; if (typeof element == 'string')
for (var i = 0; i < arguments.length; i++)
function $(){ var elements = new Array(); for (var i = 0; i < arguments.length; i++) { var element = arguments[i]; if (typeof element == 'string') { if (document.getElementById) { element = document.getElementById(element); } else if (document.all) { element = document.all[element]; } } if (arguments.length == 1) { return element; } elements.push(element); } return elements;}
if (document.getElementById) { element = document.getElementById(element); } else if (document.all)
var element = arguments[i]; if (typeof element == 'string')
function $(){ var elements = new Array(); for (var i = 0; i < arguments.length; i++) { var element = arguments[i]; if (typeof element == 'string') { if (document.getElementById) { element = document.getElementById(element); } else if (document.all) { element = document.all[element]; } } if (arguments.length == 1) { return element; } elements.push(element); } return elements;}
if (arguments.length == 1) { return element; } elements.push(element);
return elements;
function $(){ var elements = new Array(); for (var i = 0; i < arguments.length; i++) { var element = arguments[i]; if (typeof element == 'string') { if (document.getElementById) { element = document.getElementById(element); } else if (document.all) { element = document.all[element]; } } if (arguments.length == 1) { return element; } elements.push(element); } return elements;}
return elements; }
function $(){ var elements = new Array(); for (var i = 0; i < arguments.length; i++) { var element = arguments[i]; if (typeof element == 'string') { if (document.getElementById) { element = document.getElementById(element); } else if (document.all) { element = document.all[element]; } } if (arguments.length == 1) { return element; } elements.push(element); } return elements;}
function $()
$ = function()
function $() { var elements = new Array(); for (var i = 0; i < arguments.length; i++) { var element = arguments[i]; if (typeof element == 'string') { element = document.all[element]; } if (arguments.length == 1) { return element; } elements.push(element); } return elements; }
return i === null ? this.cur : this.cur[i];
return typeof i == 'undefined' ? this.cur : this.cur[i];
function $(a,c) { var $a = a || $.context || document; var $c = c && c.$jquery && c.get(0) || c; // Since we're using Prototype's $ function, // be nice and have backwards compatability if ( typeof Prototype != "undefined" ) { if ( $a.constructor == String ) { var re = new RegExp( "[^a-zA-Z0-9_-]" ); if ( !re.test($a) ) { $c = $c && $c.documentElement || document; if ( $c.getElementsByTagName($a).length === 0 ) { var obj = $c.getElementById($a); if ( obj !== null ) { return obj; } } } } else if ( $a.constructor == Array ) { return $.map( $a, function(b){ if ( b.constructor == String ) { return document.getElementById(b); } return b; }); } } // Load Dynamic Function List var self = { cur: $.Select($a,$c), $jquery: "$Rev$", // The only two getters size: function() {return this.get().length;}, get: function(i) { return i === null ? this.cur : this.cur[i]; }, each: function(f) { for ( var i = 0; i < this.size(); i++ ) { $.apply( this.get(i), f, [i] ); } return this; }, set: function(a,b) { return this.each(function(){ if ( b === null ) { for ( var j in a ) { $.attr(this,j,a[j]); } } else { $.attr(this,a,b); } }); }, html: function(h) { return h === null && this.size() ? this.get(0).innerHTML : this.set( "innerHTML", h ); }, val: function(h) { return h === null && this.size() ? this.get(0).value : this.set( "value", h ); }, css: function(a,b) { return a.constructor != String || b ? this.each(function(){ if ( !b ) { for ( var j in a ) { $.attr(this.style,j,a[j]); } } else { $.attr(this.style,a,b); } }) : $.css( this.get(0), a ); }, toggle: function() { return this.each(function(){ var d = $.getCSS(this,"display"); if ( d == "none" || d === '' ) { $(this).show(); } else { $(this).hide(); } }); }, show: function(a) { return this.each(function(){ this.style.display = this.$$oldblock ? this.$$oldblock : ''; if ( $.getCSS(this,"display") == "none" ) { this.style.display = 'block'; } }); }, hide: function(a) { return this.each(function(){ this.$$oldblock = $.getCSS(this,"display"); if ( this.$$oldblock == "none" ) { this.$$oldblock = 'block'; } this.style.display = 'none'; }); }, addClass: function(c) { return this.each(function(){ if ($.hasWord(this,c)) { return null; } this.className += ( this.className.length > 0 ? " " : "" ) + c; }); }, removeClass: function(c) { return this.each(function(){ this.className = c === null ? '' : this.className.replace( new RegExp('(^|\\s*\\b[^-])'+c+'($|\\b(?=[^-]))', 'g'), ''); }); }, // TODO: Optomize toggleClass: function(c) { return this.each(function(){ if ($.hasWord(this,c)) { this.className = this.className.replace( new RegExp('(\\s*\\b[^-])'+c+'($|\\b(?=[^-]))', 'g'), ''); } else { this.className += ( this.className.length > 0 ? " " : "" ) + c; } }); }, remove: function() { this.each(function(){this.parentNode.removeChild( this );}); this.cur = []; return this; }, wrap: function() { var a = $.clean(arguments); return this.each(function(){ var b = a[0].cloneNode(true); this.parentNode.insertBefore( b, this ); while ( b.firstChild ) { b = b.firstChild; } b.appendChild( this ); }); }, append: function() { var clone = this.size() > 1; var a = $.clean(arguments); return this.each(function(){ for ( var i = 0; i < a.length; i++ ) { this.appendChild( clone ? a[i].cloneNode(true) : a[i] ); } }); }, appendTo: function() { var a = arguments; return this.each(function(){ for ( var i = 0; i < a.length; i++ ) { $(a[i]).append( this ); } }); }, prepend: function() { var clone = this.size() > 1; var a = $.clean(arguments); return this.each(function(){ for ( var i = a.length - 1; i >= 0; i-- ) { this.insertBefore( clone ? a[i].cloneNode(true) : a[i], this.firstChild ); } }); }, before: function() { var clone = this.size() > 1; var a = $.clean(arguments); return this.each(function(){ for ( var i = 0; i < a.length; i++ ) { this.parentNode.insertBefore( clone ? a[i].cloneNode(true) : a[i], this ); } }); }, after: function() { var clone = this.size() > 1; var a = $.clean(arguments); return this.each(function(){ for ( var i = a.length - 1; i >= 0; i-- ) { this.parentNode.insertBefore( clone ? a[i].cloneNode(true) : a[i], this.nextSibling ); } }); }, empty: function() { return this.each(function(){ while ( this.firstChild ) { this.removeChild( this.firstChild ); } }); }, bind: function(t,f) { return this.each(function(){addEvent(this,t,f);}); }, unbind: function(t,f) { return this.each(function(){removeEvent(this,t,f);}); }, trigger: function(t) { return this.each(function(){triggerEvent(this,t);}); }, find: function(t) { var old = [], ret = []; this.each(function(){ old[old.length] = this; ret = $.merge( ret, $.Select(t,this) ); }); this.old = old; this.cur = ret; return this; }, end: function() { this.cur = this.old; return this; }, parent: function(a) { this.cur = $.map(this.cur,function(d){ return d.parentNode; }); if ( a ) { this.cur = $.filter(a,this.cur).r; } return this; }, parents: function(a) { this.cur = $.map(this.cur,$.parents); if ( a ) { this.cur = $.filter(a,this.cur).r; } return this; }, siblings: function(a) { // Incorrect, need to exclude current element this.cur = $.map(this.cur,$.sibling); if ( a ) { this.cur = $.filter(a,this.cur).r; } return this; }, filter: function(t) { this.cur = $.filter(t,this.cur).r; return this; }, not: function(t) { this.cur = t.constructor == String ? $.filter(t,this.cur,false).r : $.grep(this.cur,function(a){return a != t;}); return this; }, add: function(t) { this.cur = $.merge( this.cur, t.constructor == String ? $.Select(t) : t.constructor == Array ? t : [t] ); return this; }, is: function(t) { return $.filter(t,this.cur).r.length > 0; }, isNot: function(t) { return !this.s(t); } }; // TODO: Remove need to return this for ( var i in $.fn ) { if ( self[i] !== null ) { self["_"+i] = self[i]; } self[i] = $.fn[i]; } if ( typeof Prototype != "undefined" && $a.constructor != String ) { if ( $c ) { $a = self.get(); } for ( var k in self ) {(function(j){ try { if ( $a[j] === null ) { $a[j] = function() { return $.apply(self,self[j],arguments); }; } } catch(e) {} })(k);} return $a; } return self;}
for ( var i in a )
for ( var i = 0; i < a.length; i++ )
function $(a,c) { var $a = a || $.context || document; var $c = c && c.$jquery && c.get(0) || c; // Since we're using Prototype's $ function, // be nice and have backwards compatability if ( typeof Prototype != "undefined" ) { if ( $a.constructor == String ) { var re = new RegExp( "[^a-zA-Z0-9_-]" ); if ( !re.test($a) ) { $c = $c && $c.documentElement || document; if ( $c.getElementsByTagName($a).length == 0 ) { var obj = $c.getElementById($a); if ( obj != null ) return obj; } } } else if ( $a.constructor == Array ) { return $.map( $a, function(b){ if ( b.constructor == String ) return document.getElementById(b); return b; }); } } // Load Dynamic Function List var self = { cur: $.Select($a,$c), $jquery: "$Rev$", // The only two getters size: function() {return this.get().length}, get: function(i) { return i == null ? this.cur : this.cur[i]; }, each: function(f) { for ( var i = 0; i < this.size(); i++ ) $.apply( this.get(i), f, [i] ); return this; }, set: function(a,b) { return this.each(function(){ if ( b == null ) for ( var j in a ) $.attr(this,j,a[j]); else $.attr(this,a,b); }); }, html: function(h) { return h == null && this.size() ? this.get(0).innerHTML : this.set( "innerHTML", h ); }, val: function(h) { return h == null && this.size() ? this.get(0).value : this.set( "value", h ); }, css: function(a,b) { return this.each(function(){ if ( !b ) for ( var j in a ) $.attr(this.style,j,a[j]); else $.attr(this.style,a,b); }); }, toggle: function() { return this.each(function(){ var d = $.getCSS(this,"display"); if ( d == "none" || d == '' ) $(this).show(); else $(this).hide(); }); }, show: function(a) { return this.each(function(){ this.style.display = this.$$oldblock ? this.$$oldblock : ''; if ( $.getCSS(this,"display") == "none" ) this.style.display = 'block'; }); }, hide: function(a) { return this.each(function(){ this.$$oldblock = $.getCSS(this,"display"); if ( this.$$oldblock == "none" ) this.$$oldblock = 'block'; this.style.display = 'none'; }); }, addClass: function(c) { return this.each(function(){ if ($.hasWord(this,c)) return; this.className += ( this.className.length > 0 ? " " : "" ) + c; }); }, removeClass: function(c) { return this.each(function(){ this.className = c == null ? '' : this.className.replace( new RegExp('(^|\\s*\\b[^-])'+c+'($|\\b(?=[^-]))', 'g'), ''); }); }, // TODO: Optomize toggleClass: function(c) { return this.each(function(){ if ($.hasWord(this,c)) this.className = this.className.replace( new RegExp('(\\s*\\b[^-])'+c+'($|\\b(?=[^-]))', 'g'), ''); else this.className += ( this.className.length > 0 ? " " : "" ) + c; }); }, remove: function() { this.each(function(){this.parentNode.removeChild( this );}); this.cur = []; return this; }, wrap: function() { var a = $.clean(arguments); return this.each(function(){ var b = a[0].cloneNode(true); this.parentNode.insertBefore( b, this ); while ( b.firstChild ) b = b.firstChild; b.appendChild( this ); }); }, append: function() { var clone = this.size() > 1; var a = $.clean(arguments); return this.each(function(){ for ( var i in a ) this.appendChild( clone ? a[i].cloneNode(true) : a[i] ); }); }, appendTo: function() { var a = arguments; return this.each(function(){ for ( var i = 0; i < a.length; i++ ) $(a[i]).append( this ); }); }, prepend: function() { var clone = this.size() > 1; var a = $.clean(arguments); return this.each(function(){ for ( var i = a.length - 1; i >= 0; i-- ) this.insertBefore( clone ? a[i].cloneNode(true) : a[i], this.firstChild ); }); }, before: function() { var clone = this.size() > 1; var a = $.clean(arguments); return this.each(function(){ for ( var i in a ) this.parentNode.insertBefore( clone ? a[i].cloneNode(true) : a[i], this ); }); }, after: function() { var clone = this.size() > 1; var a = $.clean(arguments); return this.each(function(){ for ( var i = a.length - 1; i >= 0; i-- ) this.parentNode.insertBefore( clone ? a[i].cloneNode(true) : a[i], this.nextSibling ); }); }, empty: function() { return this.each(function(){ while ( this.firstChild ) this.removeChild( this.firstChild ); }); }, bind: function(t,f) { return this.each(function(){addEvent(this,t,f);}); }, unbind: function(t,f) { return this.each(function(){removeEvent(this,t,f);}); }, trigger: function(t) { return this.each(function(){triggerEvent(this,t);}); }, find: function(t) { var old = [], ret = []; this.each(function(){ old[old.length] = this; ret = $.merge( ret, $.Select(t,this) ); }); this.old = old; this.cur = ret; return this; }, end: function() { this.cur = this.old; return this; }, parent: function(a) { this.cur = $.map(this.cur,function(d){ return d.parentNode; }); if ( a ) this.cur = $.filter(a,this.cur).r; return this; }, parents: function(a) { this.cur = $.map(this.cur,$.parents); if ( a ) this.cur = $.filter(a,this.cur).r; return this; }, siblings: function(a) { // Incorrect, need to exclude current element this.cur = $.map(this.cur,$.sibling); if ( a ) this.cur = $.filter(a,this.cur).r; return this; }, filter: function(t) { this.cur = $.filter(t,this.cur).r; return this; }, not: function(t) { this.cur = t.constructor == String ? $.filter(t,this.cur,false).r : $.grep(this.cur,function(a){return a != t;}); return this; }, add: function(t) { this.cur = $.merge( this.cur, t.constructor == String ? $.Select(t) : t.constructor == Array ? t : [t] ); return this; }, is: function(t) { return $.filter(t,this.cur).r.length > 0; }, isNot: function(t) { return !this.s(t); } }; // TODO: Remove need to return this for ( var i in $.fn ) { if ( self[i] != null ) self["_"+i] = self[i]; self[i] = $.fn[i]; } if ( typeof Prototype != "undefined" && $a.constructor != String ) { if ( $c ) $a = self.get(); for ( var i in self ) {(function(j){ try { if ( $a[j] == null ) { $a[j] = function() { return $.apply(self,self[j],arguments); }; } } catch(e) {} })(i);} return $a; } return self;}
this.cur = $.map(this.cur,$.sibling); if ( a ) this.cur = $.filter(a,this.cur).r; return this; }, parents: function(a) {
this.cur = $.map(this.cur,$.sibling); if ( a ) this.cur = $.filter(a,this.cur).r;
function $(a,c) { var $a = a || $.context || document; var $c = c && c.$jquery && c.get(0) || c; // Since we're using Prototype's $ function, // be nice and have backwards compatability if ( typeof Prototype != "undefined" ) { if ( $a.constructor == String ) { var re = new RegExp( "[^a-zA-Z0-9_-]" ); if ( !re.test($a) ) { $c = $c && $c.documentElement || document; if ( $c.getElementsByTagName($a).length == 0 ) { var obj = $c.getElementById($a); if ( obj != null ) return obj; } } } else if ( $a.constructor == Array ) { return $.map( $a, function(b){ if ( b.constructor == String ) return document.getElementById(b); return b; }); } } // Load Dynamic Function List var self = { cur: $.Select($a,$c), $jquery: "$Rev$", // The only two getters size: function() {return this.get().length}, get: function(i) { return i == null ? this.cur : this.cur[i]; }, each: function(f) { for ( var i = 0; i < this.size(); i++ ) $.apply( this.get(i), f, [i] ); return this; }, set: function(a,b) { return this.each(function(){ if ( b == null ) for ( var j in a ) $.attr(this,j,a[j]); else $.attr(this,a,b); }); }, html: function(h) { return h == null && this.size() ? this.get(0).innerHTML : this.set( "innerHTML", h ); }, val: function(h) { return h == null && this.size() ? this.get(0).value : this.set( "value", h ); }, css: function(a,b) { return this.each(function(){ if ( !b ) for ( var j in a ) $.attr(this.style,j,a[j]); else $.attr(this.style,a,b); }); }, toggle: function() { return this.each(function(){ var d = $.getCSS(this,"display"); if ( d == "none" || d == '' ) $(this).show(); else $(this).hide(); }); }, show: function(a) { return this.each(function(){ this.style.display = this.$$oldblock ? this.$$oldblock : ''; if ( $.getCSS(this,"display") == "none" ) this.style.display = 'block'; }); }, hide: function(a) { return this.each(function(){ this.$$oldblock = $.getCSS(this,"display"); if ( this.$$oldblock == "none" ) this.$$oldblock = 'block'; this.style.display = 'none'; }); }, addClass: function(c) { return this.each(function(){ if ($.hasWord(this,c)) return; this.className += ( this.className.length > 0 ? " " : "" ) + c; }); }, removeClass: function(c) { return this.each(function(){ this.className = c == null ? '' : this.className.replace( new RegExp('(^|\\s*\\b[^-])'+c+'($|\\b(?=[^-]))', 'g'), ''); }); }, // TODO: Optomize toggleClass: function(c) { return this.each(function(){ if ($.hasWord(this,c)) this.className = this.className.replace( new RegExp('(\\s*\\b[^-])'+c+'($|\\b(?=[^-]))', 'g'), ''); else this.className += ( this.className.length > 0 ? " " : "" ) + c; }); }, remove: function() { this.each(function(){this.parentNode.removeChild( this );}); this.cur = []; return this; }, wrap: function() { var a = $.clean(arguments); return this.each(function(){ var b = a[0].cloneNode(true); this.parentNode.insertBefore( b, this ); while ( b.firstChild ) b = b.firstChild; b.appendChild( this ); }); }, append: function() { var clone = this.size() > 1; var a = $.clean(arguments); return this.each(function(){ for ( var i in a ) this.appendChild( clone ? a[i].cloneNode(true) : a[i] ); }); }, appendTo: function() { var a = arguments; return this.each(function(){ for ( var i = 0; i < a.length; i++ ) $(a[i]).append( this ); }); }, prepend: function() { var clone = this.size() > 1; var a = $.clean(arguments); return this.each(function(){ for ( var i = a.length - 1; i >= 0; i-- ) this.insertBefore( clone ? a[i].cloneNode(true) : a[i], this.firstChild ); }); }, before: function() { var clone = this.size() > 1; var a = $.clean(arguments); return this.each(function(){ for ( var i in a ) this.parentNode.insertBefore( clone ? a[i].cloneNode(true) : a[i], this ); }); }, after: function() { var clone = this.size() > 1; var a = $.clean(arguments); return this.each(function(){ for ( var i = a.length - 1; i >= 0; i-- ) this.parentNode.insertBefore( clone ? a[i].cloneNode(true) : a[i], this.nextSibling ); }); }, empty: function() { return this.each(function(){ while ( this.firstChild ) this.removeChild( this.firstChild ); }); }, bind: function(t,f) { return this.each(function(){addEvent(this,t,f);}); }, unbind: function(t,f) { return this.each(function(){removeEvent(this,t,f);}); }, trigger: function(t) { return this.each(function(){triggerEvent(this,t);}); }, find: function(t) { var old = [], ret = []; this.each(function(){ old[old.length] = this; ret = $.merge( ret, $.Select(t,this) ); }); this.old = old; this.cur = ret; return this; }, end: function() { this.cur = this.old; return this; }, parent: function(a) { this.cur = $.map(this.cur,function(d){ return d.parentNode; }); if ( a ) this.cur = $.filter(a,this.cur).r; return this; }, parents: function(a) { this.cur = $.map(this.cur,$.parents); if ( a ) this.cur = $.filter(a,this.cur).r; return this; }, siblings: function(a) { // Incorrect, need to exclude current element this.cur = $.map(this.cur,$.sibling); if ( a ) this.cur = $.filter(a,this.cur).r; return this; }, parents: function(a) { return this; }, filter: function(t) { this.cur = $.filter(t,this.cur).r; return this; }, not: function(t) { this.cur = t.constructor == String ? $.filter(t,this.cur,false).r : $.grep(this.cur,function(a){return a != t;}); return this; }, add: function(t) { this.cur = $.merge( this.cur, t.constructor == String ? $.Select(t) : t.constructor == Array ? t : [t] ); return this; }, is: function(t) { return $.filter(t,this.cur).r.length > 0; }, isNot: function(t) { return !this.s(t); } }; // TODO: Remove need to return this for ( var i in $.fn ) { if ( self[i] != null ) self["_"+i] = self[i]; self[i] = $.fn[i]; } if ( typeof Prototype != "undefined" && $a.constructor != String ) { if ( $c ) $a = self.get(); for ( var i in self ) {(function(j){ try { if ( $a[j] == null ) { $a[j] = function() { return $.apply(self,self[j],arguments); }; } } catch(e) {} })(i);} return $a; } return self;}
function $(a,c) { var $a = a || $.context || document; var $c = c && c.$jquery && c.get(0) || c; if ( typeof Prototype != "undefined" ) { if ( $a.constructor == String ) { var re = new RegExp( "[^a-zA-Z0-9_-]" ); if ( !re.test($a) ) { $c = $c && $c.documentElement || document; if ( $c.getElementsByTagName($a).length === 0 ) { var obj = $c.getElementById($a); if ( obj ) { return obj; } } } } else if ( $a.constructor == Array ) { return $.map( $a, function(b){ if ( b.constructor == String ) { return document.getElementById(b); } return b; }); } } var self = { cur: $.Select($a,$c), $jquery: "$Rev$", size: function() {return this.get().length;}, get: function(i) { return typeof i == 'undefined' ? this.cur : this.cur[i]; }, each: function(f) { for ( var i = 0; i < this.size(); i++ ) $.apply( this.get(i), f, [i] ); return this; }, set: function(a,b) { return this.each(function(){ if ( typeof b == 'undefined' ) for ( var j in a ) $.attr(this,j,a[j]); else $.attr(this,a,b); }); }, html: function(h) { return typeof h == 'undefined' && this.size() ? this.get(0).innerHTML : this.set( "innerHTML", h ); }, val: function(h) { return typeof h == 'undefined' && this.size() ? this.get(0).value : this.set( "value", h ); }, css: function(a,b) { return a.constructor != String || b ? this.each(function(){ if ( !b ) for ( var j in a ) $.attr(this.style,j,a[j]); else $.attr(this.style,a,b); }) : $.css( this.get(0), a ); }, toggle: function() { return this.each(function(){ var d = $.getCSS(this,"display"); if ( d == "none" || d === '' ) $(this).show(); else $(this).hide(); }); }, show: function(a) { return this.each(function(){ this.style.display = this.$$oldblock ? this.$$oldblock : ''; if ( $.getCSS(this,"display") == "none" ) this.style.display = 'block'; }); }, hide: function(a) { return this.each(function(){ this.$$oldblock = $.getCSS(this,"display"); if ( this.$$oldblock == "none" ) this.$$oldblock = 'block'; this.style.display = 'none'; }); }, addClass: function(c) { return this.each(function(){ if ($.hasWord(this,c)) return; this.className += ( this.className.length > 0 ? " " : "" ) + c; }); }, removeClass: function(c) { return this.each(function(){ this.className = !c ? '' : this.className.replace( new RegExp('(^|\\s*\\b[^-])'+c+'($|\\b(?=[^-]))', 'g'), ''); }); }, toggleClass: function(c) { return this.each(function(){ if ($.hasWord(this,c)) this.className = this.className.replace( new RegExp('(\\s*\\b[^-])'+c+'($|\\b(?=[^-]))', 'g'), ''); else this.className += ( this.className.length > 0 ? " " : "" ) + c; }); }, remove: function() { this.each(function(){this.parentNode.removeChild( this );}); this.cur = []; return this; }, wrap: function() { var a = $.clean(arguments); return this.each(function(){ var b = a[0].cloneNode(true); this.parentNode.insertBefore( b, this ); while ( b.firstChild ) b = b.firstChild; b.appendChild( this ); }); }, append: function() { var clone = this.size() > 1; var a = $.clean(arguments); return this.domManip(function(){ for ( var i = 0; i < a.length; i++ ) this.appendChild( clone ? a[i].cloneNode(true) : a[i] ); }); }, appendTo: function() { var a = arguments; return this.each(function(){ for ( var i = 0; i < a.length; i++ ) $(a[i]).append( this ); }); }, prepend: function() { var clone = this.size() > 1; var a = $.clean(arguments); return this.domManip(function(){ for ( var i = a.length - 1; i >= 0; i-- ) this.insertBefore( clone ? a[i].cloneNode(true) : a[i], this.firstChild ); }); }, before: function() { var clone = this.size() > 1; var a = $.clean(arguments); return this.each(function(){ for ( var i = 0; i < a.length; i++ ) this.parentNode.insertBefore( clone ? a[i].cloneNode(true) : a[i], this ); }); }, after: function() { var clone = this.size() > 1; var a = $.clean(arguments); return this.each(function(){ for ( var i = a.length - 1; i >= 0; i-- ) this.parentNode.insertBefore( clone ? a[i].cloneNode(true) : a[i], this.nextSibling ); }); }, empty: function() { return this.each(function(){ while ( this.firstChild ) this.removeChild( this.firstChild ); }); }, bind: function(t,f) { return this.each(function(){$.event.add(this,t,f);}); }, unbind: function(t,f) { return this.each(function(){$.event.remove(this,t,f);}); }, trigger: function(t) { return this.each(function(){$.event.trigger(this,t);}); }, find: function(t) { var old = [], ret = []; this.each(function(){ old[old.length] = this; ret = $.merge( ret, $.Select(t,this) ); }); this.old = old; this.cur = ret; return this; }, end: function() { this.cur = this.old; return this; }, parent: function(a) { this.cur = $.map(this.cur,function(d){ return d.parentNode; }); if ( a ) this.cur = $.filter(a,this.cur).r; return this; }, parents: function(a) { this.cur = $.map(this.cur,$.parents); if ( a ) this.cur = $.filter(a,this.cur).r; return this; }, siblings: function(a) { this.cur = $.map(this.cur,$.sibling); if ( a ) this.cur = $.filter(a,this.cur).r; return this; }, filter: function(t) { this.cur = $.filter(t,this.cur).r; return this; }, not: function(t) { this.cur = t.constructor == String ? $.filter(t,this.cur,false).r : $.grep(this.cur,function(a){return a != t;}); return this; }, add: function(t) { this.cur = $.merge( this.cur, t.constructor == String ? $.Select(t) : t.constructor == Array ? t : [t] ); return this; }, is: function(t) { return $.filter(t,this.cur).r.length > 0; }, isNot: function(t) { return !this.s(t); }
var $ = function(a,c) { return new jQuery(a,c);
function $(a,c) { var $a = a || $.context || document; var $c = c && c.$jquery && c.get(0) || c; // Since we're using Prototype's $ function, // be nice and have backwards compatability if ( typeof Prototype != "undefined" ) { if ( $a.constructor == String ) { var re = new RegExp( "[^a-zA-Z0-9_-]" ); if ( !re.test($a) ) { $c = $c && $c.documentElement || document; if ( $c.getElementsByTagName($a).length === 0 ) { var obj = $c.getElementById($a); if ( obj ) { return obj; } } } } else if ( $a.constructor == Array ) { return $.map( $a, function(b){ if ( b.constructor == String ) { return document.getElementById(b); } return b; }); } } // Load Dynamic Function List var self = { cur: $.Select($a,$c), $jquery: "$Rev$", // The only two getters size: function() {return this.get().length;}, get: function(i) { return typeof i == 'undefined' ? this.cur : this.cur[i]; }, each: function(f) { for ( var i = 0; i < this.size(); i++ ) $.apply( this.get(i), f, [i] ); return this; }, set: function(a,b) { return this.each(function(){ if ( typeof b == 'undefined' ) for ( var j in a ) $.attr(this,j,a[j]); else $.attr(this,a,b); }); }, html: function(h) { return typeof h == 'undefined' && this.size() ? this.get(0).innerHTML : this.set( "innerHTML", h ); }, val: function(h) { return typeof h == 'undefined' && this.size() ? this.get(0).value : this.set( "value", h ); }, css: function(a,b) { return a.constructor != String || b ? this.each(function(){ if ( !b ) for ( var j in a ) $.attr(this.style,j,a[j]); else $.attr(this.style,a,b); }) : $.css( this.get(0), a ); }, toggle: function() { return this.each(function(){ var d = $.getCSS(this,"display"); if ( d == "none" || d === '' ) $(this).show(); else $(this).hide(); }); }, show: function(a) { return this.each(function(){ this.style.display = this.$$oldblock ? this.$$oldblock : ''; if ( $.getCSS(this,"display") == "none" ) this.style.display = 'block'; }); }, hide: function(a) { return this.each(function(){ this.$$oldblock = $.getCSS(this,"display"); if ( this.$$oldblock == "none" ) this.$$oldblock = 'block'; this.style.display = 'none'; }); }, addClass: function(c) { return this.each(function(){ if ($.hasWord(this,c)) return; this.className += ( this.className.length > 0 ? " " : "" ) + c; }); }, removeClass: function(c) { return this.each(function(){ this.className = !c ? '' : this.className.replace( new RegExp('(^|\\s*\\b[^-])'+c+'($|\\b(?=[^-]))', 'g'), ''); }); }, // TODO: Optomize toggleClass: function(c) { return this.each(function(){ if ($.hasWord(this,c)) this.className = this.className.replace( new RegExp('(\\s*\\b[^-])'+c+'($|\\b(?=[^-]))', 'g'), ''); else this.className += ( this.className.length > 0 ? " " : "" ) + c; }); }, remove: function() { this.each(function(){this.parentNode.removeChild( this );}); this.cur = []; return this; }, wrap: function() { var a = $.clean(arguments); return this.each(function(){ var b = a[0].cloneNode(true); this.parentNode.insertBefore( b, this ); while ( b.firstChild ) b = b.firstChild; b.appendChild( this ); }); }, append: function() { var clone = this.size() > 1; var a = $.clean(arguments); return this.domManip(function(){ for ( var i = 0; i < a.length; i++ ) this.appendChild( clone ? a[i].cloneNode(true) : a[i] ); }); }, appendTo: function() { var a = arguments; return this.each(function(){ for ( var i = 0; i < a.length; i++ ) $(a[i]).append( this ); }); }, prepend: function() { var clone = this.size() > 1; var a = $.clean(arguments); return this.domManip(function(){ for ( var i = a.length - 1; i >= 0; i-- ) this.insertBefore( clone ? a[i].cloneNode(true) : a[i], this.firstChild ); }); }, before: function() { var clone = this.size() > 1; var a = $.clean(arguments); return this.each(function(){ for ( var i = 0; i < a.length; i++ ) this.parentNode.insertBefore( clone ? a[i].cloneNode(true) : a[i], this ); }); }, after: function() { var clone = this.size() > 1; var a = $.clean(arguments); return this.each(function(){ for ( var i = a.length - 1; i >= 0; i-- ) this.parentNode.insertBefore( clone ? a[i].cloneNode(true) : a[i], this.nextSibling ); }); }, empty: function() { return this.each(function(){ while ( this.firstChild ) this.removeChild( this.firstChild ); }); }, bind: function(t,f) { return this.each(function(){$.event.add(this,t,f);}); }, unbind: function(t,f) { return this.each(function(){$.event.remove(this,t,f);}); }, trigger: function(t) { return this.each(function(){$.event.trigger(this,t);}); }, find: function(t) { var old = [], ret = []; this.each(function(){ old[old.length] = this; ret = $.merge( ret, $.Select(t,this) ); }); this.old = old; this.cur = ret; return this; }, end: function() { this.cur = this.old; return this; }, parent: function(a) { this.cur = $.map(this.cur,function(d){ return d.parentNode; }); if ( a ) this.cur = $.filter(a,this.cur).r; return this; }, parents: function(a) { this.cur = $.map(this.cur,$.parents); if ( a ) this.cur = $.filter(a,this.cur).r; return this; }, siblings: function(a) { // Incorrect, need to exclude current element this.cur = $.map(this.cur,$.sibling); if ( a ) this.cur = $.filter(a,this.cur).r; return this; }, filter: function(t) { this.cur = $.filter(t,this.cur).r; return this; }, not: function(t) { this.cur = t.constructor == String ? $.filter(t,this.cur,false).r : $.grep(this.cur,function(a){return a != t;}); return this; }, add: function(t) { this.cur = $.merge( this.cur, t.constructor == String ? $.Select(t) : t.constructor == Array ? t : [t] ); return this; }, is: function(t) { return $.filter(t,this.cur).r.length > 0; }, isNot: function(t) { return !this.s(t); } }; // TODO: Remove need to return this for ( var i in $.fn ) { if ( self[i] !== null ) self["_"+i] = self[i]; self[i] = $.fn[i]; } if ( typeof Prototype != "undefined" && $a.constructor != String ) { if ( $c ) $a = self.get(); for ( var k in self ) {(function(j){ try { if ( !$a[j] ) $a[j] = function() { return $.apply(self,self[j],arguments); }; } catch(e) {} })(k);} return $a; } return self;}
for ( var i in $.fn ) { if ( self[i] !== null ) self["_"+i] = self[i]; self[i] = $.fn[i]; } if ( typeof Prototype != "undefined" && $a.constructor != String ) { if ( $c ) $a = self.get(); for ( var k in self ) {(function(j){ try { if ( !$a[j] ) $a[j] = function() { return $.apply(self,self[j],arguments); }; } catch(e) {} })(k);} return $a; } return self; }
function $(a,c) { var $a = a || $.context || document; var $c = c && c.$jquery && c.get(0) || c; // Since we're using Prototype's $ function, // be nice and have backwards compatability if ( typeof Prototype != "undefined" ) { if ( $a.constructor == String ) { var re = new RegExp( "[^a-zA-Z0-9_-]" ); if ( !re.test($a) ) { $c = $c && $c.documentElement || document; if ( $c.getElementsByTagName($a).length === 0 ) { var obj = $c.getElementById($a); if ( obj ) { return obj; } } } } else if ( $a.constructor == Array ) { return $.map( $a, function(b){ if ( b.constructor == String ) { return document.getElementById(b); } return b; }); } } // Load Dynamic Function List var self = { cur: $.Select($a,$c), $jquery: "$Rev$", // The only two getters size: function() {return this.get().length;}, get: function(i) { return typeof i == 'undefined' ? this.cur : this.cur[i]; }, each: function(f) { for ( var i = 0; i < this.size(); i++ ) $.apply( this.get(i), f, [i] ); return this; }, set: function(a,b) { return this.each(function(){ if ( typeof b == 'undefined' ) for ( var j in a ) $.attr(this,j,a[j]); else $.attr(this,a,b); }); }, html: function(h) { return typeof h == 'undefined' && this.size() ? this.get(0).innerHTML : this.set( "innerHTML", h ); }, val: function(h) { return typeof h == 'undefined' && this.size() ? this.get(0).value : this.set( "value", h ); }, css: function(a,b) { return a.constructor != String || b ? this.each(function(){ if ( !b ) for ( var j in a ) $.attr(this.style,j,a[j]); else $.attr(this.style,a,b); }) : $.css( this.get(0), a ); }, toggle: function() { return this.each(function(){ var d = $.getCSS(this,"display"); if ( d == "none" || d === '' ) $(this).show(); else $(this).hide(); }); }, show: function(a) { return this.each(function(){ this.style.display = this.$$oldblock ? this.$$oldblock : ''; if ( $.getCSS(this,"display") == "none" ) this.style.display = 'block'; }); }, hide: function(a) { return this.each(function(){ this.$$oldblock = $.getCSS(this,"display"); if ( this.$$oldblock == "none" ) this.$$oldblock = 'block'; this.style.display = 'none'; }); }, addClass: function(c) { return this.each(function(){ if ($.hasWord(this,c)) return; this.className += ( this.className.length > 0 ? " " : "" ) + c; }); }, removeClass: function(c) { return this.each(function(){ this.className = !c ? '' : this.className.replace( new RegExp('(^|\\s*\\b[^-])'+c+'($|\\b(?=[^-]))', 'g'), ''); }); }, // TODO: Optomize toggleClass: function(c) { return this.each(function(){ if ($.hasWord(this,c)) this.className = this.className.replace( new RegExp('(\\s*\\b[^-])'+c+'($|\\b(?=[^-]))', 'g'), ''); else this.className += ( this.className.length > 0 ? " " : "" ) + c; }); }, remove: function() { this.each(function(){this.parentNode.removeChild( this );}); this.cur = []; return this; }, wrap: function() { var a = $.clean(arguments); return this.each(function(){ var b = a[0].cloneNode(true); this.parentNode.insertBefore( b, this ); while ( b.firstChild ) b = b.firstChild; b.appendChild( this ); }); }, append: function() { var clone = this.size() > 1; var a = $.clean(arguments); return this.domManip(function(){ for ( var i = 0; i < a.length; i++ ) this.appendChild( clone ? a[i].cloneNode(true) : a[i] ); }); }, appendTo: function() { var a = arguments; return this.each(function(){ for ( var i = 0; i < a.length; i++ ) $(a[i]).append( this ); }); }, prepend: function() { var clone = this.size() > 1; var a = $.clean(arguments); return this.domManip(function(){ for ( var i = a.length - 1; i >= 0; i-- ) this.insertBefore( clone ? a[i].cloneNode(true) : a[i], this.firstChild ); }); }, before: function() { var clone = this.size() > 1; var a = $.clean(arguments); return this.each(function(){ for ( var i = 0; i < a.length; i++ ) this.parentNode.insertBefore( clone ? a[i].cloneNode(true) : a[i], this ); }); }, after: function() { var clone = this.size() > 1; var a = $.clean(arguments); return this.each(function(){ for ( var i = a.length - 1; i >= 0; i-- ) this.parentNode.insertBefore( clone ? a[i].cloneNode(true) : a[i], this.nextSibling ); }); }, empty: function() { return this.each(function(){ while ( this.firstChild ) this.removeChild( this.firstChild ); }); }, bind: function(t,f) { return this.each(function(){$.event.add(this,t,f);}); }, unbind: function(t,f) { return this.each(function(){$.event.remove(this,t,f);}); }, trigger: function(t) { return this.each(function(){$.event.trigger(this,t);}); }, find: function(t) { var old = [], ret = []; this.each(function(){ old[old.length] = this; ret = $.merge( ret, $.Select(t,this) ); }); this.old = old; this.cur = ret; return this; }, end: function() { this.cur = this.old; return this; }, parent: function(a) { this.cur = $.map(this.cur,function(d){ return d.parentNode; }); if ( a ) this.cur = $.filter(a,this.cur).r; return this; }, parents: function(a) { this.cur = $.map(this.cur,$.parents); if ( a ) this.cur = $.filter(a,this.cur).r; return this; }, siblings: function(a) { // Incorrect, need to exclude current element this.cur = $.map(this.cur,$.sibling); if ( a ) this.cur = $.filter(a,this.cur).r; return this; }, filter: function(t) { this.cur = $.filter(t,this.cur).r; return this; }, not: function(t) { this.cur = t.constructor == String ? $.filter(t,this.cur,false).r : $.grep(this.cur,function(a){return a != t;}); return this; }, add: function(t) { this.cur = $.merge( this.cur, t.constructor == String ? $.Select(t) : t.constructor == Array ? t : [t] ); return this; }, is: function(t) { return $.filter(t,this.cur).r.length > 0; }, isNot: function(t) { return !this.s(t); } }; // TODO: Remove need to return this for ( var i in $.fn ) { if ( self[i] !== null ) self["_"+i] = self[i]; self[i] = $.fn[i]; } if ( typeof Prototype != "undefined" && $a.constructor != String ) { if ( $c ) $a = self.get(); for ( var k in self ) {(function(j){ try { if ( !$a[j] ) $a[j] = function() { return $.apply(self,self[j],arguments); }; } catch(e) {} })(k);} return $a; } return self;}
return new Range(start, end, exclusive);
return new ObjectRange(start, end, exclusive);
var $R = function(start, end, exclusive) { return new Range(start, end, exclusive);}
blocking = true; $.get('index.html', function(content) { var div = $(document.createElement('div')).html(content) .find('[@id=main]').html(); $('#main').html(div); blocking = false; process(); });
var runTime = new Date() - startTime; $('body').append('<br/>Tests completed in ' + runTime + ' milliseconds.');
synchronize(function() { blocking = true; $.get('index.html', function(content) { var div = $(document.createElement('div')).html(content) // search for main div .find('[@id=main]').html(); $('#main').html(div); blocking = false; process(); }); });
return a && b && a.constructor == Function && b.constructor == Function ? this.click(function(e){
return typeof a[0] == "function" && typeof a[1] == "function" ? this.click(function(e) {
return a && b && a.constructor == Function && b.constructor == Function ? this.click(function(e){ // Figure out which function to execute this.last = this.last == a ? b : a; // Make sure that clicks stop e.preventDefault(); // and execute the function return this.last.apply( this, [e] ) || false; }) :
this.last = this.last == a ? b : a;
this.lastToggle = this.lastToggle == 0 ? 1 : 0;
return a && b && a.constructor == Function && b.constructor == Function ? this.click(function(e){ // Figure out which function to execute this.last = this.last == a ? b : a; // Make sure that clicks stop e.preventDefault(); // and execute the function return this.last.apply( this, [e] ) || false; }) :
return this.last.apply( this, [e] ) || false;
return a[this.lastToggle].apply( this, [e] ) || false;
return a && b && a.constructor == Function && b.constructor == Function ? this.click(function(e){ // Figure out which function to execute this.last = this.last == a ? b : a; // Make sure that clicks stop e.preventDefault(); // and execute the function return this.last.apply( this, [e] ) || false; }) :
function (str, p1, part, s) { return (parseInt(part) + 1) + ".";
function (str, dot, dotNum, noDot, noDotNum, pos, s) { return (parseInt(str) + 1) + (dot ? "." : "");
function (str, p1, part, s) { return (parseInt(part) + 1) + "."; });
"windowing.js"
"window-manager.js"
(function() { var javascriptFiles = [ "platform.js", "debug.js", "xmlhttp.js", "json.js", "dom.js", "graphics.js", "ajax.js", "history.js", "windowing.js" ]; var cssFiles = [ ]; var url = SimileAjax.findScript(document, "ajax-api.js"); if (url == null) { SimileAjax.error = new Error("Failed to derive URL prefix for Simile Ajax API code files"); return; } SimileAjax.urlPrefix = url.substr(0, url.indexOf("ajax-api.js")); var includeJavascriptFile = function(filename) { SimileAjax.includeJavascriptFile(document, SimileAjax.urlPrefix + "scripts/" + filename); }; var includeCssFile = function(filename) { SimileAjax.includeCssFile(document, SimileAjax.urlPrefix + "styles/" + filename); } /* * Include non-localized files */ for (var i = 0; i < javascriptFiles.length; i++) { includeJavascriptFile(javascriptFiles[i]); } for (var i = 0; i < cssFiles.length; i++) { includeCssFile(cssFiles[i]); } SimileAjax.loaded = true; })();
alert("Caught exception: " + msg2 + "\n\nDetails: " + e2.description);
if (!SimileAjax.Debug.silent) { alert("Caught exception: " + msg2 + "\n\nDetails: " + e2.description); }
function(msg2, e2) { alert("Caught exception: " + msg2 + "\n\nDetails: " + e2.description); } :
expect(1);
expect(2);
test("load(String, Object, Function) - simple: inject text into DOM", function() { expect(1); stop(); $('#first').load("data/name.php", function() { ok( $('#first').text() == 'ERROR', 'Check if content was injected into the DOM' ); start(); });});
ok( $('#first').text() == 'ERROR', 'Check if content was injected into the DOM' );
ok( /^ERROR/.test($('#first').text()), 'Check if content was injected into the DOM' );
test("load(String, Object, Function) - simple: inject text into DOM", function() { expect(1); stop(); $('#first').load("data/name.php", function() { ok( $('#first').text() == 'ERROR', 'Check if content was injected into the DOM' ); start(); });});
$.xml(mth, url, $.param(this.vars), function(r) {
$.ajax(mth, url, $.param(this.vars), function(r) {
$.xml(mth, url, $.param(this.vars), function(r) { eval(r.responseText); });
js = js.replace(/&lt;/g, "<").replace(/&gt;/g, ">");
js = js.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&");
$.get(files[num],function(js){ js = js.replace(/&lt;/g, "<").replace(/&gt;/g, ">"); try { eval(js); } catch(e) { Test.push( [ false, "Died on test #" + Test.length + ": " + e ] ); } var good = 0, bad = 0; var ol = document.createElement("ol"); var li = "", state = "pass"; for ( var i = 0; i < Test.length; i++ ) { var li = document.createElement("li"); li.className = Test[i][0] ? "pass" : "fail"; li.innerHTML = Test[i][1]; ol.appendChild( li ); if ( !Test[i][0] ) { state = "fail"; bad++; } else good++; } var li = document.createElement("li"); li.className = state; var b = document.createElement("b"); b.innerHTML = files[num] + " <b style='color:black;'>(<b class='fail'>" + bad + "</b>, <b class='pass'>" + good + "</b>, " + Test.length + ")</b>"; b.onclick = function(){ var n = this.nextSibling; if ( jQuery.css( n, "display" ) == "none" ) n.style.display = "block"; else n.style.display = "none"; }; li.appendChild( b ); li.appendChild( ol ); document.getElementById("tests").appendChild( li ); Test = []; if ( ++num < files.length ) runTest( files, num ); });
e[ prop[p] ]();
e[ prop[p] ]( prop );
return this.queue(function(){ var i = 0; for ( var p in prop ) { var e = new jQuery.fx( this, jQuery.speed(speed,callback,i++), p ); if ( prop[p].constructor == Number ) e.custom( e.cur(), prop[p] ); else e[ prop[p] ](); } });
return handler.call(obj, elmt2, evt, target);
return obj[handlerName].call(obj, elmt2, evt, target);
SimileAjax.DOM.registerEvent(elmt, eventName, function(elmt2, evt, target) { return handler.call(obj, elmt2, evt, target); });
$.apply( self, callback, [res.responseText] );
callback.apply( self, [res.responseText] );
$.ajax( type, url, params,function(res){ // Inject the HTML into all the matched elements self.html(res.responseText).each(function(){ // If a callback function was provided if ( callback && callback.constructor == Function ) // Execute it within the context of the element $.apply( self, callback, [res.responseText] ); }); // Execute all the scripts inside of the newly-injected HTML $("script", self).each(function(){ eval( this.text || this.textContent || this.innerHTML || ""); }); });
$.xml( "GET", url, null, function(r) { if ( ret ) { ret( $.httpData(r,type) ); }
$.ajax( type, url, params,function(res){ self.html(res.responseText).each(function(){ if ( callback && callback.constructor == Function ) $.apply( self, callback, [res.responseText] ); }); $("script", self).each(function(){ eval( this.text || this.textContent || this.innerHTML || ""); });
$.xml( "GET", url, null, function(r) { if ( ret ) { ret( $.httpData(r,type) ); } });
var handler = function() {return function(){view.onCDReal(event.target)}};
view.pending = setTimeout(function(){view.showDetail(_e);}, 500);
var handler = function() {return function(){view.onCDReal(event.target)}};
var url = SimileAjax.findScript("ajax-api.js");
var url = SimileAjax.findScript(document, "ajax-api.js");
(function() { var javascriptFiles = [ "ajax.js", "platform.js", "debug.js", "xmlhttp.js", "dom.js", "graphics.js" ]; var cssFiles = [ ]; var url = SimileAjax.findScript("ajax-api.js"); if (url == null) { SimileAjax.error = new Error("Failed to derive URL prefix for Simile Ajax API code files"); return; } SimileAjax.urlPrefix = url.substr(0, url.indexOf("ajax-api.js")); var includeJavascriptFile = function(filename) { SimileAjax.includeJavascriptFile(SimileAjax.urlPrefix + "scripts/" + filename); }; var includeCssFile = function(filename) { SimileAjax.includeCssFile(SimileAjax.urlPrefix + "styles/" + filename); } /* * Include non-localized files */ for (var i = 0; i < javascriptFiles.length; i++) { includeJavascriptFile(javascriptFiles[i]); } for (var i = 0; i < cssFiles.length; i++) { includeCssFile(cssFiles[i]); } SimileAjax.loaded = true; })();
SimileAjax.includeJavascriptFile(SimileAjax.urlPrefix + "scripts/" + filename);
SimileAjax.includeJavascriptFile(document, SimileAjax.urlPrefix + "scripts/" + filename);
(function() { var javascriptFiles = [ "ajax.js", "platform.js", "debug.js", "xmlhttp.js", "dom.js", "graphics.js" ]; var cssFiles = [ ]; var url = SimileAjax.findScript("ajax-api.js"); if (url == null) { SimileAjax.error = new Error("Failed to derive URL prefix for Simile Ajax API code files"); return; } SimileAjax.urlPrefix = url.substr(0, url.indexOf("ajax-api.js")); var includeJavascriptFile = function(filename) { SimileAjax.includeJavascriptFile(SimileAjax.urlPrefix + "scripts/" + filename); }; var includeCssFile = function(filename) { SimileAjax.includeCssFile(SimileAjax.urlPrefix + "styles/" + filename); } /* * Include non-localized files */ for (var i = 0; i < javascriptFiles.length; i++) { includeJavascriptFile(javascriptFiles[i]); } for (var i = 0; i < cssFiles.length; i++) { includeCssFile(cssFiles[i]); } SimileAjax.loaded = true; })();
SimileAjax.includeCssFile(SimileAjax.urlPrefix + "styles/" + filename);
SimileAjax.includeCssFile(document, SimileAjax.urlPrefix + "styles/" + filename);
(function() { var javascriptFiles = [ "ajax.js", "platform.js", "debug.js", "xmlhttp.js", "dom.js", "graphics.js" ]; var cssFiles = [ ]; var url = SimileAjax.findScript("ajax-api.js"); if (url == null) { SimileAjax.error = new Error("Failed to derive URL prefix for Simile Ajax API code files"); return; } SimileAjax.urlPrefix = url.substr(0, url.indexOf("ajax-api.js")); var includeJavascriptFile = function(filename) { SimileAjax.includeJavascriptFile(SimileAjax.urlPrefix + "scripts/" + filename); }; var includeCssFile = function(filename) { SimileAjax.includeCssFile(SimileAjax.urlPrefix + "styles/" + filename); } /* * Include non-localized files */ for (var i = 0; i < javascriptFiles.length; i++) { includeJavascriptFile(javascriptFiles[i]); } for (var i = 0; i < cssFiles.length; i++) { includeCssFile(cssFiles[i]); } SimileAjax.loaded = true; })();
setTimeout(function(){ y.overflow = z.oo; if(y.height=="0px"||y.width=="0px")z.ss("none"); $.setAuto( z.el, "height" ); $.setAuto( z.el, "width" ); if(z.o.onComplete.constructor == Function){z.el.$_ = z.o.onComplete;z.el.$_();} },13);
return a ? this.each(function(){ new fx.FadeSize(this,o).hide(); }) : this._hide();
setTimeout(function(){ y.overflow = z.oo; if(y.height=="0px"||y.width=="0px")z.ss("none"); $.setAuto( z.el, "height" ); $.setAuto( z.el, "width" ); if(z.o.onComplete.constructor == Function){z.el.$_ = z.o.onComplete;z.el.$_();} },13);
return this.each(function(){ if ( !this.$$queue ) { this.$$queue = {}; } if ( !this.$$queue[type] ) { this.$$queue[type] = []; } this.$$queue[type].push( fn ); if ( this.$$queue[type].length == 1 ) { $.apply(this,fn);
return this.queue(function(){ var i = 0; for ( var p in prop ) { var e = new fx( this, $.speed(speed,callback,i++), p ); if ( prop[p].constructor == Number ) e.custom( e.cur(), prop[p] ); else e[ prop[p] ]();
return this.each(function(){ if ( !this.$$queue ) { this.$$queue = {}; } if ( !this.$$queue[type] ) { this.$$queue[type] = []; } this.$$queue[type].push( fn ); if ( this.$$queue[type].length == 1 ) { $.apply(this,fn); } });
toggleElem.onclick = function() {return false;};
toggleElems.each(function(toggleElem){ Event.observe(toggleElem, 'click', todoItems.toggleNextActionListing); containerElem = todoItems.findNearestParentByClassName(toggleElem, "container"); collapsedCookie = contextCollapseCookieManager.getCookie(todoItems.buildCookieName(containerElem)); if (collapsedCookie) { itemsElem = todoItems.findItemsElem(toggleElem); todoItems.collapseNextActionListing(toggleElem, itemsElem); } });
function(e2) { alert("Caught exception: " + e2.message);
function(msg2, e2) { alert("Caught exception: " + msg2 + "\n\nDetails: " + e2.description);
function(e2) { alert("Caught exception: " + e2.message); } :
test("load(String, Object, Function) - simple: inject text into DOM", function() { expect(2); stop(); $('#first').load("data/name.php", function() { ok( /^ERROR/.test($('#first').text()), 'Check if content was injected into the DOM' ); start(); });
test("serialize()", function() { expect(1); var data = $(':input').not('button').serialize(); ok( data == 'action=Test&text2=Test&radio1=on&radio2=on&check=on&=on&hidden=&foo[bar]=&name=name&=foobar&select1=&select2=3&select3=1', 'Check form serialization as query string' );
test("load(String, Object, Function) - simple: inject text into DOM", function() { expect(2); stop(); $('#first').load("data/name.php", function() { ok( /^ERROR/.test($('#first').text()), 'Check if content was injected into the DOM' ); start(); });});
this.mCompositeObservers = this.mCompositeObservers.filter( function (v) { return v != aObserver; } );
this.compCalendar.mObservers.forEach(function (o) { try { o[method].apply(o, args); } catch (e) { } });
this.mCompositeObservers = this.mCompositeObservers.filter( function (v) { return v != aObserver; } );
setTimeout(function() { drawTableInner(tbodyID, dataArray, textFuncs); }, 0);
setTimeout(function() { DWRUtil.drawTableInner(tbodyID, dataArray, textFuncs); }, 0);
setTimeout(function() { drawTableInner(tbodyID, dataArray, textFuncs); }, 0);
jQuery.ajax( type, url, params,function(res){ self.html(res.responseText).each(function(){ if ( callback && callback.constructor == Function ) callback.apply( self, [res.responseText] ); }); $("script", self).each(function(){ eval( this.text || this.textContent || this.innerHTML || ""); }); });
callback = callback || function(){};
jQuery.ajax( type, url, params,function(res){ // Inject the HTML into all the matched elements self.html(res.responseText).each(function(){ // If a callback function was provided if ( callback && callback.constructor == Function ) // Execute it within the context of the element callback.apply( self, [res.responseText] ); }); // Execute all the scripts inside of the newly-injected HTML $("script", self).each(function(){ eval( this.text || this.textContent || this.innerHTML || ""); }); });
}, batch.metadata.timeout);
}, batch.timeout);
batch.interval = setInterval(function() { clearInterval(batch.interval); DWREngine._abortRequest(batch); }, batch.metadata.timeout);
$("div.more,div.short",this.parentNode.parentNode).toggle().find("div.desc",function(){
$("div.more,div.short",this.parentNode.parentNode).toggle('slow').find("div.desc",function(){
$(document).ready(function(){ $("span.tooltip").each(function(){ if ( types[ this.innerHTML ] ) this.title = types[ this.innerHTML ]; }).ToolTipDemo('#fff'); $("a.name").click(function(){ $("div.more,div.short",this.parentNode.parentNode).toggle().find("div.desc",function(){ $(this).html( $(this).html().replace(/\n\n/g, "<br/><br/>") ); }); return false; }); $("#docs").alphaPager( 1 );});
batch.interval = setInterval(function() { DWREngine._abortRequest(batch); }, batch.timeout);
batch.interval = setInterval(function() { dwr.engine._abortRequest(batch); }, batch.timeout);
batch.interval = setInterval(function() { DWREngine._abortRequest(batch); }, batch.timeout);
var asciiBytes = aBytes.filter(function (n) {return !(0x80 & n);});
name = name.split("").filter(function (el) { return chars.indexOf(el) != -1; }).join("");
var asciiBytes = aBytes.filter(function (n) {return !(0x80 & n);});