diff --git a/app/models/form.server.model.js b/app/models/form.server.model.js index 00c21aa6..50b0151a 100644 --- a/app/models/form.server.model.js +++ b/app/models/form.server.model.js @@ -14,10 +14,10 @@ var mongoose = require('mongoose'), util = require('util'); //Mongoose Models -var FieldSchema = require('./form_field.server.model.js'), - FormSubmissionSchema = require('./form_submission.server.model.js'), +var FormSubmissionSchema = require('./form_submission.server.model.js'), + FieldSchema = require('./form_field.server.model.js'), Field = mongoose.model('Field', FieldSchema), - FormSubmission = mongoose.model('FormSubmission', FormSubmissionSchema) + FormSubmission = mongoose.model('FormSubmission', FormSubmissionSchema); var ButtonSchema = new Schema({ url: { @@ -41,7 +41,7 @@ var ButtonSchema = new Schema({ /** * Form Schema */ -var LogicJumpSchema = new Schema({ +var FormSchema = new Schema({ created: { type: Date, default: Date.now @@ -64,9 +64,10 @@ var LogicJumpSchema = new Schema({ type: String, default: '', }, - form_fields: { - type: [FieldSchema], - }, + form_fields: [Field], + //form_fields: { + // type: [FieldSchema], + //}, submissions: [{ type: Schema.Types.ObjectId, @@ -139,12 +140,42 @@ var LogicJumpSchema = new Schema({ }, font: String, backgroundImage: { type: Schema.Types.Mixed } + }, + + plugins: { + oscarhost: { + baseUrl: { + type: String, + }, + settings: { + lookupField: { + type: Schema.Types.ObjectId, + ref: 'Field' + }, + updateType: { + type: String, + enum: ['upsert', 'force_add', 'force_update', 'fetch'], + }, + fieldMap: { + type: Schema.Types.Mixed, + } + }, + auth: { + user: { + type: String, + required: true, + }, + pass: { + type: String, + required: true, + } + } + } } }); - //Delete template PDF of current Form -LogicJumpSchema.pre('remove', function (next) { +FormSchema.pre('remove', function (next) { if(this.pdf && process.env.NODE_ENV === 'development'){ //Delete template form fs.unlink(this.pdf.path, function(err){ @@ -157,7 +188,7 @@ LogicJumpSchema.pre('remove', function (next) { var _original; //Set _original -LogicJumpSchema.pre('save', function (next) { +FormSchema.pre('save', function (next) { // console.log(this.constructor.model); // console.log(FormModel); this.constructor // ≈ mongoose.model('…', FieldSchema).findById @@ -175,7 +206,7 @@ LogicJumpSchema.pre('save', function (next) { }); //Update lastModified and created everytime we save -LogicJumpSchema.pre('save', function (next) { +FormSchema.pre('save', function (next) { var now = new Date(); this.lastModified = now; if( !this.created ){ @@ -198,7 +229,7 @@ function getDeletedIndexes(needle, haystack){ } //Move PDF to permanent location after new template is uploaded -LogicJumpSchema.pre('save', function (next) { +FormSchema.pre('save', function (next) { if(this.pdf){ var that = this; async.series([ @@ -311,7 +342,7 @@ LogicJumpSchema.pre('save', function (next) { next(); }); -LogicJumpSchema.pre('save', function (next) { +FormSchema.pre('save', function (next) { // var _original = this._original; // console.log('_original\n------------'); // console.log(_original); @@ -445,21 +476,4 @@ LogicJumpSchema.pre('save', function (next) { } }); -// LogicJumpSchema.methods.generateFDFTemplate = function() { -// var _keys = _.pluck(this.form_fields, 'title'), -// _values = _.pluck(this.form_fields, 'fieldValue'); - -// _values.forEach(function(val){ -// if(val === true){ -// val = 'Yes'; -// }else if(val === false) { -// val = 'Off'; -// } -// }); - -// var jsonObj = _.zipObject(_keys, _values); - -// return jsonObj; -// }; - - mongoose.model('LogicJump', LogicJumpSchema); +mongoose.model('Form', FormSchema); diff --git a/app/models/form_field.server.model.js b/app/models/form_field.server.model.js index 21f63974..d1e0dcee 100644 --- a/app/models/form_field.server.model.js +++ b/app/models/form_field.server.model.js @@ -4,19 +4,7 @@ * Module dependencies. */ var mongoose = require('mongoose'), - Schema = mongoose.Schema, - nools = require('nools'); - -// /** -// * LogicJump Schema -// */ -// var LogicJump = new Schema({ -// [ - -// ] -// type: Schema.Types.ObjectId, -// ref: 'FormSubmission' -// }); + Schema = mongoose.Schema; /** * Question Schema @@ -124,7 +112,6 @@ function validateFormFieldType(value) { return true; } return false; -} +}; - -module.exports = FormFieldSchema; \ No newline at end of file +module.exports = FormFieldSchema; diff --git a/app/models/form_submission.server.model.js b/app/models/form_submission.server.model.js index d8f59c64..9383cce2 100644 --- a/app/models/form_submission.server.model.js +++ b/app/models/form_submission.server.model.js @@ -11,7 +11,37 @@ var mongoose = require('mongoose'), config = require('../../config/config'), path = require('path'), fs = require('fs-extra'), - FieldSchema = require('./form_field.server.model.js'); + Field = mongoose.model('Field'), + soap = require('soap'), + OscarSecurity = require('../../scripts/oscarhost/OscarSecurity'); + +var newDemoTemplate = { + "activeCount": 0, + "address": "", + "alias": "", + "anonymous": "", + "chartNo": "", + "children":"", + "citizenship":"", + "city": "", + "dateJoined": null, + "dateOfBirth": "", + "email": "", + "firstName": "", + "hin": 9146509343, + "lastName": "", + "lastUpdateDate": null, + "monthOfBirth": "", + "officialLanguage": "", + "phone": "", + "phone2": "", + "providerNo": 0, + "province": "", + "sex": "", + "spokenLanguage": "", + "postal": "", + "yearOfBirth": "" + }; /** * Form Submission Schema @@ -30,7 +60,7 @@ var FormSubmissionSchema = new Schema({ ref: 'User', required: true }, - form_fields: [Schema.Types.Mixed],//[FieldSchema], + form_fields: [Field], form: { type:Schema.Types.ObjectId, ref:'Form', @@ -59,13 +89,84 @@ var FormSubmissionSchema = new Schema({ }, percentageComplete: { type: Number, + }, + + //TODO: DAVID: Need to not have this hardcoded + oscarDemoNum: { + type: Number, } }); -//Mongoose Relationship initialization -// FormSubmissionSchema.plugin(relationship, { relationshipPathName:'form' }); +//Oscarhost API hook +FormSubmissionSchema.post('save', function (next) { + if(this.form.plugins.oscarhost.baseUrl){ + var url_login = this.form.plugins.oscarhost.baseUrl+'/LoginService?wsdl', + url_demo = this.form.plugins.oscarhost.baseUrl+'/DemographicService?wsdl'; + var options = { + ignoredNamespaces: { + namespaces: ['targetNamespace', 'typedNamespace'], + override: true + } + } + + //Generate demographics from hashmap + var generateDemo = function(formFields, conversionMap, templateDemo){ + var _generatedDemo = {}; + for(var field in formFields){ + if(templateDemo.hasOwnProperty(conversionMap[field._id])){ + var propertyName = conversionMap[field._id]; + + if(propertyName === "unparsedDOB"){ + var date = Date.parse(field.fieldValue); + generatedDemo['dateOfBirth'] = date.getDate(); + generatedDemo['yearOfBirth'] = date.getFullYear(); + generatedDemo['monthOfBirth'] = date.getMonth(); + }else{ + generatedDemo[propertyName] = field.fieldValue; + } + + } + } + return _generatedDemo; + } + + var submissionDemographic = generateDemo(this.form_fields, this.form.plugin.oscarhost.settings.fieldMap); + + async.waterfall([ + function (callback) { + //Authenticate with API + soap.createClient(url_login, options, function(err, client) { + client.login(args_login, function (err, result) { + if(err) callback(err); + callback(null, result.return); + }); + }); + }, + + function (security_obj, callback) { + //Force Add + if(this.plugins.oscarhost.settings.updateType === 'force_add'){ + soap.createClient(url_demo, options, function(err, client) { + client.setSecurity(new OscarSecurity(security_obj.securityId, security_obj.securityTokenKey) ); + + client.addDemographic({ arg0: exampleDemo }, function (err, result) { + if(err) callback(err); + + callback(null, result); + }); + }); + } + }, + + ], function(err, result) { + if(err) throw err; + console.log(result); + this.oscarDemoNum = parseInt(result.return, 10); + }); + } +}); //Check for IP Address of submitting person FormSubmissionSchema.pre('save', function (next){ @@ -79,7 +180,6 @@ FormSubmissionSchema.pre('save', function (next){ }); } } - // console.log('ipAddr check'); next(); }); @@ -108,9 +208,8 @@ FormSubmissionSchema.pre('save', function (next) { } else { next(); } - }); module.exports = FormSubmissionSchema; -// mongoose.model('FormSubmission', FormSubmissionSchema); +//mongoose.model('FormSubmission', FormSubmissionSchema); diff --git a/app/models/logic_jump.server.model.js b/app/models/logic_jump.server.model.js index 0c35a8d8..8727502a 100644 --- a/app/models/logic_jump.server.model.js +++ b/app/models/logic_jump.server.model.js @@ -6,12 +6,10 @@ var mongoose = require('mongoose'), Schema = mongoose.Schema, _ = require('lodash'), - tree = require('mongoose-tree'), - math = require('math'), - deasync = require('fibers'); + math = require('math'); -var BooleanExpresssionSchema = new Schema({ +var BooleanExpressionSchema = new Schema({ expressionString: { type: String, }, @@ -29,7 +27,7 @@ BooleanExpresssionSchema.plugin(tree, { }); */ -BooleanExpresssionSchema.methods.evaluate = function(){ +BooleanExpressionSchema.methods.evaluate = function(){ //Get headNode var headNode = math.parse(expressionString); @@ -40,7 +38,6 @@ BooleanExpresssionSchema.methods.evaluate = function(){ headNode.traverse(function (node, path, parent) { if(node.type === 'SymbolNode'){ - Fiber() mongoose.model('Field') .findOne({_id: node.name}).exec(function(err, field){ if(err) { @@ -64,9 +61,9 @@ BooleanExpresssionSchema.methods.evaluate = function(){ this.result = result; return result; -}); +}; -mongoose.model('BooleanStatement', BooleanStatementSchema); +mongoose.model('BooleanExpression', BooleanExpressionSchema); /** * Form Schema @@ -87,4 +84,5 @@ var LogicJumpSchema = new Schema({ }); +// return LogicJumpSchema; mongoose.model('LogicJump', LogicJumpSchema); diff --git a/app/tests/form.server.model.test.js b/app/tests/form.server.model.test.js index 10712674..1f67ba9f 100644 --- a/app/tests/form.server.model.test.js +++ b/app/tests/form.server.model.test.js @@ -1,189 +1,260 @@ -// 'use strict'; +'use strict'; -// /** -// * Module dependencies. -// */ -// var should = require('should'), -// mongoose = require('mongoose'), -// User = mongoose.model('User'), -// Form = mongoose.model('Form'), -// _ = require('lodash'), -// FormSubmission = mongoose.model('FormSubmission'); - -// /** -// * Globals -// */ -// var user, myForm, mySubmission; - -// /** -// * Unit tests -// */ -// describe('Form Model Unit Tests:', function() { -// beforeEach(function(done) { -// user = new User({ -// firstName: 'Full', -// lastName: 'Name', -// displayName: 'Full Name', -// email: 'test@test.com', -// username: 'username', -// password: 'password' -// }); - -// user.save(function() { -// myForm = new Form({ -// title: 'Form Title', -// admin: user, -// language: 'english', -// form_fields: [ -// {'fieldType':'textfield', 'title':'First Name', 'fieldValue': ''}, -// {'fieldType':'checkbox', 'title':'nascar', 'fieldValue': ''}, -// {'fieldType':'checkbox', 'title':'hockey', 'fieldValue': ''} -// ] -// }); - -// done(); -// }); -// }); - -// describe('Method Save', function() { -// it('should be able to save without problems', function(done) { -// return myForm.save(function(err) { -// should.not.exist(err); -// done(); -// }); -// }); - -// it('should be able to show an error when try to save without title', function(done) { -// var _form = myForm; -// _form.title = ''; - -// return _form.save(function(err) { -// should.exist(err); -// should.equal(err.errors.title.message, 'Form Title cannot be blank'); -// done(); -// }); -// }); -// }); - -// describe('Method Find', function(){ -// beforeEach(function(done){ -// myForm.save(function(err) { -// done(); -// }); -// }); -// it('should be able to findOne my form without problems', function(done) { -// return Form.findOne({_id: myForm._id}, function(err,form) { -// should.not.exist(err); -// should.exist(form); -// should.deepEqual(form.toObject(), myForm.toObject()); -// done(); -// }); -// }); -// }); +/** + * Module dependencies. + */ +var should = require('should'), + mongoose = require('mongoose'), + User = mongoose.model('User'), + Form = mongoose.model('Form'), + _ = require('lodash'), + config = require('../../config/config'), + FormSubmission = mongoose.model('FormSubmission'); -// describe('Test FormField and Submission Logic', function() { -// var new_form_fields_add1, new_form_fields_del, submission_fields, old_fields, form; +var exampleDemo = { + activeCount: 1, + unparsedDOB: '', + address: '880-9650 Velit. St.', + chartNo: '', + city: '', + dateJoined: Date.now(), + dateOfBirth: '10', + displayName: 'LITTLE, URIAH', + email: '', + familyDoctor: '', + firstName: 'Uriah F.', + hcType: 'BC', + hin: '', + hsAlertCount: 0, + lastName: 'Little', + lastUpdateDate: Date.now(), + lastUpdateUser: '', + links: '', + monthOfBirth: '05', + officialLanguage: 'English', + patientStatus: 'AC', + patientStatusDate: Date.now(), + phone: '250-', + phone2: '', + postal: "S4M 7T8", + providerNo: '4', + province: 'BC', + rosterStatus: '', + sex: 'M', + sexDesc: 'Female', + sin: '', + spokenLanguage: 'English', + title: 'MS.', + yearOfBirth: '2015' +} -// before(function(){ -// new_form_fields_add1 = _.clone(myForm.toObject().form_fields); -// new_form_fields_add1.push( -// {'fieldType':'textfield', 'title':'Last Name', 'fieldValue': ''} -// ); +/** + * Globals + */ +var user, myForm, mySubmission; -// new_form_fields_del = _.clone(myForm.toObject().form_fields); -// new_form_fields_del.splice(0, 1); +/** + * Unit tests + */ +describe('Form Model Unit Tests:', function() { + beforeEach(function(done) { + user = new User({ + firstName: 'Full', + lastName: 'Name', + displayName: 'Full Name', + email: 'test@test.com', + username: 'username', + password: 'password' + }); + + user.save(function() { + myForm = new Form({ + title: 'Form Title', + admin: user, + language: 'english', + }); + myForm.form_fields.push({fieldType:'textfield', title:'First Name'}); + myForm.form_fields.push({fieldType:'checkbox', title:'nascar'}); + myForm.form_fields.push({fieldType:'checkbox', title:'hockey'}); + + done(); + }); + }); + + describe('Method Save', function() { + it('should be able to save without problems', function(done) { + return myForm.save(function(err) { + should.not.exist(err); + done(); + }); + }); + + it('should be able to show an error when try to save without title', function(done) { + var _form = myForm; + _form.title = ''; + + return _form.save(function(err) { + should.exist(err); + should.equal(err.errors.title.message, 'Form Title cannot be blank'); + done(); + }); + }); + }); + + describe('Method Find', function(){ + beforeEach(function(done){ + myForm.save(function(err) { + done(); + }); + }); + it('should be able to findOne my form without problems', function(done) { + return Form.findOne({_id: myForm._id}, function(err,form) { + should.not.exist(err); + should.exist(form); + should.deepEqual(form.toObject(), myForm.toObject()); + done(); + }); + }); + }); + + describe('Test FormField and Submission Logic', function() { + var new_form_fields_add1, new_form_fields_del, submission_fields, old_fields, form; + + before(function(){ + new_form_fields_add1 = _.clone(myForm.toObject().form_fields); + new_form_fields_add1.push( + {'fieldType':'textfield', 'title':'Last Name', 'fieldValue': ''} + ); + + new_form_fields_del = _.clone(myForm.toObject().form_fields); + new_form_fields_del.splice(0, 1); -// submission_fields = _.clone(myForm.toObject().form_fields); -// submission_fields[0].fieldValue = 'David'; -// submission_fields[1].fieldValue = true; -// submission_fields[2].fieldValue = true; + submission_fields = _.clone(myForm.toObject().form_fields); + submission_fields[0].fieldValue = 'David'; + submission_fields[1].fieldValue = true; + submission_fields[2].fieldValue = true; -// mySubmission = new FormSubmission({ -// form_fields: submission_fields, -// admin: user, -// form: myForm, -// timeElapsed: 17.55 -// }); + mySubmission = new FormSubmission({ + form_fields: submission_fields, + admin: user, + form: myForm, + timeElapsed: 17.55 + }); -// }); + }); -// beforeEach(function(done){ -// myForm.save(function(){ -// mySubmission.save(function(){ -// done(); -// }); -// }); -// }); + beforeEach(function(done){ + myForm.save(function(){ + mySubmission.save(function(){ + done(); + }); + }); + }); -// afterEach(function(done){ -// mySubmission.remove(function(){ -// done(); -// }); -// }); + afterEach(function(done){ + mySubmission.remove(function(){ + done(); + }); + }); -// // it('should preserve deleted form_fields that have submissions without any problems', function(done) { + // it('should preserve deleted form_fields that have submissions without any problems', function(done) { -// // old_fields = myForm.toObject().form_fields; -// // // console.log(old_fields); + // old_fields = myForm.toObject().form_fields; + // // console.log(old_fields); -// // // var expected_fields = old_fields.slice(1,3).concat(old_fields.slice(0,1)); + // // var expected_fields = old_fields.slice(1,3).concat(old_fields.slice(0,1)); -// // myForm.form_fields = new_form_fields_del; + // myForm.form_fields = new_form_fields_del; -// // myForm.save(function(err, _form) { + // myForm.save(function(err, _form) { -// // should.not.exist(err); -// // should.exist(_form); + // should.not.exist(err); + // should.exist(_form); -// // // var actual_fields = _.map(_form.toObject().form_fields, function(o){ _.omit(o, '_id')}); -// // // old_fields = _.map(old_fields, function(o){ _.omit(o, '_id')}); + // // var actual_fields = _.map(_form.toObject().form_fields, function(o){ _.omit(o, '_id')}); + // // old_fields = _.map(old_fields, function(o){ _.omit(o, '_id')}); -// // // console.log(old_fields); -// // should.deepEqual(JSON.stringify(_form.toObject().form_fields), JSON.stringify(old_fields), 'old form_fields not equal to newly saved form_fields'); -// // done(); -// // }); -// // }); + // // console.log(old_fields); + // should.deepEqual(JSON.stringify(_form.toObject().form_fields), JSON.stringify(old_fields), 'old form_fields not equal to newly saved form_fields'); + // done(); + // }); + // }); -// // it('should delete \'preserved\' form_fields whose submissions have been removed without any problems', function(done) { + // it('should delete \'preserved\' form_fields whose submissions have been removed without any problems', function(done) { -// // myForm.form_fields = new_form_fields_del; -// // myForm.save(function(err, form -// // should.not.exist(err); -// // (form.form_fields).should.be.eql(old_fields, 'old form_fields not equal to newly saved form_fields'); + // myForm.form_fields = new_form_fields_del; + // myForm.save(function(err, form + // should.not.exist(err); + // (form.form_fields).should.be.eql(old_fields, 'old form_fields not equal to newly saved form_fields'); -// // //Remove submission -// // mySubmission.remove(function(err){ -// // myForm.submissions.should.have.length(0); -// // myForm.form_fields.should.not.containDeep(old_fields[0]); -// // }); -// // }); -// // }); -// }); + // //Remove submission + // mySubmission.remove(function(err){ + // myForm.submissions.should.have.length(0); + // myForm.form_fields.should.not.containDeep(old_fields[0]); + // }); + // }); + // }); + }); -// // describe('Method generateFDFTemplate', function() { -// // var FormFDF; -// // before(function(done){ -// // return myForm.save(function(err, form){ - -// // FormFDF = { -// // 'First Name': '', -// // 'nascar': '', -// // 'hockey': '' -// // }; -// // done(); -// // }); -// // }); + describe('Submission of Form should add Patient to OscarHost', function() { + var mySubmission; + before(function(done){ + myForm.form_fields = [ + new Field({'fieldType':'textfield', 'title':'What\'s your first name', 'fieldValue': ''}), + new Field({'fieldType':'textfield', 'title':'And your last name', 'fieldValue': ''}), + new Field({'fieldType':'radio', 'title':'And your sex', 'fieldOptions': [{ 'option_id': 0, 'option_title': 'Male', 'option_value': 'M' }, { 'option_id': 1, 'option_title': 'Female', 'option_value': 'F' }], 'fieldValue': ''}), + new Field({'fieldType':'date', 'title':'When were you born?', 'fieldValue': ''}), + new Field({'fieldType':'number', 'title':'What\'s your phone #?', 'fieldValue': ''}), + ]; + var myFieldMap = {}; + myFieldMap[myForm.form_fields[0]._id] = 'firstName'; + myFieldMap[myForm.form_fields[1]._id] = 'lastName'; + myFieldMap[myForm.form_fields[2]._id] = 'sex'; + myFieldMap[myForm.form_fields[3]._id] = 'unparsedDOB'; + myFieldMap[myForm.form_fields[4]._id] = 'phone'; -// // it('should be able to generate a FDF template without any problems', function() { -// // var fdfTemplate = myForm.generateFDFTemplate(); -// // (fdfTemplate).should.be.eql(FormFDF); -// // }); -// // }); + myForm.plugins.oscarhost = { + baseUrl: config.oscarhost.baseUrl, + settings: { + lookupField: '', + updateType: 'force_add', + fieldMap: myFieldMap, + }, + auth: config.oscarhost.auth, + }; -// afterEach(function(done) { -// Form.remove().exec(function() { -// User.remove().exec(done); -// }); -// }); -// }); + myForm.save(function(err, form){ + if(err) done(err); + + var submission_fields = _.clone(myForm.toObject().form_fields); + submission_fields[0].fieldValue = 'David'; + submission_fields[1].fieldValue = 'Baldwynn'+Date.now(); + submission_fields[2].fieldValue = 'M'; + submission_fields[3].fieldValue = Date.now(); + submission_fields[4].fieldValue = 6043158008; + + mySubmission = new FormSubmission({ + form_fields: submission_fields, + admin: form.admin, + form: form, + timeElapsed: 17.55 + }); + done(); + }); + }); + it('should be able to submit a valid form without problems', function(done) { + mySubmission.save(function(err, submission) { + should.not.exist(err); + should.exist(submission.oscarDemoNum); + done(); + }); + }); + }); + + afterEach(function(done) { + Form.remove().exec(function() { + User.remove().exec(done); + }); + }); +}); diff --git a/app/tests/form.server.routes.test.js b/app/tests/form.server.routes.test.js index d62defe1..503ee13a 100644 --- a/app/tests/form.server.routes.test.js +++ b/app/tests/form.server.routes.test.js @@ -10,6 +10,7 @@ // mongoose = require('mongoose'), // User = mongoose.model('User'), // Form = mongoose.model('Form'), +// Field = mongoose.model('Field'), // FormSubmission = mongoose.model('FormSubmission'), // agent = request.agent(app); @@ -52,9 +53,9 @@ // language: 'english', // admin: user._id, // form_fields: [ -// {'fieldType':'textfield', 'title':'First Name', 'fieldValue': ''}, -// {'fieldType':'checkbox', 'title':'nascar', 'fieldValue': ''}, -// {'fieldType':'checkbox', 'title':'hockey', 'fieldValue': ''} +// new Field({'fieldType':'textfield', 'title':'First Name', 'fieldValue': ''}), +// new Field({'fieldType':'checkbox', 'title':'nascar', 'fieldValue': ''}), +// new Field({'fieldType':'checkbox', 'title':'hockey', 'fieldValue': ''}) // ] // }; diff --git a/app/tests/logic_jump.server.model.test.js b/app/tests/logic_jump.server.model.test.js new file mode 100644 index 00000000..212d035d --- /dev/null +++ b/app/tests/logic_jump.server.model.test.js @@ -0,0 +1,70 @@ +// 'use strict'; + +// var should = require('should'), +// mongoose = require('mongoose'), +// math = require('math'), +// Form = mongoose.model('Form'), +// LogicJump = mongoose.model('LogicJump'), +// BooleanƒExpression = mongoose.model('BooleanExpression'), +// Field = mongoose.model('Field'); + +// /** +// * Globals +// */ +// var textField; + +// /** +// * Form routes tests +// */ +// describe('LogicJump Tests', function() { + +// beforeEach(function(done) { +// textField = new Field({ +// title: 'First Name', +// fieldType: 'textfield', +// fieldValue: 'David', +// }); + +// textField.save(function(err){ +// if(err) done(err); +// done(); +// }); +// }); + +// describe('BooleanExpression', function(){ +// var scope; + +// beforeEach(function(){ +// scope = { +// x: false, +// y: true, +// b: 5, +// a: 3 +// } +// }); + +// it('should evaluate a simple boolean expression to be true', function(){ +// var expression = 'and( or( x, y), (b > a))'; + +// var code = math.parse(expression); +// var actual = code.compile().eval(scope); + +// // var expected = ( (false || true) && !!(5 > 3) ); + +// actual.should.equal(true); +// }); + + +// afterEach(function(done){ +// BooleanExpression.remove().exec(function() { +// done(); +// }); +// }); +// }); + +// afterEach(function(done) { +// Field.remove().exec(function() { +// done(); +// }); +// }); +// }); diff --git a/app/tests/rules.server.test.js b/app/tests/rules.server.test.js deleted file mode 100644 index 60b06054..00000000 --- a/app/tests/rules.server.test.js +++ /dev/null @@ -1,324 +0,0 @@ -var RuleEngine = require('node-rules'), - should = require('should'), - rules = require('../../docs/Node-Rules/rules.logic-jump'); - -describe('Logic-Jump Rules Tests', function() { - - - describe('StringRules', function(){ - describe('Contains Rule', function(){ - it('should be TRUTHY if right IS a substring of left', function(done){ - //initialize the rule engine - R = new RuleEngine(rules.StringRules.Contains); - - //sample fact to run the rules on - var fact = { - left:"userblahblahnamenaoeuaoe", - right:"user", - }; - - //Now pass the fact on to the rule engine for results - R.execute(fact,function(result){ - result.result.should.equal(true); - done(); - }); - }); - it('should be FALSEY if right IS NOT a substring of left', function(done){ - //initialize the rule engine - R = new RuleEngine(rules.StringRules.Contains); - - //sample fact to run the rules on - var fact = { - left:"userblahblahnamenaoeuaoe", - right:"user1", - }; - - //Now pass the fact on to the rule engine for results - R.execute(fact,function(result){ - result.result.should.equal(false); - done(); - }); - }); - }); - - describe('NotContains Rule', function(){ - it('should be TRUTHY if right IS NOT a substring of left', function(done){ - //initialize the rule engine - R = new RuleEngine(rules.StringRules.NotContains); - - //sample fact to run the rules on - var fact = { - "left":"userblahblahnamenaoeuaoe", - "right":"user1oe", - }; - - //Now pass the fact on to the rule engine for results - R.execute(fact,function(result){ - result.result.should.equal(true); - done(); - }); - }); - it('should be FALSEY if right IS a substring of left', function(done){ - //initialize the rule engine - R = new RuleEngine(rules.StringRules.NotContains); - - //sample fact to run the rules on - var fact = { - "left":"userblahblahnamenaoeuaoe", - "right":"user", - }; - - //Now pass the fact on to the rule engine for results - R.execute(fact,function(result){ - result.result.should.equal(false); - done(); - }); - }); - }); - - describe('BeginsWith Rule', function(){ - it('should be TRUTHY if Left string DOES begin with Right', function(done){ - //initialize the rule engine - R = new RuleEngine(rules.StringRules.BeginsWith); - - //sample fact to run the rules on - var fact = { - "left":"userblahblahnamenaoeuaoe", - "right":"user", - }; - - //Now pass the fact on to the rule engine for results - R.execute(fact,function(result){ - result.result.should.equal(true); - done(); - }); - }); - it('should be FALSEY if left DOES NOT begin with right', function(done){ - //initialize the rule engine - R = new RuleEngine(rules.StringRules.BeginsWith); - - //sample fact to run the rules on - var fact = { - "left":"userblahblahnamenaoeuaoe", - "right":"euaoe", - }; - - //Now pass the fact on to the rule engine for results - R.execute(fact,function(result){ - result.result.should.equal(false); - done(); - }); - }); - }); - - describe('EndsWith Rule', function(){ - it('should be TRUTHY if Left string DOES end with Right', function(done){ - //initialize the rule engine - R = new RuleEngine(rules.StringRules.EndsWith); - - //sample fact to run the rules on - var fact = { - "left":"userblahblahnamenaoeuaoe", - "right":"euaoe", - }; - - //Now pass the fact on to the rule engine for results - R.execute(fact,function(result){ - result.result.should.equal(true); - done(); - }); - }); - it('should be FALSEY if left DOES NOT end with right', function(done){ - //initialize the rule engine - R = new RuleEngine(rules.StringRules.EndsWith); - - //sample fact to run the rules on - var fact = { - "left":"userblahblahnamenaoeuaoe", - "right":"userb", - }; - - //Now pass the fact on to the rule engine for results - R.execute(fact,function(result){ - result.result.should.equal(false); - done(); - }); - }); - }); - }); - - describe('NumberRules', function(){ - describe('GreaterThan Rule', function(){ - it('NumberRules.GreaterThan rule should be TRUTHY if left > right', function(done){ - //initialize the rule engine - R = new RuleEngine(rules.NumberRules.GreaterThan); - - //sample fact to run the rules on - var fact = { - left:100, - right:5, - }; - - //Now pass the fact on to the rule engine for results - R.execute(fact,function(result){ - result.result.should.equal(true); - done(); - }); - }); - it('NumberRules.GreaterThan rule should be FALSEY if left < right', function(done){ - //initialize the rule engine - R = new RuleEngine(rules.NumberRules.GreaterThan); - - //sample fact to run the rules on - var fact = { - left:100, - right:1000, - }; - - //Now pass the fact on to the rule engine for results - R.execute(fact,function(result){ - result.result.should.equal(false); - done(); - }); - }); - }); - - describe('SmallerThan Rule', function(){ - it('should be TRUTHY if left < right', function(done){ - //initialize the rule engine - R = new RuleEngine(rules.NumberRules.SmallerThan); - - //sample fact to run the rules on - var fact = { - left:100, - right:1000, - }; - - //Now pass the fact on to the rule engine for results - R.execute(fact,function(result){ - result.result.should.equal(true); - done(); - }); - }); - it('should be FALSEY if left > right', function(done){ - //initialize the rule engine - R = new RuleEngine(rules.NumberRules.SmallerThan); - - //sample fact to run the rules on - var fact = { - left:100, - right:5, - }; - - //Now pass the fact on to the rule engine for results - R.execute(fact,function(result){ - result.result.should.equal(false); - done(); - }); - }); - }); - - describe('GreaterThanOrEqual Rule', function(){ - it('should be TRUTHY if left == right', function(done){ - //initialize the rule engine - R = new RuleEngine(rules.NumberRules.GreaterThanOrEqual); - - //sample fact to run the rules on - var fact = { - left:100, - right:100, - }; - - //Now pass the fact on to the rule engine for results - R.execute(fact,function(result){ - result.result.should.equal(true); - done(); - }); - }); - it('should be TRUTHY if left > right', function(done){ - //initialize the rule engine - R = new RuleEngine(rules.NumberRules.GreaterThanOrEqual); - - //sample fact to run the rules on - var fact = { - left:100, - right:5, - }; - - //Now pass the fact on to the rule engine for results - R.execute(fact,function(result){ - result.result.should.equal(true); - done(); - }); - }); - it('should be FALSEY if left < right', function(done){ - //initialize the rule engine - R = new RuleEngine(rules.NumberRules.GreaterThanOrEqual); - - //sample fact to run the rules on - var fact = { - left:100, - right:1000, - }; - - //Now pass the fact on to the rule engine for results - R.execute(fact,function(result){ - result.result.should.equal(false); - done(); - }); - }); - }); - - describe('SmallerThanOrEqual Rule', function(){ - it('should be TRUTHY if left === right', function(done){ - //initialize the rule engine - R = new RuleEngine(rules.NumberRules.SmallerThanOrEqual); - - //sample fact to run the rules on - var fact = { - left:100, - right:100, - }; - - //Now pass the fact on to the rule engine for results - R.execute(fact,function(result){ - result.result.should.equal(true); - done(); - }); - }); - it('should be FALSEY if left > right', function(done){ - //initialize the rule engine - R = new RuleEngine(rules.NumberRules.SmallerThanOrEqual); - - //sample fact to run the rules on - var fact = { - left:100, - right:5, - }; - - //Now pass the fact on to the rule engine for results - R.execute(fact,function(result){ - result.result.should.equal(false); - done(); - }); - }); - it('should be TRUTHY if left < right', function(done){ - //initialize the rule engine - R = new RuleEngine(rules.NumberRules.SmallerThanOrEqual); - - //sample fact to run the rules on - var fact = { - left:100, - right:1000, - }; - - //Now pass the fact on to the rule engine for results - R.execute(fact,function(result){ - result.result.should.equal(true); - done(); - }); - }); - }); - - }); -}); \ No newline at end of file diff --git a/app/tests/user.server.routes.test.js b/app/tests/user.server.routes.test.js index 58670f56..779089a5 100644 --- a/app/tests/user.server.routes.test.js +++ b/app/tests/user.server.routes.test.js @@ -1,195 +1,195 @@ -'use strict'; +// 'use strict'; -var should = require('should'), - _ = require('lodash'), - app = require('../../server'), - request = require('supertest'), - Session = require('supertest-session')({ - app: app - }), - mongoose = require('mongoose'), - User = mongoose.model('User'), - config = require('../../config/config'), - tmpUser = mongoose.model(config.tempUserCollection), - agent = request.agent(app), - url = require('url'); +// var should = require('should'), +// _ = require('lodash'), +// app = require('../../server'), +// request = require('supertest'), +// Session = require('supertest-session')({ +// app: app +// }), +// mongoose = require('mongoose'), +// User = mongoose.model('User'), +// config = require('../../config/config'), +// tmpUser = mongoose.model(config.tempUserCollection), +// agent = request.agent(app), +// url = require('url'); -var mailosaur = require('mailosaur')(config.mailosaur.key), - mailbox = new mailosaur.Mailbox(config.mailosaur.mailbox_id); +// var mailosaur = require('mailosaur')(config.mailosaur.key), +// mailbox = new mailosaur.Mailbox(config.mailosaur.mailbox_id); -var mandrill = require('node-mandrill')(config.mailer.options.auth.pass); +// var mandrill = require('node-mandrill')(config.mailer.options.auth.pass); -/** - * Globals - */ -var credentials, _User, _Session; +// /** +// * Globals +// */ +// var credentials, _User, _Session; -/** - * Form routes tests - */ -describe('User CRUD tests', function() { - this.timeout(15000); - var userSession; +// /** +// * Form routes tests +// */ +// describe('User CRUD tests', function() { +// this.timeout(15000); +// var userSession; - beforeEach(function() { - //Initialize Session - userSession = new Session(); +// beforeEach(function() { +// //Initialize Session +// userSession = new Session(); - // Create user credentials - credentials = { - username: 'be1e58fb@mailosaur.in', - password: 'password' - }; +// // Create user credentials +// credentials = { +// username: 'be1e58fb@mailosaur.in', +// password: 'password' +// }; - // Create a new user - _User = { - firstName: 'Full', - lastName: 'Name', - email: credentials.username, - username: credentials.username, - password: credentials.password, - }; - }); +// // Create a new user +// _User = { +// firstName: 'Full', +// lastName: 'Name', +// email: credentials.username, +// username: credentials.username, +// password: credentials.password, +// }; +// }); - // describe('Create, Verify and Activate a User', function() { - var username = 'testActiveAccount.be1e58fb@mailosaur.in'; - var link, _tmpUser, activateToken = ''; +// // describe('Create, Verify and Activate a User', function() { +// var username = 'testActiveAccount.be1e58fb@mailosaur.in'; +// var link, _tmpUser, activateToken = ''; - it('should be able to create a temporary (non-activated) User', function(done) { - _User.email = _User.username = username; - request(app).post('/auth/signup') - .send(_User) - .expect(200, 'An email has been sent to you. Please check it to verify your account.') - .end(function(FormSaveErr, FormSaveRes) { - // (FormSaveRes.text).should.equal('An email has been sent to you. Please check it to verify your account.'); - done(); - // tmpUser.findOne({username: _User.username}, function (err, user) { - // should.not.exist(err); - // should.exist(user); - // _tmpUser = user; +// it('should be able to create a temporary (non-activated) User', function(done) { +// _User.email = _User.username = username; +// request(app).post('/auth/signup') +// .send(_User) +// .expect(200, 'An email has been sent to you. Please check it to verify your account.') +// .end(function(FormSaveErr, FormSaveRes) { +// // (FormSaveRes.text).should.equal('An email has been sent to you. Please check it to verify your account.'); +// done(); +// // tmpUser.findOne({username: _User.username}, function (err, user) { +// // should.not.exist(err); +// // should.exist(user); +// // _tmpUser = user; - // _User.username.should.equal(user.username); - // _User.firstName.should.equal(user.firstName); - // _User.lastName.should.equal(user.lastName); +// // _User.username.should.equal(user.username); +// // _User.firstName.should.equal(user.firstName); +// // _User.lastName.should.equal(user.lastName); - // // mandrill('/messages/search', { - // // query: "subject:Confirm", - // // senders: [ - // // "test@forms.polydaic.com" - // // ], - // // limit: 1 - // // }, function(error, emails) { - // // if (error) console.log( JSON.stringify(error) ); +// // // mandrill('/messages/search', { +// // // query: "subject:Confirm", +// // // senders: [ +// // // "test@forms.polydaic.com" +// // // ], +// // // limit: 1 +// // // }, function(error, emails) { +// // // if (error) console.log( JSON.stringify(error) ); - // // var confirmation_email = emails[0]; +// // // var confirmation_email = emails[0]; - // // mandrill('/messages/content', { - // // id: confirmation_email._id - // // }, function(error, email) { - // // if (error) console.log( JSON.stringify(error) ); +// // // mandrill('/messages/content', { +// // // id: confirmation_email._id +// // // }, function(error, email) { +// // // if (error) console.log( JSON.stringify(error) ); - // // // console.log(email); - // // var link = _(email.text.split('\n')).reverse().value()[1]; - // // console.log(link); - // // activateToken = _(url.parse(link).hash.split('/')).reverse().value()[0]; - // // console.log('actual activateToken: '+ activateToken); - // // console.log('expected activateToken: ' + user.GENERATED_VERIFYING_URL); +// // // // console.log(email); +// // // var link = _(email.text.split('\n')).reverse().value()[1]; +// // // console.log(link); +// // // activateToken = _(url.parse(link).hash.split('/')).reverse().value()[0]; +// // // console.log('actual activateToken: '+ activateToken); +// // // console.log('expected activateToken: ' + user.GENERATED_VERIFYING_URL); - // // done(); +// // // done(); - // // }); - // // }); +// // // }); +// // // }); - // // mailbox.getEmails(function(err, _emails) { - // // if(err) done(err); +// // // mailbox.getEmails(function(err, _emails) { +// // // if(err) done(err); - // // var emails = _emails; +// // // var emails = _emails; - // // console.log('mailbox.getEmails:'); - // // console.log(emails[0].text.links); +// // // console.log('mailbox.getEmails:'); +// // // console.log(emails[0].text.links); - // // var link = emails[0].text.links[0].href; - // // activateToken = _(url.parse(link).hash.split('/')).reverse().value()[0]; - // // console.log('actual activateToken: '+ activateToken); - // // console.log('expected activateToken: ' + user.GENERATED_VERIFYING_URL); - // // (activateToken).should.equal(user.GENERATED_VERIFYING_URL); +// // // var link = emails[0].text.links[0].href; +// // // activateToken = _(url.parse(link).hash.split('/')).reverse().value()[0]; +// // // console.log('actual activateToken: '+ activateToken); +// // // console.log('expected activateToken: ' + user.GENERATED_VERIFYING_URL); +// // // (activateToken).should.equal(user.GENERATED_VERIFYING_URL); - // // done(); - // // }); - // }); - }); - }); +// // // done(); +// // // }); +// // }); +// }); +// }); - // it('should be able to verify a User Account', function(done) { - // userSession.get('/auth/verify/'+activateToken) - // .expect(200) - // .end(function(VerifyErr, VerifyRes) { - // should.not.exist(VerifyErr); - // (VerifyRes.text).should.equal('User successfully verified'); - // done(); - // }); - // }); +// // it('should be able to verify a User Account', function(done) { +// // userSession.get('/auth/verify/'+activateToken) +// // .expect(200) +// // .end(function(VerifyErr, VerifyRes) { +// // should.not.exist(VerifyErr); +// // (VerifyRes.text).should.equal('User successfully verified'); +// // done(); +// // }); +// // }); - // it('should receive confirmation email after verifying a User Account', function(done) { - // mailbox.getEmails(function(err, _emails) { - // if(err) throw err; - // var email = _emails[0]; +// // it('should receive confirmation email after verifying a User Account', function(done) { +// // mailbox.getEmails(function(err, _emails) { +// // if(err) throw err; +// // var email = _emails[0]; - // // console.log('mailbox.getEmails:'); - // console.log(email); - // (email.subject).should.equal('Account successfully verified!'); - // done(); - // }); - // }); - // }); +// // // console.log('mailbox.getEmails:'); +// // console.log(email); +// // (email.subject).should.equal('Account successfully verified!'); +// // done(); +// // }); +// // }); +// // }); - // it('should be able to login and logout a User', function (done) { - // var username = 'testActiveAccount.be1e58fb@mailosaur.in'; - // _User.email = _User.username = credentials.username = username; - // userSession.post('/auth/signup') - // .send(_User) - // .expect(200) - // .end(function(FormSaveErr, FormSaveRes) { - // (FormSaveRes.text).should.equal('An email has been sent to you. Please check it to verify your account.'); +// // it('should be able to login and logout a User', function (done) { +// // var username = 'testActiveAccount.be1e58fb@mailosaur.in'; +// // _User.email = _User.username = credentials.username = username; +// // userSession.post('/auth/signup') +// // .send(_User) +// // .expect(200) +// // .end(function(FormSaveErr, FormSaveRes) { +// // (FormSaveRes.text).should.equal('An email has been sent to you. Please check it to verify your account.'); - // userSession.post('/auth/signin') - // .send(credentials) - // .expect('Content-Type', /json/) - // .expect(200) - // .end(function(signinErr, signinRes) { +// // userSession.post('/auth/signin') +// // .send(credentials) +// // .expect('Content-Type', /json/) +// // .expect(200) +// // .end(function(signinErr, signinRes) { - // // Handle signin error - // if (signinErr) throw signinErr; +// // // Handle signin error +// // if (signinErr) throw signinErr; - // userSession.get('/auth/signout') - // .expect(200) - // .end(function(signoutErr, signoutRes) { +// // userSession.get('/auth/signout') +// // .expect(200) +// // .end(function(signoutErr, signoutRes) { - // // Handle signout error - // if (signoutErr) throw signoutErr; +// // // Handle signout error +// // if (signoutErr) throw signoutErr; - // (signoutRes.text).should.equal('Successfully logged out'); +// // (signoutRes.text).should.equal('Successfully logged out'); - // done(); - // }); - // }); - // }); - // }); +// // done(); +// // }); +// // }); +// // }); +// // }); - // it('should be able to reset a User\'s password'); +// // it('should be able to reset a User\'s password'); - // it('should be able to delete a User account without any problems'); +// // it('should be able to delete a User account without any problems'); - afterEach(function(done) { - User.remove().exec(function () { - tmpUser.remove().exec(function(){ - // mailbox.deleteAllEmail(function (err, body) { - // if(err) throw err; - userSession.destroy(); - done(); - // }); - }); - }); - }); -}); +// afterEach(function(done) { +// User.remove().exec(function () { +// tmpUser.remove().exec(function(){ +// // mailbox.deleteAllEmail(function (err, body) { +// // if(err) throw err; +// userSession.destroy(); +// done(); +// // }); +// }); +// }); +// }); +// }); diff --git a/docs/OscarHost/AddDemopgrahic.response.har b/docs/OscarHost/AddDemopgrahic.response.har new file mode 100644 index 00000000..6a3cf423 --- /dev/null +++ b/docs/OscarHost/AddDemopgrahic.response.har @@ -0,0 +1,4662 @@ +{ + "log": { + "version": "1.2", + "creator": { + "name": "WebInspector", + "version": "537.36" + }, + "pages": [ + { + "startedDateTime": "2015-09-10T17:13:11.121Z", + "id": "page_2", + "title": "https://secure11.oscarhost.ca/kensington/demographic/demographiccontrol.jsp?demographic_no=189164&displaymode=edit&dboperation=search_detail", + "pageTimings": { + "onContentLoad": 1054.2589999968186, + "onLoad": 1048.60799999733 + } + } + ], + "entries": [ + { + "startedDateTime": "2015-09-10T17:13:11.121Z", + "time": 230.60199999599718, + "request": { + "method": "GET", + "url": "https://secure11.oscarhost.ca/kensington/demographic/demographiccontrol.jsp?demographic_no=189164&displaymode=edit&dboperation=search_detail", + "httpVersion": "HTTP/1.1", + "headers": [ + { + "name": "Accept-Encoding", + "value": "gzip, deflate, lzma, sdch" + }, + { + "name": "Host", + "value": "secure11.oscarhost.ca" + }, + { + "name": "Accept-Language", + "value": "en-US,en;q=0.8" + }, + { + "name": "Upgrade-Insecure-Requests", + "value": "1" + }, + { + "name": "User-Agent", + "value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.155 Safari/537.36 OPR/31.0.1889.174" + }, + { + "name": "Accept", + "value": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8" + }, + { + "name": "Referer", + "value": "https://secure11.oscarhost.ca/kensington/demographic/demographicaddarecord.jsp" + }, + { + "name": "Cookie", + "value": "JSESSIONID=C89CFAAB236CC41DEBBEEDA066552DC9; _ga=GA1.2.1898936923.1439425583; oscrcpid=\"\"; oscadmid=\"\"; oscprvid=74389190981689774322881876020216189399197; RT=" + }, + { + "name": "Connection", + "value": "keep-alive" + } + ], + "queryString": [ + { + "name": "demographic_no", + "value": "189164" + }, + { + "name": "displaymode", + "value": "edit" + }, + { + "name": "dboperation", + "value": "search_detail" + } + ], + "cookies": [ + { + "name": "JSESSIONID", + "value": "C89CFAAB236CC41DEBBEEDA066552DC9", + "expires": null, + "httpOnly": false, + "secure": false + }, + { + "name": "_ga", + "value": "GA1.2.1898936923.1439425583", + "expires": null, + "httpOnly": false, + "secure": false + }, + { + "name": "oscrcpid", + "value": "\"\"", + "expires": null, + "httpOnly": false, + "secure": false + }, + { + "name": "oscadmid", + "value": "\"\"", + "expires": null, + "httpOnly": false, + "secure": false + }, + { + "name": "oscprvid", + "value": "74389190981689774322881876020216189399197", + "expires": null, + "httpOnly": false, + "secure": false + }, + { + "name": "RT", + "value": "", + "expires": null, + "httpOnly": false, + "secure": false + } + ], + "headersSize": 782, + "bodySize": 0 + }, + "response": { + "status": 200, + "statusText": "OK", + "httpVersion": "HTTP/1.1", + "headers": [ + { + "name": "Date", + "value": "Thu, 10 Sep 2015 17:13:11 GMT" + }, + { + "name": "Cache-Control", + "value": "no-store, no-cache, must-revalidate" + }, + { + "name": "Connection", + "value": "Keep-Alive" + }, + { + "name": "Keep-Alive", + "value": "timeout=15, max=97" + }, + { + "name": "Transfer-Encoding", + "value": "chunked" + }, + { + "name": "Content-Type", + "value": "text/html;charset=UTF-8" + } + ], + "cookies": [], + "content": { + "size": 144718, + "mimeType": "text/html", + "compression": -149, + "text": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nPATIENT DETAIL INFO\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n \n\n\n\n\n\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n
PATIENT'S MASTER FILE\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t
\n\t\t\t\t TEST,\n\t\t\t\tACCOUNT M\n\t\t\t\t21 years  \n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\tNext Appointment: \n\t\t\t\t\n\n\t\t\t\t\n\n\t\t\t\t
\n\t\t
\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\n\n\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t\n\t\t\t\n\n\n\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\n \n \n \n \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n \n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n \n \n \n\n \n\t\t\t\n\n\t\t\t\n\t\t\t\t\n\t\t\t\n \n \n\t\t\t\n\t\t\t\n \n\t\t\t\n\t\t\t\t\n\t\t\t\n \n \n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t
Appointment
Appt.History\n\t\t\t\t
Billing
\n\n\t\t\t\t\n\t\t\t\tInvoice List\n\n\n
\n Check Eligibility\n\t\t\t\t\t\n\n\t\t\t\t
Create Invoice
Clinical Modules
Consultations
Prescriptions\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\tE-Chart +\n\t\t\t\t\t\n
\n\t\t\t\t\tPreventions
\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tTickler\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\tSend a Message
Add Patient Set\n
Resources
\n\t\t\t\tDocuments
Add Document
Current eForms
\n\t\t\t\tAdd eForm
\n\t\t
\n \n \n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\n\n\n\n\n\n\n\n\n\n\n\n
\n
\n
\n
\n Search\n
\n
\n
    \n
  • \n
    By:\n
    \n\t\n \n
  • \n
  • \n
    Input:\n
    \n \n
  • \n
  • \n\t\t\t\t\n\t\t\t\t\n \n \n \n \n \n\t\t\t\t\t\n \n\t\t\t\t    \n\t\t\t\t\n\t\t\t\t\t\n
  • \n
\n
\n
\n\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\n\t\t\t\t\t\n\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\tRecord ( 189164\n\t\t\t\t\t\t ) \n \n Edit\n Close\n \n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t

 Demographic

\n\t\t\t\t\t\t
    \n
  • Last Name:\n TEST\n
  • \n
  • \n\t\t\t\t\t\t\tFirst Name:\n ACCOUNT\n\t\t\t\t\t\t\t
  • \n
  • Title:\n MR\n\t\t\t\t\t\t\t
  • \n
  • Sex:\n M\n
  • \n
  • Age:\n 21 (DOB: 1994-06-15)\n \n
  • \n
  • Language:\n English\n
  • \n\t\t\t\t\t\t\n
  • Country Of Origin:\n AUSTRIA\n
  • \n\t\t\t\t\t\t\n
  • Spoken Language:\n English\n\t\t\t\t\t\t\t
  • \n\t\t\t\t\t\t\n\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t

 Other Contacts: \n\t\t\t\t\t\tAdd Relation

\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t

 Clinic Status (Enrollment History)

\n\t\t\t\t\t\t
    \n
  • Roster Status:\n \n
  • \n
  • Roster Date:\n \n
  • \n
  • Termination Date:\n \n
  • \n\n
  • Patient Status:\n \n\t\t\t\t\t\t\t\n AC\n\t\t\t\t\t\t\t\n \n\t\t\t\t\t\t\t
  • \n
  • Chart No.:\n \n\t\t\t\t\t\t\t
  • \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n
  • Cytology #:\n
  • \n
  • Date Joined:\n\t\t\t\t\t\t\t2015-09-10\n
  • \n End Date:\n 2016-09-10\n\t\t\t\t\t\t\t
  • \n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\n\t\t\t\t\t\t
\n\t\t\t\t\t\t

 Alert

\n \n\t\t\t\t\t\t \n\t\t\t\t\t\t
\n\n\t\t\t\t\t\t
\n\t\t\t\t\t\t

 Rx Interaction Warning Level

\n \n\t\t\t\t\t\t \n\t\t\t\t\t\tNot Specified\n\t\t\t\t\t\t
\n\n\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t

 Contact Information

\n\t\t\t\t\t\t
    \n
  • Phone(H):\n 604-123-4333 \n\t\t\t\t\t\t\t
  • \n
  • Phone(W):\n \n\t\t\t\t\t\t\t
  • \n
  • Cell Phone:\n 6041118888
  • \n
  • Address:\n 500 Somewhere Ave\n\t\t\t\t\t\t\t
  • \n
  • City:\n TEST CITY\n
  • \n
  • \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tProvince :\n BC
  • \n
  • \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tPostal :\n V6V262
  • \n\n
  • Email:\n someone@someone.com\n\t\t\t\t\t\t\t
  • \n
  • Newsletter:\n No\n\t\t\t\t\t\t\t
  • \n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\n\t\t\t\t\t\t
\n\t\t\t\t\t\t

 Health Insurance

\n\t\t\t\t\t\t
    \n
  • Health Ins. #:\n 9146509343\n\t\t\t\t\t\t\t  \n\t\t\t\t\t\t\t
  • \n
  • HC Type:\n BC\n\t\t\t\t\t\t\t
  • \n
  • EFF Date:\n 2015-05-01\n
  • \n
  • Renew Date:\n \n
  • \n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t
\n\t\t\t\t\t\t

 Patient Clinic Status

\n\t\t\t\t\t\t
    \n
  • \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tDoctor\n :\n \n \n \n \n\t\t\t\t\t\t\t
  • \n
  • Nurse:\n\t\t\t\t\t\t\t
  • \n
  • Midwife:\n\t\t\t\t\t\t\t
  • \n
  • Resident:\n
  • \n
  • Referral Doctor:\n\t\t\t\t\t\t\t
  • \n
  • Referral Doctor #:\n\t\t\t\t\t\t\t
  • \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\n\n\t\t\t\t\t\t
\n\t\t\t\t\t\t

 Notes

\n\n  \n\n\n\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\n\n\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t \n \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n \n\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n \n \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\n\n\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\tLast Name: First Name:\n\t\t\t\t\t\t\t\t
Title: \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t Language: \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
 \n\t\t\t\t\t\t\t Spoken: \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
Address: \n\t\t\t\t\t\t\t\tCity:
\n\t\t\t\t\t\t\t\tProvince : \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\tPostal :
Phone(H): \n\t\t\t\t\t\t\t\t Ext: \n\t\t\t\t\t\t\t\tPhone(W): Ext: \n\t\t\t\t\t\t\t\t
Cell Phone: \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tCountry Of Origin:
Email: \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t Not available\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tMyOscar UserName:
\n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tRegister for MyOSCAR \n\t\t\t\t\t\t\t\t
Newsletter:\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t SIN:
DOB(yyyymmdd):\n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\n\t\t\t \n\n\t\t\t \n\n\t\t\t\t\t\t\t\t\tAge: Sex:\n\t\t\t\t\t\t\t\t
Health Ins. #: \n\t\t\t\t\t\t\t\tVer. \n\t\t\t\t\t\t\t\t\tEFF Date:\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t Renew Date:\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
HC Type:\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t Cytology #:\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tDoctor\n\t\t\t\t\t\t\t\t: Nurse:
Midwife: Resident:
Referral Doctor: \n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\tReferral Doctor #: \n\t\t\t\t\t\t\t\t
Roster Status:\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n \n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\tRoster Date: \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tTermination Date: \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
Termination Reason: \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
Patient Status:\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\n \n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tPatient Status Date: \n \n \n \n\t\t\t\t\t\t\t\t
Chart No.:\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\tWaiting List:\n\t\t\t\t\t\t\t\t\t\t Waiting List Note:
 Date of request: (yyyy-mm-dd)\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
Date Joined:\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t End Date: \n\t\t\t\t\t\t\t\t
\nRx Interaction Warning Level\n\n\t\t\t\t\t\n\t\t\t\t\t\n\n
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
Alert:
Notes: \n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n \n\t\t\t\t\t\t
\n\n \n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n
\n\t\t\t\t\n\n\t\t
\n\t\t
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" + }, + "redirectURL": "", + "headersSize": 231, + "bodySize": 144867, + "_transferSize": 145098 + }, + "cache": {}, + "timings": { + "blocked": 0.704999998561107, + "dns": -1, + "connect": -1, + "send": 0.16400001186411806, + "wait": 109.75499999767678, + "receive": 119.97799998789517, + "ssl": -1 + }, + "connection": "137908", + "pageref": "page_2" + }, + { + "startedDateTime": "2015-09-10T17:13:11.502Z", + "time": 0, + "request": { + "method": "GET", + "url": "https://secure11.oscarhost.ca/kensington/share/calendar/calendar.css", + "httpVersion": "unknown", + "headers": [ + { + "name": "User-Agent", + "value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.155 Safari/537.36 OPR/31.0.1889.174" + } + ], + "queryString": [], + "cookies": [], + "headersSize": -1, + "bodySize": 0 + }, + "response": { + "status": 200, + "statusText": "OK", + "httpVersion": "unknown", + "headers": [ + { + "name": "Date", + "value": "Tue, 08 Sep 2015 18:20:35 GMT" + }, + { + "name": "Last-Modified", + "value": "Tue, 17 Mar 2015 17:35:50 GMT" + }, + { + "name": "Accept-Ranges", + "value": "bytes" + }, + { + "name": "ETag", + "value": "\"4720-1426613750000\"" + }, + { + "name": "Content-Length", + "value": "4720" + }, + { + "name": "Content-Type", + "value": "text/css;charset=UTF-8" + } + ], + "cookies": [], + "content": { + "size": 4720, + "mimeType": "text/css", + "text": "/*\n * \n * Copyright (c) 2001-2002. Department of Family Medicine, McMaster University. All Rights Reserved. *\n * This software is published under the GPL GNU General Public License. \n * This program is free software; you can redistribute it and/or \n * modify it under the terms of the GNU General Public License \n * as published by the Free Software Foundation; either version 2 \n * of the License, or (at your option) any later version. * \n * This program is distributed in the hope that it will be useful, \n * but WITHOUT ANY WARRANTY; without even the implied warranty of \n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the \n * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License \n * along with this program; if not, write to the Free Software \n * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * \n * \n * \n * \n * This software was written for the \n * Department of Family Medicine \n * McMaster University \n * Hamilton \n * Ontario, Canada \n */\n.calendar {\n\tposition: relative;\n\tdisplay: none;\n\tborder-top: 2px solid #fff;\n\tborder-right: 2px solid #000;\n\tborder-bottom: 2px solid #000;\n\tborder-left: 2px solid #fff;\n\tfont-size: 11px;\n\tcolor: #000;\n\tcursor: default;\n\tbackground: #c8d0d4;\n\tfont-family: Verdana, Arial, Helvetica, sans-serif;\n z-index: 150;\n}\n\n.calendar table {\n\tborder-top: 1px solid #000;\n\tborder-right: 1px solid #fff;\n\tborder-bottom: 1px solid #fff;\n\tborder-left: 1px solid #000;\n\tfont-size: 11px;\n\tcolor: #000;\n\tcursor: default;\n\tbackground: #ffffff;\n\tfont-family: Verdana, Arial, Helvetica, sans-serif;\n}\n\n.calendar .button {\n\ttext-align: center;\n\tpadding: 1px;\n\tborder-top: 1px solid #fff;\n\tborder-right: 1px solid #000;\n\tborder-bottom: 1px solid #000;\n\tborder-left: 1px solid #fff;\n}\n\n.calendar thead .title {\n\tfont-weight: bold;\n\tpadding: 1px;\n\tborder: 1px solid #000;\n\tbackground: #5F7BA4;\n\tcolor: #fff;\n\ttext-align: center;\n}\n\n.calendar thead .headrow {\n\t\n}\n\n.calendar thead .daynames {\n\t\n}\n\n.calendar thead .name {\n\tborder-bottom: 1px solid #000;\n\tpadding: 2px;\n\ttext-align: center;\n\tbackground: #ffffff;\n}\n\n.calendar thead .weekend {\n\tfont-weight: bold;\n\tcolor: #5f7ba4;\n}\n\n.calendar thead .hilite {\n\tborder-top: 2px solid #fff;\n\tborder-right: 2px solid #000;\n\tborder-bottom: 2px solid #000;\n\tborder-left: 2px solid #fff;\n\tpadding: 0px;\n\tbackground: #5F7BA4;\n}\n\n.calendar thead .active {\n\tpadding: 2px 0px 0px 2px;\n\tborder-top: 1px solid #000;\n\tborder-right: 1px solid #fff;\n\tborder-bottom: 1px solid #fff;\n\tborder-left: 1px solid #000;\n\tbackground: #5F7BA4;\n}\n\n.calendar tbody .day {\n\twidth: 2em;\n\ttext-align: right;\n\tpadding: 2px 4px 2px 2px;\n}\n\n.calendar table .wn {\n\tpadding: 2px 3px 2px 2px;\n\tborder-right: 1px solid #000;\n\tbackground: #D1DEE8;\n}\n\n.calendar tbody .rowhilite td {\n\tbackground: #D1DEE8;\n}\n\n.calendar tbody .rowhilite td.wn {\n\tbackground: #5F7BA4;\n}\n\n.calendar tbody td.hilite {\n\tpadding: 1px 3px 1px 1px;\n\tborder: 1px solid;\n\tborder-color: #fff #000 #000 #fff;\n}\n\n.calendar tbody td.active {\n\tpadding: 2px 2px 0px 2px;\n\tborder: 1px solid;\n\tborder-color: #000 #fff #fff #000;\n}\n\n.calendar tbody td.selected {\n\tfont-weight: bold;\n\tpadding: 2px 2px 0px 2px;\n\tborder: 1px solid;\n\tborder-color: #000 #fff #fff #000;\n\tbackground: #D1DEE8;\n}\n\n.calendar tbody td.weekend {\n\tfont-weight: bold;\n\tcolor: #5f7ba4;\n}\n\n.calendar tbody td.today {\n\tfont-weight: bold;\n\tcolor: #5F7BA4;\n}\n\n.calendar tbody .disabled {\n\tcolor: #999;\n}\n\n.calendar tbody .emptycell {\n\tvisibility: hidden;\n}\n\n.calendar tbody .emptyrow {\n\tdisplay: none;\n}\n\n.calendar tfoot .footrow {\n\t\n}\n\n.calendar tfoot .ttip {\n\tbackground: #ffffff;\n\tpadding: 1px;\n\tborder: 1px solid #000;\n\tbackground: #5F7BA4;\n\tcolor: #fff;\n\ttext-align: center;\n}\n\n.calendar tfoot .hilite {\n\tborder-top: 1px solid #fff;\n\tborder-right: 1px solid #000;\n\tborder-bottom: 1px solid #000;\n\tborder-left: 1px solid #fff;\n\tpadding: 1px;\n\tbackground: #5F7BA4;\n}\n\n.calendar tfoot .active {\n\tpadding: 2px 0px 0px 2px;\n\tborder-top: 1px solid #000;\n\tborder-right: 1px solid #fff;\n\tborder-bottom: 1px solid #fff;\n\tborder-left: 1px solid #000;\n}\n\n.combo {\n\tposition: absolute;\n\tdisplay: none;\n\twidth: 4em;\n\ttop: 0px;\n\tleft: 0px;\n\tcursor: default;\n\tborder-top: 1px solid #fff;\n\tborder-right: 1px solid #000;\n\tborder-bottom: 1px solid #000;\n\tborder-left: 1px solid #fff;\n\tbackground: #ffffff;\n\tfont-size: smaller;\n\tpadding: 1px;\n}\n\n.combo .label {\n\ttext-align: center;\n\tpadding: 1px;\n}\n\n.combo .active {\n\tbackground: #c8d0d4;\n\tpadding: 0px;\n\tborder-top: 1px solid #000;\n\tborder-right: 1px solid #fff;\n\tborder-bottom: 1px solid #fff;\n\tborder-left: 1px solid #000;\n}\n\n.combo .hilite {\n\tfont-size: 9pt;\n\tbackground: #5f7ba4;\n\tcolor: #d1dee8;\n}" + }, + "redirectURL": "", + "headersSize": -1, + "bodySize": 0, + "_transferSize": 0 + }, + "cache": {}, + "timings": { + "blocked": -1, + "dns": -1, + "connect": -1, + "send": 0, + "wait": 0, + "receive": 0, + "ssl": -1 + }, + "pageref": "page_2" + }, + { + "startedDateTime": "2015-09-10T17:13:11.503Z", + "time": 224.43599998950958, + "request": { + "method": "GET", + "url": "https://secure11.oscarhost.ca/kensington/share/javascript/prototype.js", + "httpVersion": "HTTP/1.1", + "headers": [ + { + "name": "Accept-Encoding", + "value": "gzip, deflate, lzma, sdch" + }, + { + "name": "Host", + "value": "secure11.oscarhost.ca" + }, + { + "name": "Accept-Language", + "value": "en-US,en;q=0.8" + }, + { + "name": "User-Agent", + "value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.155 Safari/537.36 OPR/31.0.1889.174" + }, + { + "name": "Accept", + "value": "*/*" + }, + { + "name": "Referer", + "value": "https://secure11.oscarhost.ca/kensington/demographic/demographiccontrol.jsp?demographic_no=189164&displaymode=edit&dboperation=search_detail" + }, + { + "name": "Cookie", + "value": "JSESSIONID=C89CFAAB236CC41DEBBEEDA066552DC9; _ga=GA1.2.1898936923.1439425583; oscrcpid=\"\"; oscadmid=\"\"; oscprvid=74389190981689774322881876020216189399197; RT=" + }, + { + "name": "Connection", + "value": "keep-alive" + } + ], + "queryString": [], + "cookies": [ + { + "name": "JSESSIONID", + "value": "C89CFAAB236CC41DEBBEEDA066552DC9", + "expires": null, + "httpOnly": false, + "secure": false + }, + { + "name": "_ga", + "value": "GA1.2.1898936923.1439425583", + "expires": null, + "httpOnly": false, + "secure": false + }, + { + "name": "oscrcpid", + "value": "\"\"", + "expires": null, + "httpOnly": false, + "secure": false + }, + { + "name": "oscadmid", + "value": "\"\"", + "expires": null, + "httpOnly": false, + "secure": false + }, + { + "name": "oscprvid", + "value": "74389190981689774322881876020216189399197", + "expires": null, + "httpOnly": false, + "secure": false + }, + { + "name": "RT", + "value": "", + "expires": null, + "httpOnly": false, + "secure": false + } + ], + "headersSize": 673, + "bodySize": 0 + }, + "response": { + "status": 200, + "statusText": "OK", + "httpVersion": "HTTP/1.1", + "headers": [ + { + "name": "Date", + "value": "Thu, 10 Sep 2015 17:13:11 GMT" + }, + { + "name": "Last-Modified", + "value": "Mon, 09 Mar 2015 19:32:54 GMT" + }, + { + "name": "ETag", + "value": "\"96311-1425929574000\"" + }, + { + "name": "Content-Type", + "value": "text/javascript;charset=UTF-8" + }, + { + "name": "Cache-Control", + "value": "no-store, no-cache, must-revalidate" + }, + { + "name": "Connection", + "value": "Keep-Alive" + }, + { + "name": "Accept-Ranges", + "value": "bytes" + }, + { + "name": "Keep-Alive", + "value": "timeout=15, max=96" + }, + { + "name": "Content-Length", + "value": "96311" + } + ], + "cookies": [], + "content": { + "size": 96311, + "mimeType": "text/javascript", + "compression": 0, + "text": "/* Prototype JavaScript framework, version 1.5.1.1\n * (c) 2005-2007 Sam Stephenson\n *\n * Prototype is freely distributable under the terms of an MIT-style license.\n * For details, see the Prototype web site: http://www.prototypejs.org/\n *\n/*--------------------------------------------------------------------------*/\n\nvar Prototype = {\n Version: '1.5.1.1',\n\n Browser: {\n IE: !!(window.attachEvent && !window.opera),\n Opera: !!window.opera,\n WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1,\n Gecko: navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1\n },\n\n BrowserFeatures: {\n XPath: !!document.evaluate,\n ElementExtensions: !!window.HTMLElement,\n SpecificElementExtensions:\n (document.createElement('div').__proto__ !==\n document.createElement('form').__proto__)\n },\n\n ScriptFragment: ']*>([\\\\S\\\\s]*?)<\\/script>',\n JSONFilter: /^\\/\\*-secure-([\\s\\S]*)\\*\\/\\s*$/,\n\n emptyFunction: function() { },\n K: function(x) { return x }\n}\n\nvar Class = {\n create: function() {\n return function() {\n this.initialize.apply(this, arguments);\n }\n }\n}\n\nvar Abstract = new Object();\n\nObject.extend = function(destination, source) {\n for (var property in source) {\n destination[property] = source[property];\n }\n return destination;\n}\n\nObject.extend(Object, {\n inspect: function(object) {\n try {\n if (object === undefined) return 'undefined';\n if (object === null) return 'null';\n return object.inspect ? object.inspect() : object.toString();\n } catch (e) {\n if (e instanceof RangeError) return '...';\n throw e;\n }\n },\n\n toJSON: function(object) {\n var type = typeof object;\n switch(type) {\n case 'undefined':\n case 'function':\n case 'unknown': return;\n case 'boolean': return object.toString();\n }\n if (object === null) return 'null';\n if (object.toJSON) return object.toJSON();\n if (object.ownerDocument === document) return;\n var results = [];\n for (var property in object) {\n var value = Object.toJSON(object[property]);\n if (value !== undefined)\n results.push(property.toJSON() + ': ' + value);\n }\n return '{' + results.join(', ') + '}';\n },\n\n keys: function(object) {\n var keys = [];\n for (var property in object)\n keys.push(property);\n return keys;\n },\n\n values: function(object) {\n var values = [];\n for (var property in object)\n values.push(object[property]);\n return values;\n },\n\n clone: function(object) {\n return Object.extend({}, object);\n }\n});\n\nFunction.prototype.bind = function() {\n var __method = this, args = $A(arguments), object = args.shift();\n return function() {\n return __method.apply(object, args.concat($A(arguments)));\n }\n}\n\nFunction.prototype.bindAsEventListener = function(object) {\n var __method = this, args = $A(arguments), object = args.shift();\n return function(event) {\n return __method.apply(object, [event || window.event].concat(args));\n }\n}\n\nObject.extend(Number.prototype, {\n toColorPart: function() {\n return this.toPaddedString(2, 16);\n },\n\n succ: function() {\n return this + 1;\n },\n\n times: function(iterator) {\n $R(0, this, true).each(iterator);\n return this;\n },\n\n toPaddedString: function(length, radix) {\n var string = this.toString(radix || 10);\n return '0'.times(length - string.length) + string;\n },\n\n toJSON: function() {\n return isFinite(this) ? this.toString() : 'null';\n }\n});\n\nDate.prototype.toJSON = function() {\n return '\"' + this.getFullYear() + '-' +\n (this.getMonth() + 1).toPaddedString(2) + '-' +\n this.getDate().toPaddedString(2) + 'T' +\n this.getHours().toPaddedString(2) + ':' +\n this.getMinutes().toPaddedString(2) + ':' +\n this.getSeconds().toPaddedString(2) + '\"';\n};\n\nvar Try = {\n these: function() {\n var returnValue;\n\n for (var i = 0, length = arguments.length; i < length; i++) {\n var lambda = arguments[i];\n try {\n returnValue = lambda();\n break;\n } catch (e) {}\n }\n\n return returnValue;\n }\n}\n\n/*--------------------------------------------------------------------------*/\n\nvar PeriodicalExecuter = Class.create();\nPeriodicalExecuter.prototype = {\n initialize: function(callback, frequency) {\n this.callback = callback;\n this.frequency = frequency;\n this.currentlyExecuting = false;\n\n this.registerCallback();\n },\n\n registerCallback: function() {\n this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);\n },\n\n stop: function() {\n if (!this.timer) return;\n clearInterval(this.timer);\n this.timer = null;\n },\n\n onTimerEvent: function() {\n if (!this.currentlyExecuting) {\n try {\n this.currentlyExecuting = true;\n this.callback(this);\n } finally {\n this.currentlyExecuting = false;\n }\n }\n }\n}\nObject.extend(String, {\n interpret: function(value) {\n return value == null ? '' : String(value);\n },\n specialChar: {\n '\\b': '\\\\b',\n '\\t': '\\\\t',\n '\\n': '\\\\n',\n '\\f': '\\\\f',\n '\\r': '\\\\r',\n '\\\\': '\\\\\\\\'\n }\n});\n\nObject.extend(String.prototype, {\n gsub: function(pattern, replacement) {\n var result = '', source = this, match;\n replacement = arguments.callee.prepareReplacement(replacement);\n\n while (source.length > 0) {\n if (match = source.match(pattern)) {\n result += source.slice(0, match.index);\n result += String.interpret(replacement(match));\n source = source.slice(match.index + match[0].length);\n } else {\n result += source, source = '';\n }\n }\n return result;\n },\n\n sub: function(pattern, replacement, count) {\n replacement = this.gsub.prepareReplacement(replacement);\n count = count === undefined ? 1 : count;\n\n return this.gsub(pattern, function(match) {\n if (--count < 0) return match[0];\n return replacement(match);\n });\n },\n\n scan: function(pattern, iterator) {\n this.gsub(pattern, iterator);\n return this;\n },\n\n truncate: function(length, truncation) {\n length = length || 30;\n truncation = truncation === undefined ? '...' : truncation;\n return this.length > length ?\n this.slice(0, length - truncation.length) + truncation : this;\n },\n\n strip: function() {\n return this.replace(/^\\s+/, '').replace(/\\s+$/, '');\n },\n\n stripTags: function() {\n return this.replace(/<\\/?[^>]+>/gi, '');\n },\n\n stripScripts: function() {\n return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), '');\n },\n\n extractScripts: function() {\n var matchAll = new RegExp(Prototype.ScriptFragment, 'img');\n var matchOne = new RegExp(Prototype.ScriptFragment, 'im');\n return (this.match(matchAll) || []).map(function(scriptTag) {\n return (scriptTag.match(matchOne) || ['', ''])[1];\n });\n },\n\n evalScripts: function() {\n return this.extractScripts().map(function(script) { return eval(script) });\n },\n\n escapeHTML: function() {\n var self = arguments.callee;\n self.text.data = this;\n return self.div.innerHTML;\n },\n\n unescapeHTML: function() {\n var div = document.createElement('div');\n div.innerHTML = this.stripTags();\n return div.childNodes[0] ? (div.childNodes.length > 1 ?\n $A(div.childNodes).inject('', function(memo, node) { return memo+node.nodeValue }) :\n div.childNodes[0].nodeValue) : '';\n },\n\n toQueryParams: function(separator) {\n var match = this.strip().match(/([^?#]*)(#.*)?$/);\n if (!match) return {};\n\n return match[1].split(separator || '&').inject({}, function(hash, pair) {\n if ((pair = pair.split('='))[0]) {\n var key = decodeURIComponent(pair.shift());\n var value = pair.length > 1 ? pair.join('=') : pair[0];\n if (value != undefined) value = decodeURIComponent(value);\n\n if (key in hash) {\n if (hash[key].constructor != Array) hash[key] = [hash[key]];\n hash[key].push(value);\n }\n else hash[key] = value;\n }\n return hash;\n });\n },\n\n toArray: function() {\n return this.split('');\n },\n\n succ: function() {\n return this.slice(0, this.length - 1) +\n String.fromCharCode(this.charCodeAt(this.length - 1) + 1);\n },\n\n times: function(count) {\n var result = '';\n for (var i = 0; i < count; i++) result += this;\n return result;\n },\n\n camelize: function() {\n var parts = this.split('-'), len = parts.length;\n if (len == 1) return parts[0];\n\n var camelized = this.charAt(0) == '-'\n ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1)\n : parts[0];\n\n for (var i = 1; i < len; i++)\n camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1);\n\n return camelized;\n },\n\n capitalize: function() {\n return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase();\n },\n\n underscore: function() {\n return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'_').toLowerCase();\n },\n\n dasherize: function() {\n return this.gsub(/_/,'-');\n },\n\n inspect: function(useDoubleQuotes) {\n var escapedString = this.gsub(/[\\x00-\\x1f\\\\]/, function(match) {\n var character = String.specialChar[match[0]];\n return character ? character : '\\\\u00' + match[0].charCodeAt().toPaddedString(2, 16);\n });\n if (useDoubleQuotes) return '\"' + escapedString.replace(/\"/g, '\\\\\"') + '\"';\n return \"'\" + escapedString.replace(/'/g, '\\\\\\'') + \"'\";\n },\n\n toJSON: function() {\n return this.inspect(true);\n },\n\n unfilterJSON: function(filter) {\n return this.sub(filter || Prototype.JSONFilter, '#{1}');\n },\n\n isJSON: function() {\n var str = this.replace(/\\\\./g, '@').replace(/\"[^\"\\\\\\n\\r]*\"/g, '');\n return (/^[,:{}\\[\\]0-9.\\-+Eaeflnr-u \\n\\r\\t]*$/).test(str);\n },\n\n evalJSON: function(sanitize) {\n var json = this.unfilterJSON();\n try {\n if (!sanitize || json.isJSON()) return eval('(' + json + ')');\n } catch (e) { }\n throw new SyntaxError('Badly formed JSON string: ' + this.inspect());\n },\n\n include: function(pattern) {\n return this.indexOf(pattern) > -1;\n },\n\n startsWith: function(pattern) {\n return this.indexOf(pattern) === 0;\n },\n\n endsWith: function(pattern) {\n var d = this.length - pattern.length;\n return d >= 0 && this.lastIndexOf(pattern) === d;\n },\n\n empty: function() {\n return this == '';\n },\n\n blank: function() {\n return /^\\s*$/.test(this);\n }\n});\n\nif (Prototype.Browser.WebKit || Prototype.Browser.IE) Object.extend(String.prototype, {\n escapeHTML: function() {\n return this.replace(/&/g,'&').replace(//g,'>');\n },\n unescapeHTML: function() {\n return this.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>');\n }\n});\n\nString.prototype.gsub.prepareReplacement = function(replacement) {\n if (typeof replacement == 'function') return replacement;\n var template = new Template(replacement);\n return function(match) { return template.evaluate(match) };\n}\n\nString.prototype.parseQuery = String.prototype.toQueryParams;\n\nObject.extend(String.prototype.escapeHTML, {\n div: document.createElement('div'),\n text: document.createTextNode('')\n});\n\nwith (String.prototype.escapeHTML) div.appendChild(text);\n\nvar Template = Class.create();\nTemplate.Pattern = /(^|.|\\r|\\n)(#\\{(.*?)\\})/;\nTemplate.prototype = {\n initialize: function(template, pattern) {\n this.template = template.toString();\n this.pattern = pattern || Template.Pattern;\n },\n\n evaluate: function(object) {\n return this.template.gsub(this.pattern, function(match) {\n var before = match[1];\n if (before == '\\\\') return match[2];\n return before + String.interpret(object[match[3]]);\n });\n }\n}\n\nvar $break = {}, $continue = new Error('\"throw $continue\" is deprecated, use \"return\" instead');\n\nvar Enumerable = {\n each: function(iterator) {\n var index = 0;\n try {\n this._each(function(value) {\n iterator(value, index++);\n });\n } catch (e) {\n if (e != $break) throw e;\n }\n return this;\n },\n\n eachSlice: function(number, iterator) {\n var index = -number, slices = [], array = this.toArray();\n while ((index += number) < array.length)\n slices.push(array.slice(index, index+number));\n return slices.map(iterator);\n },\n\n all: function(iterator) {\n var result = true;\n this.each(function(value, index) {\n result = result && !!(iterator || Prototype.K)(value, index);\n if (!result) throw $break;\n });\n return result;\n },\n\n any: function(iterator) {\n var result = false;\n this.each(function(value, index) {\n if (result = !!(iterator || Prototype.K)(value, index))\n throw $break;\n });\n return result;\n },\n\n collect: function(iterator) {\n var results = [];\n this.each(function(value, index) {\n results.push((iterator || Prototype.K)(value, index));\n });\n return results;\n },\n\n detect: function(iterator) {\n var result;\n this.each(function(value, index) {\n if (iterator(value, index)) {\n result = value;\n throw $break;\n }\n });\n return result;\n },\n\n findAll: function(iterator) {\n var results = [];\n this.each(function(value, index) {\n if (iterator(value, index))\n results.push(value);\n });\n return results;\n },\n\n grep: function(pattern, iterator) {\n var results = [];\n this.each(function(value, index) {\n var stringValue = value.toString();\n if (stringValue.match(pattern))\n results.push((iterator || Prototype.K)(value, index));\n })\n return results;\n },\n\n include: function(object) {\n var found = false;\n this.each(function(value) {\n if (value == object) {\n found = true;\n throw $break;\n }\n });\n return found;\n },\n\n inGroupsOf: function(number, fillWith) {\n fillWith = fillWith === undefined ? null : fillWith;\n return this.eachSlice(number, function(slice) {\n while(slice.length < number) slice.push(fillWith);\n return slice;\n });\n },\n\n inject: function(memo, iterator) {\n this.each(function(value, index) {\n memo = iterator(memo, value, index);\n });\n return memo;\n },\n\n invoke: function(method) {\n var args = $A(arguments).slice(1);\n return this.map(function(value) {\n return value[method].apply(value, args);\n });\n },\n\n max: function(iterator) {\n var result;\n this.each(function(value, index) {\n value = (iterator || Prototype.K)(value, index);\n if (result == undefined || value >= result)\n result = value;\n });\n return result;\n },\n\n min: function(iterator) {\n var result;\n this.each(function(value, index) {\n value = (iterator || Prototype.K)(value, index);\n if (result == undefined || value < result)\n result = value;\n });\n return result;\n },\n\n partition: function(iterator) {\n var trues = [], falses = [];\n this.each(function(value, index) {\n ((iterator || Prototype.K)(value, index) ?\n trues : falses).push(value);\n });\n return [trues, falses];\n },\n\n pluck: function(property) {\n var results = [];\n this.each(function(value, index) {\n results.push(value[property]);\n });\n return results;\n },\n\n reject: function(iterator) {\n var results = [];\n this.each(function(value, index) {\n if (!iterator(value, index))\n results.push(value);\n });\n return results;\n },\n\n sortBy: function(iterator) {\n return this.map(function(value, index) {\n return {value: value, criteria: iterator(value, index)};\n }).sort(function(left, right) {\n var a = left.criteria, b = right.criteria;\n return a < b ? -1 : a > b ? 1 : 0;\n }).pluck('value');\n },\n\n toArray: function() {\n return this.map();\n },\n\n zip: function() {\n var iterator = Prototype.K, args = $A(arguments);\n if (typeof args.last() == 'function')\n iterator = args.pop();\n\n var collections = [this].concat(args).map($A);\n return this.map(function(value, index) {\n return iterator(collections.pluck(index));\n });\n },\n\n size: function() {\n return this.toArray().length;\n },\n\n inspect: function() {\n return '#';\n }\n}\n\nObject.extend(Enumerable, {\n map: Enumerable.collect,\n find: Enumerable.detect,\n select: Enumerable.findAll,\n member: Enumerable.include,\n entries: Enumerable.toArray\n});\nvar $A = Array.from = function(iterable) {\n if (!iterable) return [];\n if (iterable.toArray) {\n return iterable.toArray();\n } else {\n var results = [];\n for (var i = 0, length = iterable.length; i < length; i++)\n results.push(iterable[i]);\n return results;\n }\n}\n\nif (Prototype.Browser.WebKit) {\n $A = Array.from = function(iterable) {\n if (!iterable) return [];\n if (!(typeof iterable == 'function' && iterable == '[object NodeList]') &&\n iterable.toArray) {\n return iterable.toArray();\n } else {\n var results = [];\n for (var i = 0, length = iterable.length; i < length; i++)\n results.push(iterable[i]);\n return results;\n }\n }\n}\n\nObject.extend(Array.prototype, Enumerable);\n\nif (!Array.prototype._reverse)\n Array.prototype._reverse = Array.prototype.reverse;\n\nObject.extend(Array.prototype, {\n _each: function(iterator) {\n for (var i = 0, length = this.length; i < length; i++)\n iterator(this[i]);\n },\n\n clear: function() {\n this.length = 0;\n return this;\n },\n\n first: function() {\n return this[0];\n },\n\n last: function() {\n return this[this.length - 1];\n },\n\n compact: function() {\n return this.select(function(value) {\n return value != null;\n });\n },\n\n flatten: function() {\n return this.inject([], function(array, value) {\n return array.concat(value && value.constructor == Array ?\n value.flatten() : [value]);\n });\n },\n\n without: function() {\n var values = $A(arguments);\n return this.select(function(value) {\n return !values.include(value);\n });\n },\n\n indexOf: function(object) {\n for (var i = 0, length = this.length; i < length; i++)\n if (this[i] == object) return i;\n return -1;\n },\n\n reverse: function(inline) {\n return (inline !== false ? this : this.toArray())._reverse();\n },\n\n reduce: function() {\n return this.length > 1 ? this : this[0];\n },\n\n uniq: function(sorted) {\n return this.inject([], function(array, value, index) {\n if (0 == index || (sorted ? array.last() != value : !array.include(value)))\n array.push(value);\n return array;\n });\n },\n\n clone: function() {\n return [].concat(this);\n },\n\n size: function() {\n return this.length;\n },\n\n inspect: function() {\n return '[' + this.map(Object.inspect).join(', ') + ']';\n },\n\n toJSON: function() {\n var results = [];\n this.each(function(object) {\n var value = Object.toJSON(object);\n if (value !== undefined) results.push(value);\n });\n return '[' + results.join(', ') + ']';\n }\n});\n\nArray.prototype.toArray = Array.prototype.clone;\n\nfunction $w(string) {\n string = string.strip();\n return string ? string.split(/\\s+/) : [];\n}\n\nif (Prototype.Browser.Opera){\n Array.prototype.concat = function() {\n var array = [];\n for (var i = 0, length = this.length; i < length; i++) array.push(this[i]);\n for (var i = 0, length = arguments.length; i < length; i++) {\n if (arguments[i].constructor == Array) {\n for (var j = 0, arrayLength = arguments[i].length; j < arrayLength; j++)\n array.push(arguments[i][j]);\n } else {\n array.push(arguments[i]);\n }\n }\n return array;\n }\n}\nvar Hash = function(object) {\n if (object instanceof Hash) this.merge(object);\n else Object.extend(this, object || {});\n};\n\nObject.extend(Hash, {\n toQueryString: function(obj) {\n var parts = [];\n parts.add = arguments.callee.addPair;\n\n this.prototype._each.call(obj, function(pair) {\n if (!pair.key) return;\n var value = pair.value;\n\n if (value && typeof value == 'object') {\n if (value.constructor == Array) value.each(function(value) {\n parts.add(pair.key, value);\n });\n return;\n }\n parts.add(pair.key, value);\n });\n\n return parts.join('&');\n },\n\n toJSON: function(object) {\n var results = [];\n this.prototype._each.call(object, function(pair) {\n var value = Object.toJSON(pair.value);\n if (value !== undefined) results.push(pair.key.toJSON() + ': ' + value);\n });\n return '{' + results.join(', ') + '}';\n }\n});\n\nHash.toQueryString.addPair = function(key, value, prefix) {\n key = encodeURIComponent(key);\n if (value === undefined) this.push(key);\n else this.push(key + '=' + (value == null ? '' : encodeURIComponent(value)));\n}\n\nObject.extend(Hash.prototype, Enumerable);\nObject.extend(Hash.prototype, {\n _each: function(iterator) {\n for (var key in this) {\n var value = this[key];\n if (value && value == Hash.prototype[key]) continue;\n\n var pair = [key, value];\n pair.key = key;\n pair.value = value;\n iterator(pair);\n }\n },\n\n keys: function() {\n return this.pluck('key');\n },\n\n values: function() {\n return this.pluck('value');\n },\n\n merge: function(hash) {\n return $H(hash).inject(this, function(mergedHash, pair) {\n mergedHash[pair.key] = pair.value;\n return mergedHash;\n });\n },\n\n remove: function() {\n var result;\n for(var i = 0, length = arguments.length; i < length; i++) {\n var value = this[arguments[i]];\n if (value !== undefined){\n if (result === undefined) result = value;\n else {\n if (result.constructor != Array) result = [result];\n result.push(value)\n }\n }\n delete this[arguments[i]];\n }\n return result;\n },\n\n toQueryString: function() {\n return Hash.toQueryString(this);\n },\n\n inspect: function() {\n return '#';\n },\n\n toJSON: function() {\n return Hash.toJSON(this);\n }\n});\n\nfunction $H(object) {\n if (object instanceof Hash) return object;\n return new Hash(object);\n};\n\n// Safari iterates over shadowed properties\nif (function() {\n var i = 0, Test = function(value) { this.key = value };\n Test.prototype.key = 'foo';\n for (var property in new Test('bar')) i++;\n return i > 1;\n}()) Hash.prototype._each = function(iterator) {\n var cache = [];\n for (var key in this) {\n var value = this[key];\n if ((value && value == Hash.prototype[key]) || cache.include(key)) continue;\n cache.push(key);\n var pair = [key, value];\n pair.key = key;\n pair.value = value;\n iterator(pair);\n }\n};\nObjectRange = Class.create();\nObject.extend(ObjectRange.prototype, Enumerable);\nObject.extend(ObjectRange.prototype, {\n initialize: function(start, end, exclusive) {\n this.start = start;\n this.end = end;\n this.exclusive = exclusive;\n },\n\n _each: function(iterator) {\n var value = this.start;\n while (this.include(value)) {\n iterator(value);\n value = value.succ();\n }\n },\n\n include: function(value) {\n if (value < this.start)\n return false;\n if (this.exclusive)\n return value < this.end;\n return value <= this.end;\n }\n});\n\nvar $R = function(start, end, exclusive) {\n return new ObjectRange(start, end, exclusive);\n}\n\nvar Ajax = {\n getTransport: function() {\n return Try.these(\n function() {return new XMLHttpRequest()},\n function() {return new ActiveXObject('Msxml2.XMLHTTP')},\n function() {return new ActiveXObject('Microsoft.XMLHTTP')}\n ) || false;\n },\n\n activeRequestCount: 0\n}\n\nAjax.Responders = {\n responders: [],\n\n _each: function(iterator) {\n this.responders._each(iterator);\n },\n\n register: function(responder) {\n if (!this.include(responder))\n this.responders.push(responder);\n },\n\n unregister: function(responder) {\n this.responders = this.responders.without(responder);\n },\n\n dispatch: function(callback, request, transport, json) {\n this.each(function(responder) {\n if (typeof responder[callback] == 'function') {\n try {\n responder[callback].apply(responder, [request, transport, json]);\n } catch (e) {}\n }\n });\n }\n};\n\nObject.extend(Ajax.Responders, Enumerable);\n\nAjax.Responders.register({\n onCreate: function() {\n Ajax.activeRequestCount++;\n },\n onComplete: function() {\n Ajax.activeRequestCount--;\n }\n});\n\nAjax.Base = function() {};\nAjax.Base.prototype = {\n setOptions: function(options) {\n this.options = {\n method: 'post',\n asynchronous: true,\n contentType: 'application/x-www-form-urlencoded',\n encoding: 'UTF-8',\n parameters: ''\n }\n Object.extend(this.options, options || {});\n\n this.options.method = this.options.method.toLowerCase();\n if (typeof this.options.parameters == 'string')\n this.options.parameters = this.options.parameters.toQueryParams();\n }\n}\n\nAjax.Request = Class.create();\nAjax.Request.Events =\n ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete'];\n\nAjax.Request.prototype = Object.extend(new Ajax.Base(), {\n _complete: false,\n\n initialize: function(url, options) {\n this.transport = Ajax.getTransport();\n this.setOptions(options);\n this.request(url);\n },\n\n request: function(url) {\n this.url = url;\n this.method = this.options.method;\n var params = Object.clone(this.options.parameters);\n\n if (!['get', 'post'].include(this.method)) {\n // simulate other verbs over post\n params['_method'] = this.method;\n this.method = 'post';\n }\n\n this.parameters = params;\n\n if (params = Hash.toQueryString(params)) {\n // when GET, append parameters to URL\n if (this.method == 'get')\n this.url += (this.url.include('?') ? '&' : '?') + params;\n else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent))\n params += '&_=';\n }\n\n try {\n if (this.options.onCreate) this.options.onCreate(this.transport);\n Ajax.Responders.dispatch('onCreate', this, this.transport);\n\n this.transport.open(this.method.toUpperCase(), this.url,\n this.options.asynchronous);\n\n if (this.options.asynchronous)\n setTimeout(function() { this.respondToReadyState(1) }.bind(this), 10);\n\n this.transport.onreadystatechange = this.onStateChange.bind(this);\n this.setRequestHeaders();\n\n this.body = this.method == 'post' ? (this.options.postBody || params) : null;\n this.transport.send(this.body);\n\n /* Force Firefox to handle ready state 4 for synchronous requests */\n if (!this.options.asynchronous && this.transport.overrideMimeType)\n this.onStateChange();\n\n }\n catch (e) {\n this.dispatchException(e);\n }\n },\n\n onStateChange: function() {\n var readyState = this.transport.readyState;\n if (readyState > 1 && !((readyState == 4) && this._complete))\n this.respondToReadyState(this.transport.readyState);\n },\n\n setRequestHeaders: function() {\n var headers = {\n 'X-Requested-With': 'XMLHttpRequest',\n 'X-Prototype-Version': Prototype.Version,\n 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*'\n };\n\n if (this.method == 'post') {\n headers['Content-type'] = this.options.contentType +\n (this.options.encoding ? '; charset=' + this.options.encoding : '');\n\n /* Force \"Connection: close\" for older Mozilla browsers to work\n * around a bug where XMLHttpRequest sends an incorrect\n * Content-length header. See Mozilla Bugzilla #246651.\n */\n if (this.transport.overrideMimeType &&\n (navigator.userAgent.match(/Gecko\\/(\\d{4})/) || [0,2005])[1] < 2005)\n headers['Connection'] = 'close';\n }\n\n // user-defined headers\n if (typeof this.options.requestHeaders == 'object') {\n var extras = this.options.requestHeaders;\n\n if (typeof extras.push == 'function')\n for (var i = 0, length = extras.length; i < length; i += 2)\n headers[extras[i]] = extras[i+1];\n else\n $H(extras).each(function(pair) { headers[pair.key] = pair.value });\n }\n\n for (var name in headers)\n this.transport.setRequestHeader(name, headers[name]);\n },\n\n success: function() {\n return !this.transport.status\n || (this.transport.status >= 200 && this.transport.status < 300);\n },\n\n respondToReadyState: function(readyState) {\n var state = Ajax.Request.Events[readyState];\n var transport = this.transport, json = this.evalJSON();\n\n if (state == 'Complete') {\n try {\n this._complete = true;\n (this.options['on' + this.transport.status]\n || this.options['on' + (this.success() ? 'Success' : 'Failure')]\n || Prototype.emptyFunction)(transport, json);\n } catch (e) {\n this.dispatchException(e);\n }\n\n var contentType = this.getHeader('Content-type');\n if (contentType && contentType.strip().\n match(/^(text|application)\\/(x-)?(java|ecma)script(;.*)?$/i))\n this.evalResponse();\n }\n\n try {\n (this.options['on' + state] || Prototype.emptyFunction)(transport, json);\n Ajax.Responders.dispatch('on' + state, this, transport, json);\n } catch (e) {\n this.dispatchException(e);\n }\n\n if (state == 'Complete') {\n // avoid memory leak in MSIE: clean up\n this.transport.onreadystatechange = Prototype.emptyFunction;\n }\n },\n\n getHeader: function(name) {\n try {\n return this.transport.getResponseHeader(name);\n } catch (e) { return null }\n },\n\n evalJSON: function() {\n try {\n var json = this.getHeader('X-JSON');\n return json ? json.evalJSON() : null;\n } catch (e) { return null }\n },\n\n evalResponse: function() {\n try {\n return eval((this.transport.responseText || '').unfilterJSON());\n } catch (e) {\n this.dispatchException(e);\n }\n },\n\n dispatchException: function(exception) {\n (this.options.onException || Prototype.emptyFunction)(this, exception);\n Ajax.Responders.dispatch('onException', this, exception);\n }\n});\n\nAjax.Updater = Class.create();\n\nObject.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), {\n initialize: function(container, url, options) {\n this.container = {\n success: (container.success || container),\n failure: (container.failure || (container.success ? null : container))\n }\n\n this.transport = Ajax.getTransport();\n this.setOptions(options);\n\n var onComplete = this.options.onComplete || Prototype.emptyFunction;\n this.options.onComplete = (function(transport, param) {\n this.updateContent();\n onComplete(transport, param);\n }).bind(this);\n\n this.request(url);\n },\n\n updateContent: function() {\n var receiver = this.container[this.success() ? 'success' : 'failure'];\n var response = this.transport.responseText;\n\n if (!this.options.evalScripts) response = response.stripScripts();\n\n if (receiver = $(receiver)) {\n if (this.options.insertion)\n new this.options.insertion(receiver, response);\n else\n receiver.update(response);\n }\n\n if (this.success()) {\n if (this.onComplete)\n setTimeout(this.onComplete.bind(this), 10);\n }\n }\n});\n\nAjax.PeriodicalUpdater = Class.create();\nAjax.PeriodicalUpdater.prototype = Object.extend(new Ajax.Base(), {\n initialize: function(container, url, options) {\n this.setOptions(options);\n this.onComplete = this.options.onComplete;\n\n this.frequency = (this.options.frequency || 2);\n this.decay = (this.options.decay || 1);\n\n this.updater = {};\n this.container = container;\n this.url = url;\n\n this.start();\n },\n\n start: function() {\n this.options.onComplete = this.updateComplete.bind(this);\n this.onTimerEvent();\n },\n\n stop: function() {\n this.updater.options.onComplete = undefined;\n clearTimeout(this.timer);\n (this.onComplete || Prototype.emptyFunction).apply(this, arguments);\n },\n\n updateComplete: function(request) {\n if (this.options.decay) {\n this.decay = (request.responseText == this.lastText ?\n this.decay * this.options.decay : 1);\n\n this.lastText = request.responseText;\n }\n this.timer = setTimeout(this.onTimerEvent.bind(this),\n this.decay * this.frequency * 1000);\n },\n\n onTimerEvent: function() {\n this.updater = new Ajax.Updater(this.container, this.url, this.options);\n }\n});\nfunction $(element) {\n if (arguments.length > 1) {\n for (var i = 0, elements = [], length = arguments.length; i < length; i++)\n elements.push($(arguments[i]));\n return elements;\n }\n if (typeof element == 'string')\n element = document.getElementById(element);\n return Element.extend(element);\n}\n\nif (Prototype.BrowserFeatures.XPath) {\n document._getElementsByXPath = function(expression, parentElement) {\n var results = [];\n var query = document.evaluate(expression, $(parentElement) || document,\n null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);\n for (var i = 0, length = query.snapshotLength; i < length; i++)\n results.push(query.snapshotItem(i));\n return results;\n };\n\n document.getElementsByClassName = function(className, parentElement) {\n var q = \".//*[contains(concat(' ', @class, ' '), ' \" + className + \" ')]\";\n return document._getElementsByXPath(q, parentElement);\n }\n\n} else document.getElementsByClassName = function(className, parentElement) {\n var children = ($(parentElement) || document.body).getElementsByTagName('*');\n var elements = [], child, pattern = new RegExp(\"(^|\\\\s)\" + className + \"(\\\\s|$)\");\n for (var i = 0, length = children.length; i < length; i++) {\n child = children[i];\n var elementClassName = child.className;\n if (elementClassName.length == 0) continue;\n if (elementClassName == className || elementClassName.match(pattern))\n elements.push(Element.extend(child));\n }\n return elements;\n};\n\n/*--------------------------------------------------------------------------*/\n\nif (!window.Element) var Element = {};\n\nElement.extend = function(element) {\n var F = Prototype.BrowserFeatures;\n if (!element || !element.tagName || element.nodeType == 3 ||\n element._extended || F.SpecificElementExtensions || element == window)\n return element;\n\n var methods = {}, tagName = element.tagName, cache = Element.extend.cache,\n T = Element.Methods.ByTag;\n\n // extend methods for all tags (Safari doesn't need this)\n if (!F.ElementExtensions) {\n Object.extend(methods, Element.Methods),\n Object.extend(methods, Element.Methods.Simulated);\n }\n\n // extend methods for specific tags\n if (T[tagName]) Object.extend(methods, T[tagName]);\n\n for (var property in methods) {\n var value = methods[property];\n if (typeof value == 'function' && !(property in element))\n element[property] = cache.findOrStore(value);\n }\n\n element._extended = Prototype.emptyFunction;\n return element;\n};\n\nElement.extend.cache = {\n findOrStore: function(value) {\n return this[value] = this[value] || function() {\n return value.apply(null, [this].concat($A(arguments)));\n }\n }\n};\n\nElement.Methods = {\n visible: function(element) {\n return $(element).style.display != 'none';\n },\n\n toggle: function(element) {\n element = $(element);\n Element[Element.visible(element) ? 'hide' : 'show'](element);\n return element;\n },\n\n hide: function(element) {\n $(element).style.display = 'none';\n return element;\n },\n\n show: function(element) {\n $(element).style.display = '';\n return element;\n },\n\n remove: function(element) {\n element = $(element);\n element.parentNode.removeChild(element);\n return element;\n },\n\n update: function(element, html) {\n html = typeof html == 'undefined' ? '' : html.toString();\n $(element).innerHTML = html.stripScripts();\n setTimeout(function() {html.evalScripts()}, 10);\n return element;\n },\n\n replace: function(element, html) {\n element = $(element);\n html = typeof html == 'undefined' ? '' : html.toString();\n if (element.outerHTML) {\n element.outerHTML = html.stripScripts();\n } else {\n var range = element.ownerDocument.createRange();\n range.selectNodeContents(element);\n element.parentNode.replaceChild(\n range.createContextualFragment(html.stripScripts()), element);\n }\n setTimeout(function() {html.evalScripts()}, 10);\n return element;\n },\n\n inspect: function(element) {\n element = $(element);\n var result = '<' + element.tagName.toLowerCase();\n $H({'id': 'id', 'className': 'class'}).each(function(pair) {\n var property = pair.first(), attribute = pair.last();\n var value = (element[property] || '').toString();\n if (value) result += ' ' + attribute + '=' + value.inspect(true);\n });\n return result + '>';\n },\n\n recursivelyCollect: function(element, property) {\n element = $(element);\n var elements = [];\n while (element = element[property])\n if (element.nodeType == 1)\n elements.push(Element.extend(element));\n return elements;\n },\n\n ancestors: function(element) {\n return $(element).recursivelyCollect('parentNode');\n },\n\n descendants: function(element) {\n return $A($(element).getElementsByTagName('*')).each(Element.extend);\n },\n\n firstDescendant: function(element) {\n element = $(element).firstChild;\n while (element && element.nodeType != 1) element = element.nextSibling;\n return $(element);\n },\n\n immediateDescendants: function(element) {\n if (!(element = $(element).firstChild)) return [];\n while (element && element.nodeType != 1) element = element.nextSibling;\n if (element) return [element].concat($(element).nextSiblings());\n return [];\n },\n\n previousSiblings: function(element) {\n return $(element).recursivelyCollect('previousSibling');\n },\n\n nextSiblings: function(element) {\n return $(element).recursivelyCollect('nextSibling');\n },\n\n siblings: function(element) {\n element = $(element);\n return element.previousSiblings().reverse().concat(element.nextSiblings());\n },\n\n match: function(element, selector) {\n if (typeof selector == 'string')\n selector = new Selector(selector);\n return selector.match($(element));\n },\n\n up: function(element, expression, index) {\n element = $(element);\n if (arguments.length == 1) return $(element.parentNode);\n var ancestors = element.ancestors();\n return expression ? Selector.findElement(ancestors, expression, index) :\n ancestors[index || 0];\n },\n\n down: function(element, expression, index) {\n element = $(element);\n if (arguments.length == 1) return element.firstDescendant();\n var descendants = element.descendants();\n return expression ? Selector.findElement(descendants, expression, index) :\n descendants[index || 0];\n },\n\n previous: function(element, expression, index) {\n element = $(element);\n if (arguments.length == 1) return $(Selector.handlers.previousElementSibling(element));\n var previousSiblings = element.previousSiblings();\n return expression ? Selector.findElement(previousSiblings, expression, index) :\n previousSiblings[index || 0];\n },\n\n next: function(element, expression, index) {\n element = $(element);\n if (arguments.length == 1) return $(Selector.handlers.nextElementSibling(element));\n var nextSiblings = element.nextSiblings();\n return expression ? Selector.findElement(nextSiblings, expression, index) :\n nextSiblings[index || 0];\n },\n\n getElementsBySelector: function() {\n var args = $A(arguments), element = $(args.shift());\n return Selector.findChildElements(element, args);\n },\n\n getElementsByClassName: function(element, className) {\n return document.getElementsByClassName(className, element);\n },\n\n readAttribute: function(element, name) {\n element = $(element);\n if (Prototype.Browser.IE) {\n if (!element.attributes) return null;\n var t = Element._attributeTranslations;\n if (t.values[name]) return t.values[name](element, name);\n if (t.names[name]) name = t.names[name];\n var attribute = element.attributes[name];\n return attribute ? attribute.nodeValue : null;\n }\n return element.getAttribute(name);\n },\n\n getHeight: function(element) {\n return $(element).getDimensions().height;\n },\n\n getWidth: function(element) {\n return $(element).getDimensions().width;\n },\n\n classNames: function(element) {\n return new Element.ClassNames(element);\n },\n\n hasClassName: function(element, className) {\n if (!(element = $(element))) return;\n var elementClassName = element.className;\n if (elementClassName.length == 0) return false;\n if (elementClassName == className ||\n elementClassName.match(new RegExp(\"(^|\\\\s)\" + className + \"(\\\\s|$)\")))\n return true;\n return false;\n },\n\n addClassName: function(element, className) {\n if (!(element = $(element))) return;\n Element.classNames(element).add(className);\n return element;\n },\n\n removeClassName: function(element, className) {\n if (!(element = $(element))) return;\n Element.classNames(element).remove(className);\n return element;\n },\n\n toggleClassName: function(element, className) {\n if (!(element = $(element))) return;\n Element.classNames(element)[element.hasClassName(className) ? 'remove' : 'add'](className);\n return element;\n },\n\n observe: function() {\n Event.observe.apply(Event, arguments);\n return $A(arguments).first();\n },\n\n stopObserving: function() {\n Event.stopObserving.apply(Event, arguments);\n return $A(arguments).first();\n },\n\n // removes whitespace-only text node children\n cleanWhitespace: function(element) {\n element = $(element);\n var node = element.firstChild;\n while (node) {\n var nextNode = node.nextSibling;\n if (node.nodeType == 3 && !/\\S/.test(node.nodeValue))\n element.removeChild(node);\n node = nextNode;\n }\n return element;\n },\n\n empty: function(element) {\n return $(element).innerHTML.blank();\n },\n\n descendantOf: function(element, ancestor) {\n element = $(element), ancestor = $(ancestor);\n while (element = element.parentNode)\n if (element == ancestor) return true;\n return false;\n },\n\n scrollTo: function(element) {\n element = $(element);\n var pos = Position.cumulativeOffset(element);\n window.scrollTo(pos[0], pos[1]);\n return element;\n },\n\n getStyle: function(element, style) {\n element = $(element);\n style = style == 'float' ? 'cssFloat' : style.camelize();\n var value = element.style[style];\n if (!value) {\n var css = document.defaultView.getComputedStyle(element, null);\n value = css ? css[style] : null;\n }\n if (style == 'opacity') return value ? parseFloat(value) : 1.0;\n return value == 'auto' ? null : value;\n },\n\n getOpacity: function(element) {\n return $(element).getStyle('opacity');\n },\n\n setStyle: function(element, styles, camelized) {\n element = $(element);\n var elementStyle = element.style;\n\n for (var property in styles)\n if (property == 'opacity') element.setOpacity(styles[property])\n else\n elementStyle[(property == 'float' || property == 'cssFloat') ?\n (elementStyle.styleFloat === undefined ? 'cssFloat' : 'styleFloat') :\n (camelized ? property : property.camelize())] = styles[property];\n\n return element;\n },\n\n setOpacity: function(element, value) {\n element = $(element);\n element.style.opacity = (value == 1 || value === '') ? '' :\n (value < 0.00001) ? 0 : value;\n return element;\n },\n\n getDimensions: function(element) {\n element = $(element);\n var display = $(element).getStyle('display');\n if (display != 'none' && display != null) // Safari bug\n return {width: element.offsetWidth, height: element.offsetHeight};\n\n // All *Width and *Height properties give 0 on elements with display none,\n // so enable the element temporarily\n var els = element.style;\n var originalVisibility = els.visibility;\n var originalPosition = els.position;\n var originalDisplay = els.display;\n els.visibility = 'hidden';\n els.position = 'absolute';\n els.display = 'block';\n var originalWidth = element.clientWidth;\n var originalHeight = element.clientHeight;\n els.display = originalDisplay;\n els.position = originalPosition;\n els.visibility = originalVisibility;\n return {width: originalWidth, height: originalHeight};\n },\n\n makePositioned: function(element) {\n element = $(element);\n var pos = Element.getStyle(element, 'position');\n if (pos == 'static' || !pos) {\n element._madePositioned = true;\n element.style.position = 'relative';\n // Opera returns the offset relative to the positioning context, when an\n // element is position relative but top and left have not been defined\n if (window.opera) {\n element.style.top = 0;\n element.style.left = 0;\n }\n }\n return element;\n },\n\n undoPositioned: function(element) {\n element = $(element);\n if (element._madePositioned) {\n element._madePositioned = undefined;\n element.style.position =\n element.style.top =\n element.style.left =\n element.style.bottom =\n element.style.right = '';\n }\n return element;\n },\n\n makeClipping: function(element) {\n element = $(element);\n if (element._overflow) return element;\n element._overflow = element.style.overflow || 'auto';\n if ((Element.getStyle(element, 'overflow') || 'visible') != 'hidden')\n element.style.overflow = 'hidden';\n return element;\n },\n\n undoClipping: function(element) {\n element = $(element);\n if (!element._overflow) return element;\n element.style.overflow = element._overflow == 'auto' ? '' : element._overflow;\n element._overflow = null;\n return element;\n }\n};\n\nObject.extend(Element.Methods, {\n childOf: Element.Methods.descendantOf,\n childElements: Element.Methods.immediateDescendants\n});\n\nif (Prototype.Browser.Opera) {\n Element.Methods._getStyle = Element.Methods.getStyle;\n Element.Methods.getStyle = function(element, style) {\n switch(style) {\n case 'left':\n case 'top':\n case 'right':\n case 'bottom':\n if (Element._getStyle(element, 'position') == 'static') return null;\n default: return Element._getStyle(element, style);\n }\n };\n}\nelse if (Prototype.Browser.IE) {\n Element.Methods.getStyle = function(element, style) {\n element = $(element);\n style = (style == 'float' || style == 'cssFloat') ? 'styleFloat' : style.camelize();\n var value = element.style[style];\n if (!value && element.currentStyle) value = element.currentStyle[style];\n\n if (style == 'opacity') {\n if (value = (element.getStyle('filter') || '').match(/alpha\\(opacity=(.*)\\)/))\n if (value[1]) return parseFloat(value[1]) / 100;\n return 1.0;\n }\n\n if (value == 'auto') {\n if ((style == 'width' || style == 'height') && (element.getStyle('display') != 'none'))\n return element['offset'+style.capitalize()] + 'px';\n return null;\n }\n return value;\n };\n\n Element.Methods.setOpacity = function(element, value) {\n element = $(element);\n var filter = element.getStyle('filter'), style = element.style;\n if (value == 1 || value === '') {\n style.filter = filter.replace(/alpha\\([^\\)]*\\)/gi,'');\n return element;\n } else if (value < 0.00001) value = 0;\n style.filter = filter.replace(/alpha\\([^\\)]*\\)/gi, '') +\n 'alpha(opacity=' + (value * 100) + ')';\n return element;\n };\n\n // IE is missing .innerHTML support for TABLE-related elements\n Element.Methods.update = function(element, html) {\n element = $(element);\n html = typeof html == 'undefined' ? '' : html.toString();\n var tagName = element.tagName.toUpperCase();\n if (['THEAD','TBODY','TR','TD'].include(tagName)) {\n var div = document.createElement('div');\n switch (tagName) {\n case 'THEAD':\n case 'TBODY':\n div.innerHTML = '' + html.stripScripts() + '
';\n depth = 2;\n break;\n case 'TR':\n div.innerHTML = '' + html.stripScripts() + '
';\n depth = 3;\n break;\n case 'TD':\n div.innerHTML = '
' + html.stripScripts() + '
';\n depth = 4;\n }\n $A(element.childNodes).each(function(node) { element.removeChild(node) });\n depth.times(function() { div = div.firstChild });\n $A(div.childNodes).each(function(node) { element.appendChild(node) });\n } else {\n element.innerHTML = html.stripScripts();\n }\n setTimeout(function() { html.evalScripts() }, 10);\n return element;\n }\n}\nelse if (Prototype.Browser.Gecko) {\n Element.Methods.setOpacity = function(element, value) {\n element = $(element);\n element.style.opacity = (value == 1) ? 0.999999 :\n (value === '') ? '' : (value < 0.00001) ? 0 : value;\n return element;\n };\n}\n\nElement._attributeTranslations = {\n names: {\n colspan: \"colSpan\",\n rowspan: \"rowSpan\",\n valign: \"vAlign\",\n datetime: \"dateTime\",\n accesskey: \"accessKey\",\n tabindex: \"tabIndex\",\n enctype: \"encType\",\n maxlength: \"maxLength\",\n readonly: \"readOnly\",\n longdesc: \"longDesc\"\n },\n values: {\n _getAttr: function(element, attribute) {\n return element.getAttribute(attribute, 2);\n },\n _flag: function(element, attribute) {\n return $(element).hasAttribute(attribute) ? attribute : null;\n },\n style: function(element) {\n return element.style.cssText.toLowerCase();\n },\n title: function(element) {\n var node = element.getAttributeNode('title');\n return node.specified ? node.nodeValue : null;\n }\n }\n};\n\n(function() {\n Object.extend(this, {\n href: this._getAttr,\n src: this._getAttr,\n type: this._getAttr,\n disabled: this._flag,\n checked: this._flag,\n readonly: this._flag,\n multiple: this._flag\n });\n}).call(Element._attributeTranslations.values);\n\nElement.Methods.Simulated = {\n hasAttribute: function(element, attribute) {\n var t = Element._attributeTranslations, node;\n attribute = t.names[attribute] || attribute;\n node = $(element).getAttributeNode(attribute);\n return node && node.specified;\n }\n};\n\nElement.Methods.ByTag = {};\n\nObject.extend(Element, Element.Methods);\n\nif (!Prototype.BrowserFeatures.ElementExtensions &&\n document.createElement('div').__proto__) {\n window.HTMLElement = {};\n window.HTMLElement.prototype = document.createElement('div').__proto__;\n Prototype.BrowserFeatures.ElementExtensions = true;\n}\n\nElement.hasAttribute = function(element, attribute) {\n if (element.hasAttribute) return element.hasAttribute(attribute);\n return Element.Methods.Simulated.hasAttribute(element, attribute);\n};\n\nElement.addMethods = function(methods) {\n var F = Prototype.BrowserFeatures, T = Element.Methods.ByTag;\n\n if (!methods) {\n Object.extend(Form, Form.Methods);\n Object.extend(Form.Element, Form.Element.Methods);\n Object.extend(Element.Methods.ByTag, {\n \"FORM\": Object.clone(Form.Methods),\n \"INPUT\": Object.clone(Form.Element.Methods),\n \"SELECT\": Object.clone(Form.Element.Methods),\n \"TEXTAREA\": Object.clone(Form.Element.Methods)\n });\n }\n\n if (arguments.length == 2) {\n var tagName = methods;\n methods = arguments[1];\n }\n\n if (!tagName) Object.extend(Element.Methods, methods || {});\n else {\n if (tagName.constructor == Array) tagName.each(extend);\n else extend(tagName);\n }\n\n function extend(tagName) {\n tagName = tagName.toUpperCase();\n if (!Element.Methods.ByTag[tagName])\n Element.Methods.ByTag[tagName] = {};\n Object.extend(Element.Methods.ByTag[tagName], methods);\n }\n\n function copy(methods, destination, onlyIfAbsent) {\n onlyIfAbsent = onlyIfAbsent || false;\n var cache = Element.extend.cache;\n for (var property in methods) {\n var value = methods[property];\n if (!onlyIfAbsent || !(property in destination))\n destination[property] = cache.findOrStore(value);\n }\n }\n\n function findDOMClass(tagName) {\n var klass;\n var trans = {\n \"OPTGROUP\": \"OptGroup\", \"TEXTAREA\": \"TextArea\", \"P\": \"Paragraph\",\n \"FIELDSET\": \"FieldSet\", \"UL\": \"UList\", \"OL\": \"OList\", \"DL\": \"DList\",\n \"DIR\": \"Directory\", \"H1\": \"Heading\", \"H2\": \"Heading\", \"H3\": \"Heading\",\n \"H4\": \"Heading\", \"H5\": \"Heading\", \"H6\": \"Heading\", \"Q\": \"Quote\",\n \"INS\": \"Mod\", \"DEL\": \"Mod\", \"A\": \"Anchor\", \"IMG\": \"Image\", \"CAPTION\":\n \"TableCaption\", \"COL\": \"TableCol\", \"COLGROUP\": \"TableCol\", \"THEAD\":\n \"TableSection\", \"TFOOT\": \"TableSection\", \"TBODY\": \"TableSection\", \"TR\":\n \"TableRow\", \"TH\": \"TableCell\", \"TD\": \"TableCell\", \"FRAMESET\":\n \"FrameSet\", \"IFRAME\": \"IFrame\"\n };\n if (trans[tagName]) klass = 'HTML' + trans[tagName] + 'Element';\n if (window[klass]) return window[klass];\n klass = 'HTML' + tagName + 'Element';\n if (window[klass]) return window[klass];\n klass = 'HTML' + tagName.capitalize() + 'Element';\n if (window[klass]) return window[klass];\n\n window[klass] = {};\n window[klass].prototype = document.createElement(tagName).__proto__;\n return window[klass];\n }\n\n if (F.ElementExtensions) {\n copy(Element.Methods, HTMLElement.prototype);\n copy(Element.Methods.Simulated, HTMLElement.prototype, true);\n }\n\n if (F.SpecificElementExtensions) {\n for (var tag in Element.Methods.ByTag) {\n var klass = findDOMClass(tag);\n if (typeof klass == \"undefined\") continue;\n copy(T[tag], klass.prototype);\n }\n }\n\n Object.extend(Element, Element.Methods);\n delete Element.ByTag;\n};\n\nvar Toggle = { display: Element.toggle };\n\n/*--------------------------------------------------------------------------*/\n\nAbstract.Insertion = function(adjacency) {\n this.adjacency = adjacency;\n}\n\nAbstract.Insertion.prototype = {\n initialize: function(element, content) {\n this.element = $(element);\n this.content = content.stripScripts();\n\n if (this.adjacency && this.element.insertAdjacentHTML) {\n try {\n this.element.insertAdjacentHTML(this.adjacency, this.content);\n } catch (e) {\n var tagName = this.element.tagName.toUpperCase();\n if (['TBODY', 'TR'].include(tagName)) {\n this.insertContent(this.contentFromAnonymousTable());\n } else {\n throw e;\n }\n }\n } else {\n this.range = this.element.ownerDocument.createRange();\n if (this.initializeRange) this.initializeRange();\n this.insertContent([this.range.createContextualFragment(this.content)]);\n }\n\n setTimeout(function() {content.evalScripts()}, 10);\n },\n\n contentFromAnonymousTable: function() {\n var div = document.createElement('div');\n div.innerHTML = '' + this.content + '
';\n return $A(div.childNodes[0].childNodes[0].childNodes);\n }\n}\n\nvar Insertion = new Object();\n\nInsertion.Before = Class.create();\nInsertion.Before.prototype = Object.extend(new Abstract.Insertion('beforeBegin'), {\n initializeRange: function() {\n this.range.setStartBefore(this.element);\n },\n\n insertContent: function(fragments) {\n fragments.each((function(fragment) {\n this.element.parentNode.insertBefore(fragment, this.element);\n }).bind(this));\n }\n});\n\nInsertion.Top = Class.create();\nInsertion.Top.prototype = Object.extend(new Abstract.Insertion('afterBegin'), {\n initializeRange: function() {\n this.range.selectNodeContents(this.element);\n this.range.collapse(true);\n },\n\n insertContent: function(fragments) {\n fragments.reverse(false).each((function(fragment) {\n this.element.insertBefore(fragment, this.element.firstChild);\n }).bind(this));\n }\n});\n\nInsertion.Bottom = Class.create();\nInsertion.Bottom.prototype = Object.extend(new Abstract.Insertion('beforeEnd'), {\n initializeRange: function() {\n this.range.selectNodeContents(this.element);\n this.range.collapse(this.element);\n },\n\n insertContent: function(fragments) {\n fragments.each((function(fragment) {\n this.element.appendChild(fragment);\n }).bind(this));\n }\n});\n\nInsertion.After = Class.create();\nInsertion.After.prototype = Object.extend(new Abstract.Insertion('afterEnd'), {\n initializeRange: function() {\n this.range.setStartAfter(this.element);\n },\n\n insertContent: function(fragments) {\n fragments.each((function(fragment) {\n this.element.parentNode.insertBefore(fragment,\n this.element.nextSibling);\n }).bind(this));\n }\n});\n\n/*--------------------------------------------------------------------------*/\n\nElement.ClassNames = Class.create();\nElement.ClassNames.prototype = {\n initialize: function(element) {\n this.element = $(element);\n },\n\n _each: function(iterator) {\n this.element.className.split(/\\s+/).select(function(name) {\n return name.length > 0;\n })._each(iterator);\n },\n\n set: function(className) {\n this.element.className = className;\n },\n\n add: function(classNameToAdd) {\n if (this.include(classNameToAdd)) return;\n this.set($A(this).concat(classNameToAdd).join(' '));\n },\n\n remove: function(classNameToRemove) {\n if (!this.include(classNameToRemove)) return;\n this.set($A(this).without(classNameToRemove).join(' '));\n },\n\n toString: function() {\n return $A(this).join(' ');\n }\n};\n\nObject.extend(Element.ClassNames.prototype, Enumerable);\n/* Portions of the Selector class are derived from Jack Slocum’s DomQuery,\n * part of YUI-Ext version 0.40, distributed under the terms of an MIT-style\n * license. Please see http://www.yui-ext.com/ for more information. */\n\nvar Selector = Class.create();\n\nSelector.prototype = {\n initialize: function(expression) {\n this.expression = expression.strip();\n this.compileMatcher();\n },\n\n compileMatcher: function() {\n // Selectors with namespaced attributes can't use the XPath version\n if (Prototype.BrowserFeatures.XPath && !(/\\[[\\w-]*?:/).test(this.expression))\n return this.compileXPathMatcher();\n\n var e = this.expression, ps = Selector.patterns, h = Selector.handlers,\n c = Selector.criteria, le, p, m;\n\n if (Selector._cache[e]) {\n this.matcher = Selector._cache[e]; return;\n }\n this.matcher = [\"this.matcher = function(root) {\",\n \"var r = root, h = Selector.handlers, c = false, n;\"];\n\n while (e && le != e && (/\\S/).test(e)) {\n le = e;\n for (var i in ps) {\n p = ps[i];\n if (m = e.match(p)) {\n this.matcher.push(typeof c[i] == 'function' ? c[i](m) :\n \t new Template(c[i]).evaluate(m));\n e = e.replace(m[0], '');\n break;\n }\n }\n }\n\n this.matcher.push(\"return h.unique(n);\\n}\");\n eval(this.matcher.join('\\n'));\n Selector._cache[this.expression] = this.matcher;\n },\n\n compileXPathMatcher: function() {\n var e = this.expression, ps = Selector.patterns,\n x = Selector.xpath, le, m;\n\n if (Selector._cache[e]) {\n this.xpath = Selector._cache[e]; return;\n }\n\n this.matcher = ['.//*'];\n while (e && le != e && (/\\S/).test(e)) {\n le = e;\n for (var i in ps) {\n if (m = e.match(ps[i])) {\n this.matcher.push(typeof x[i] == 'function' ? x[i](m) :\n new Template(x[i]).evaluate(m));\n e = e.replace(m[0], '');\n break;\n }\n }\n }\n\n this.xpath = this.matcher.join('');\n Selector._cache[this.expression] = this.xpath;\n },\n\n findElements: function(root) {\n root = root || document;\n if (this.xpath) return document._getElementsByXPath(this.xpath, root);\n return this.matcher(root);\n },\n\n match: function(element) {\n return this.findElements(document).include(element);\n },\n\n toString: function() {\n return this.expression;\n },\n\n inspect: function() {\n return \"#\";\n }\n};\n\nObject.extend(Selector, {\n _cache: {},\n\n xpath: {\n descendant: \"//*\",\n child: \"/*\",\n adjacent: \"/following-sibling::*[1]\",\n laterSibling: '/following-sibling::*',\n tagName: function(m) {\n if (m[1] == '*') return '';\n return \"[local-name()='\" + m[1].toLowerCase() +\n \"' or local-name()='\" + m[1].toUpperCase() + \"']\";\n },\n className: \"[contains(concat(' ', @class, ' '), ' #{1} ')]\",\n id: \"[@id='#{1}']\",\n attrPresence: \"[@#{1}]\",\n attr: function(m) {\n m[3] = m[5] || m[6];\n return new Template(Selector.xpath.operators[m[2]]).evaluate(m);\n },\n pseudo: function(m) {\n var h = Selector.xpath.pseudos[m[1]];\n if (!h) return '';\n if (typeof h === 'function') return h(m);\n return new Template(Selector.xpath.pseudos[m[1]]).evaluate(m);\n },\n operators: {\n '=': \"[@#{1}='#{3}']\",\n '!=': \"[@#{1}!='#{3}']\",\n '^=': \"[starts-with(@#{1}, '#{3}')]\",\n '$=': \"[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']\",\n '*=': \"[contains(@#{1}, '#{3}')]\",\n '~=': \"[contains(concat(' ', @#{1}, ' '), ' #{3} ')]\",\n '|=': \"[contains(concat('-', @#{1}, '-'), '-#{3}-')]\"\n },\n pseudos: {\n 'first-child': '[not(preceding-sibling::*)]',\n 'last-child': '[not(following-sibling::*)]',\n 'only-child': '[not(preceding-sibling::* or following-sibling::*)]',\n 'empty': \"[count(*) = 0 and (count(text()) = 0 or translate(text(), ' \\t\\r\\n', '') = '')]\",\n 'checked': \"[@checked]\",\n 'disabled': \"[@disabled]\",\n 'enabled': \"[not(@disabled)]\",\n 'not': function(m) {\n var e = m[6], p = Selector.patterns,\n x = Selector.xpath, le, m, v;\n\n var exclusion = [];\n while (e && le != e && (/\\S/).test(e)) {\n le = e;\n for (var i in p) {\n if (m = e.match(p[i])) {\n v = typeof x[i] == 'function' ? x[i](m) : new Template(x[i]).evaluate(m);\n exclusion.push(\"(\" + v.substring(1, v.length - 1) + \")\");\n e = e.replace(m[0], '');\n break;\n }\n }\n }\n return \"[not(\" + exclusion.join(\" and \") + \")]\";\n },\n 'nth-child': function(m) {\n return Selector.xpath.pseudos.nth(\"(count(./preceding-sibling::*) + 1) \", m);\n },\n 'nth-last-child': function(m) {\n return Selector.xpath.pseudos.nth(\"(count(./following-sibling::*) + 1) \", m);\n },\n 'nth-of-type': function(m) {\n return Selector.xpath.pseudos.nth(\"position() \", m);\n },\n 'nth-last-of-type': function(m) {\n return Selector.xpath.pseudos.nth(\"(last() + 1 - position()) \", m);\n },\n 'first-of-type': function(m) {\n m[6] = \"1\"; return Selector.xpath.pseudos['nth-of-type'](m);\n },\n 'last-of-type': function(m) {\n m[6] = \"1\"; return Selector.xpath.pseudos['nth-last-of-type'](m);\n },\n 'only-of-type': function(m) {\n var p = Selector.xpath.pseudos; return p['first-of-type'](m) + p['last-of-type'](m);\n },\n nth: function(fragment, m) {\n var mm, formula = m[6], predicate;\n if (formula == 'even') formula = '2n+0';\n if (formula == 'odd') formula = '2n+1';\n if (mm = formula.match(/^(\\d+)$/)) // digit only\n return '[' + fragment + \"= \" + mm[1] + ']';\n if (mm = formula.match(/^(-?\\d*)?n(([+-])(\\d+))?/)) { // an+b\n if (mm[1] == \"-\") mm[1] = -1;\n var a = mm[1] ? Number(mm[1]) : 1;\n var b = mm[2] ? Number(mm[2]) : 0;\n predicate = \"[((#{fragment} - #{b}) mod #{a} = 0) and \" +\n \"((#{fragment} - #{b}) div #{a} >= 0)]\";\n return new Template(predicate).evaluate({\n fragment: fragment, a: a, b: b });\n }\n }\n }\n },\n\n criteria: {\n tagName: 'n = h.tagName(n, r, \"#{1}\", c); c = false;',\n className: 'n = h.className(n, r, \"#{1}\", c); c = false;',\n id: 'n = h.id(n, r, \"#{1}\", c); c = false;',\n attrPresence: 'n = h.attrPresence(n, r, \"#{1}\"); c = false;',\n attr: function(m) {\n m[3] = (m[5] || m[6]);\n return new Template('n = h.attr(n, r, \"#{1}\", \"#{3}\", \"#{2}\"); c = false;').evaluate(m);\n },\n pseudo: function(m) {\n if (m[6]) m[6] = m[6].replace(/\"/g, '\\\\\"');\n return new Template('n = h.pseudo(n, \"#{1}\", \"#{6}\", r, c); c = false;').evaluate(m);\n },\n descendant: 'c = \"descendant\";',\n child: 'c = \"child\";',\n adjacent: 'c = \"adjacent\";',\n laterSibling: 'c = \"laterSibling\";'\n },\n\n patterns: {\n // combinators must be listed first\n // (and descendant needs to be last combinator)\n laterSibling: /^\\s*~\\s*/,\n child: /^\\s*>\\s*/,\n adjacent: /^\\s*\\+\\s*/,\n descendant: /^\\s/,\n\n // selectors follow\n tagName: /^\\s*(\\*|[\\w\\-]+)(\\b|$)?/,\n id: /^#([\\w\\-\\*]+)(\\b|$)/,\n className: /^\\.([\\w\\-\\*]+)(\\b|$)/,\n pseudo: /^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\\((.*?)\\))?(\\b|$|\\s|(?=:))/,\n attrPresence: /^\\[([\\w]+)\\]/,\n attr: /\\[((?:[\\w-]*:)?[\\w-]+)\\s*(?:([!^$*~|]?=)\\s*((['\"])([^\\]]*?)\\4|([^'\"][^\\]]*?)))?\\]/\n },\n\n handlers: {\n // UTILITY FUNCTIONS\n // joins two collections\n concat: function(a, b) {\n for (var i = 0, node; node = b[i]; i++)\n a.push(node);\n return a;\n },\n\n // marks an array of nodes for counting\n mark: function(nodes) {\n for (var i = 0, node; node = nodes[i]; i++)\n node._counted = true;\n return nodes;\n },\n\n unmark: function(nodes) {\n for (var i = 0, node; node = nodes[i]; i++)\n node._counted = undefined;\n return nodes;\n },\n\n // mark each child node with its position (for nth calls)\n // \"ofType\" flag indicates whether we're indexing for nth-of-type\n // rather than nth-child\n index: function(parentNode, reverse, ofType) {\n parentNode._counted = true;\n if (reverse) {\n for (var nodes = parentNode.childNodes, i = nodes.length - 1, j = 1; i >= 0; i--) {\n node = nodes[i];\n if (node.nodeType == 1 && (!ofType || node._counted)) node.nodeIndex = j++;\n }\n } else {\n for (var i = 0, j = 1, nodes = parentNode.childNodes; node = nodes[i]; i++)\n if (node.nodeType == 1 && (!ofType || node._counted)) node.nodeIndex = j++;\n }\n },\n\n // filters out duplicates and extends all nodes\n unique: function(nodes) {\n if (nodes.length == 0) return nodes;\n var results = [], n;\n for (var i = 0, l = nodes.length; i < l; i++)\n if (!(n = nodes[i])._counted) {\n n._counted = true;\n results.push(Element.extend(n));\n }\n return Selector.handlers.unmark(results);\n },\n\n // COMBINATOR FUNCTIONS\n descendant: function(nodes) {\n var h = Selector.handlers;\n for (var i = 0, results = [], node; node = nodes[i]; i++)\n h.concat(results, node.getElementsByTagName('*'));\n return results;\n },\n\n child: function(nodes) {\n var h = Selector.handlers;\n for (var i = 0, results = [], node; node = nodes[i]; i++) {\n for (var j = 0, children = [], child; child = node.childNodes[j]; j++)\n if (child.nodeType == 1 && child.tagName != '!') results.push(child);\n }\n return results;\n },\n\n adjacent: function(nodes) {\n for (var i = 0, results = [], node; node = nodes[i]; i++) {\n var next = this.nextElementSibling(node);\n if (next) results.push(next);\n }\n return results;\n },\n\n laterSibling: function(nodes) {\n var h = Selector.handlers;\n for (var i = 0, results = [], node; node = nodes[i]; i++)\n h.concat(results, Element.nextSiblings(node));\n return results;\n },\n\n nextElementSibling: function(node) {\n while (node = node.nextSibling)\n\t if (node.nodeType == 1) return node;\n return null;\n },\n\n previousElementSibling: function(node) {\n while (node = node.previousSibling)\n if (node.nodeType == 1) return node;\n return null;\n },\n\n // TOKEN FUNCTIONS\n tagName: function(nodes, root, tagName, combinator) {\n tagName = tagName.toUpperCase();\n var results = [], h = Selector.handlers;\n if (nodes) {\n if (combinator) {\n // fastlane for ordinary descendant combinators\n if (combinator == \"descendant\") {\n for (var i = 0, node; node = nodes[i]; i++)\n h.concat(results, node.getElementsByTagName(tagName));\n return results;\n } else nodes = this[combinator](nodes);\n if (tagName == \"*\") return nodes;\n }\n for (var i = 0, node; node = nodes[i]; i++)\n if (node.tagName.toUpperCase() == tagName) results.push(node);\n return results;\n } else return root.getElementsByTagName(tagName);\n },\n\n id: function(nodes, root, id, combinator) {\n var targetNode = $(id), h = Selector.handlers;\n if (!nodes && root == document) return targetNode ? [targetNode] : [];\n if (nodes) {\n if (combinator) {\n if (combinator == 'child') {\n for (var i = 0, node; node = nodes[i]; i++)\n if (targetNode.parentNode == node) return [targetNode];\n } else if (combinator == 'descendant') {\n for (var i = 0, node; node = nodes[i]; i++)\n if (Element.descendantOf(targetNode, node)) return [targetNode];\n } else if (combinator == 'adjacent') {\n for (var i = 0, node; node = nodes[i]; i++)\n if (Selector.handlers.previousElementSibling(targetNode) == node)\n return [targetNode];\n } else nodes = h[combinator](nodes);\n }\n for (var i = 0, node; node = nodes[i]; i++)\n if (node == targetNode) return [targetNode];\n return [];\n }\n return (targetNode && Element.descendantOf(targetNode, root)) ? [targetNode] : [];\n },\n\n className: function(nodes, root, className, combinator) {\n if (nodes && combinator) nodes = this[combinator](nodes);\n return Selector.handlers.byClassName(nodes, root, className);\n },\n\n byClassName: function(nodes, root, className) {\n if (!nodes) nodes = Selector.handlers.descendant([root]);\n var needle = ' ' + className + ' ';\n for (var i = 0, results = [], node, nodeClassName; node = nodes[i]; i++) {\n nodeClassName = node.className;\n if (nodeClassName.length == 0) continue;\n if (nodeClassName == className || (' ' + nodeClassName + ' ').include(needle))\n results.push(node);\n }\n return results;\n },\n\n attrPresence: function(nodes, root, attr) {\n var results = [];\n for (var i = 0, node; node = nodes[i]; i++)\n if (Element.hasAttribute(node, attr)) results.push(node);\n return results;\n },\n\n attr: function(nodes, root, attr, value, operator) {\n if (!nodes) nodes = root.getElementsByTagName(\"*\");\n var handler = Selector.operators[operator], results = [];\n for (var i = 0, node; node = nodes[i]; i++) {\n var nodeValue = Element.readAttribute(node, attr);\n if (nodeValue === null) continue;\n if (handler(nodeValue, value)) results.push(node);\n }\n return results;\n },\n\n pseudo: function(nodes, name, value, root, combinator) {\n if (nodes && combinator) nodes = this[combinator](nodes);\n if (!nodes) nodes = root.getElementsByTagName(\"*\");\n return Selector.pseudos[name](nodes, value, root);\n }\n },\n\n pseudos: {\n 'first-child': function(nodes, value, root) {\n for (var i = 0, results = [], node; node = nodes[i]; i++) {\n if (Selector.handlers.previousElementSibling(node)) continue;\n results.push(node);\n }\n return results;\n },\n 'last-child': function(nodes, value, root) {\n for (var i = 0, results = [], node; node = nodes[i]; i++) {\n if (Selector.handlers.nextElementSibling(node)) continue;\n results.push(node);\n }\n return results;\n },\n 'only-child': function(nodes, value, root) {\n var h = Selector.handlers;\n for (var i = 0, results = [], node; node = nodes[i]; i++)\n if (!h.previousElementSibling(node) && !h.nextElementSibling(node))\n results.push(node);\n return results;\n },\n 'nth-child': function(nodes, formula, root) {\n return Selector.pseudos.nth(nodes, formula, root);\n },\n 'nth-last-child': function(nodes, formula, root) {\n return Selector.pseudos.nth(nodes, formula, root, true);\n },\n 'nth-of-type': function(nodes, formula, root) {\n return Selector.pseudos.nth(nodes, formula, root, false, true);\n },\n 'nth-last-of-type': function(nodes, formula, root) {\n return Selector.pseudos.nth(nodes, formula, root, true, true);\n },\n 'first-of-type': function(nodes, formula, root) {\n return Selector.pseudos.nth(nodes, \"1\", root, false, true);\n },\n 'last-of-type': function(nodes, formula, root) {\n return Selector.pseudos.nth(nodes, \"1\", root, true, true);\n },\n 'only-of-type': function(nodes, formula, root) {\n var p = Selector.pseudos;\n return p['last-of-type'](p['first-of-type'](nodes, formula, root), formula, root);\n },\n\n // handles the an+b logic\n getIndices: function(a, b, total) {\n if (a == 0) return b > 0 ? [b] : [];\n return $R(1, total).inject([], function(memo, i) {\n if (0 == (i - b) % a && (i - b) / a >= 0) memo.push(i);\n return memo;\n });\n },\n\n // handles nth(-last)-child, nth(-last)-of-type, and (first|last)-of-type\n nth: function(nodes, formula, root, reverse, ofType) {\n if (nodes.length == 0) return [];\n if (formula == 'even') formula = '2n+0';\n if (formula == 'odd') formula = '2n+1';\n var h = Selector.handlers, results = [], indexed = [], m;\n h.mark(nodes);\n for (var i = 0, node; node = nodes[i]; i++) {\n if (!node.parentNode._counted) {\n h.index(node.parentNode, reverse, ofType);\n indexed.push(node.parentNode);\n }\n }\n if (formula.match(/^\\d+$/)) { // just a number\n formula = Number(formula);\n for (var i = 0, node; node = nodes[i]; i++)\n if (node.nodeIndex == formula) results.push(node);\n } else if (m = formula.match(/^(-?\\d*)?n(([+-])(\\d+))?/)) { // an+b\n if (m[1] == \"-\") m[1] = -1;\n var a = m[1] ? Number(m[1]) : 1;\n var b = m[2] ? Number(m[2]) : 0;\n var indices = Selector.pseudos.getIndices(a, b, nodes.length);\n for (var i = 0, node, l = indices.length; node = nodes[i]; i++) {\n for (var j = 0; j < l; j++)\n if (node.nodeIndex == indices[j]) results.push(node);\n }\n }\n h.unmark(nodes);\n h.unmark(indexed);\n return results;\n },\n\n 'empty': function(nodes, value, root) {\n for (var i = 0, results = [], node; node = nodes[i]; i++) {\n // IE treats comments as element nodes\n if (node.tagName == '!' || (node.firstChild && !node.innerHTML.match(/^\\s*$/))) continue;\n results.push(node);\n }\n return results;\n },\n\n 'not': function(nodes, selector, root) {\n var h = Selector.handlers, selectorType, m;\n var exclusions = new Selector(selector).findElements(root);\n h.mark(exclusions);\n for (var i = 0, results = [], node; node = nodes[i]; i++)\n if (!node._counted) results.push(node);\n h.unmark(exclusions);\n return results;\n },\n\n 'enabled': function(nodes, value, root) {\n for (var i = 0, results = [], node; node = nodes[i]; i++)\n if (!node.disabled) results.push(node);\n return results;\n },\n\n 'disabled': function(nodes, value, root) {\n for (var i = 0, results = [], node; node = nodes[i]; i++)\n if (node.disabled) results.push(node);\n return results;\n },\n\n 'checked': function(nodes, value, root) {\n for (var i = 0, results = [], node; node = nodes[i]; i++)\n if (node.checked) results.push(node);\n return results;\n }\n },\n\n operators: {\n '=': function(nv, v) { return nv == v; },\n '!=': function(nv, v) { return nv != v; },\n '^=': function(nv, v) { return nv.startsWith(v); },\n '$=': function(nv, v) { return nv.endsWith(v); },\n '*=': function(nv, v) { return nv.include(v); },\n '~=': function(nv, v) { return (' ' + nv + ' ').include(' ' + v + ' '); },\n '|=': function(nv, v) { return ('-' + nv.toUpperCase() + '-').include('-' + v.toUpperCase() + '-'); }\n },\n\n matchElements: function(elements, expression) {\n var matches = new Selector(expression).findElements(), h = Selector.handlers;\n h.mark(matches);\n for (var i = 0, results = [], element; element = elements[i]; i++)\n if (element._counted) results.push(element);\n h.unmark(matches);\n return results;\n },\n\n findElement: function(elements, expression, index) {\n if (typeof expression == 'number') {\n index = expression; expression = false;\n }\n return Selector.matchElements(elements, expression || '*')[index || 0];\n },\n\n findChildElements: function(element, expressions) {\n var exprs = expressions.join(','), expressions = [];\n exprs.scan(/(([\\w#:.~>+()\\s-]+|\\*|\\[.*?\\])+)\\s*(,|$)/, function(m) {\n expressions.push(m[1].strip());\n });\n var results = [], h = Selector.handlers;\n for (var i = 0, l = expressions.length, selector; i < l; i++) {\n selector = new Selector(expressions[i].strip());\n h.concat(results, selector.findElements(element));\n }\n return (l > 1) ? h.unique(results) : results;\n }\n});\n\nfunction $$() {\n return Selector.findChildElements(document, $A(arguments));\n}\nvar Form = {\n reset: function(form) {\n $(form).reset();\n return form;\n },\n\n serializeElements: function(elements, getHash) {\n var data = elements.inject({}, function(result, element) {\n if (!element.disabled && element.name) {\n var key = element.name, value = $(element).getValue();\n if (value != null) {\n \tif (key in result) {\n if (result[key].constructor != Array) result[key] = [result[key]];\n result[key].push(value);\n }\n else result[key] = value;\n }\n }\n return result;\n });\n\n return getHash ? data : Hash.toQueryString(data);\n }\n};\n\nForm.Methods = {\n serialize: function(form, getHash) {\n return Form.serializeElements(Form.getElements(form), getHash);\n },\n\n getElements: function(form) {\n return $A($(form).getElementsByTagName('*')).inject([],\n function(elements, child) {\n if (Form.Element.Serializers[child.tagName.toLowerCase()])\n elements.push(Element.extend(child));\n return elements;\n }\n );\n },\n\n getInputs: function(form, typeName, name) {\n form = $(form);\n var inputs = form.getElementsByTagName('input');\n\n if (!typeName && !name) return $A(inputs).map(Element.extend);\n\n for (var i = 0, matchingInputs = [], length = inputs.length; i < length; i++) {\n var input = inputs[i];\n if ((typeName && input.type != typeName) || (name && input.name != name))\n continue;\n matchingInputs.push(Element.extend(input));\n }\n\n return matchingInputs;\n },\n\n disable: function(form) {\n form = $(form);\n Form.getElements(form).invoke('disable');\n return form;\n },\n\n enable: function(form) {\n form = $(form);\n Form.getElements(form).invoke('enable');\n return form;\n },\n\n findFirstElement: function(form) {\n return $(form).getElements().find(function(element) {\n return element.type != 'hidden' && !element.disabled &&\n ['input', 'select', 'textarea'].include(element.tagName.toLowerCase());\n });\n },\n\n focusFirstElement: function(form) {\n form = $(form);\n form.findFirstElement().activate();\n return form;\n },\n\n request: function(form, options) {\n form = $(form), options = Object.clone(options || {});\n\n var params = options.parameters;\n options.parameters = form.serialize(true);\n\n if (params) {\n if (typeof params == 'string') params = params.toQueryParams();\n Object.extend(options.parameters, params);\n }\n\n if (form.hasAttribute('method') && !options.method)\n options.method = form.method;\n\n return new Ajax.Request(form.readAttribute('action'), options);\n }\n}\n\n/*--------------------------------------------------------------------------*/\n\nForm.Element = {\n focus: function(element) {\n $(element).focus();\n return element;\n },\n\n select: function(element) {\n $(element).select();\n return element;\n }\n}\n\nForm.Element.Methods = {\n serialize: function(element) {\n element = $(element);\n if (!element.disabled && element.name) {\n var value = element.getValue();\n if (value != undefined) {\n var pair = {};\n pair[element.name] = value;\n return Hash.toQueryString(pair);\n }\n }\n return '';\n },\n\n getValue: function(element) {\n element = $(element);\n var method = element.tagName.toLowerCase();\n return Form.Element.Serializers[method](element);\n },\n\n clear: function(element) {\n $(element).value = '';\n return element;\n },\n\n present: function(element) {\n return $(element).value != '';\n },\n\n activate: function(element) {\n element = $(element);\n try {\n element.focus();\n if (element.select && (element.tagName.toLowerCase() != 'input' ||\n !['button', 'reset', 'submit'].include(element.type)))\n element.select();\n } catch (e) {}\n return element;\n },\n\n disable: function(element) {\n element = $(element);\n element.blur();\n element.disabled = true;\n return element;\n },\n\n enable: function(element) {\n element = $(element);\n element.disabled = false;\n return element;\n }\n}\n\n/*--------------------------------------------------------------------------*/\n\nvar Field = Form.Element;\nvar $F = Form.Element.Methods.getValue;\n\n/*--------------------------------------------------------------------------*/\n\nForm.Element.Serializers = {\n input: function(element) {\n switch (element.type.toLowerCase()) {\n case 'checkbox':\n case 'radio':\n return Form.Element.Serializers.inputSelector(element);\n default:\n return Form.Element.Serializers.textarea(element);\n }\n },\n\n inputSelector: function(element) {\n return element.checked ? element.value : null;\n },\n\n textarea: function(element) {\n return element.value;\n },\n\n select: function(element) {\n return this[element.type == 'select-one' ?\n 'selectOne' : 'selectMany'](element);\n },\n\n selectOne: function(element) {\n var index = element.selectedIndex;\n return index >= 0 ? this.optionValue(element.options[index]) : null;\n },\n\n selectMany: function(element) {\n var values, length = element.length;\n if (!length) return null;\n\n for (var i = 0, values = []; i < length; i++) {\n var opt = element.options[i];\n if (opt.selected) values.push(this.optionValue(opt));\n }\n return values;\n },\n\n optionValue: function(opt) {\n // extend element because hasAttribute may not be native\n return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text;\n }\n}\n\n/*--------------------------------------------------------------------------*/\n\nAbstract.TimedObserver = function() {}\nAbstract.TimedObserver.prototype = {\n initialize: function(element, frequency, callback) {\n this.frequency = frequency;\n this.element = $(element);\n this.callback = callback;\n\n this.lastValue = this.getValue();\n this.registerCallback();\n },\n\n registerCallback: function() {\n setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);\n },\n\n onTimerEvent: function() {\n var value = this.getValue();\n var changed = ('string' == typeof this.lastValue && 'string' == typeof value\n ? this.lastValue != value : String(this.lastValue) != String(value));\n if (changed) {\n this.callback(this.element, value);\n this.lastValue = value;\n }\n }\n}\n\nForm.Element.Observer = Class.create();\nForm.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), {\n getValue: function() {\n return Form.Element.getValue(this.element);\n }\n});\n\nForm.Observer = Class.create();\nForm.Observer.prototype = Object.extend(new Abstract.TimedObserver(), {\n getValue: function() {\n return Form.serialize(this.element);\n }\n});\n\n/*--------------------------------------------------------------------------*/\n\nAbstract.EventObserver = function() {}\nAbstract.EventObserver.prototype = {\n initialize: function(element, callback) {\n this.element = $(element);\n this.callback = callback;\n\n this.lastValue = this.getValue();\n if (this.element.tagName.toLowerCase() == 'form')\n this.registerFormCallbacks();\n else\n this.registerCallback(this.element);\n },\n\n onElementEvent: function() {\n var value = this.getValue();\n if (this.lastValue != value) {\n this.callback(this.element, value);\n this.lastValue = value;\n }\n },\n\n registerFormCallbacks: function() {\n Form.getElements(this.element).each(this.registerCallback.bind(this));\n },\n\n registerCallback: function(element) {\n if (element.type) {\n switch (element.type.toLowerCase()) {\n case 'checkbox':\n case 'radio':\n Event.observe(element, 'click', this.onElementEvent.bind(this));\n break;\n default:\n Event.observe(element, 'change', this.onElementEvent.bind(this));\n break;\n }\n }\n }\n}\n\nForm.Element.EventObserver = Class.create();\nForm.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), {\n getValue: function() {\n return Form.Element.getValue(this.element);\n }\n});\n\nForm.EventObserver = Class.create();\nForm.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), {\n getValue: function() {\n return Form.serialize(this.element);\n }\n});\nif (!window.Event) {\n var Event = new Object();\n}\n\nObject.extend(Event, {\n KEY_BACKSPACE: 8,\n KEY_TAB: 9,\n KEY_RETURN: 13,\n KEY_ESC: 27,\n KEY_LEFT: 37,\n KEY_UP: 38,\n KEY_RIGHT: 39,\n KEY_DOWN: 40,\n KEY_DELETE: 46,\n KEY_HOME: 36,\n KEY_END: 35,\n KEY_PAGEUP: 33,\n KEY_PAGEDOWN: 34,\n\n element: function(event) {\n return $(event.target || event.srcElement);\n },\n\n isLeftClick: function(event) {\n return (((event.which) && (event.which == 1)) ||\n ((event.button) && (event.button == 1)));\n },\n\n pointerX: function(event) {\n return event.pageX || (event.clientX +\n (document.documentElement.scrollLeft || document.body.scrollLeft));\n },\n\n pointerY: function(event) {\n return event.pageY || (event.clientY +\n (document.documentElement.scrollTop || document.body.scrollTop));\n },\n\n stop: function(event) {\n if (event.preventDefault) {\n event.preventDefault();\n event.stopPropagation();\n } else {\n event.returnValue = false;\n event.cancelBubble = true;\n }\n },\n\n // find the first node with the given tagName, starting from the\n // node the event was triggered on; traverses the DOM upwards\n findElement: function(event, tagName) {\n var element = Event.element(event);\n while (element.parentNode && (!element.tagName ||\n (element.tagName.toUpperCase() != tagName.toUpperCase())))\n element = element.parentNode;\n return element;\n },\n\n observers: false,\n\n _observeAndCache: function(element, name, observer, useCapture) {\n if (!this.observers) this.observers = [];\n if (element.addEventListener) {\n this.observers.push([element, name, observer, useCapture]);\n element.addEventListener(name, observer, useCapture);\n } else if (element.attachEvent) {\n this.observers.push([element, name, observer, useCapture]);\n element.attachEvent('on' + name, observer);\n }\n },\n\n unloadCache: function() {\n if (!Event.observers) return;\n for (var i = 0, length = Event.observers.length; i < length; i++) {\n Event.stopObserving.apply(this, Event.observers[i]);\n Event.observers[i][0] = null;\n }\n Event.observers = false;\n },\n\n observe: function(element, name, observer, useCapture) {\n element = $(element);\n useCapture = useCapture || false;\n\n if (name == 'keypress' &&\n (Prototype.Browser.WebKit || element.attachEvent))\n name = 'keydown';\n\n Event._observeAndCache(element, name, observer, useCapture);\n },\n\n stopObserving: function(element, name, observer, useCapture) {\n element = $(element);\n useCapture = useCapture || false;\n\n if (name == 'keypress' &&\n (Prototype.Browser.WebKit || element.attachEvent))\n name = 'keydown';\n\n if (element.removeEventListener) {\n element.removeEventListener(name, observer, useCapture);\n } else if (element.detachEvent) {\n try {\n element.detachEvent('on' + name, observer);\n } catch (e) {}\n }\n }\n});\n\n/* prevent memory leaks in IE */\nif (Prototype.Browser.IE)\n Event.observe(window, 'unload', Event.unloadCache, false);\nvar Position = {\n // set to true if needed, warning: firefox performance problems\n // NOT neeeded for page scrolling, only if draggable contained in\n // scrollable elements\n includeScrollOffsets: false,\n\n // must be called before calling withinIncludingScrolloffset, every time the\n // page is scrolled\n prepare: function() {\n this.deltaX = window.pageXOffset\n || document.documentElement.scrollLeft\n || document.body.scrollLeft\n || 0;\n this.deltaY = window.pageYOffset\n || document.documentElement.scrollTop\n || document.body.scrollTop\n || 0;\n },\n\n realOffset: function(element) {\n var valueT = 0, valueL = 0;\n do {\n valueT += element.scrollTop || 0;\n valueL += element.scrollLeft || 0;\n element = element.parentNode;\n } while (element);\n return [valueL, valueT];\n },\n\n cumulativeOffset: function(element) {\n var valueT = 0, valueL = 0;\n do {\n valueT += element.offsetTop || 0;\n valueL += element.offsetLeft || 0;\n element = element.offsetParent;\n } while (element);\n return [valueL, valueT];\n },\n\n positionedOffset: function(element) {\n var valueT = 0, valueL = 0;\n do {\n valueT += element.offsetTop || 0;\n valueL += element.offsetLeft || 0;\n element = element.offsetParent;\n if (element) {\n if(element.tagName=='BODY') break;\n var p = Element.getStyle(element, 'position');\n if (p == 'relative' || p == 'absolute') break;\n }\n } while (element);\n return [valueL, valueT];\n },\n\n offsetParent: function(element) {\n if (element.offsetParent) return element.offsetParent;\n if (element == document.body) return element;\n\n while ((element = element.parentNode) && element != document.body)\n if (Element.getStyle(element, 'position') != 'static')\n return element;\n\n return document.body;\n },\n\n // caches x/y coordinate pair to use with overlap\n within: function(element, x, y) {\n if (this.includeScrollOffsets)\n return this.withinIncludingScrolloffsets(element, x, y);\n this.xcomp = x;\n this.ycomp = y;\n this.offset = this.cumulativeOffset(element);\n\n return (y >= this.offset[1] &&\n y < this.offset[1] + element.offsetHeight &&\n x >= this.offset[0] &&\n x < this.offset[0] + element.offsetWidth);\n },\n\n withinIncludingScrolloffsets: function(element, x, y) {\n var offsetcache = this.realOffset(element);\n\n this.xcomp = x + offsetcache[0] - this.deltaX;\n this.ycomp = y + offsetcache[1] - this.deltaY;\n this.offset = this.cumulativeOffset(element);\n\n return (this.ycomp >= this.offset[1] &&\n this.ycomp < this.offset[1] + element.offsetHeight &&\n this.xcomp >= this.offset[0] &&\n this.xcomp < this.offset[0] + element.offsetWidth);\n },\n\n // within must be called directly before\n overlap: function(mode, element) {\n if (!mode) return 0;\n if (mode == 'vertical')\n return ((this.offset[1] + element.offsetHeight) - this.ycomp) /\n element.offsetHeight;\n if (mode == 'horizontal')\n return ((this.offset[0] + element.offsetWidth) - this.xcomp) /\n element.offsetWidth;\n },\n\n page: function(forElement) {\n var valueT = 0, valueL = 0;\n\n var element = forElement;\n do {\n valueT += element.offsetTop || 0;\n valueL += element.offsetLeft || 0;\n\n // Safari fix\n if (element.offsetParent == document.body)\n if (Element.getStyle(element,'position')=='absolute') break;\n\n } while (element = element.offsetParent);\n\n element = forElement;\n do {\n if (!window.opera || element.tagName=='BODY') {\n valueT -= element.scrollTop || 0;\n valueL -= element.scrollLeft || 0;\n }\n } while (element = element.parentNode);\n\n return [valueL, valueT];\n },\n\n clone: function(source, target) {\n var options = Object.extend({\n setLeft: true,\n setTop: true,\n setWidth: true,\n setHeight: true,\n offsetTop: 0,\n offsetLeft: 0\n }, arguments[2] || {})\n\n // find page position of source\n source = $(source);\n var p = Position.page(source);\n\n // find coordinate system to use\n target = $(target);\n var delta = [0, 0];\n var parent = null;\n // delta [0,0] will do fine with position: fixed elements,\n // position:absolute needs offsetParent deltas\n if (Element.getStyle(target,'position') == 'absolute') {\n parent = Position.offsetParent(target);\n delta = Position.page(parent);\n }\n\n // correct by body offsets (fixes Safari)\n if (parent == document.body) {\n delta[0] -= document.body.offsetLeft;\n delta[1] -= document.body.offsetTop;\n }\n\n // set position\n if(options.setLeft) target.style.left = (p[0] - delta[0] + options.offsetLeft) + 'px';\n if(options.setTop) target.style.top = (p[1] - delta[1] + options.offsetTop) + 'px';\n if(options.setWidth) target.style.width = source.offsetWidth + 'px';\n if(options.setHeight) target.style.height = source.offsetHeight + 'px';\n },\n\n absolutize: function(element) {\n element = $(element);\n if (element.style.position == 'absolute') return;\n Position.prepare();\n\n var offsets = Position.positionedOffset(element);\n var top = offsets[1];\n var left = offsets[0];\n var width = element.clientWidth;\n var height = element.clientHeight;\n\n element._originalLeft = left - parseFloat(element.style.left || 0);\n element._originalTop = top - parseFloat(element.style.top || 0);\n element._originalWidth = element.style.width;\n element._originalHeight = element.style.height;\n\n element.style.position = 'absolute';\n element.style.top = top + 'px';\n element.style.left = left + 'px';\n element.style.width = width + 'px';\n element.style.height = height + 'px';\n },\n\n relativize: function(element) {\n element = $(element);\n if (element.style.position == 'relative') return;\n Position.prepare();\n\n element.style.position = 'relative';\n var top = parseFloat(element.style.top || 0) - (element._originalTop || 0);\n var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0);\n\n element.style.top = top + 'px';\n element.style.left = left + 'px';\n element.style.height = element._originalHeight;\n element.style.width = element._originalWidth;\n }\n}\n\n// Safari returns margins on body which is incorrect if the child is absolutely\n// positioned. For performance reasons, redefine Position.cumulativeOffset for\n// KHTML/WebKit only.\nif (Prototype.Browser.WebKit) {\n Position.cumulativeOffset = function(element) {\n var valueT = 0, valueL = 0;\n do {\n valueT += element.offsetTop || 0;\n valueL += element.offsetLeft || 0;\n if (element.offsetParent == document.body)\n if (Element.getStyle(element, 'position') == 'absolute') break;\n\n element = element.offsetParent;\n } while (element);\n\n return [valueL, valueT];\n }\n}\n\nElement.addMethods();" + }, + "redirectURL": "", + "headersSize": 329, + "bodySize": 96311, + "_transferSize": 96640 + }, + "cache": {}, + "timings": { + "blocked": 70.0839999917662, + "dns": -1, + "connect": -1, + "send": 0.1530000008641963, + "wait": 17.5380000000587, + "receive": 136.66099999682046, + "ssl": -1 + }, + "connection": "137908", + "pageref": "page_2" + }, + { + "startedDateTime": "2015-09-10T17:13:11.503Z", + "time": 308.2469999935711, + "request": { + "method": "GET", + "url": "https://secure11.oscarhost.ca/kensington/js/jquery.js", + "httpVersion": "HTTP/1.1", + "headers": [ + { + "name": "Accept-Encoding", + "value": "gzip, deflate, lzma, sdch" + }, + { + "name": "Host", + "value": "secure11.oscarhost.ca" + }, + { + "name": "Accept-Language", + "value": "en-US,en;q=0.8" + }, + { + "name": "User-Agent", + "value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.155 Safari/537.36 OPR/31.0.1889.174" + }, + { + "name": "Accept", + "value": "*/*" + }, + { + "name": "Referer", + "value": "https://secure11.oscarhost.ca/kensington/demographic/demographiccontrol.jsp?demographic_no=189164&displaymode=edit&dboperation=search_detail" + }, + { + "name": "Cookie", + "value": "JSESSIONID=C89CFAAB236CC41DEBBEEDA066552DC9; _ga=GA1.2.1898936923.1439425583; oscrcpid=\"\"; oscadmid=\"\"; oscprvid=74389190981689774322881876020216189399197; RT=" + }, + { + "name": "Connection", + "value": "keep-alive" + } + ], + "queryString": [], + "cookies": [ + { + "name": "JSESSIONID", + "value": "C89CFAAB236CC41DEBBEEDA066552DC9", + "expires": null, + "httpOnly": false, + "secure": false + }, + { + "name": "_ga", + "value": "GA1.2.1898936923.1439425583", + "expires": null, + "httpOnly": false, + "secure": false + }, + { + "name": "oscrcpid", + "value": "\"\"", + "expires": null, + "httpOnly": false, + "secure": false + }, + { + "name": "oscadmid", + "value": "\"\"", + "expires": null, + "httpOnly": false, + "secure": false + }, + { + "name": "oscprvid", + "value": "74389190981689774322881876020216189399197", + "expires": null, + "httpOnly": false, + "secure": false + }, + { + "name": "RT", + "value": "", + "expires": null, + "httpOnly": false, + "secure": false + } + ], + "headersSize": 656, + "bodySize": 0 + }, + "response": { + "status": 200, + "statusText": "OK", + "httpVersion": "HTTP/1.1", + "headers": [ + { + "name": "Date", + "value": "Thu, 10 Sep 2015 17:13:11 GMT" + }, + { + "name": "Last-Modified", + "value": "Mon, 09 Mar 2015 19:32:54 GMT" + }, + { + "name": "ETag", + "value": "\"120654-1425929574000\"" + }, + { + "name": "Content-Type", + "value": "text/javascript;charset=UTF-8" + }, + { + "name": "Cache-Control", + "value": "no-store, no-cache, must-revalidate" + }, + { + "name": "Connection", + "value": "Keep-Alive" + }, + { + "name": "Accept-Ranges", + "value": "bytes" + }, + { + "name": "Keep-Alive", + "value": "timeout=15, max=100" + }, + { + "name": "Content-Length", + "value": "120654" + } + ], + "cookies": [], + "content": { + "size": 120654, + "mimeType": "text/javascript", + "compression": 0, + "text": "/*!\n * jQuery JavaScript Library v1.3.2\n * http://jquery.com/\n *\n * Copyright (c) 2009 John Resig\n * Dual licensed under the MIT and GPL licenses.\n * http://docs.jquery.com/License\n *\n * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)\n * Revision: 6246\n */\n(function(){\n\nvar \n\t// Will speed up references to window, and allows munging its name.\n\twindow = this,\n\t// Will speed up references to undefined, and allows munging its name.\n\tundefined,\n\t// Map over jQuery in case of overwrite\n\t_jQuery = window.jQuery,\n\t// Map over the $ in case of overwrite\n\t_$ = window.$,\n\n\tjQuery = window.jQuery = window.$ = function( selector, context ) {\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\treturn new jQuery.fn.init( selector, context );\n\t},\n\n\t// A simple way to check for HTML strings or ID strings\n\t// (both of which we optimize for)\n\tquickExpr = /^[^<]*(<(.|\\s)+>)[^>]*$|^#([\\w-]+)$/,\n\t// Is it a simple selector\n\tisSimple = /^.[^:#\\[\\.,]*$/;\n\njQuery.fn = jQuery.prototype = {\n\tinit: function( selector, context ) {\n\t\t// Make sure that a selection was provided\n\t\tselector = selector || document;\n\n\t\t// Handle $(DOMElement)\n\t\tif ( selector.nodeType ) {\n\t\t\tthis[0] = selector;\n\t\t\tthis.length = 1;\n\t\t\tthis.context = selector;\n\t\t\treturn this;\n\t\t}\n\t\t// Handle HTML strings\n\t\tif ( typeof selector === \"string\" ) {\n\t\t\t// Are we dealing with HTML string or an ID?\n\t\t\tvar match = quickExpr.exec( selector );\n\n\t\t\t// Verify a match, and that no context was specified for #id\n\t\t\tif ( match && (match[1] || !context) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[1] )\n\t\t\t\t\tselector = jQuery.clean( [ match[1] ], context );\n\n\t\t\t\t// HANDLE: $(\"#id\")\n\t\t\t\telse {\n\t\t\t\t\tvar elem = document.getElementById( match[3] );\n\n\t\t\t\t\t// Handle the case where IE and Opera return items\n\t\t\t\t\t// by name instead of ID\n\t\t\t\t\tif ( elem && elem.id != match[3] )\n\t\t\t\t\t\treturn jQuery().find( selector );\n\n\t\t\t\t\t// Otherwise, we inject the element directly into the jQuery object\n\t\t\t\t\tvar ret = jQuery( elem || [] );\n\t\t\t\t\tret.context = document;\n\t\t\t\t\tret.selector = selector;\n\t\t\t\t\treturn ret;\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(expr, [context])\n\t\t\t// (which is just equivalent to: $(content).find(expr)\n\t\t\t} else\n\t\t\t\treturn jQuery( context ).find( selector );\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( jQuery.isFunction( selector ) )\n\t\t\treturn jQuery( document ).ready( selector );\n\n\t\t// Make sure that old selector state is passed along\n\t\tif ( selector.selector && selector.context ) {\n\t\t\tthis.selector = selector.selector;\n\t\t\tthis.context = selector.context;\n\t\t}\n\n\t\treturn this.setArray(jQuery.isArray( selector ) ?\n\t\t\tselector :\n\t\t\tjQuery.makeArray(selector));\n\t},\n\n\t// Start with an empty selector\n\tselector: \"\",\n\n\t// The current version of jQuery being used\n\tjquery: \"1.3.2\",\n\n\t// The number of elements contained in the matched element set\n\tsize: function() {\n\t\treturn this.length;\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\t\treturn num === undefined ?\n\n\t\t\t// Return a 'clean' array\n\t\t\tArray.prototype.slice.call( this ) :\n\n\t\t\t// Return just the object\n\t\t\tthis[ num ];\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems, name, selector ) {\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery( elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\n\t\tret.context = this.context;\n\n\t\tif ( name === \"find\" )\n\t\t\tret.selector = this.selector + (this.selector ? \" \" : \"\") + selector;\n\t\telse if ( name )\n\t\t\tret.selector = this.selector + \".\" + name + \"(\" + selector + \")\";\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Force the current matched set of elements to become\n\t// the specified array of elements (destroying the stack in the process)\n\t// You should use pushStack() in order to do this, but maintain the stack\n\tsetArray: function( elems ) {\n\t\t// Resetting the length to 0, then using the native Array push\n\t\t// is a super-fast way to populate an object with array-like properties\n\t\tthis.length = 0;\n\t\tArray.prototype.push.apply( this, elems );\n\n\t\treturn this;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\t// (You can seed the arguments with an array of args, but this is\n\t// only used internally.)\n\teach: function( callback, args ) {\n\t\treturn jQuery.each( this, callback, args );\n\t},\n\n\t// Determine the position of an element within\n\t// the matched set of elements\n\tindex: function( elem ) {\n\t\t// Locate the position of the desired element\n\t\treturn jQuery.inArray(\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem && elem.jquery ? elem[0] : elem\n\t\t, this );\n\t},\n\n\tattr: function( name, value, type ) {\n\t\tvar options = name;\n\n\t\t// Look for the case where we're accessing a style value\n\t\tif ( typeof name === \"string\" )\n\t\t\tif ( value === undefined )\n\t\t\t\treturn this[0] && jQuery[ type || \"attr\" ]( this[0], name );\n\n\t\t\telse {\n\t\t\t\toptions = {};\n\t\t\t\toptions[ name ] = value;\n\t\t\t}\n\n\t\t// Check to see if we're setting style values\n\t\treturn this.each(function(i){\n\t\t\t// Set all the styles\n\t\t\tfor ( name in options )\n\t\t\t\tjQuery.attr(\n\t\t\t\t\ttype ?\n\t\t\t\t\t\tthis.style :\n\t\t\t\t\t\tthis,\n\t\t\t\t\tname, jQuery.prop( this, options[ name ], type, i, name )\n\t\t\t\t);\n\t\t});\n\t},\n\n\tcss: function( key, value ) {\n\t\t// ignore negative width and height values\n\t\tif ( (key == 'width' || key == 'height') && parseFloat(value) < 0 )\n\t\t\tvalue = undefined;\n\t\treturn this.attr( key, value, \"curCSS\" );\n\t},\n\n\ttext: function( text ) {\n\t\tif ( typeof text !== \"object\" && text != null )\n\t\t\treturn this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );\n\n\t\tvar ret = \"\";\n\n\t\tjQuery.each( text || this, function(){\n\t\t\tjQuery.each( this.childNodes, function(){\n\t\t\t\tif ( this.nodeType != 8 )\n\t\t\t\t\tret += this.nodeType != 1 ?\n\t\t\t\t\t\tthis.nodeValue :\n\t\t\t\t\t\tjQuery.fn.text( [ this ] );\n\t\t\t});\n\t\t});\n\n\t\treturn ret;\n\t},\n\n\twrapAll: function( html ) {\n\t\tif ( this[0] ) {\n\t\t\t// The elements to wrap the target around\n\t\t\tvar wrap = jQuery( html, this[0].ownerDocument ).clone();\n\n\t\t\tif ( this[0].parentNode )\n\t\t\t\twrap.insertBefore( this[0] );\n\n\t\t\twrap.map(function(){\n\t\t\t\tvar elem = this;\n\n\t\t\t\twhile ( elem.firstChild )\n\t\t\t\t\telem = elem.firstChild;\n\n\t\t\t\treturn elem;\n\t\t\t}).append(this);\n\t\t}\n\n\t\treturn this;\n\t},\n\n\twrapInner: function( html ) {\n\t\treturn this.each(function(){\n\t\t\tjQuery( this ).contents().wrapAll( html );\n\t\t});\n\t},\n\n\twrap: function( html ) {\n\t\treturn this.each(function(){\n\t\t\tjQuery( this ).wrapAll( html );\n\t\t});\n\t},\n\n\tappend: function() {\n\t\treturn this.domManip(arguments, true, function(elem){\n\t\t\tif (this.nodeType == 1)\n\t\t\t\tthis.appendChild( elem );\n\t\t});\n\t},\n\n\tprepend: function() {\n\t\treturn this.domManip(arguments, true, function(elem){\n\t\t\tif (this.nodeType == 1)\n\t\t\t\tthis.insertBefore( elem, this.firstChild );\n\t\t});\n\t},\n\n\tbefore: function() {\n\t\treturn this.domManip(arguments, false, function(elem){\n\t\t\tthis.parentNode.insertBefore( elem, this );\n\t\t});\n\t},\n\n\tafter: function() {\n\t\treturn this.domManip(arguments, false, function(elem){\n\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\n\t\t});\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || jQuery( [] );\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: [].push,\n\tsort: [].sort,\n\tsplice: [].splice,\n\n\tfind: function( selector ) {\n\t\tif ( this.length === 1 ) {\n\t\t\tvar ret = this.pushStack( [], \"find\", selector );\n\t\t\tret.length = 0;\n\t\t\tjQuery.find( selector, this[0], ret );\n\t\t\treturn ret;\n\t\t} else {\n\t\t\treturn this.pushStack( jQuery.unique(jQuery.map(this, function(elem){\n\t\t\t\treturn jQuery.find( selector, elem );\n\t\t\t})), \"find\", selector );\n\t\t}\n\t},\n\n\tclone: function( events ) {\n\t\t// Do the clone\n\t\tvar ret = this.map(function(){\n\t\t\tif ( !jQuery.support.noCloneEvent && !jQuery.isXMLDoc(this) ) {\n\t\t\t\t// IE copies events bound via attachEvent when\n\t\t\t\t// using cloneNode. Calling detachEvent on the\n\t\t\t\t// clone will also remove the events from the orignal\n\t\t\t\t// In order to get around this, we use innerHTML.\n\t\t\t\t// Unfortunately, this means some modifications to\n\t\t\t\t// attributes in IE that are actually only stored\n\t\t\t\t// as properties will not be copied (such as the\n\t\t\t\t// the name attribute on an input).\n\t\t\t\tvar html = this.outerHTML;\n\t\t\t\tif ( !html ) {\n\t\t\t\t\tvar div = this.ownerDocument.createElement(\"div\");\n\t\t\t\t\tdiv.appendChild( this.cloneNode(true) );\n\t\t\t\t\thtml = div.innerHTML;\n\t\t\t\t}\n\n\t\t\t\treturn jQuery.clean([html.replace(/ jQuery\\d+=\"(?:\\d+|null)\"/g, \"\").replace(/^\\s*/, \"\")])[0];\n\t\t\t} else\n\t\t\t\treturn this.cloneNode(true);\n\t\t});\n\n\t\t// Copy the events from the original to the clone\n\t\tif ( events === true ) {\n\t\t\tvar orig = this.find(\"*\").andSelf(), i = 0;\n\n\t\t\tret.find(\"*\").andSelf().each(function(){\n\t\t\t\tif ( this.nodeName !== orig[i].nodeName )\n\t\t\t\t\treturn;\n\n\t\t\t\tvar events = jQuery.data( orig[i], \"events\" );\n\n\t\t\t\tfor ( var type in events ) {\n\t\t\t\t\tfor ( var handler in events[ type ] ) {\n\t\t\t\t\t\tjQuery.event.add( this, type, events[ type ][ handler ], events[ type ][ handler ].data );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\ti++;\n\t\t\t});\n\t\t}\n\n\t\t// Return the cloned set\n\t\treturn ret;\n\t},\n\n\tfilter: function( selector ) {\n\t\treturn this.pushStack(\n\t\t\tjQuery.isFunction( selector ) &&\n\t\t\tjQuery.grep(this, function(elem, i){\n\t\t\t\treturn selector.call( elem, i );\n\t\t\t}) ||\n\n\t\t\tjQuery.multiFilter( selector, jQuery.grep(this, function(elem){\n\t\t\t\treturn elem.nodeType === 1;\n\t\t\t}) ), \"filter\", selector );\n\t},\n\n\tclosest: function( selector ) {\n\t\tvar pos = jQuery.expr.match.POS.test( selector ) ? jQuery(selector) : null,\n\t\t\tcloser = 0;\n\n\t\treturn this.map(function(){\n\t\t\tvar cur = this;\n\t\t\twhile ( cur && cur.ownerDocument ) {\n\t\t\t\tif ( pos ? pos.index(cur) > -1 : jQuery(cur).is(selector) ) {\n\t\t\t\t\tjQuery.data(cur, \"closest\", closer);\n\t\t\t\t\treturn cur;\n\t\t\t\t}\n\t\t\t\tcur = cur.parentNode;\n\t\t\t\tcloser++;\n\t\t\t}\n\t\t});\n\t},\n\n\tnot: function( selector ) {\n\t\tif ( typeof selector === \"string\" )\n\t\t\t// test special case where just one selector is passed in\n\t\t\tif ( isSimple.test( selector ) )\n\t\t\t\treturn this.pushStack( jQuery.multiFilter( selector, this, true ), \"not\", selector );\n\t\t\telse\n\t\t\t\tselector = jQuery.multiFilter( selector, this );\n\n\t\tvar isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType;\n\t\treturn this.filter(function() {\n\t\t\treturn isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector;\n\t\t});\n\t},\n\n\tadd: function( selector ) {\n\t\treturn this.pushStack( jQuery.unique( jQuery.merge(\n\t\t\tthis.get(),\n\t\t\ttypeof selector === \"string\" ?\n\t\t\t\tjQuery( selector ) :\n\t\t\t\tjQuery.makeArray( selector )\n\t\t)));\n\t},\n\n\tis: function( selector ) {\n\t\treturn !!selector && jQuery.multiFilter( selector, this ).length > 0;\n\t},\n\n\thasClass: function( selector ) {\n\t\treturn !!selector && this.is( \".\" + selector );\n\t},\n\n\tval: function( value ) {\n\t\tif ( value === undefined ) {\t\t\t\n\t\t\tvar elem = this[0];\n\n\t\t\tif ( elem ) {\n\t\t\t\tif( jQuery.nodeName( elem, 'option' ) )\n\t\t\t\t\treturn (elem.attributes.value || {}).specified ? elem.value : elem.text;\n\t\t\t\t\n\t\t\t\t// We need to handle select boxes special\n\t\t\t\tif ( jQuery.nodeName( elem, \"select\" ) ) {\n\t\t\t\t\tvar index = elem.selectedIndex,\n\t\t\t\t\t\tvalues = [],\n\t\t\t\t\t\toptions = elem.options,\n\t\t\t\t\t\tone = elem.type == \"select-one\";\n\n\t\t\t\t\t// Nothing was selected\n\t\t\t\t\tif ( index < 0 )\n\t\t\t\t\t\treturn null;\n\n\t\t\t\t\t// Loop through all the selected options\n\t\t\t\t\tfor ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {\n\t\t\t\t\t\tvar option = options[ i ];\n\n\t\t\t\t\t\tif ( option.selected ) {\n\t\t\t\t\t\t\t// Get the specifc value for the option\n\t\t\t\t\t\t\tvalue = jQuery(option).val();\n\n\t\t\t\t\t\t\t// We don't need an array for one selects\n\t\t\t\t\t\t\tif ( one )\n\t\t\t\t\t\t\t\treturn value;\n\n\t\t\t\t\t\t\t// Multi-Selects return an array\n\t\t\t\t\t\t\tvalues.push( value );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn values;\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\t// Everything else, we just grab the value\n\t\t\t\treturn (elem.value || \"\").replace(/\\r/g, \"\");\n\n\t\t\t}\n\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif ( typeof value === \"number\" )\n\t\t\tvalue += '';\n\n\t\treturn this.each(function(){\n\t\t\tif ( this.nodeType != 1 )\n\t\t\t\treturn;\n\n\t\t\tif ( jQuery.isArray(value) && /radio|checkbox/.test( this.type ) )\n\t\t\t\tthis.checked = (jQuery.inArray(this.value, value) >= 0 ||\n\t\t\t\t\tjQuery.inArray(this.name, value) >= 0);\n\n\t\t\telse if ( jQuery.nodeName( this, \"select\" ) ) {\n\t\t\t\tvar values = jQuery.makeArray(value);\n\n\t\t\t\tjQuery( \"option\", this ).each(function(){\n\t\t\t\t\tthis.selected = (jQuery.inArray( this.value, values ) >= 0 ||\n\t\t\t\t\t\tjQuery.inArray( this.text, values ) >= 0);\n\t\t\t\t});\n\n\t\t\t\tif ( !values.length )\n\t\t\t\t\tthis.selectedIndex = -1;\n\n\t\t\t} else\n\t\t\t\tthis.value = value;\n\t\t});\n\t},\n\n\thtml: function( value ) {\n\t\treturn value === undefined ?\n\t\t\t(this[0] ?\n\t\t\t\tthis[0].innerHTML.replace(/ jQuery\\d+=\"(?:\\d+|null)\"/g, \"\") :\n\t\t\t\tnull) :\n\t\t\tthis.empty().append( value );\n\t},\n\n\treplaceWith: function( value ) {\n\t\treturn this.after( value ).remove();\n\t},\n\n\teq: function( i ) {\n\t\treturn this.slice( i, +i + 1 );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( Array.prototype.slice.apply( this, arguments ),\n\t\t\t\"slice\", Array.prototype.slice.call(arguments).join(\",\") );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map(this, function(elem, i){\n\t\t\treturn callback.call( elem, i, elem );\n\t\t}));\n\t},\n\n\tandSelf: function() {\n\t\treturn this.add( this.prevObject );\n\t},\n\n\tdomManip: function( args, table, callback ) {\n\t\tif ( this[0] ) {\n\t\t\tvar fragment = (this[0].ownerDocument || this[0]).createDocumentFragment(),\n\t\t\t\tscripts = jQuery.clean( args, (this[0].ownerDocument || this[0]), fragment ),\n\t\t\t\tfirst = fragment.firstChild;\n\n\t\t\tif ( first )\n\t\t\t\tfor ( var i = 0, l = this.length; i < l; i++ )\n\t\t\t\t\tcallback.call( root(this[i], first), this.length > 1 || i > 0 ?\n\t\t\t\t\t\t\tfragment.cloneNode(true) : fragment );\n\t\t\n\t\t\tif ( scripts )\n\t\t\t\tjQuery.each( scripts, evalScript );\n\t\t}\n\n\t\treturn this;\n\t\t\n\t\tfunction root( elem, cur ) {\n\t\t\treturn table && jQuery.nodeName(elem, \"table\") && jQuery.nodeName(cur, \"tr\") ?\n\t\t\t\t(elem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\t\telem.appendChild(elem.ownerDocument.createElement(\"tbody\"))) :\n\t\t\t\telem;\n\t\t}\n\t}\n};\n\n// Give the init function the jQuery prototype for later instantiation\njQuery.fn.init.prototype = jQuery.fn;\n\nfunction evalScript( i, elem ) {\n\tif ( elem.src )\n\t\tjQuery.ajax({\n\t\t\turl: elem.src,\n\t\t\tasync: false,\n\t\t\tdataType: \"script\"\n\t\t});\n\n\telse\n\t\tjQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || \"\" );\n\n\tif ( elem.parentNode )\n\t\telem.parentNode.removeChild( elem );\n}\n\nfunction now(){\n\treturn +new Date;\n}\n\njQuery.extend = jQuery.fn.extend = function() {\n\t// copy reference to target object\n\tvar target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\t\ttarget = arguments[1] || {};\n\t\t// skip the boolean and the target\n\t\ti = 2;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !jQuery.isFunction(target) )\n\t\ttarget = {};\n\n\t// extend jQuery itself if only one argument is passed\n\tif ( length == i ) {\n\t\ttarget = this;\n\t\t--i;\n\t}\n\n\tfor ( ; i < length; i++ )\n\t\t// Only deal with non-null/undefined values\n\t\tif ( (options = arguments[ i ]) != null )\n\t\t\t// Extend the base object\n\t\t\tfor ( var name in options ) {\n\t\t\t\tvar src = target[ name ], copy = options[ name ];\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( target === copy )\n\t\t\t\t\tcontinue;\n\n\t\t\t\t// Recurse if we're merging object values\n\t\t\t\tif ( deep && copy && typeof copy === \"object\" && !copy.nodeType )\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, \n\t\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\t\tsrc || ( copy.length != null ? [ ] : { } )\n\t\t\t\t\t, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\telse if ( copy !== undefined )\n\t\t\t\t\ttarget[ name ] = copy;\n\n\t\t\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\n// exclude the following css properties to add px\nvar\texclude = /z-?index|font-?weight|opacity|zoom|line-?height/i,\n\t// cache defaultView\n\tdefaultView = document.defaultView || {},\n\ttoString = Object.prototype.toString;\n\njQuery.extend({\n\tnoConflict: function( deep ) {\n\t\twindow.$ = _$;\n\n\t\tif ( deep )\n\t\t\twindow.jQuery = _jQuery;\n\n\t\treturn jQuery;\n\t},\n\n\t// See test/unit/core.js for details concerning isFunction.\n\t// Since version 1.3, DOM methods and functions like alert\n\t// aren't supported. They return false on IE (#2968).\n\tisFunction: function( obj ) {\n\t\treturn toString.call(obj) === \"[object Function]\";\n\t},\n\n\tisArray: function( obj ) {\n\t\treturn toString.call(obj) === \"[object Array]\";\n\t},\n\n\t// check if an element is in a (or is an) XML document\n\tisXMLDoc: function( elem ) {\n\t\treturn elem.nodeType === 9 && elem.documentElement.nodeName !== \"HTML\" ||\n\t\t\t!!elem.ownerDocument && jQuery.isXMLDoc( elem.ownerDocument );\n\t},\n\n\t// Evalulates a script in a global context\n\tglobalEval: function( data ) {\n\t\tif ( data && /\\S/.test(data) ) {\n\t\t\t// Inspired by code by Andrea Giammarchi\n\t\t\t// http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html\n\t\t\tvar head = document.getElementsByTagName(\"head\")[0] || document.documentElement,\n\t\t\t\tscript = document.createElement(\"script\");\n\n\t\t\tscript.type = \"text/javascript\";\n\t\t\tif ( jQuery.support.scriptEval )\n\t\t\t\tscript.appendChild( document.createTextNode( data ) );\n\t\t\telse\n\t\t\t\tscript.text = data;\n\n\t\t\t// Use insertBefore instead of appendChild to circumvent an IE6 bug.\n\t\t\t// This arises when a base node is used (#2709).\n\t\t\thead.insertBefore( script, head.firstChild );\n\t\t\thead.removeChild( script );\n\t\t}\n\t},\n\n\tnodeName: function( elem, name ) {\n\t\treturn elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase();\n\t},\n\n\t// args is for internal usage only\n\teach: function( object, callback, args ) {\n\t\tvar name, i = 0, length = object.length;\n\n\t\tif ( args ) {\n\t\t\tif ( length === undefined ) {\n\t\t\t\tfor ( name in object )\n\t\t\t\t\tif ( callback.apply( object[ name ], args ) === false )\n\t\t\t\t\t\tbreak;\n\t\t\t} else\n\t\t\t\tfor ( ; i < length; )\n\t\t\t\t\tif ( callback.apply( object[ i++ ], args ) === false )\n\t\t\t\t\t\tbreak;\n\n\t\t// A special, fast, case for the most common use of each\n\t\t} else {\n\t\t\tif ( length === undefined ) {\n\t\t\t\tfor ( name in object )\n\t\t\t\t\tif ( callback.call( object[ name ], name, object[ name ] ) === false )\n\t\t\t\t\t\tbreak;\n\t\t\t} else\n\t\t\t\tfor ( var value = object[0];\n\t\t\t\t\ti < length && callback.call( value, i, value ) !== false; value = object[++i] ){}\n\t\t}\n\n\t\treturn object;\n\t},\n\n\tprop: function( elem, value, type, i, name ) {\n\t\t// Handle executable functions\n\t\tif ( jQuery.isFunction( value ) )\n\t\t\tvalue = value.call( elem, i );\n\n\t\t// Handle passing in a number to a CSS property\n\t\treturn typeof value === \"number\" && type == \"curCSS\" && !exclude.test( name ) ?\n\t\t\tvalue + \"px\" :\n\t\t\tvalue;\n\t},\n\n\tclassName: {\n\t\t// internal only, use addClass(\"class\")\n\t\tadd: function( elem, classNames ) {\n\t\t\tjQuery.each((classNames || \"\").split(/\\s+/), function(i, className){\n\t\t\t\tif ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) )\n\t\t\t\t\telem.className += (elem.className ? \" \" : \"\") + className;\n\t\t\t});\n\t\t},\n\n\t\t// internal only, use removeClass(\"class\")\n\t\tremove: function( elem, classNames ) {\n\t\t\tif (elem.nodeType == 1)\n\t\t\t\telem.className = classNames !== undefined ?\n\t\t\t\t\tjQuery.grep(elem.className.split(/\\s+/), function(className){\n\t\t\t\t\t\treturn !jQuery.className.has( classNames, className );\n\t\t\t\t\t}).join(\" \") :\n\t\t\t\t\t\"\";\n\t\t},\n\n\t\t// internal only, use hasClass(\"class\")\n\t\thas: function( elem, className ) {\n\t\t\treturn elem && jQuery.inArray( className, (elem.className || elem).toString().split(/\\s+/) ) > -1;\n\t\t}\n\t},\n\n\t// A method for quickly swapping in/out CSS properties to get correct calculations\n\tswap: function( elem, options, callback ) {\n\t\tvar old = {};\n\t\t// Remember the old values, and insert the new ones\n\t\tfor ( var name in options ) {\n\t\t\told[ name ] = elem.style[ name ];\n\t\t\telem.style[ name ] = options[ name ];\n\t\t}\n\n\t\tcallback.call( elem );\n\n\t\t// Revert the old values\n\t\tfor ( var name in options )\n\t\t\telem.style[ name ] = old[ name ];\n\t},\n\n\tcss: function( elem, name, force, extra ) {\n\t\tif ( name == \"width\" || name == \"height\" ) {\n\t\t\tvar val, props = { position: \"absolute\", visibility: \"hidden\", display:\"block\" }, which = name == \"width\" ? [ \"Left\", \"Right\" ] : [ \"Top\", \"Bottom\" ];\n\n\t\t\tfunction getWH() {\n\t\t\t\tval = name == \"width\" ? elem.offsetWidth : elem.offsetHeight;\n\n\t\t\t\tif ( extra === \"border\" )\n\t\t\t\t\treturn;\n\n\t\t\t\tjQuery.each( which, function() {\n\t\t\t\t\tif ( !extra )\n\t\t\t\t\t\tval -= parseFloat(jQuery.curCSS( elem, \"padding\" + this, true)) || 0;\n\t\t\t\t\tif ( extra === \"margin\" )\n\t\t\t\t\t\tval += parseFloat(jQuery.curCSS( elem, \"margin\" + this, true)) || 0;\n\t\t\t\t\telse\n\t\t\t\t\t\tval -= parseFloat(jQuery.curCSS( elem, \"border\" + this + \"Width\", true)) || 0;\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif ( elem.offsetWidth !== 0 )\n\t\t\t\tgetWH();\n\t\t\telse\n\t\t\t\tjQuery.swap( elem, props, getWH );\n\n\t\t\treturn Math.max(0, Math.round(val));\n\t\t}\n\n\t\treturn jQuery.curCSS( elem, name, force );\n\t},\n\n\tcurCSS: function( elem, name, force ) {\n\t\tvar ret, style = elem.style;\n\n\t\t// We need to handle opacity special in IE\n\t\tif ( name == \"opacity\" && !jQuery.support.opacity ) {\n\t\t\tret = jQuery.attr( style, \"opacity\" );\n\n\t\t\treturn ret == \"\" ?\n\t\t\t\t\"1\" :\n\t\t\t\tret;\n\t\t}\n\n\t\t// Make sure we're using the right name for getting the float value\n\t\tif ( name.match( /float/i ) )\n\t\t\tname = styleFloat;\n\n\t\tif ( !force && style && style[ name ] )\n\t\t\tret = style[ name ];\n\n\t\telse if ( defaultView.getComputedStyle ) {\n\n\t\t\t// Only \"float\" is needed here\n\t\t\tif ( name.match( /float/i ) )\n\t\t\t\tname = \"float\";\n\n\t\t\tname = name.replace( /([A-Z])/g, \"-$1\" ).toLowerCase();\n\n\t\t\tvar computedStyle = defaultView.getComputedStyle( elem, null );\n\n\t\t\tif ( computedStyle )\n\t\t\t\tret = computedStyle.getPropertyValue( name );\n\n\t\t\t// We should always get a number back from opacity\n\t\t\tif ( name == \"opacity\" && ret == \"\" )\n\t\t\t\tret = \"1\";\n\n\t\t} else if ( elem.currentStyle ) {\n\t\t\tvar camelCase = name.replace(/\\-(\\w)/g, function(all, letter){\n\t\t\t\treturn letter.toUpperCase();\n\t\t\t});\n\n\t\t\tret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ];\n\n\t\t\t// From the awesome hack by Dean Edwards\n\t\t\t// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291\n\n\t\t\t// If we're not dealing with a regular pixel number\n\t\t\t// but a number that has a weird ending, we need to convert it to pixels\n\t\t\tif ( !/^\\d+(px)?$/i.test( ret ) && /^\\d/.test( ret ) ) {\n\t\t\t\t// Remember the original values\n\t\t\t\tvar left = style.left, rsLeft = elem.runtimeStyle.left;\n\n\t\t\t\t// Put in the new values to get a computed value out\n\t\t\t\telem.runtimeStyle.left = elem.currentStyle.left;\n\t\t\t\tstyle.left = ret || 0;\n\t\t\t\tret = style.pixelLeft + \"px\";\n\n\t\t\t\t// Revert the changed values\n\t\t\t\tstyle.left = left;\n\t\t\t\telem.runtimeStyle.left = rsLeft;\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tclean: function( elems, context, fragment ) {\n\t\tcontext = context || document;\n\n\t\t// !context.createElement fails in IE with an error but returns typeof 'object'\n\t\tif ( typeof context.createElement === \"undefined\" )\n\t\t\tcontext = context.ownerDocument || context[0] && context[0].ownerDocument || document;\n\n\t\t// If a single string is passed in and it's a single tag\n\t\t// just do a createElement and skip the rest\n\t\tif ( !fragment && elems.length === 1 && typeof elems[0] === \"string\" ) {\n\t\t\tvar match = /^<(\\w+)\\s*\\/?>$/.exec(elems[0]);\n\t\t\tif ( match )\n\t\t\t\treturn [ context.createElement( match[1] ) ];\n\t\t}\n\n\t\tvar ret = [], scripts = [], div = context.createElement(\"div\");\n\n\t\tjQuery.each(elems, function(i, elem){\n\t\t\tif ( typeof elem === \"number\" )\n\t\t\t\telem += '';\n\n\t\t\tif ( !elem )\n\t\t\t\treturn;\n\n\t\t\t// Convert html string into DOM nodes\n\t\t\tif ( typeof elem === \"string\" ) {\n\t\t\t\t// Fix \"XHTML\"-style tags in all browsers\n\t\t\t\telem = elem.replace(/(<(\\w+)[^>]*?)\\/>/g, function(all, front, tag){\n\t\t\t\t\treturn tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ?\n\t\t\t\t\t\tall :\n\t\t\t\t\t\tfront + \">\";\n\t\t\t\t});\n\n\t\t\t\t// Trim whitespace, otherwise indexOf won't work as expected\n\t\t\t\tvar tags = elem.replace(/^\\s+/, \"\").substring(0, 10).toLowerCase();\n\n\t\t\t\tvar wrap =\n\t\t\t\t\t// option or optgroup\n\t\t\t\t\t!tags.indexOf(\"\", \"\" ] ||\n\n\t\t\t\t\t!tags.indexOf(\"\", \"\" ] ||\n\n\t\t\t\t\ttags.match(/^<(thead|tbody|tfoot|colg|cap)/) &&\n\t\t\t\t\t[ 1, \"\", \"
\" ] ||\n\n\t\t\t\t\t!tags.indexOf(\"\", \"\" ] ||\n\n\t\t\t\t \t// matched above\n\t\t\t\t\t(!tags.indexOf(\"\", \"\" ] ||\n\n\t\t\t\t\t!tags.indexOf(\"\", \"\" ] ||\n\n\t\t\t\t\t// IE can't serialize and \n\n\n \n\n\n\n\n\nPATIENT SEARCH RESULTS\n\n \n \n \n \n \n \n \n\n\n\n\n\n
\n \n Cancel\n \n\n\n\n\n\n\n\n\n\n\n\n\n
\n
\n
\n
\n Search\n
\n
\n
    \n
  • \n
    By:\n
    \n\t\n \n
  • \n
  • \n
    Input:\n
    \n \n
  • \n
  • \n\t\t\t\t\n\t\t\t\t\n \n \n \n \n \n\t\t\t\t\t\n \n\t\t\t\t    \n\t\t\t\t\n\t\t\t\t\t\n
  • \n
\n
\n
\n\n
\n\n
\n
\n Search\n
\n
\n SEARCH FOR PATIENT RECORDS\n \n
\n
\n\n\t\n\t\t\n\t\n
Results based on keyword(s) : 9146489321
\n
    \n
  • \n\t\t\n \n\t\t
     
    \n\n\t\t\n\t\t
    Name1\n
    \n\t\t
    Chart#\n
    \n\t\t
    X\n
    \n\t\t
    DOB yyyy-mm-dd\n
    \n\t\t
    Doctor\n
    \n
    Ros' Sta'\n
    \n\t\t
    Pat' Sta'\n
    \n
    Phone\n
    \n\t
  • \n\t\n\t
  • \n\t\t
    \n\t\t\n\t\t23267
    \n\t\t\n\t\t
    \n\t\t\tE\n\t\t \n\t\t\tRx\n\t\t
    \n\t\t\n\t\t\n\t\t
    Baldwin, David C.
    \n\t\t
    0266910
    \n\t\t
    M
    \n\t\t
    1994-05-06
    \n\t\t
    In,Walk
    \n\t\t
     
    \n\t\t
    AC
    \n\t\t
    (604) 925-2364
    \n\t
  • \n\t\n
\n
\n*Sorts by demographic number
\n1Sorts by last name
\n
\n
\n\n\n\n\n

Please select by clicking on the patient's demographic id for details.

\n
\n\n\n\n" + }, + "redirectURL": "", + "headersSize": 232, + "bodySize": 11090, + "_transferSize": 11322 + }, + "cache": {}, + "timings": { + "blocked": 42.3860000009881, + "dns": 0.012000000424500001, + "connect": 32.8090000002703, + "send": 0.09199999840349449, + "wait": 28.7419999986016, + "receive": 7053.6339999998745, + "ssl": 15.447000001586304 + }, + "connection": "7793", + "pageref": "page_6" + }, + { + "startedDateTime": "2015-09-08T18:32:24.001Z", + "time": 1848.2860000003711, + "request": { + "method": "GET", + "url": "https://secure11.oscarhost.ca/kensington/js/global.js", + "httpVersion": "HTTP/1.1", + "headers": [ + { + "name": "Accept-Encoding", + "value": "gzip, deflate, lzma, sdch" + }, + { + "name": "Host", + "value": "secure11.oscarhost.ca" + }, + { + "name": "Accept-Language", + "value": "en-US,en;q=0.8" + }, + { + "name": "User-Agent", + "value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.155 Safari/537.36 OPR/31.0.1889.174" + }, + { + "name": "Accept", + "value": "*/*" + }, + { + "name": "Referer", + "value": "https://secure11.oscarhost.ca/kensington/demographic/demographiccontrol.jsp?search_mode=search_hin&keyword=9146489321&orderby=last_name%2C+first_name&dboperation=search_titlename&limit1=0&limit2=10&displaymode=Search&ptstatus=active&fromMessenger=false&outofdomain=" + }, + { + "name": "Cookie", + "value": "JSESSIONID=41CDC6020F6E048360624AC8FB064B3D; _ga=GA1.2.1898936923.1439425583; oscprvid=57146991964065959575879118387130192807081; RT=" + }, + { + "name": "Connection", + "value": "keep-alive" + } + ], + "queryString": [], + "cookies": [ + { + "name": "JSESSIONID", + "value": "41CDC6020F6E048360624AC8FB064B3D", + "expires": null, + "httpOnly": false, + "secure": false + }, + { + "name": "_ga", + "value": "GA1.2.1898936923.1439425583", + "expires": null, + "httpOnly": false, + "secure": false + }, + { + "name": "oscprvid", + "value": "57146991964065959575879118387130192807081", + "expires": null, + "httpOnly": false, + "secure": false + }, + { + "name": "RT", + "value": "", + "expires": null, + "httpOnly": false, + "secure": false + } + ], + "headersSize": 755, + "bodySize": 0 + }, + "response": { + "status": 200, + "statusText": "OK", + "httpVersion": "HTTP/1.1", + "headers": [ + { + "name": "Date", + "value": "Tue, 08 Sep 2015 18:32:19 GMT" + }, + { + "name": "Last-Modified", + "value": "Wed, 24 Jun 2015 21:22:36 GMT" + }, + { + "name": "ETag", + "value": "\"4129-1435180956000\"" + }, + { + "name": "Content-Type", + "value": "text/javascript;charset=UTF-8" + }, + { + "name": "Cache-Control", + "value": "no-store, no-cache, must-revalidate" + }, + { + "name": "Connection", + "value": "Keep-Alive" + }, + { + "name": "Accept-Ranges", + "value": "bytes" + }, + { + "name": "Keep-Alive", + "value": "timeout=15, max=100" + }, + { + "name": "Content-Length", + "value": "4129" + } + ], + "cookies": [], + "content": { + "size": 4129, + "mimeType": "text/javascript", + "compression": 0, + "text": "\n// setfocus to the current window\nfunction setfocus() {\n this.focus();\n}\n\n// refresh this page\nfunction refresh() {\n\t history.go(0);\n}\nfunction showHideItem(id){\n if(document.getElementById(id).style.display == 'none')\n document.getElementById(id).style.display = 'block';\n else\n document.getElementById(id).style.display = 'none';\n}\nvar currentWidth;\n// This function is useful to simulate min-width for the body in IE6 (for popup windows)\nfunction setMinWidth(width){\n if (currentWidth != document.documentElement.clientWidth) {\n document.body.style.width = (document.documentElement.clientWidth < (width+10))? width+\"px\" : \"auto\";\n }\n currentWidth = document.documentElement.clientWidth;\n}\n\n// open a new popup window\nfunction popupPage(vheight,vwidth,varpage) { \n var page = \"\" + varpage;\n windowprops = \"height=\"+vheight+\",width=\"+vwidth+\",location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes\";\n var popup=window.open(page, \"attachment\", windowprops);\n if (popup != null) {\n if (popup.opener == null) {\n popup.opener = self; \n }\n }\n}\n//popup and focus\n//allow to specify pageTitle\nfunction popupFocusPage(vheight,vwidth,varpage,pageTitle){\n var page = \"\" + varpage;\n var windowprops = \"height=\"+vheight+\",width=\"+vwidth+\",location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes,\"+\n \"screenX=50,screenY=50,top=0,left=0\";\n var popup=window.open(page, pageTitle, windowprops);\n if (popup != null) {\n if (popup.opener == null) {\n popup.opener = self;\n }\n popup.focus();\n }\n}\n// Prompt user if exiting without saving\nfunction onExit() {\n if(confirm(\"Are you sure you wish to exit without saving your changes?\")==true)\n {\n window.close();\n }\n return(false);\n}\n\n// Check if the entered type is a number\nfunction checkTypeNum(typeIn) {\n\tvar typeInOK = true;\n\tvar i = 0;\n\tvar length = typeIn.length;\n\tvar ch;\n\t// walk through a string and find a number\n\tif (length>=1) {\n\t while (i < length) {\n\t\tch = typeIn.substring(i, i+1);\n\t\tif ((ch < \"0\") || (ch > \"9\")) {\n\t\t\ttypeInOK = false;\n\t\t\tbreak;\n\t\t}\n\t i++;\n }\n\t} else typeInOK = false;\n\treturn typeInOK;\n}\n\n// print the current window\nfunction onPrint() {\n\twindows.print();\n}\n\n// change the case of current control's text to upper case\nfunction upCaseCtrl(ctrl) {\n\tctrl.value = ctrl.value.toUpperCase();\n}\n\n\nfunction openBrWindow(theURL,winName,features) { \n window.open(theURL,winName,features);\n}\n\nfunction Check(e) {\n\te.checked = true;\n}\n\nfunction Clear(e) {\n\te.checked = false;\n}\n \nfunction CheckAll(ml) {\n\tvar len = ml.elements.length;\n\tfor (var i = 0; i < len; i++) {\n\t var e = ml.elements[i];\n\t if (e.name == \"checkbox\") {\n\t\t\tCheck(e);\n\t }\n\t}\n}\n\nfunction ClearAll(ml) {\n\tvar len = ml.elements.length;\n\tfor (var i = 0; i < len; i++) {\n\t var e = ml.elements[i];\n\t if (e.name == \"checkbox\") {\n\t\tClear(e);\n\t }\n\t}\n}\n\n//set the focus to this window\nfunction start(){\n\t this.focus();\n}\n\n//close the current window\nfunction closeit() {\n self.opener.refresh();\n close();\n} \n\n//ajax update of the current window\nfunction updateAjax() {\n var parentAjaxId = \"<%=parentAjaxId%>\"; \n if( parentAjaxId != \"null\" ) {\n window.opener.document.forms['encForm'].elements['reloadDiv'].value = parentAjaxId;\n window.opener.updateNeeded = true; \n }\n}\n\nfunction setEnabledAll(form, enabled){\n\tfor (var i = 0; i < form.elements.length; i++) {\n\t\tform.elements[i].disabled=!enabled;\n\t}\n}\n\nfunction getSelectedRadioValue(radioGroup)\n{\n\tfor (var i=0; i\n * \n * This software was written for the \n * Department of Family Medicine \n * McMaster University \n * Hamilton \n * Ontario, Canada \n */\n\nfunction popup(height, width, url, windowName) {\n return popup2(height, width, 0, 0, url, windowName);\n}\n\n\nfunction popup2(height, width, top, left, url, windowName){ \n var page = url; \n windowprops = \"height=\"+height+\",width=\"+width+\",location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=yes,screenX=0,screenY=0,top=\" + top + \",left=\" + left;\n var popup=window.open(url, windowName, windowprops); \n if (popup != null){ \n if (popup.opener == null){ \n popup.opener = self; \n } \n } \n popup.focus(); \n return popup; \n}\n\nfunction confirmNGo(url, message) {\n if (confirm(message)) {\n location.href = url;\n }\n return false;\n}\n\n\nfunction showHideItem(id){ \n if(document.getElementById(id).style.display == 'none')\n showItem(id); \n else\n hideItem(id); \n}\n\nfunction showItem(id){\n document.getElementById(id).style.display = ''; \n}\n\nfunction hideItem(id){\n document.getElementById(id).style.display = 'none'; \n}\n\n/*\noElm - Mandatory. This is element in whose children you will look for the attribute.\nstrTagName - Mandatory. This is the name of the HTML elements you want to look in. Use wildcard (*) if you want to look in all elements.\nstrAttributeName - Mandatory. The name of the attribute you’re looking for.\nstrAttributeValue - Optional. If you want the attribute you’re looking for to have a certain value as well. (don't specify it if you don't know it)\n*/\ndocument.getElementsByAttribute = function(oElm, strTagName, strAttributeName, strAttributeValue){\n var arrElements = (strTagName == \"*\" && oElm.all)? oElm.all : oElm.getElementsByTagName(strTagName);\n var arrReturnElements = new Array();\n var oAttributeValue = (typeof strAttributeValue != \"undefined\")? new RegExp(\"(^|\\\\s)\" + strAttributeValue + \"(\\\\s|$)\") : null;\n var oCurrent;\n var oAttribute;\n for(var i=0; i 0){\n if(typeof strAttributeValue == \"undefined\" || (oAttributeValue && oAttributeValue.test(oAttribute))){\n arrReturnElements.push(oCurrent);\n }\n }\n }\n return arrReturnElements;\n}\n\nfunction validDate(id) {\n //checks if the has a valid date format yyyy/mm/dd\n var completeRawDate = document.getElementById(id).value;\n return validDateText(completeRawDate);\n}\n\nfunction validDateText(completeRawDate) {\n//Just another method that validates date in a string, useful if you want to make your own\n//date checking script.\n var delimiter = '/';\n if (completeRawDate.indexOf('/') == -1)\n delimiter = '-';\n var dateArray = completeRawDate.split(delimiter);\n if (dateArray.length != 3) return false;\n year = (dateArray[0] - 0);\n month = (dateArray[1] - 1);\n day = (dateArray[2] - 0);\n //alert(\"year: \" + year + \", \" + month + \", \" + day);\n dateObject = new Date(year,month,day);\n return ((day==dateObject.getDate()) && (month==dateObject.getMonth()) && (year==dateObject.getFullYear()));\n}\n\nfunction validDateFieldsByClass(className, parentEle) {\n//Checks if the dates are valid, identifies date fields by class name; datefield preferrably type=\"text\"\n// parentEle is any object that encloses the fields, usually the form element\n var datefields = document.getElementsByClassName(className, parentEle)\n for (var i=0; i\nfunction checkAll(master, parentEle, className){\n var val = master.checked;\n var chkList = document.getElementsByClassName(className, parentEle);\n for (i =0; i < chkList.length; i++){\n chkList[i].checked = val;\n }\n}\n\n//Calls firebugs console log if it's available. A safer way to use the console because if firebug is not enabled the javascript will error on the console.log line.\nfunction oscarLog(str){\n if(window.console){\n console.log(str);\n }\n \n}\n\n\n//Can be use the enter key in a text box and call javacript function\n//example: \nfunction grabEnter(event,callb){\n if( (window.event && window.event.keyCode == 13) || (event && event.which == 13) ) {\n eval(callb);\n return false;\n }\n}\n\n\n\n//Checks to see if a String is numeric integer ie. No decimal aloud\nfunction isNumericInt(sText){\n var validNumChars = \"0123456789\";\n var isNumber=true;\n var chara;\n for (i = 0; i < sText.length && isNumber == true; i++) {\n chara = sText.charAt(i);\n if (validNumChars.indexOf(chara) == -1) {\n isNumber = false;\n }\n }\n return isNumber;\n}\n\n//Checks to see if a String is numeric\nfunction isNumeric(sText){\n var validNumChars = \"0123456789.\";\n var isNumber=true;\n var chara;\n for (i = 0; i < sText.length && isNumber == true; i++) {\n chara = sText.charAt(i);\n if (validNumChars.indexOf(chara) == -1) {\n isNumber = false;\n }\n }\n return isNumber;\n}\n//remove leading and trailing white space\nfunction trim(str){\n str=str.replace(/^\\s+/g,\"\");\n str=str.replace(/\\s+$/g,\"\");//trim str\n return str;\n}" + }, + "redirectURL": "", + "headersSize": 328, + "bodySize": 7027, + "_transferSize": 7355 + }, + "cache": {}, + "timings": { + "blocked": 101.718000001711, + "dns": 0.006999998730989887, + "connect": 36.556999999447996, + "send": 0.11200000153601763, + "wait": 1521.323999997544, + "receive": 188.24999999924808, + "ssl": 18.679999997402987 + }, + "connection": "7817", + "pageref": "page_6" + }, + { + "startedDateTime": "2015-09-08T18:32:24.002Z", + "time": 1848.3930000002147, + "request": { + "method": "GET", + "url": "https://secure11.oscarhost.ca/kensington/js/jquery.js", + "httpVersion": "HTTP/1.1", + "headers": [ + { + "name": "Accept-Encoding", + "value": "gzip, deflate, lzma, sdch" + }, + { + "name": "Host", + "value": "secure11.oscarhost.ca" + }, + { + "name": "Accept-Language", + "value": "en-US,en;q=0.8" + }, + { + "name": "User-Agent", + "value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.155 Safari/537.36 OPR/31.0.1889.174" + }, + { + "name": "Accept", + "value": "*/*" + }, + { + "name": "Referer", + "value": "https://secure11.oscarhost.ca/kensington/demographic/demographiccontrol.jsp?search_mode=search_hin&keyword=9146489321&orderby=last_name%2C+first_name&dboperation=search_titlename&limit1=0&limit2=10&displaymode=Search&ptstatus=active&fromMessenger=false&outofdomain=" + }, + { + "name": "Cookie", + "value": "JSESSIONID=41CDC6020F6E048360624AC8FB064B3D; _ga=GA1.2.1898936923.1439425583; oscprvid=57146991964065959575879118387130192807081; RT=" + }, + { + "name": "Connection", + "value": "keep-alive" + } + ], + "queryString": [], + "cookies": [ + { + "name": "JSESSIONID", + "value": "41CDC6020F6E048360624AC8FB064B3D", + "expires": null, + "httpOnly": false, + "secure": false + }, + { + "name": "_ga", + "value": "GA1.2.1898936923.1439425583", + "expires": null, + "httpOnly": false, + "secure": false + }, + { + "name": "oscprvid", + "value": "57146991964065959575879118387130192807081", + "expires": null, + "httpOnly": false, + "secure": false + }, + { + "name": "RT", + "value": "", + "expires": null, + "httpOnly": false, + "secure": false + } + ], + "headersSize": 755, + "bodySize": 0 + }, + "response": { + "status": 200, + "statusText": "OK", + "httpVersion": "HTTP/1.1", + "headers": [ + { + "name": "Date", + "value": "Tue, 08 Sep 2015 18:32:19 GMT" + }, + { + "name": "Last-Modified", + "value": "Tue, 17 Mar 2015 17:35:50 GMT" + }, + { + "name": "ETag", + "value": "\"120654-1426613750000\"" + }, + { + "name": "Content-Type", + "value": "text/javascript;charset=UTF-8" + }, + { + "name": "Cache-Control", + "value": "no-store, no-cache, must-revalidate" + }, + { + "name": "Connection", + "value": "Keep-Alive" + }, + { + "name": "Accept-Ranges", + "value": "bytes" + }, + { + "name": "Keep-Alive", + "value": "timeout=15, max=100" + }, + { + "name": "Content-Length", + "value": "120654" + } + ], + "cookies": [], + "content": { + "size": 120654, + "mimeType": "text/javascript", + "compression": 0, + "text": "/*!\n * jQuery JavaScript Library v1.3.2\n * http://jquery.com/\n *\n * Copyright (c) 2009 John Resig\n * Dual licensed under the MIT and GPL licenses.\n * http://docs.jquery.com/License\n *\n * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)\n * Revision: 6246\n */\n(function(){\n\nvar \n\t// Will speed up references to window, and allows munging its name.\n\twindow = this,\n\t// Will speed up references to undefined, and allows munging its name.\n\tundefined,\n\t// Map over jQuery in case of overwrite\n\t_jQuery = window.jQuery,\n\t// Map over the $ in case of overwrite\n\t_$ = window.$,\n\n\tjQuery = window.jQuery = window.$ = function( selector, context ) {\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\treturn new jQuery.fn.init( selector, context );\n\t},\n\n\t// A simple way to check for HTML strings or ID strings\n\t// (both of which we optimize for)\n\tquickExpr = /^[^<]*(<(.|\\s)+>)[^>]*$|^#([\\w-]+)$/,\n\t// Is it a simple selector\n\tisSimple = /^.[^:#\\[\\.,]*$/;\n\njQuery.fn = jQuery.prototype = {\n\tinit: function( selector, context ) {\n\t\t// Make sure that a selection was provided\n\t\tselector = selector || document;\n\n\t\t// Handle $(DOMElement)\n\t\tif ( selector.nodeType ) {\n\t\t\tthis[0] = selector;\n\t\t\tthis.length = 1;\n\t\t\tthis.context = selector;\n\t\t\treturn this;\n\t\t}\n\t\t// Handle HTML strings\n\t\tif ( typeof selector === \"string\" ) {\n\t\t\t// Are we dealing with HTML string or an ID?\n\t\t\tvar match = quickExpr.exec( selector );\n\n\t\t\t// Verify a match, and that no context was specified for #id\n\t\t\tif ( match && (match[1] || !context) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[1] )\n\t\t\t\t\tselector = jQuery.clean( [ match[1] ], context );\n\n\t\t\t\t// HANDLE: $(\"#id\")\n\t\t\t\telse {\n\t\t\t\t\tvar elem = document.getElementById( match[3] );\n\n\t\t\t\t\t// Handle the case where IE and Opera return items\n\t\t\t\t\t// by name instead of ID\n\t\t\t\t\tif ( elem && elem.id != match[3] )\n\t\t\t\t\t\treturn jQuery().find( selector );\n\n\t\t\t\t\t// Otherwise, we inject the element directly into the jQuery object\n\t\t\t\t\tvar ret = jQuery( elem || [] );\n\t\t\t\t\tret.context = document;\n\t\t\t\t\tret.selector = selector;\n\t\t\t\t\treturn ret;\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(expr, [context])\n\t\t\t// (which is just equivalent to: $(content).find(expr)\n\t\t\t} else\n\t\t\t\treturn jQuery( context ).find( selector );\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( jQuery.isFunction( selector ) )\n\t\t\treturn jQuery( document ).ready( selector );\n\n\t\t// Make sure that old selector state is passed along\n\t\tif ( selector.selector && selector.context ) {\n\t\t\tthis.selector = selector.selector;\n\t\t\tthis.context = selector.context;\n\t\t}\n\n\t\treturn this.setArray(jQuery.isArray( selector ) ?\n\t\t\tselector :\n\t\t\tjQuery.makeArray(selector));\n\t},\n\n\t// Start with an empty selector\n\tselector: \"\",\n\n\t// The current version of jQuery being used\n\tjquery: \"1.3.2\",\n\n\t// The number of elements contained in the matched element set\n\tsize: function() {\n\t\treturn this.length;\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\t\treturn num === undefined ?\n\n\t\t\t// Return a 'clean' array\n\t\t\tArray.prototype.slice.call( this ) :\n\n\t\t\t// Return just the object\n\t\t\tthis[ num ];\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems, name, selector ) {\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery( elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\n\t\tret.context = this.context;\n\n\t\tif ( name === \"find\" )\n\t\t\tret.selector = this.selector + (this.selector ? \" \" : \"\") + selector;\n\t\telse if ( name )\n\t\t\tret.selector = this.selector + \".\" + name + \"(\" + selector + \")\";\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Force the current matched set of elements to become\n\t// the specified array of elements (destroying the stack in the process)\n\t// You should use pushStack() in order to do this, but maintain the stack\n\tsetArray: function( elems ) {\n\t\t// Resetting the length to 0, then using the native Array push\n\t\t// is a super-fast way to populate an object with array-like properties\n\t\tthis.length = 0;\n\t\tArray.prototype.push.apply( this, elems );\n\n\t\treturn this;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\t// (You can seed the arguments with an array of args, but this is\n\t// only used internally.)\n\teach: function( callback, args ) {\n\t\treturn jQuery.each( this, callback, args );\n\t},\n\n\t// Determine the position of an element within\n\t// the matched set of elements\n\tindex: function( elem ) {\n\t\t// Locate the position of the desired element\n\t\treturn jQuery.inArray(\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem && elem.jquery ? elem[0] : elem\n\t\t, this );\n\t},\n\n\tattr: function( name, value, type ) {\n\t\tvar options = name;\n\n\t\t// Look for the case where we're accessing a style value\n\t\tif ( typeof name === \"string\" )\n\t\t\tif ( value === undefined )\n\t\t\t\treturn this[0] && jQuery[ type || \"attr\" ]( this[0], name );\n\n\t\t\telse {\n\t\t\t\toptions = {};\n\t\t\t\toptions[ name ] = value;\n\t\t\t}\n\n\t\t// Check to see if we're setting style values\n\t\treturn this.each(function(i){\n\t\t\t// Set all the styles\n\t\t\tfor ( name in options )\n\t\t\t\tjQuery.attr(\n\t\t\t\t\ttype ?\n\t\t\t\t\t\tthis.style :\n\t\t\t\t\t\tthis,\n\t\t\t\t\tname, jQuery.prop( this, options[ name ], type, i, name )\n\t\t\t\t);\n\t\t});\n\t},\n\n\tcss: function( key, value ) {\n\t\t// ignore negative width and height values\n\t\tif ( (key == 'width' || key == 'height') && parseFloat(value) < 0 )\n\t\t\tvalue = undefined;\n\t\treturn this.attr( key, value, \"curCSS\" );\n\t},\n\n\ttext: function( text ) {\n\t\tif ( typeof text !== \"object\" && text != null )\n\t\t\treturn this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );\n\n\t\tvar ret = \"\";\n\n\t\tjQuery.each( text || this, function(){\n\t\t\tjQuery.each( this.childNodes, function(){\n\t\t\t\tif ( this.nodeType != 8 )\n\t\t\t\t\tret += this.nodeType != 1 ?\n\t\t\t\t\t\tthis.nodeValue :\n\t\t\t\t\t\tjQuery.fn.text( [ this ] );\n\t\t\t});\n\t\t});\n\n\t\treturn ret;\n\t},\n\n\twrapAll: function( html ) {\n\t\tif ( this[0] ) {\n\t\t\t// The elements to wrap the target around\n\t\t\tvar wrap = jQuery( html, this[0].ownerDocument ).clone();\n\n\t\t\tif ( this[0].parentNode )\n\t\t\t\twrap.insertBefore( this[0] );\n\n\t\t\twrap.map(function(){\n\t\t\t\tvar elem = this;\n\n\t\t\t\twhile ( elem.firstChild )\n\t\t\t\t\telem = elem.firstChild;\n\n\t\t\t\treturn elem;\n\t\t\t}).append(this);\n\t\t}\n\n\t\treturn this;\n\t},\n\n\twrapInner: function( html ) {\n\t\treturn this.each(function(){\n\t\t\tjQuery( this ).contents().wrapAll( html );\n\t\t});\n\t},\n\n\twrap: function( html ) {\n\t\treturn this.each(function(){\n\t\t\tjQuery( this ).wrapAll( html );\n\t\t});\n\t},\n\n\tappend: function() {\n\t\treturn this.domManip(arguments, true, function(elem){\n\t\t\tif (this.nodeType == 1)\n\t\t\t\tthis.appendChild( elem );\n\t\t});\n\t},\n\n\tprepend: function() {\n\t\treturn this.domManip(arguments, true, function(elem){\n\t\t\tif (this.nodeType == 1)\n\t\t\t\tthis.insertBefore( elem, this.firstChild );\n\t\t});\n\t},\n\n\tbefore: function() {\n\t\treturn this.domManip(arguments, false, function(elem){\n\t\t\tthis.parentNode.insertBefore( elem, this );\n\t\t});\n\t},\n\n\tafter: function() {\n\t\treturn this.domManip(arguments, false, function(elem){\n\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\n\t\t});\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || jQuery( [] );\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: [].push,\n\tsort: [].sort,\n\tsplice: [].splice,\n\n\tfind: function( selector ) {\n\t\tif ( this.length === 1 ) {\n\t\t\tvar ret = this.pushStack( [], \"find\", selector );\n\t\t\tret.length = 0;\n\t\t\tjQuery.find( selector, this[0], ret );\n\t\t\treturn ret;\n\t\t} else {\n\t\t\treturn this.pushStack( jQuery.unique(jQuery.map(this, function(elem){\n\t\t\t\treturn jQuery.find( selector, elem );\n\t\t\t})), \"find\", selector );\n\t\t}\n\t},\n\n\tclone: function( events ) {\n\t\t// Do the clone\n\t\tvar ret = this.map(function(){\n\t\t\tif ( !jQuery.support.noCloneEvent && !jQuery.isXMLDoc(this) ) {\n\t\t\t\t// IE copies events bound via attachEvent when\n\t\t\t\t// using cloneNode. Calling detachEvent on the\n\t\t\t\t// clone will also remove the events from the orignal\n\t\t\t\t// In order to get around this, we use innerHTML.\n\t\t\t\t// Unfortunately, this means some modifications to\n\t\t\t\t// attributes in IE that are actually only stored\n\t\t\t\t// as properties will not be copied (such as the\n\t\t\t\t// the name attribute on an input).\n\t\t\t\tvar html = this.outerHTML;\n\t\t\t\tif ( !html ) {\n\t\t\t\t\tvar div = this.ownerDocument.createElement(\"div\");\n\t\t\t\t\tdiv.appendChild( this.cloneNode(true) );\n\t\t\t\t\thtml = div.innerHTML;\n\t\t\t\t}\n\n\t\t\t\treturn jQuery.clean([html.replace(/ jQuery\\d+=\"(?:\\d+|null)\"/g, \"\").replace(/^\\s*/, \"\")])[0];\n\t\t\t} else\n\t\t\t\treturn this.cloneNode(true);\n\t\t});\n\n\t\t// Copy the events from the original to the clone\n\t\tif ( events === true ) {\n\t\t\tvar orig = this.find(\"*\").andSelf(), i = 0;\n\n\t\t\tret.find(\"*\").andSelf().each(function(){\n\t\t\t\tif ( this.nodeName !== orig[i].nodeName )\n\t\t\t\t\treturn;\n\n\t\t\t\tvar events = jQuery.data( orig[i], \"events\" );\n\n\t\t\t\tfor ( var type in events ) {\n\t\t\t\t\tfor ( var handler in events[ type ] ) {\n\t\t\t\t\t\tjQuery.event.add( this, type, events[ type ][ handler ], events[ type ][ handler ].data );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\ti++;\n\t\t\t});\n\t\t}\n\n\t\t// Return the cloned set\n\t\treturn ret;\n\t},\n\n\tfilter: function( selector ) {\n\t\treturn this.pushStack(\n\t\t\tjQuery.isFunction( selector ) &&\n\t\t\tjQuery.grep(this, function(elem, i){\n\t\t\t\treturn selector.call( elem, i );\n\t\t\t}) ||\n\n\t\t\tjQuery.multiFilter( selector, jQuery.grep(this, function(elem){\n\t\t\t\treturn elem.nodeType === 1;\n\t\t\t}) ), \"filter\", selector );\n\t},\n\n\tclosest: function( selector ) {\n\t\tvar pos = jQuery.expr.match.POS.test( selector ) ? jQuery(selector) : null,\n\t\t\tcloser = 0;\n\n\t\treturn this.map(function(){\n\t\t\tvar cur = this;\n\t\t\twhile ( cur && cur.ownerDocument ) {\n\t\t\t\tif ( pos ? pos.index(cur) > -1 : jQuery(cur).is(selector) ) {\n\t\t\t\t\tjQuery.data(cur, \"closest\", closer);\n\t\t\t\t\treturn cur;\n\t\t\t\t}\n\t\t\t\tcur = cur.parentNode;\n\t\t\t\tcloser++;\n\t\t\t}\n\t\t});\n\t},\n\n\tnot: function( selector ) {\n\t\tif ( typeof selector === \"string\" )\n\t\t\t// test special case where just one selector is passed in\n\t\t\tif ( isSimple.test( selector ) )\n\t\t\t\treturn this.pushStack( jQuery.multiFilter( selector, this, true ), \"not\", selector );\n\t\t\telse\n\t\t\t\tselector = jQuery.multiFilter( selector, this );\n\n\t\tvar isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType;\n\t\treturn this.filter(function() {\n\t\t\treturn isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector;\n\t\t});\n\t},\n\n\tadd: function( selector ) {\n\t\treturn this.pushStack( jQuery.unique( jQuery.merge(\n\t\t\tthis.get(),\n\t\t\ttypeof selector === \"string\" ?\n\t\t\t\tjQuery( selector ) :\n\t\t\t\tjQuery.makeArray( selector )\n\t\t)));\n\t},\n\n\tis: function( selector ) {\n\t\treturn !!selector && jQuery.multiFilter( selector, this ).length > 0;\n\t},\n\n\thasClass: function( selector ) {\n\t\treturn !!selector && this.is( \".\" + selector );\n\t},\n\n\tval: function( value ) {\n\t\tif ( value === undefined ) {\t\t\t\n\t\t\tvar elem = this[0];\n\n\t\t\tif ( elem ) {\n\t\t\t\tif( jQuery.nodeName( elem, 'option' ) )\n\t\t\t\t\treturn (elem.attributes.value || {}).specified ? elem.value : elem.text;\n\t\t\t\t\n\t\t\t\t// We need to handle select boxes special\n\t\t\t\tif ( jQuery.nodeName( elem, \"select\" ) ) {\n\t\t\t\t\tvar index = elem.selectedIndex,\n\t\t\t\t\t\tvalues = [],\n\t\t\t\t\t\toptions = elem.options,\n\t\t\t\t\t\tone = elem.type == \"select-one\";\n\n\t\t\t\t\t// Nothing was selected\n\t\t\t\t\tif ( index < 0 )\n\t\t\t\t\t\treturn null;\n\n\t\t\t\t\t// Loop through all the selected options\n\t\t\t\t\tfor ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {\n\t\t\t\t\t\tvar option = options[ i ];\n\n\t\t\t\t\t\tif ( option.selected ) {\n\t\t\t\t\t\t\t// Get the specifc value for the option\n\t\t\t\t\t\t\tvalue = jQuery(option).val();\n\n\t\t\t\t\t\t\t// We don't need an array for one selects\n\t\t\t\t\t\t\tif ( one )\n\t\t\t\t\t\t\t\treturn value;\n\n\t\t\t\t\t\t\t// Multi-Selects return an array\n\t\t\t\t\t\t\tvalues.push( value );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn values;\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\t// Everything else, we just grab the value\n\t\t\t\treturn (elem.value || \"\").replace(/\\r/g, \"\");\n\n\t\t\t}\n\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif ( typeof value === \"number\" )\n\t\t\tvalue += '';\n\n\t\treturn this.each(function(){\n\t\t\tif ( this.nodeType != 1 )\n\t\t\t\treturn;\n\n\t\t\tif ( jQuery.isArray(value) && /radio|checkbox/.test( this.type ) )\n\t\t\t\tthis.checked = (jQuery.inArray(this.value, value) >= 0 ||\n\t\t\t\t\tjQuery.inArray(this.name, value) >= 0);\n\n\t\t\telse if ( jQuery.nodeName( this, \"select\" ) ) {\n\t\t\t\tvar values = jQuery.makeArray(value);\n\n\t\t\t\tjQuery( \"option\", this ).each(function(){\n\t\t\t\t\tthis.selected = (jQuery.inArray( this.value, values ) >= 0 ||\n\t\t\t\t\t\tjQuery.inArray( this.text, values ) >= 0);\n\t\t\t\t});\n\n\t\t\t\tif ( !values.length )\n\t\t\t\t\tthis.selectedIndex = -1;\n\n\t\t\t} else\n\t\t\t\tthis.value = value;\n\t\t});\n\t},\n\n\thtml: function( value ) {\n\t\treturn value === undefined ?\n\t\t\t(this[0] ?\n\t\t\t\tthis[0].innerHTML.replace(/ jQuery\\d+=\"(?:\\d+|null)\"/g, \"\") :\n\t\t\t\tnull) :\n\t\t\tthis.empty().append( value );\n\t},\n\n\treplaceWith: function( value ) {\n\t\treturn this.after( value ).remove();\n\t},\n\n\teq: function( i ) {\n\t\treturn this.slice( i, +i + 1 );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( Array.prototype.slice.apply( this, arguments ),\n\t\t\t\"slice\", Array.prototype.slice.call(arguments).join(\",\") );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map(this, function(elem, i){\n\t\t\treturn callback.call( elem, i, elem );\n\t\t}));\n\t},\n\n\tandSelf: function() {\n\t\treturn this.add( this.prevObject );\n\t},\n\n\tdomManip: function( args, table, callback ) {\n\t\tif ( this[0] ) {\n\t\t\tvar fragment = (this[0].ownerDocument || this[0]).createDocumentFragment(),\n\t\t\t\tscripts = jQuery.clean( args, (this[0].ownerDocument || this[0]), fragment ),\n\t\t\t\tfirst = fragment.firstChild;\n\n\t\t\tif ( first )\n\t\t\t\tfor ( var i = 0, l = this.length; i < l; i++ )\n\t\t\t\t\tcallback.call( root(this[i], first), this.length > 1 || i > 0 ?\n\t\t\t\t\t\t\tfragment.cloneNode(true) : fragment );\n\t\t\n\t\t\tif ( scripts )\n\t\t\t\tjQuery.each( scripts, evalScript );\n\t\t}\n\n\t\treturn this;\n\t\t\n\t\tfunction root( elem, cur ) {\n\t\t\treturn table && jQuery.nodeName(elem, \"table\") && jQuery.nodeName(cur, \"tr\") ?\n\t\t\t\t(elem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\t\telem.appendChild(elem.ownerDocument.createElement(\"tbody\"))) :\n\t\t\t\telem;\n\t\t}\n\t}\n};\n\n// Give the init function the jQuery prototype for later instantiation\njQuery.fn.init.prototype = jQuery.fn;\n\nfunction evalScript( i, elem ) {\n\tif ( elem.src )\n\t\tjQuery.ajax({\n\t\t\turl: elem.src,\n\t\t\tasync: false,\n\t\t\tdataType: \"script\"\n\t\t});\n\n\telse\n\t\tjQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || \"\" );\n\n\tif ( elem.parentNode )\n\t\telem.parentNode.removeChild( elem );\n}\n\nfunction now(){\n\treturn +new Date;\n}\n\njQuery.extend = jQuery.fn.extend = function() {\n\t// copy reference to target object\n\tvar target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\t\ttarget = arguments[1] || {};\n\t\t// skip the boolean and the target\n\t\ti = 2;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !jQuery.isFunction(target) )\n\t\ttarget = {};\n\n\t// extend jQuery itself if only one argument is passed\n\tif ( length == i ) {\n\t\ttarget = this;\n\t\t--i;\n\t}\n\n\tfor ( ; i < length; i++ )\n\t\t// Only deal with non-null/undefined values\n\t\tif ( (options = arguments[ i ]) != null )\n\t\t\t// Extend the base object\n\t\t\tfor ( var name in options ) {\n\t\t\t\tvar src = target[ name ], copy = options[ name ];\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( target === copy )\n\t\t\t\t\tcontinue;\n\n\t\t\t\t// Recurse if we're merging object values\n\t\t\t\tif ( deep && copy && typeof copy === \"object\" && !copy.nodeType )\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, \n\t\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\t\tsrc || ( copy.length != null ? [ ] : { } )\n\t\t\t\t\t, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\telse if ( copy !== undefined )\n\t\t\t\t\ttarget[ name ] = copy;\n\n\t\t\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\n// exclude the following css properties to add px\nvar\texclude = /z-?index|font-?weight|opacity|zoom|line-?height/i,\n\t// cache defaultView\n\tdefaultView = document.defaultView || {},\n\ttoString = Object.prototype.toString;\n\njQuery.extend({\n\tnoConflict: function( deep ) {\n\t\twindow.$ = _$;\n\n\t\tif ( deep )\n\t\t\twindow.jQuery = _jQuery;\n\n\t\treturn jQuery;\n\t},\n\n\t// See test/unit/core.js for details concerning isFunction.\n\t// Since version 1.3, DOM methods and functions like alert\n\t// aren't supported. They return false on IE (#2968).\n\tisFunction: function( obj ) {\n\t\treturn toString.call(obj) === \"[object Function]\";\n\t},\n\n\tisArray: function( obj ) {\n\t\treturn toString.call(obj) === \"[object Array]\";\n\t},\n\n\t// check if an element is in a (or is an) XML document\n\tisXMLDoc: function( elem ) {\n\t\treturn elem.nodeType === 9 && elem.documentElement.nodeName !== \"HTML\" ||\n\t\t\t!!elem.ownerDocument && jQuery.isXMLDoc( elem.ownerDocument );\n\t},\n\n\t// Evalulates a script in a global context\n\tglobalEval: function( data ) {\n\t\tif ( data && /\\S/.test(data) ) {\n\t\t\t// Inspired by code by Andrea Giammarchi\n\t\t\t// http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html\n\t\t\tvar head = document.getElementsByTagName(\"head\")[0] || document.documentElement,\n\t\t\t\tscript = document.createElement(\"script\");\n\n\t\t\tscript.type = \"text/javascript\";\n\t\t\tif ( jQuery.support.scriptEval )\n\t\t\t\tscript.appendChild( document.createTextNode( data ) );\n\t\t\telse\n\t\t\t\tscript.text = data;\n\n\t\t\t// Use insertBefore instead of appendChild to circumvent an IE6 bug.\n\t\t\t// This arises when a base node is used (#2709).\n\t\t\thead.insertBefore( script, head.firstChild );\n\t\t\thead.removeChild( script );\n\t\t}\n\t},\n\n\tnodeName: function( elem, name ) {\n\t\treturn elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase();\n\t},\n\n\t// args is for internal usage only\n\teach: function( object, callback, args ) {\n\t\tvar name, i = 0, length = object.length;\n\n\t\tif ( args ) {\n\t\t\tif ( length === undefined ) {\n\t\t\t\tfor ( name in object )\n\t\t\t\t\tif ( callback.apply( object[ name ], args ) === false )\n\t\t\t\t\t\tbreak;\n\t\t\t} else\n\t\t\t\tfor ( ; i < length; )\n\t\t\t\t\tif ( callback.apply( object[ i++ ], args ) === false )\n\t\t\t\t\t\tbreak;\n\n\t\t// A special, fast, case for the most common use of each\n\t\t} else {\n\t\t\tif ( length === undefined ) {\n\t\t\t\tfor ( name in object )\n\t\t\t\t\tif ( callback.call( object[ name ], name, object[ name ] ) === false )\n\t\t\t\t\t\tbreak;\n\t\t\t} else\n\t\t\t\tfor ( var value = object[0];\n\t\t\t\t\ti < length && callback.call( value, i, value ) !== false; value = object[++i] ){}\n\t\t}\n\n\t\treturn object;\n\t},\n\n\tprop: function( elem, value, type, i, name ) {\n\t\t// Handle executable functions\n\t\tif ( jQuery.isFunction( value ) )\n\t\t\tvalue = value.call( elem, i );\n\n\t\t// Handle passing in a number to a CSS property\n\t\treturn typeof value === \"number\" && type == \"curCSS\" && !exclude.test( name ) ?\n\t\t\tvalue + \"px\" :\n\t\t\tvalue;\n\t},\n\n\tclassName: {\n\t\t// internal only, use addClass(\"class\")\n\t\tadd: function( elem, classNames ) {\n\t\t\tjQuery.each((classNames || \"\").split(/\\s+/), function(i, className){\n\t\t\t\tif ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) )\n\t\t\t\t\telem.className += (elem.className ? \" \" : \"\") + className;\n\t\t\t});\n\t\t},\n\n\t\t// internal only, use removeClass(\"class\")\n\t\tremove: function( elem, classNames ) {\n\t\t\tif (elem.nodeType == 1)\n\t\t\t\telem.className = classNames !== undefined ?\n\t\t\t\t\tjQuery.grep(elem.className.split(/\\s+/), function(className){\n\t\t\t\t\t\treturn !jQuery.className.has( classNames, className );\n\t\t\t\t\t}).join(\" \") :\n\t\t\t\t\t\"\";\n\t\t},\n\n\t\t// internal only, use hasClass(\"class\")\n\t\thas: function( elem, className ) {\n\t\t\treturn elem && jQuery.inArray( className, (elem.className || elem).toString().split(/\\s+/) ) > -1;\n\t\t}\n\t},\n\n\t// A method for quickly swapping in/out CSS properties to get correct calculations\n\tswap: function( elem, options, callback ) {\n\t\tvar old = {};\n\t\t// Remember the old values, and insert the new ones\n\t\tfor ( var name in options ) {\n\t\t\told[ name ] = elem.style[ name ];\n\t\t\telem.style[ name ] = options[ name ];\n\t\t}\n\n\t\tcallback.call( elem );\n\n\t\t// Revert the old values\n\t\tfor ( var name in options )\n\t\t\telem.style[ name ] = old[ name ];\n\t},\n\n\tcss: function( elem, name, force, extra ) {\n\t\tif ( name == \"width\" || name == \"height\" ) {\n\t\t\tvar val, props = { position: \"absolute\", visibility: \"hidden\", display:\"block\" }, which = name == \"width\" ? [ \"Left\", \"Right\" ] : [ \"Top\", \"Bottom\" ];\n\n\t\t\tfunction getWH() {\n\t\t\t\tval = name == \"width\" ? elem.offsetWidth : elem.offsetHeight;\n\n\t\t\t\tif ( extra === \"border\" )\n\t\t\t\t\treturn;\n\n\t\t\t\tjQuery.each( which, function() {\n\t\t\t\t\tif ( !extra )\n\t\t\t\t\t\tval -= parseFloat(jQuery.curCSS( elem, \"padding\" + this, true)) || 0;\n\t\t\t\t\tif ( extra === \"margin\" )\n\t\t\t\t\t\tval += parseFloat(jQuery.curCSS( elem, \"margin\" + this, true)) || 0;\n\t\t\t\t\telse\n\t\t\t\t\t\tval -= parseFloat(jQuery.curCSS( elem, \"border\" + this + \"Width\", true)) || 0;\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif ( elem.offsetWidth !== 0 )\n\t\t\t\tgetWH();\n\t\t\telse\n\t\t\t\tjQuery.swap( elem, props, getWH );\n\n\t\t\treturn Math.max(0, Math.round(val));\n\t\t}\n\n\t\treturn jQuery.curCSS( elem, name, force );\n\t},\n\n\tcurCSS: function( elem, name, force ) {\n\t\tvar ret, style = elem.style;\n\n\t\t// We need to handle opacity special in IE\n\t\tif ( name == \"opacity\" && !jQuery.support.opacity ) {\n\t\t\tret = jQuery.attr( style, \"opacity\" );\n\n\t\t\treturn ret == \"\" ?\n\t\t\t\t\"1\" :\n\t\t\t\tret;\n\t\t}\n\n\t\t// Make sure we're using the right name for getting the float value\n\t\tif ( name.match( /float/i ) )\n\t\t\tname = styleFloat;\n\n\t\tif ( !force && style && style[ name ] )\n\t\t\tret = style[ name ];\n\n\t\telse if ( defaultView.getComputedStyle ) {\n\n\t\t\t// Only \"float\" is needed here\n\t\t\tif ( name.match( /float/i ) )\n\t\t\t\tname = \"float\";\n\n\t\t\tname = name.replace( /([A-Z])/g, \"-$1\" ).toLowerCase();\n\n\t\t\tvar computedStyle = defaultView.getComputedStyle( elem, null );\n\n\t\t\tif ( computedStyle )\n\t\t\t\tret = computedStyle.getPropertyValue( name );\n\n\t\t\t// We should always get a number back from opacity\n\t\t\tif ( name == \"opacity\" && ret == \"\" )\n\t\t\t\tret = \"1\";\n\n\t\t} else if ( elem.currentStyle ) {\n\t\t\tvar camelCase = name.replace(/\\-(\\w)/g, function(all, letter){\n\t\t\t\treturn letter.toUpperCase();\n\t\t\t});\n\n\t\t\tret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ];\n\n\t\t\t// From the awesome hack by Dean Edwards\n\t\t\t// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291\n\n\t\t\t// If we're not dealing with a regular pixel number\n\t\t\t// but a number that has a weird ending, we need to convert it to pixels\n\t\t\tif ( !/^\\d+(px)?$/i.test( ret ) && /^\\d/.test( ret ) ) {\n\t\t\t\t// Remember the original values\n\t\t\t\tvar left = style.left, rsLeft = elem.runtimeStyle.left;\n\n\t\t\t\t// Put in the new values to get a computed value out\n\t\t\t\telem.runtimeStyle.left = elem.currentStyle.left;\n\t\t\t\tstyle.left = ret || 0;\n\t\t\t\tret = style.pixelLeft + \"px\";\n\n\t\t\t\t// Revert the changed values\n\t\t\t\tstyle.left = left;\n\t\t\t\telem.runtimeStyle.left = rsLeft;\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tclean: function( elems, context, fragment ) {\n\t\tcontext = context || document;\n\n\t\t// !context.createElement fails in IE with an error but returns typeof 'object'\n\t\tif ( typeof context.createElement === \"undefined\" )\n\t\t\tcontext = context.ownerDocument || context[0] && context[0].ownerDocument || document;\n\n\t\t// If a single string is passed in and it's a single tag\n\t\t// just do a createElement and skip the rest\n\t\tif ( !fragment && elems.length === 1 && typeof elems[0] === \"string\" ) {\n\t\t\tvar match = /^<(\\w+)\\s*\\/?>$/.exec(elems[0]);\n\t\t\tif ( match )\n\t\t\t\treturn [ context.createElement( match[1] ) ];\n\t\t}\n\n\t\tvar ret = [], scripts = [], div = context.createElement(\"div\");\n\n\t\tjQuery.each(elems, function(i, elem){\n\t\t\tif ( typeof elem === \"number\" )\n\t\t\t\telem += '';\n\n\t\t\tif ( !elem )\n\t\t\t\treturn;\n\n\t\t\t// Convert html string into DOM nodes\n\t\t\tif ( typeof elem === \"string\" ) {\n\t\t\t\t// Fix \"XHTML\"-style tags in all browsers\n\t\t\t\telem = elem.replace(/(<(\\w+)[^>]*?)\\/>/g, function(all, front, tag){\n\t\t\t\t\treturn tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ?\n\t\t\t\t\t\tall :\n\t\t\t\t\t\tfront + \">\";\n\t\t\t\t});\n\n\t\t\t\t// Trim whitespace, otherwise indexOf won't work as expected\n\t\t\t\tvar tags = elem.replace(/^\\s+/, \"\").substring(0, 10).toLowerCase();\n\n\t\t\t\tvar wrap =\n\t\t\t\t\t// option or optgroup\n\t\t\t\t\t!tags.indexOf(\"\", \"\" ] ||\n\n\t\t\t\t\t!tags.indexOf(\"\", \"\" ] ||\n\n\t\t\t\t\ttags.match(/^<(thead|tbody|tfoot|colg|cap)/) &&\n\t\t\t\t\t[ 1, \"\", \"
\" ] ||\n\n\t\t\t\t\t!tags.indexOf(\"\", \"\" ] ||\n\n\t\t\t\t \t// matched above\n\t\t\t\t\t(!tags.indexOf(\"\", \"\" ] ||\n\n\t\t\t\t\t!tags.indexOf(\"\", \"\" ] ||\n\n\t\t\t\t\t// IE can't serialize and \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n \n\n\n\n\n\n\n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n\t\n\t\t\n\t\t\n\t\n
PATIENT'S MASTER FILE\n\t\t\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t
\n\t\t\t\t TEST,\n\t\t\t\tACCOUNT M\n\t\t\t\t21 years  \n\t\t\t\t\n\n\t\t\t\t\n\t\t\t\tNext Appointment: \n\t\t\t\t\n\n\t\t\t\t\n\n\t\t\t\t
\n\t\t
\n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\n\n\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t\n\t\t\t\n\n\n\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t\n\t\t\t\n\n\t\t\t\n \n \n \n \n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n \n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n \n \n \n\n \n\t\t\t\n\n\t\t\t\n\t\t\t\t\n\t\t\t\n \n \n\t\t\t\n\t\t\t\n \n\t\t\t\n\t\t\t\t\n\t\t\t\n \n \n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t
Appointment
Appt.History\n\t\t\t\t
Billing
\n\n\t\t\t\t\n\t\t\t\tInvoice List\n\n\n
\n Check Eligibility\n\t\t\t\t\t\n\n\t\t\t\t
Create Invoice
Clinical Modules
Consultations
Prescriptions\n\t\t\t\t
\n\t\t\t\t\t\n\t\t\t\t\tE-Chart +\n\t\t\t\t\t\n
\n\t\t\t\t\tPreventions
\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tTickler\n\t\t\t\t\n\t\t\t\t
\n\t\t\t\tSend a Message
Add Patient Set\n
Resources
\n\t\t\t\tDocuments
Add Document
Current eForms
\n\t\t\t\tAdd eForm
\n\t\t
\n \n \n\t\t\n\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\n\n\n\n\n\n\n\n\n\n\n\n
\n
\n
\n
\n Search\n
\n
\n
    \n
  • \n
    By:\n
    \n\t\n \n
  • \n
  • \n
    Input:\n
    \n \n
  • \n
  • \n\t\t\t\t\n\t\t\t\t\n \n \n \n \n \n\t\t\t\t\t\n \n\t\t\t\t    \n\t\t\t\t\n\t\t\t\t\t\n
  • \n
\n
\n
\n\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\n\t\t\t\t\t\n\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t
\n\t\t\t\t\t\tRecord ( 189164\n\t\t\t\t\t\t ) \n \n Edit\n Close\n \n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t

 Demographic

\n\t\t\t\t\t\t
    \n
  • Last Name:\n TEST\n
  • \n
  • \n\t\t\t\t\t\t\tFirst Name:\n ACCOUNT\n\t\t\t\t\t\t\t
  • \n
  • Title:\n MR\n\t\t\t\t\t\t\t
  • \n
  • Sex:\n M\n
  • \n
  • Age:\n 21 (DOB: 1994-06-15)\n \n
  • \n
  • Language:\n English\n
  • \n\t\t\t\t\t\t\n
  • Country Of Origin:\n AUSTRIA\n
  • \n\t\t\t\t\t\t\n
  • Spoken Language:\n English\n\t\t\t\t\t\t\t
  • \n\t\t\t\t\t\t\n\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t

 Other Contacts: \n\t\t\t\t\t\tAdd Relation

\n\t\t\t\t\t\t
    \n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t

 Clinic Status (Enrollment History)

\n\t\t\t\t\t\t
    \n
  • Roster Status:\n \n
  • \n
  • Roster Date:\n \n
  • \n
  • Termination Date:\n \n
  • \n\n
  • Patient Status:\n \n\t\t\t\t\t\t\t\n AC\n\t\t\t\t\t\t\t\n \n\t\t\t\t\t\t\t
  • \n
  • Chart No.:\n \n\t\t\t\t\t\t\t
  • \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n
  • Cytology #:\n
  • \n
  • Date Joined:\n\t\t\t\t\t\t\t2015-09-10\n
  • \n End Date:\n 2016-09-10\n\t\t\t\t\t\t\t
  • \n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\n\t\t\t\t\t\t
\n\t\t\t\t\t\t

 Alert

\n \n\t\t\t\t\t\t \n\t\t\t\t\t\t
\n\n\t\t\t\t\t\t
\n\t\t\t\t\t\t

 Rx Interaction Warning Level

\n \n\t\t\t\t\t\t \n\t\t\t\t\t\tNot Specified\n\t\t\t\t\t\t
\n\n\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t

 Contact Information

\n\t\t\t\t\t\t
    \n
  • Phone(H):\n 604-123-4333 \n\t\t\t\t\t\t\t
  • \n
  • Phone(W):\n \n\t\t\t\t\t\t\t
  • \n
  • Cell Phone:\n 6041118888
  • \n
  • Address:\n 500 Somewhere Ave\n\t\t\t\t\t\t\t
  • \n
  • City:\n TEST CITY\n
  • \n
  • \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tProvince :\n BC
  • \n
  • \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tPostal :\n V6V262
  • \n\n
  • Email:\n someone@tsnstnhs.com\n\t\t\t\t\t\t\t
  • \n
  • Newsletter:\n No\n\t\t\t\t\t\t\t
  • \n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\n\t\t\t\t\t\t
\n\t\t\t\t\t\t

 Health Insurance

\n\t\t\t\t\t\t
    \n
  • Health Ins. #:\n 9146509343\n\t\t\t\t\t\t\t  \n\t\t\t\t\t\t\t
  • \n
  • HC Type:\n BC\n\t\t\t\t\t\t\t
  • \n
  • EFF Date:\n 2015-05-01\n
  • \n
  • Renew Date:\n \n
  • \n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t
\n\t\t\t\t\t\t

 Patient Clinic Status

\n\t\t\t\t\t\t
    \n
  • \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tDoctor\n :\n \n \n \n \n\t\t\t\t\t\t\t
  • \n
  • Nurse:\n\t\t\t\t\t\t\t
  • \n
  • Midwife:\n\t\t\t\t\t\t\t
  • \n
  • Resident:\n
  • \n
  • Referral Doctor:\n\t\t\t\t\t\t\t
  • \n
  • Referral Doctor #:\n\t\t\t\t\t\t\t
  • \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\n\n\t\t\t\t\t\t
\n\t\t\t\t\t\t

 Notes

\n\n  \n\n\n\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n\n\n\n\n\t\t\t\t\t\t\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t \n \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n \n\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n \n \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\n\n\n\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\tLast Name: First Name:\n\t\t\t\t\t\t\t\t
Title: \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t Language: \n\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
 \n\t\t\t\t\t\t\t Spoken: \n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t
Address: \n\t\t\t\t\t\t\t\tCity:
\n\t\t\t\t\t\t\t\tProvince : \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\tPostal :
Phone(H): \n\t\t\t\t\t\t\t\t Ext: \n\t\t\t\t\t\t\t\tPhone(W): Ext: \n\t\t\t\t\t\t\t\t
Cell Phone: \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tCountry Of Origin:
Email: \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t Not available\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tMyOscar UserName:
\n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tRegister for MyOSCAR \n\t\t\t\t\t\t\t\t
Newsletter:\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t SIN:
DOB(yyyymmdd):\n\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\n\t\t\t \n\n\t\t\t \n\n\t\t\t\t\t\t\t\t\tAge: Sex:\n\t\t\t\t\t\t\t\t
Health Ins. #: \n\t\t\t\t\t\t\t\tVer. \n\t\t\t\t\t\t\t\t\tEFF Date:\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t Renew Date:\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
HC Type:\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t Cytology #:\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tDoctor\n\t\t\t\t\t\t\t\t: Nurse:
Midwife: Resident:
Referral Doctor: \n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\tReferral Doctor #: \n\t\t\t\t\t\t\t\t
Roster Status:\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n \n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\tRoster Date: \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tTermination Date: \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
Termination Reason: \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
Patient Status:\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\n \n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tPatient Status Date: \n \n \n \n\t\t\t\t\t\t\t\t
Chart No.:\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\tWaiting List:\n\t\t\t\t\t\t\t\t\t\t Waiting List Note:
 Date of request: (yyyy-mm-dd)\n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
Date Joined:\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t End Date: \n\t\t\t\t\t\t\t\t
\nRx Interaction Warning Level\n\n\t\t\t\t\t\n\t\t\t\t\t\n\n
\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
Alert:
Notes: \n\t\t\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n \n\t\t\t\t\t\t
\n\n \n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t
\n\t\t\t\t\t\t\n\t\t\t\t\t\t
\n
\n\t\t\t\t\n\n\t\t
\n\t\t
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" + }, + "redirectURL": "", + "headersSize": 231, + "bodySize": 144870, + "_transferSize": 145101 + }, + "cache": {}, + "timings": { + "blocked": 0.50599999667611, + "dns": -1, + "connect": -1, + "send": 0.12500000593718108, + "wait": 121.10299999767471, + "receive": 100.37000000011153, + "ssl": -1 + }, + "connection": "138426", + "pageref": "page_3" + }, + { + "startedDateTime": "2015-09-10T17:16:15.221Z", + "time": 0, + "request": { + "method": "GET", + "url": "https://secure11.oscarhost.ca/kensington/share/calendar/calendar.css", + "httpVersion": "unknown", + "headers": [ + { + "name": "User-Agent", + "value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.155 Safari/537.36 OPR/31.0.1889.174" + } + ], + "queryString": [], + "cookies": [], + "headersSize": -1, + "bodySize": 0 + }, + "response": { + "status": 200, + "statusText": "OK", + "httpVersion": "unknown", + "headers": [ + { + "name": "Date", + "value": "Tue, 08 Sep 2015 18:20:35 GMT" + }, + { + "name": "Last-Modified", + "value": "Tue, 17 Mar 2015 17:35:50 GMT" + }, + { + "name": "Accept-Ranges", + "value": "bytes" + }, + { + "name": "ETag", + "value": "\"4720-1426613750000\"" + }, + { + "name": "Content-Length", + "value": "4720" + }, + { + "name": "Content-Type", + "value": "text/css;charset=UTF-8" + } + ], + "cookies": [], + "content": { + "size": 4720, + "mimeType": "text/css", + "text": "/*\n * \n * Copyright (c) 2001-2002. Department of Family Medicine, McMaster University. All Rights Reserved. *\n * This software is published under the GPL GNU General Public License. \n * This program is free software; you can redistribute it and/or \n * modify it under the terms of the GNU General Public License \n * as published by the Free Software Foundation; either version 2 \n * of the License, or (at your option) any later version. * \n * This program is distributed in the hope that it will be useful, \n * but WITHOUT ANY WARRANTY; without even the implied warranty of \n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the \n * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License \n * along with this program; if not, write to the Free Software \n * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * \n * \n * \n * \n * This software was written for the \n * Department of Family Medicine \n * McMaster University \n * Hamilton \n * Ontario, Canada \n */\n.calendar {\n\tposition: relative;\n\tdisplay: none;\n\tborder-top: 2px solid #fff;\n\tborder-right: 2px solid #000;\n\tborder-bottom: 2px solid #000;\n\tborder-left: 2px solid #fff;\n\tfont-size: 11px;\n\tcolor: #000;\n\tcursor: default;\n\tbackground: #c8d0d4;\n\tfont-family: Verdana, Arial, Helvetica, sans-serif;\n z-index: 150;\n}\n\n.calendar table {\n\tborder-top: 1px solid #000;\n\tborder-right: 1px solid #fff;\n\tborder-bottom: 1px solid #fff;\n\tborder-left: 1px solid #000;\n\tfont-size: 11px;\n\tcolor: #000;\n\tcursor: default;\n\tbackground: #ffffff;\n\tfont-family: Verdana, Arial, Helvetica, sans-serif;\n}\n\n.calendar .button {\n\ttext-align: center;\n\tpadding: 1px;\n\tborder-top: 1px solid #fff;\n\tborder-right: 1px solid #000;\n\tborder-bottom: 1px solid #000;\n\tborder-left: 1px solid #fff;\n}\n\n.calendar thead .title {\n\tfont-weight: bold;\n\tpadding: 1px;\n\tborder: 1px solid #000;\n\tbackground: #5F7BA4;\n\tcolor: #fff;\n\ttext-align: center;\n}\n\n.calendar thead .headrow {\n\t\n}\n\n.calendar thead .daynames {\n\t\n}\n\n.calendar thead .name {\n\tborder-bottom: 1px solid #000;\n\tpadding: 2px;\n\ttext-align: center;\n\tbackground: #ffffff;\n}\n\n.calendar thead .weekend {\n\tfont-weight: bold;\n\tcolor: #5f7ba4;\n}\n\n.calendar thead .hilite {\n\tborder-top: 2px solid #fff;\n\tborder-right: 2px solid #000;\n\tborder-bottom: 2px solid #000;\n\tborder-left: 2px solid #fff;\n\tpadding: 0px;\n\tbackground: #5F7BA4;\n}\n\n.calendar thead .active {\n\tpadding: 2px 0px 0px 2px;\n\tborder-top: 1px solid #000;\n\tborder-right: 1px solid #fff;\n\tborder-bottom: 1px solid #fff;\n\tborder-left: 1px solid #000;\n\tbackground: #5F7BA4;\n}\n\n.calendar tbody .day {\n\twidth: 2em;\n\ttext-align: right;\n\tpadding: 2px 4px 2px 2px;\n}\n\n.calendar table .wn {\n\tpadding: 2px 3px 2px 2px;\n\tborder-right: 1px solid #000;\n\tbackground: #D1DEE8;\n}\n\n.calendar tbody .rowhilite td {\n\tbackground: #D1DEE8;\n}\n\n.calendar tbody .rowhilite td.wn {\n\tbackground: #5F7BA4;\n}\n\n.calendar tbody td.hilite {\n\tpadding: 1px 3px 1px 1px;\n\tborder: 1px solid;\n\tborder-color: #fff #000 #000 #fff;\n}\n\n.calendar tbody td.active {\n\tpadding: 2px 2px 0px 2px;\n\tborder: 1px solid;\n\tborder-color: #000 #fff #fff #000;\n}\n\n.calendar tbody td.selected {\n\tfont-weight: bold;\n\tpadding: 2px 2px 0px 2px;\n\tborder: 1px solid;\n\tborder-color: #000 #fff #fff #000;\n\tbackground: #D1DEE8;\n}\n\n.calendar tbody td.weekend {\n\tfont-weight: bold;\n\tcolor: #5f7ba4;\n}\n\n.calendar tbody td.today {\n\tfont-weight: bold;\n\tcolor: #5F7BA4;\n}\n\n.calendar tbody .disabled {\n\tcolor: #999;\n}\n\n.calendar tbody .emptycell {\n\tvisibility: hidden;\n}\n\n.calendar tbody .emptyrow {\n\tdisplay: none;\n}\n\n.calendar tfoot .footrow {\n\t\n}\n\n.calendar tfoot .ttip {\n\tbackground: #ffffff;\n\tpadding: 1px;\n\tborder: 1px solid #000;\n\tbackground: #5F7BA4;\n\tcolor: #fff;\n\ttext-align: center;\n}\n\n.calendar tfoot .hilite {\n\tborder-top: 1px solid #fff;\n\tborder-right: 1px solid #000;\n\tborder-bottom: 1px solid #000;\n\tborder-left: 1px solid #fff;\n\tpadding: 1px;\n\tbackground: #5F7BA4;\n}\n\n.calendar tfoot .active {\n\tpadding: 2px 0px 0px 2px;\n\tborder-top: 1px solid #000;\n\tborder-right: 1px solid #fff;\n\tborder-bottom: 1px solid #fff;\n\tborder-left: 1px solid #000;\n}\n\n.combo {\n\tposition: absolute;\n\tdisplay: none;\n\twidth: 4em;\n\ttop: 0px;\n\tleft: 0px;\n\tcursor: default;\n\tborder-top: 1px solid #fff;\n\tborder-right: 1px solid #000;\n\tborder-bottom: 1px solid #000;\n\tborder-left: 1px solid #fff;\n\tbackground: #ffffff;\n\tfont-size: smaller;\n\tpadding: 1px;\n}\n\n.combo .label {\n\ttext-align: center;\n\tpadding: 1px;\n}\n\n.combo .active {\n\tbackground: #c8d0d4;\n\tpadding: 0px;\n\tborder-top: 1px solid #000;\n\tborder-right: 1px solid #fff;\n\tborder-bottom: 1px solid #fff;\n\tborder-left: 1px solid #000;\n}\n\n.combo .hilite {\n\tfont-size: 9pt;\n\tbackground: #5f7ba4;\n\tcolor: #d1dee8;\n}" + }, + "redirectURL": "", + "headersSize": -1, + "bodySize": 0, + "_transferSize": 0 + }, + "cache": {}, + "timings": { + "blocked": -1, + "dns": -1, + "connect": -1, + "send": 0, + "wait": 0, + "receive": 0, + "ssl": -1 + }, + "pageref": "page_3" + }, + { + "startedDateTime": "2015-09-10T17:16:15.243Z", + "time": 743.9400000002934, + "request": { + "method": "GET", + "url": "https://secure11.oscarhost.ca/kensington/share/javascript/prototype.js", + "httpVersion": "HTTP/1.1", + "headers": [ + { + "name": "Accept-Encoding", + "value": "gzip, deflate, lzma, sdch" + }, + { + "name": "Host", + "value": "secure11.oscarhost.ca" + }, + { + "name": "Accept-Language", + "value": "en-US,en;q=0.8" + }, + { + "name": "User-Agent", + "value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.155 Safari/537.36 OPR/31.0.1889.174" + }, + { + "name": "Accept", + "value": "*/*" + }, + { + "name": "Referer", + "value": "https://secure11.oscarhost.ca/kensington/demographic/demographiccontrol.jsp?demographic_no=189164&displaymode=edit&dboperation=search_detail" + }, + { + "name": "Cookie", + "value": "JSESSIONID=C89CFAAB236CC41DEBBEEDA066552DC9; _ga=GA1.2.1898936923.1439425583; oscrcpid=\"\"; oscadmid=\"\"; oscprvid=35426861898535181493410519511693164429969; RT=" + }, + { + "name": "Connection", + "value": "keep-alive" + } + ], + "queryString": [], + "cookies": [ + { + "name": "JSESSIONID", + "value": "C89CFAAB236CC41DEBBEEDA066552DC9", + "expires": null, + "httpOnly": false, + "secure": false + }, + { + "name": "_ga", + "value": "GA1.2.1898936923.1439425583", + "expires": null, + "httpOnly": false, + "secure": false + }, + { + "name": "oscrcpid", + "value": "\"\"", + "expires": null, + "httpOnly": false, + "secure": false + }, + { + "name": "oscadmid", + "value": "\"\"", + "expires": null, + "httpOnly": false, + "secure": false + }, + { + "name": "oscprvid", + "value": "35426861898535181493410519511693164429969", + "expires": null, + "httpOnly": false, + "secure": false + }, + { + "name": "RT", + "value": "", + "expires": null, + "httpOnly": false, + "secure": false + } + ], + "headersSize": 673, + "bodySize": 0 + }, + "response": { + "status": 200, + "statusText": "OK", + "httpVersion": "HTTP/1.1", + "headers": [ + { + "name": "Date", + "value": "Thu, 10 Sep 2015 17:16:16 GMT" + }, + { + "name": "Last-Modified", + "value": "Mon, 09 Mar 2015 19:32:54 GMT" + }, + { + "name": "ETag", + "value": "\"96311-1425929574000\"" + }, + { + "name": "Content-Type", + "value": "text/javascript;charset=UTF-8" + }, + { + "name": "Cache-Control", + "value": "no-store, no-cache, must-revalidate" + }, + { + "name": "Connection", + "value": "Keep-Alive" + }, + { + "name": "Accept-Ranges", + "value": "bytes" + }, + { + "name": "Keep-Alive", + "value": "timeout=15, max=98" + }, + { + "name": "Content-Length", + "value": "96311" + } + ], + "cookies": [], + "content": { + "size": 96311, + "mimeType": "text/javascript", + "compression": 0, + "text": "/* Prototype JavaScript framework, version 1.5.1.1\n * (c) 2005-2007 Sam Stephenson\n *\n * Prototype is freely distributable under the terms of an MIT-style license.\n * For details, see the Prototype web site: http://www.prototypejs.org/\n *\n/*--------------------------------------------------------------------------*/\n\nvar Prototype = {\n Version: '1.5.1.1',\n\n Browser: {\n IE: !!(window.attachEvent && !window.opera),\n Opera: !!window.opera,\n WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1,\n Gecko: navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1\n },\n\n BrowserFeatures: {\n XPath: !!document.evaluate,\n ElementExtensions: !!window.HTMLElement,\n SpecificElementExtensions:\n (document.createElement('div').__proto__ !==\n document.createElement('form').__proto__)\n },\n\n ScriptFragment: ']*>([\\\\S\\\\s]*?)<\\/script>',\n JSONFilter: /^\\/\\*-secure-([\\s\\S]*)\\*\\/\\s*$/,\n\n emptyFunction: function() { },\n K: function(x) { return x }\n}\n\nvar Class = {\n create: function() {\n return function() {\n this.initialize.apply(this, arguments);\n }\n }\n}\n\nvar Abstract = new Object();\n\nObject.extend = function(destination, source) {\n for (var property in source) {\n destination[property] = source[property];\n }\n return destination;\n}\n\nObject.extend(Object, {\n inspect: function(object) {\n try {\n if (object === undefined) return 'undefined';\n if (object === null) return 'null';\n return object.inspect ? object.inspect() : object.toString();\n } catch (e) {\n if (e instanceof RangeError) return '...';\n throw e;\n }\n },\n\n toJSON: function(object) {\n var type = typeof object;\n switch(type) {\n case 'undefined':\n case 'function':\n case 'unknown': return;\n case 'boolean': return object.toString();\n }\n if (object === null) return 'null';\n if (object.toJSON) return object.toJSON();\n if (object.ownerDocument === document) return;\n var results = [];\n for (var property in object) {\n var value = Object.toJSON(object[property]);\n if (value !== undefined)\n results.push(property.toJSON() + ': ' + value);\n }\n return '{' + results.join(', ') + '}';\n },\n\n keys: function(object) {\n var keys = [];\n for (var property in object)\n keys.push(property);\n return keys;\n },\n\n values: function(object) {\n var values = [];\n for (var property in object)\n values.push(object[property]);\n return values;\n },\n\n clone: function(object) {\n return Object.extend({}, object);\n }\n});\n\nFunction.prototype.bind = function() {\n var __method = this, args = $A(arguments), object = args.shift();\n return function() {\n return __method.apply(object, args.concat($A(arguments)));\n }\n}\n\nFunction.prototype.bindAsEventListener = function(object) {\n var __method = this, args = $A(arguments), object = args.shift();\n return function(event) {\n return __method.apply(object, [event || window.event].concat(args));\n }\n}\n\nObject.extend(Number.prototype, {\n toColorPart: function() {\n return this.toPaddedString(2, 16);\n },\n\n succ: function() {\n return this + 1;\n },\n\n times: function(iterator) {\n $R(0, this, true).each(iterator);\n return this;\n },\n\n toPaddedString: function(length, radix) {\n var string = this.toString(radix || 10);\n return '0'.times(length - string.length) + string;\n },\n\n toJSON: function() {\n return isFinite(this) ? this.toString() : 'null';\n }\n});\n\nDate.prototype.toJSON = function() {\n return '\"' + this.getFullYear() + '-' +\n (this.getMonth() + 1).toPaddedString(2) + '-' +\n this.getDate().toPaddedString(2) + 'T' +\n this.getHours().toPaddedString(2) + ':' +\n this.getMinutes().toPaddedString(2) + ':' +\n this.getSeconds().toPaddedString(2) + '\"';\n};\n\nvar Try = {\n these: function() {\n var returnValue;\n\n for (var i = 0, length = arguments.length; i < length; i++) {\n var lambda = arguments[i];\n try {\n returnValue = lambda();\n break;\n } catch (e) {}\n }\n\n return returnValue;\n }\n}\n\n/*--------------------------------------------------------------------------*/\n\nvar PeriodicalExecuter = Class.create();\nPeriodicalExecuter.prototype = {\n initialize: function(callback, frequency) {\n this.callback = callback;\n this.frequency = frequency;\n this.currentlyExecuting = false;\n\n this.registerCallback();\n },\n\n registerCallback: function() {\n this.timer = setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);\n },\n\n stop: function() {\n if (!this.timer) return;\n clearInterval(this.timer);\n this.timer = null;\n },\n\n onTimerEvent: function() {\n if (!this.currentlyExecuting) {\n try {\n this.currentlyExecuting = true;\n this.callback(this);\n } finally {\n this.currentlyExecuting = false;\n }\n }\n }\n}\nObject.extend(String, {\n interpret: function(value) {\n return value == null ? '' : String(value);\n },\n specialChar: {\n '\\b': '\\\\b',\n '\\t': '\\\\t',\n '\\n': '\\\\n',\n '\\f': '\\\\f',\n '\\r': '\\\\r',\n '\\\\': '\\\\\\\\'\n }\n});\n\nObject.extend(String.prototype, {\n gsub: function(pattern, replacement) {\n var result = '', source = this, match;\n replacement = arguments.callee.prepareReplacement(replacement);\n\n while (source.length > 0) {\n if (match = source.match(pattern)) {\n result += source.slice(0, match.index);\n result += String.interpret(replacement(match));\n source = source.slice(match.index + match[0].length);\n } else {\n result += source, source = '';\n }\n }\n return result;\n },\n\n sub: function(pattern, replacement, count) {\n replacement = this.gsub.prepareReplacement(replacement);\n count = count === undefined ? 1 : count;\n\n return this.gsub(pattern, function(match) {\n if (--count < 0) return match[0];\n return replacement(match);\n });\n },\n\n scan: function(pattern, iterator) {\n this.gsub(pattern, iterator);\n return this;\n },\n\n truncate: function(length, truncation) {\n length = length || 30;\n truncation = truncation === undefined ? '...' : truncation;\n return this.length > length ?\n this.slice(0, length - truncation.length) + truncation : this;\n },\n\n strip: function() {\n return this.replace(/^\\s+/, '').replace(/\\s+$/, '');\n },\n\n stripTags: function() {\n return this.replace(/<\\/?[^>]+>/gi, '');\n },\n\n stripScripts: function() {\n return this.replace(new RegExp(Prototype.ScriptFragment, 'img'), '');\n },\n\n extractScripts: function() {\n var matchAll = new RegExp(Prototype.ScriptFragment, 'img');\n var matchOne = new RegExp(Prototype.ScriptFragment, 'im');\n return (this.match(matchAll) || []).map(function(scriptTag) {\n return (scriptTag.match(matchOne) || ['', ''])[1];\n });\n },\n\n evalScripts: function() {\n return this.extractScripts().map(function(script) { return eval(script) });\n },\n\n escapeHTML: function() {\n var self = arguments.callee;\n self.text.data = this;\n return self.div.innerHTML;\n },\n\n unescapeHTML: function() {\n var div = document.createElement('div');\n div.innerHTML = this.stripTags();\n return div.childNodes[0] ? (div.childNodes.length > 1 ?\n $A(div.childNodes).inject('', function(memo, node) { return memo+node.nodeValue }) :\n div.childNodes[0].nodeValue) : '';\n },\n\n toQueryParams: function(separator) {\n var match = this.strip().match(/([^?#]*)(#.*)?$/);\n if (!match) return {};\n\n return match[1].split(separator || '&').inject({}, function(hash, pair) {\n if ((pair = pair.split('='))[0]) {\n var key = decodeURIComponent(pair.shift());\n var value = pair.length > 1 ? pair.join('=') : pair[0];\n if (value != undefined) value = decodeURIComponent(value);\n\n if (key in hash) {\n if (hash[key].constructor != Array) hash[key] = [hash[key]];\n hash[key].push(value);\n }\n else hash[key] = value;\n }\n return hash;\n });\n },\n\n toArray: function() {\n return this.split('');\n },\n\n succ: function() {\n return this.slice(0, this.length - 1) +\n String.fromCharCode(this.charCodeAt(this.length - 1) + 1);\n },\n\n times: function(count) {\n var result = '';\n for (var i = 0; i < count; i++) result += this;\n return result;\n },\n\n camelize: function() {\n var parts = this.split('-'), len = parts.length;\n if (len == 1) return parts[0];\n\n var camelized = this.charAt(0) == '-'\n ? parts[0].charAt(0).toUpperCase() + parts[0].substring(1)\n : parts[0];\n\n for (var i = 1; i < len; i++)\n camelized += parts[i].charAt(0).toUpperCase() + parts[i].substring(1);\n\n return camelized;\n },\n\n capitalize: function() {\n return this.charAt(0).toUpperCase() + this.substring(1).toLowerCase();\n },\n\n underscore: function() {\n return this.gsub(/::/, '/').gsub(/([A-Z]+)([A-Z][a-z])/,'#{1}_#{2}').gsub(/([a-z\\d])([A-Z])/,'#{1}_#{2}').gsub(/-/,'_').toLowerCase();\n },\n\n dasherize: function() {\n return this.gsub(/_/,'-');\n },\n\n inspect: function(useDoubleQuotes) {\n var escapedString = this.gsub(/[\\x00-\\x1f\\\\]/, function(match) {\n var character = String.specialChar[match[0]];\n return character ? character : '\\\\u00' + match[0].charCodeAt().toPaddedString(2, 16);\n });\n if (useDoubleQuotes) return '\"' + escapedString.replace(/\"/g, '\\\\\"') + '\"';\n return \"'\" + escapedString.replace(/'/g, '\\\\\\'') + \"'\";\n },\n\n toJSON: function() {\n return this.inspect(true);\n },\n\n unfilterJSON: function(filter) {\n return this.sub(filter || Prototype.JSONFilter, '#{1}');\n },\n\n isJSON: function() {\n var str = this.replace(/\\\\./g, '@').replace(/\"[^\"\\\\\\n\\r]*\"/g, '');\n return (/^[,:{}\\[\\]0-9.\\-+Eaeflnr-u \\n\\r\\t]*$/).test(str);\n },\n\n evalJSON: function(sanitize) {\n var json = this.unfilterJSON();\n try {\n if (!sanitize || json.isJSON()) return eval('(' + json + ')');\n } catch (e) { }\n throw new SyntaxError('Badly formed JSON string: ' + this.inspect());\n },\n\n include: function(pattern) {\n return this.indexOf(pattern) > -1;\n },\n\n startsWith: function(pattern) {\n return this.indexOf(pattern) === 0;\n },\n\n endsWith: function(pattern) {\n var d = this.length - pattern.length;\n return d >= 0 && this.lastIndexOf(pattern) === d;\n },\n\n empty: function() {\n return this == '';\n },\n\n blank: function() {\n return /^\\s*$/.test(this);\n }\n});\n\nif (Prototype.Browser.WebKit || Prototype.Browser.IE) Object.extend(String.prototype, {\n escapeHTML: function() {\n return this.replace(/&/g,'&').replace(//g,'>');\n },\n unescapeHTML: function() {\n return this.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>');\n }\n});\n\nString.prototype.gsub.prepareReplacement = function(replacement) {\n if (typeof replacement == 'function') return replacement;\n var template = new Template(replacement);\n return function(match) { return template.evaluate(match) };\n}\n\nString.prototype.parseQuery = String.prototype.toQueryParams;\n\nObject.extend(String.prototype.escapeHTML, {\n div: document.createElement('div'),\n text: document.createTextNode('')\n});\n\nwith (String.prototype.escapeHTML) div.appendChild(text);\n\nvar Template = Class.create();\nTemplate.Pattern = /(^|.|\\r|\\n)(#\\{(.*?)\\})/;\nTemplate.prototype = {\n initialize: function(template, pattern) {\n this.template = template.toString();\n this.pattern = pattern || Template.Pattern;\n },\n\n evaluate: function(object) {\n return this.template.gsub(this.pattern, function(match) {\n var before = match[1];\n if (before == '\\\\') return match[2];\n return before + String.interpret(object[match[3]]);\n });\n }\n}\n\nvar $break = {}, $continue = new Error('\"throw $continue\" is deprecated, use \"return\" instead');\n\nvar Enumerable = {\n each: function(iterator) {\n var index = 0;\n try {\n this._each(function(value) {\n iterator(value, index++);\n });\n } catch (e) {\n if (e != $break) throw e;\n }\n return this;\n },\n\n eachSlice: function(number, iterator) {\n var index = -number, slices = [], array = this.toArray();\n while ((index += number) < array.length)\n slices.push(array.slice(index, index+number));\n return slices.map(iterator);\n },\n\n all: function(iterator) {\n var result = true;\n this.each(function(value, index) {\n result = result && !!(iterator || Prototype.K)(value, index);\n if (!result) throw $break;\n });\n return result;\n },\n\n any: function(iterator) {\n var result = false;\n this.each(function(value, index) {\n if (result = !!(iterator || Prototype.K)(value, index))\n throw $break;\n });\n return result;\n },\n\n collect: function(iterator) {\n var results = [];\n this.each(function(value, index) {\n results.push((iterator || Prototype.K)(value, index));\n });\n return results;\n },\n\n detect: function(iterator) {\n var result;\n this.each(function(value, index) {\n if (iterator(value, index)) {\n result = value;\n throw $break;\n }\n });\n return result;\n },\n\n findAll: function(iterator) {\n var results = [];\n this.each(function(value, index) {\n if (iterator(value, index))\n results.push(value);\n });\n return results;\n },\n\n grep: function(pattern, iterator) {\n var results = [];\n this.each(function(value, index) {\n var stringValue = value.toString();\n if (stringValue.match(pattern))\n results.push((iterator || Prototype.K)(value, index));\n })\n return results;\n },\n\n include: function(object) {\n var found = false;\n this.each(function(value) {\n if (value == object) {\n found = true;\n throw $break;\n }\n });\n return found;\n },\n\n inGroupsOf: function(number, fillWith) {\n fillWith = fillWith === undefined ? null : fillWith;\n return this.eachSlice(number, function(slice) {\n while(slice.length < number) slice.push(fillWith);\n return slice;\n });\n },\n\n inject: function(memo, iterator) {\n this.each(function(value, index) {\n memo = iterator(memo, value, index);\n });\n return memo;\n },\n\n invoke: function(method) {\n var args = $A(arguments).slice(1);\n return this.map(function(value) {\n return value[method].apply(value, args);\n });\n },\n\n max: function(iterator) {\n var result;\n this.each(function(value, index) {\n value = (iterator || Prototype.K)(value, index);\n if (result == undefined || value >= result)\n result = value;\n });\n return result;\n },\n\n min: function(iterator) {\n var result;\n this.each(function(value, index) {\n value = (iterator || Prototype.K)(value, index);\n if (result == undefined || value < result)\n result = value;\n });\n return result;\n },\n\n partition: function(iterator) {\n var trues = [], falses = [];\n this.each(function(value, index) {\n ((iterator || Prototype.K)(value, index) ?\n trues : falses).push(value);\n });\n return [trues, falses];\n },\n\n pluck: function(property) {\n var results = [];\n this.each(function(value, index) {\n results.push(value[property]);\n });\n return results;\n },\n\n reject: function(iterator) {\n var results = [];\n this.each(function(value, index) {\n if (!iterator(value, index))\n results.push(value);\n });\n return results;\n },\n\n sortBy: function(iterator) {\n return this.map(function(value, index) {\n return {value: value, criteria: iterator(value, index)};\n }).sort(function(left, right) {\n var a = left.criteria, b = right.criteria;\n return a < b ? -1 : a > b ? 1 : 0;\n }).pluck('value');\n },\n\n toArray: function() {\n return this.map();\n },\n\n zip: function() {\n var iterator = Prototype.K, args = $A(arguments);\n if (typeof args.last() == 'function')\n iterator = args.pop();\n\n var collections = [this].concat(args).map($A);\n return this.map(function(value, index) {\n return iterator(collections.pluck(index));\n });\n },\n\n size: function() {\n return this.toArray().length;\n },\n\n inspect: function() {\n return '#';\n }\n}\n\nObject.extend(Enumerable, {\n map: Enumerable.collect,\n find: Enumerable.detect,\n select: Enumerable.findAll,\n member: Enumerable.include,\n entries: Enumerable.toArray\n});\nvar $A = Array.from = function(iterable) {\n if (!iterable) return [];\n if (iterable.toArray) {\n return iterable.toArray();\n } else {\n var results = [];\n for (var i = 0, length = iterable.length; i < length; i++)\n results.push(iterable[i]);\n return results;\n }\n}\n\nif (Prototype.Browser.WebKit) {\n $A = Array.from = function(iterable) {\n if (!iterable) return [];\n if (!(typeof iterable == 'function' && iterable == '[object NodeList]') &&\n iterable.toArray) {\n return iterable.toArray();\n } else {\n var results = [];\n for (var i = 0, length = iterable.length; i < length; i++)\n results.push(iterable[i]);\n return results;\n }\n }\n}\n\nObject.extend(Array.prototype, Enumerable);\n\nif (!Array.prototype._reverse)\n Array.prototype._reverse = Array.prototype.reverse;\n\nObject.extend(Array.prototype, {\n _each: function(iterator) {\n for (var i = 0, length = this.length; i < length; i++)\n iterator(this[i]);\n },\n\n clear: function() {\n this.length = 0;\n return this;\n },\n\n first: function() {\n return this[0];\n },\n\n last: function() {\n return this[this.length - 1];\n },\n\n compact: function() {\n return this.select(function(value) {\n return value != null;\n });\n },\n\n flatten: function() {\n return this.inject([], function(array, value) {\n return array.concat(value && value.constructor == Array ?\n value.flatten() : [value]);\n });\n },\n\n without: function() {\n var values = $A(arguments);\n return this.select(function(value) {\n return !values.include(value);\n });\n },\n\n indexOf: function(object) {\n for (var i = 0, length = this.length; i < length; i++)\n if (this[i] == object) return i;\n return -1;\n },\n\n reverse: function(inline) {\n return (inline !== false ? this : this.toArray())._reverse();\n },\n\n reduce: function() {\n return this.length > 1 ? this : this[0];\n },\n\n uniq: function(sorted) {\n return this.inject([], function(array, value, index) {\n if (0 == index || (sorted ? array.last() != value : !array.include(value)))\n array.push(value);\n return array;\n });\n },\n\n clone: function() {\n return [].concat(this);\n },\n\n size: function() {\n return this.length;\n },\n\n inspect: function() {\n return '[' + this.map(Object.inspect).join(', ') + ']';\n },\n\n toJSON: function() {\n var results = [];\n this.each(function(object) {\n var value = Object.toJSON(object);\n if (value !== undefined) results.push(value);\n });\n return '[' + results.join(', ') + ']';\n }\n});\n\nArray.prototype.toArray = Array.prototype.clone;\n\nfunction $w(string) {\n string = string.strip();\n return string ? string.split(/\\s+/) : [];\n}\n\nif (Prototype.Browser.Opera){\n Array.prototype.concat = function() {\n var array = [];\n for (var i = 0, length = this.length; i < length; i++) array.push(this[i]);\n for (var i = 0, length = arguments.length; i < length; i++) {\n if (arguments[i].constructor == Array) {\n for (var j = 0, arrayLength = arguments[i].length; j < arrayLength; j++)\n array.push(arguments[i][j]);\n } else {\n array.push(arguments[i]);\n }\n }\n return array;\n }\n}\nvar Hash = function(object) {\n if (object instanceof Hash) this.merge(object);\n else Object.extend(this, object || {});\n};\n\nObject.extend(Hash, {\n toQueryString: function(obj) {\n var parts = [];\n parts.add = arguments.callee.addPair;\n\n this.prototype._each.call(obj, function(pair) {\n if (!pair.key) return;\n var value = pair.value;\n\n if (value && typeof value == 'object') {\n if (value.constructor == Array) value.each(function(value) {\n parts.add(pair.key, value);\n });\n return;\n }\n parts.add(pair.key, value);\n });\n\n return parts.join('&');\n },\n\n toJSON: function(object) {\n var results = [];\n this.prototype._each.call(object, function(pair) {\n var value = Object.toJSON(pair.value);\n if (value !== undefined) results.push(pair.key.toJSON() + ': ' + value);\n });\n return '{' + results.join(', ') + '}';\n }\n});\n\nHash.toQueryString.addPair = function(key, value, prefix) {\n key = encodeURIComponent(key);\n if (value === undefined) this.push(key);\n else this.push(key + '=' + (value == null ? '' : encodeURIComponent(value)));\n}\n\nObject.extend(Hash.prototype, Enumerable);\nObject.extend(Hash.prototype, {\n _each: function(iterator) {\n for (var key in this) {\n var value = this[key];\n if (value && value == Hash.prototype[key]) continue;\n\n var pair = [key, value];\n pair.key = key;\n pair.value = value;\n iterator(pair);\n }\n },\n\n keys: function() {\n return this.pluck('key');\n },\n\n values: function() {\n return this.pluck('value');\n },\n\n merge: function(hash) {\n return $H(hash).inject(this, function(mergedHash, pair) {\n mergedHash[pair.key] = pair.value;\n return mergedHash;\n });\n },\n\n remove: function() {\n var result;\n for(var i = 0, length = arguments.length; i < length; i++) {\n var value = this[arguments[i]];\n if (value !== undefined){\n if (result === undefined) result = value;\n else {\n if (result.constructor != Array) result = [result];\n result.push(value)\n }\n }\n delete this[arguments[i]];\n }\n return result;\n },\n\n toQueryString: function() {\n return Hash.toQueryString(this);\n },\n\n inspect: function() {\n return '#';\n },\n\n toJSON: function() {\n return Hash.toJSON(this);\n }\n});\n\nfunction $H(object) {\n if (object instanceof Hash) return object;\n return new Hash(object);\n};\n\n// Safari iterates over shadowed properties\nif (function() {\n var i = 0, Test = function(value) { this.key = value };\n Test.prototype.key = 'foo';\n for (var property in new Test('bar')) i++;\n return i > 1;\n}()) Hash.prototype._each = function(iterator) {\n var cache = [];\n for (var key in this) {\n var value = this[key];\n if ((value && value == Hash.prototype[key]) || cache.include(key)) continue;\n cache.push(key);\n var pair = [key, value];\n pair.key = key;\n pair.value = value;\n iterator(pair);\n }\n};\nObjectRange = Class.create();\nObject.extend(ObjectRange.prototype, Enumerable);\nObject.extend(ObjectRange.prototype, {\n initialize: function(start, end, exclusive) {\n this.start = start;\n this.end = end;\n this.exclusive = exclusive;\n },\n\n _each: function(iterator) {\n var value = this.start;\n while (this.include(value)) {\n iterator(value);\n value = value.succ();\n }\n },\n\n include: function(value) {\n if (value < this.start)\n return false;\n if (this.exclusive)\n return value < this.end;\n return value <= this.end;\n }\n});\n\nvar $R = function(start, end, exclusive) {\n return new ObjectRange(start, end, exclusive);\n}\n\nvar Ajax = {\n getTransport: function() {\n return Try.these(\n function() {return new XMLHttpRequest()},\n function() {return new ActiveXObject('Msxml2.XMLHTTP')},\n function() {return new ActiveXObject('Microsoft.XMLHTTP')}\n ) || false;\n },\n\n activeRequestCount: 0\n}\n\nAjax.Responders = {\n responders: [],\n\n _each: function(iterator) {\n this.responders._each(iterator);\n },\n\n register: function(responder) {\n if (!this.include(responder))\n this.responders.push(responder);\n },\n\n unregister: function(responder) {\n this.responders = this.responders.without(responder);\n },\n\n dispatch: function(callback, request, transport, json) {\n this.each(function(responder) {\n if (typeof responder[callback] == 'function') {\n try {\n responder[callback].apply(responder, [request, transport, json]);\n } catch (e) {}\n }\n });\n }\n};\n\nObject.extend(Ajax.Responders, Enumerable);\n\nAjax.Responders.register({\n onCreate: function() {\n Ajax.activeRequestCount++;\n },\n onComplete: function() {\n Ajax.activeRequestCount--;\n }\n});\n\nAjax.Base = function() {};\nAjax.Base.prototype = {\n setOptions: function(options) {\n this.options = {\n method: 'post',\n asynchronous: true,\n contentType: 'application/x-www-form-urlencoded',\n encoding: 'UTF-8',\n parameters: ''\n }\n Object.extend(this.options, options || {});\n\n this.options.method = this.options.method.toLowerCase();\n if (typeof this.options.parameters == 'string')\n this.options.parameters = this.options.parameters.toQueryParams();\n }\n}\n\nAjax.Request = Class.create();\nAjax.Request.Events =\n ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete'];\n\nAjax.Request.prototype = Object.extend(new Ajax.Base(), {\n _complete: false,\n\n initialize: function(url, options) {\n this.transport = Ajax.getTransport();\n this.setOptions(options);\n this.request(url);\n },\n\n request: function(url) {\n this.url = url;\n this.method = this.options.method;\n var params = Object.clone(this.options.parameters);\n\n if (!['get', 'post'].include(this.method)) {\n // simulate other verbs over post\n params['_method'] = this.method;\n this.method = 'post';\n }\n\n this.parameters = params;\n\n if (params = Hash.toQueryString(params)) {\n // when GET, append parameters to URL\n if (this.method == 'get')\n this.url += (this.url.include('?') ? '&' : '?') + params;\n else if (/Konqueror|Safari|KHTML/.test(navigator.userAgent))\n params += '&_=';\n }\n\n try {\n if (this.options.onCreate) this.options.onCreate(this.transport);\n Ajax.Responders.dispatch('onCreate', this, this.transport);\n\n this.transport.open(this.method.toUpperCase(), this.url,\n this.options.asynchronous);\n\n if (this.options.asynchronous)\n setTimeout(function() { this.respondToReadyState(1) }.bind(this), 10);\n\n this.transport.onreadystatechange = this.onStateChange.bind(this);\n this.setRequestHeaders();\n\n this.body = this.method == 'post' ? (this.options.postBody || params) : null;\n this.transport.send(this.body);\n\n /* Force Firefox to handle ready state 4 for synchronous requests */\n if (!this.options.asynchronous && this.transport.overrideMimeType)\n this.onStateChange();\n\n }\n catch (e) {\n this.dispatchException(e);\n }\n },\n\n onStateChange: function() {\n var readyState = this.transport.readyState;\n if (readyState > 1 && !((readyState == 4) && this._complete))\n this.respondToReadyState(this.transport.readyState);\n },\n\n setRequestHeaders: function() {\n var headers = {\n 'X-Requested-With': 'XMLHttpRequest',\n 'X-Prototype-Version': Prototype.Version,\n 'Accept': 'text/javascript, text/html, application/xml, text/xml, */*'\n };\n\n if (this.method == 'post') {\n headers['Content-type'] = this.options.contentType +\n (this.options.encoding ? '; charset=' + this.options.encoding : '');\n\n /* Force \"Connection: close\" for older Mozilla browsers to work\n * around a bug where XMLHttpRequest sends an incorrect\n * Content-length header. See Mozilla Bugzilla #246651.\n */\n if (this.transport.overrideMimeType &&\n (navigator.userAgent.match(/Gecko\\/(\\d{4})/) || [0,2005])[1] < 2005)\n headers['Connection'] = 'close';\n }\n\n // user-defined headers\n if (typeof this.options.requestHeaders == 'object') {\n var extras = this.options.requestHeaders;\n\n if (typeof extras.push == 'function')\n for (var i = 0, length = extras.length; i < length; i += 2)\n headers[extras[i]] = extras[i+1];\n else\n $H(extras).each(function(pair) { headers[pair.key] = pair.value });\n }\n\n for (var name in headers)\n this.transport.setRequestHeader(name, headers[name]);\n },\n\n success: function() {\n return !this.transport.status\n || (this.transport.status >= 200 && this.transport.status < 300);\n },\n\n respondToReadyState: function(readyState) {\n var state = Ajax.Request.Events[readyState];\n var transport = this.transport, json = this.evalJSON();\n\n if (state == 'Complete') {\n try {\n this._complete = true;\n (this.options['on' + this.transport.status]\n || this.options['on' + (this.success() ? 'Success' : 'Failure')]\n || Prototype.emptyFunction)(transport, json);\n } catch (e) {\n this.dispatchException(e);\n }\n\n var contentType = this.getHeader('Content-type');\n if (contentType && contentType.strip().\n match(/^(text|application)\\/(x-)?(java|ecma)script(;.*)?$/i))\n this.evalResponse();\n }\n\n try {\n (this.options['on' + state] || Prototype.emptyFunction)(transport, json);\n Ajax.Responders.dispatch('on' + state, this, transport, json);\n } catch (e) {\n this.dispatchException(e);\n }\n\n if (state == 'Complete') {\n // avoid memory leak in MSIE: clean up\n this.transport.onreadystatechange = Prototype.emptyFunction;\n }\n },\n\n getHeader: function(name) {\n try {\n return this.transport.getResponseHeader(name);\n } catch (e) { return null }\n },\n\n evalJSON: function() {\n try {\n var json = this.getHeader('X-JSON');\n return json ? json.evalJSON() : null;\n } catch (e) { return null }\n },\n\n evalResponse: function() {\n try {\n return eval((this.transport.responseText || '').unfilterJSON());\n } catch (e) {\n this.dispatchException(e);\n }\n },\n\n dispatchException: function(exception) {\n (this.options.onException || Prototype.emptyFunction)(this, exception);\n Ajax.Responders.dispatch('onException', this, exception);\n }\n});\n\nAjax.Updater = Class.create();\n\nObject.extend(Object.extend(Ajax.Updater.prototype, Ajax.Request.prototype), {\n initialize: function(container, url, options) {\n this.container = {\n success: (container.success || container),\n failure: (container.failure || (container.success ? null : container))\n }\n\n this.transport = Ajax.getTransport();\n this.setOptions(options);\n\n var onComplete = this.options.onComplete || Prototype.emptyFunction;\n this.options.onComplete = (function(transport, param) {\n this.updateContent();\n onComplete(transport, param);\n }).bind(this);\n\n this.request(url);\n },\n\n updateContent: function() {\n var receiver = this.container[this.success() ? 'success' : 'failure'];\n var response = this.transport.responseText;\n\n if (!this.options.evalScripts) response = response.stripScripts();\n\n if (receiver = $(receiver)) {\n if (this.options.insertion)\n new this.options.insertion(receiver, response);\n else\n receiver.update(response);\n }\n\n if (this.success()) {\n if (this.onComplete)\n setTimeout(this.onComplete.bind(this), 10);\n }\n }\n});\n\nAjax.PeriodicalUpdater = Class.create();\nAjax.PeriodicalUpdater.prototype = Object.extend(new Ajax.Base(), {\n initialize: function(container, url, options) {\n this.setOptions(options);\n this.onComplete = this.options.onComplete;\n\n this.frequency = (this.options.frequency || 2);\n this.decay = (this.options.decay || 1);\n\n this.updater = {};\n this.container = container;\n this.url = url;\n\n this.start();\n },\n\n start: function() {\n this.options.onComplete = this.updateComplete.bind(this);\n this.onTimerEvent();\n },\n\n stop: function() {\n this.updater.options.onComplete = undefined;\n clearTimeout(this.timer);\n (this.onComplete || Prototype.emptyFunction).apply(this, arguments);\n },\n\n updateComplete: function(request) {\n if (this.options.decay) {\n this.decay = (request.responseText == this.lastText ?\n this.decay * this.options.decay : 1);\n\n this.lastText = request.responseText;\n }\n this.timer = setTimeout(this.onTimerEvent.bind(this),\n this.decay * this.frequency * 1000);\n },\n\n onTimerEvent: function() {\n this.updater = new Ajax.Updater(this.container, this.url, this.options);\n }\n});\nfunction $(element) {\n if (arguments.length > 1) {\n for (var i = 0, elements = [], length = arguments.length; i < length; i++)\n elements.push($(arguments[i]));\n return elements;\n }\n if (typeof element == 'string')\n element = document.getElementById(element);\n return Element.extend(element);\n}\n\nif (Prototype.BrowserFeatures.XPath) {\n document._getElementsByXPath = function(expression, parentElement) {\n var results = [];\n var query = document.evaluate(expression, $(parentElement) || document,\n null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);\n for (var i = 0, length = query.snapshotLength; i < length; i++)\n results.push(query.snapshotItem(i));\n return results;\n };\n\n document.getElementsByClassName = function(className, parentElement) {\n var q = \".//*[contains(concat(' ', @class, ' '), ' \" + className + \" ')]\";\n return document._getElementsByXPath(q, parentElement);\n }\n\n} else document.getElementsByClassName = function(className, parentElement) {\n var children = ($(parentElement) || document.body).getElementsByTagName('*');\n var elements = [], child, pattern = new RegExp(\"(^|\\\\s)\" + className + \"(\\\\s|$)\");\n for (var i = 0, length = children.length; i < length; i++) {\n child = children[i];\n var elementClassName = child.className;\n if (elementClassName.length == 0) continue;\n if (elementClassName == className || elementClassName.match(pattern))\n elements.push(Element.extend(child));\n }\n return elements;\n};\n\n/*--------------------------------------------------------------------------*/\n\nif (!window.Element) var Element = {};\n\nElement.extend = function(element) {\n var F = Prototype.BrowserFeatures;\n if (!element || !element.tagName || element.nodeType == 3 ||\n element._extended || F.SpecificElementExtensions || element == window)\n return element;\n\n var methods = {}, tagName = element.tagName, cache = Element.extend.cache,\n T = Element.Methods.ByTag;\n\n // extend methods for all tags (Safari doesn't need this)\n if (!F.ElementExtensions) {\n Object.extend(methods, Element.Methods),\n Object.extend(methods, Element.Methods.Simulated);\n }\n\n // extend methods for specific tags\n if (T[tagName]) Object.extend(methods, T[tagName]);\n\n for (var property in methods) {\n var value = methods[property];\n if (typeof value == 'function' && !(property in element))\n element[property] = cache.findOrStore(value);\n }\n\n element._extended = Prototype.emptyFunction;\n return element;\n};\n\nElement.extend.cache = {\n findOrStore: function(value) {\n return this[value] = this[value] || function() {\n return value.apply(null, [this].concat($A(arguments)));\n }\n }\n};\n\nElement.Methods = {\n visible: function(element) {\n return $(element).style.display != 'none';\n },\n\n toggle: function(element) {\n element = $(element);\n Element[Element.visible(element) ? 'hide' : 'show'](element);\n return element;\n },\n\n hide: function(element) {\n $(element).style.display = 'none';\n return element;\n },\n\n show: function(element) {\n $(element).style.display = '';\n return element;\n },\n\n remove: function(element) {\n element = $(element);\n element.parentNode.removeChild(element);\n return element;\n },\n\n update: function(element, html) {\n html = typeof html == 'undefined' ? '' : html.toString();\n $(element).innerHTML = html.stripScripts();\n setTimeout(function() {html.evalScripts()}, 10);\n return element;\n },\n\n replace: function(element, html) {\n element = $(element);\n html = typeof html == 'undefined' ? '' : html.toString();\n if (element.outerHTML) {\n element.outerHTML = html.stripScripts();\n } else {\n var range = element.ownerDocument.createRange();\n range.selectNodeContents(element);\n element.parentNode.replaceChild(\n range.createContextualFragment(html.stripScripts()), element);\n }\n setTimeout(function() {html.evalScripts()}, 10);\n return element;\n },\n\n inspect: function(element) {\n element = $(element);\n var result = '<' + element.tagName.toLowerCase();\n $H({'id': 'id', 'className': 'class'}).each(function(pair) {\n var property = pair.first(), attribute = pair.last();\n var value = (element[property] || '').toString();\n if (value) result += ' ' + attribute + '=' + value.inspect(true);\n });\n return result + '>';\n },\n\n recursivelyCollect: function(element, property) {\n element = $(element);\n var elements = [];\n while (element = element[property])\n if (element.nodeType == 1)\n elements.push(Element.extend(element));\n return elements;\n },\n\n ancestors: function(element) {\n return $(element).recursivelyCollect('parentNode');\n },\n\n descendants: function(element) {\n return $A($(element).getElementsByTagName('*')).each(Element.extend);\n },\n\n firstDescendant: function(element) {\n element = $(element).firstChild;\n while (element && element.nodeType != 1) element = element.nextSibling;\n return $(element);\n },\n\n immediateDescendants: function(element) {\n if (!(element = $(element).firstChild)) return [];\n while (element && element.nodeType != 1) element = element.nextSibling;\n if (element) return [element].concat($(element).nextSiblings());\n return [];\n },\n\n previousSiblings: function(element) {\n return $(element).recursivelyCollect('previousSibling');\n },\n\n nextSiblings: function(element) {\n return $(element).recursivelyCollect('nextSibling');\n },\n\n siblings: function(element) {\n element = $(element);\n return element.previousSiblings().reverse().concat(element.nextSiblings());\n },\n\n match: function(element, selector) {\n if (typeof selector == 'string')\n selector = new Selector(selector);\n return selector.match($(element));\n },\n\n up: function(element, expression, index) {\n element = $(element);\n if (arguments.length == 1) return $(element.parentNode);\n var ancestors = element.ancestors();\n return expression ? Selector.findElement(ancestors, expression, index) :\n ancestors[index || 0];\n },\n\n down: function(element, expression, index) {\n element = $(element);\n if (arguments.length == 1) return element.firstDescendant();\n var descendants = element.descendants();\n return expression ? Selector.findElement(descendants, expression, index) :\n descendants[index || 0];\n },\n\n previous: function(element, expression, index) {\n element = $(element);\n if (arguments.length == 1) return $(Selector.handlers.previousElementSibling(element));\n var previousSiblings = element.previousSiblings();\n return expression ? Selector.findElement(previousSiblings, expression, index) :\n previousSiblings[index || 0];\n },\n\n next: function(element, expression, index) {\n element = $(element);\n if (arguments.length == 1) return $(Selector.handlers.nextElementSibling(element));\n var nextSiblings = element.nextSiblings();\n return expression ? Selector.findElement(nextSiblings, expression, index) :\n nextSiblings[index || 0];\n },\n\n getElementsBySelector: function() {\n var args = $A(arguments), element = $(args.shift());\n return Selector.findChildElements(element, args);\n },\n\n getElementsByClassName: function(element, className) {\n return document.getElementsByClassName(className, element);\n },\n\n readAttribute: function(element, name) {\n element = $(element);\n if (Prototype.Browser.IE) {\n if (!element.attributes) return null;\n var t = Element._attributeTranslations;\n if (t.values[name]) return t.values[name](element, name);\n if (t.names[name]) name = t.names[name];\n var attribute = element.attributes[name];\n return attribute ? attribute.nodeValue : null;\n }\n return element.getAttribute(name);\n },\n\n getHeight: function(element) {\n return $(element).getDimensions().height;\n },\n\n getWidth: function(element) {\n return $(element).getDimensions().width;\n },\n\n classNames: function(element) {\n return new Element.ClassNames(element);\n },\n\n hasClassName: function(element, className) {\n if (!(element = $(element))) return;\n var elementClassName = element.className;\n if (elementClassName.length == 0) return false;\n if (elementClassName == className ||\n elementClassName.match(new RegExp(\"(^|\\\\s)\" + className + \"(\\\\s|$)\")))\n return true;\n return false;\n },\n\n addClassName: function(element, className) {\n if (!(element = $(element))) return;\n Element.classNames(element).add(className);\n return element;\n },\n\n removeClassName: function(element, className) {\n if (!(element = $(element))) return;\n Element.classNames(element).remove(className);\n return element;\n },\n\n toggleClassName: function(element, className) {\n if (!(element = $(element))) return;\n Element.classNames(element)[element.hasClassName(className) ? 'remove' : 'add'](className);\n return element;\n },\n\n observe: function() {\n Event.observe.apply(Event, arguments);\n return $A(arguments).first();\n },\n\n stopObserving: function() {\n Event.stopObserving.apply(Event, arguments);\n return $A(arguments).first();\n },\n\n // removes whitespace-only text node children\n cleanWhitespace: function(element) {\n element = $(element);\n var node = element.firstChild;\n while (node) {\n var nextNode = node.nextSibling;\n if (node.nodeType == 3 && !/\\S/.test(node.nodeValue))\n element.removeChild(node);\n node = nextNode;\n }\n return element;\n },\n\n empty: function(element) {\n return $(element).innerHTML.blank();\n },\n\n descendantOf: function(element, ancestor) {\n element = $(element), ancestor = $(ancestor);\n while (element = element.parentNode)\n if (element == ancestor) return true;\n return false;\n },\n\n scrollTo: function(element) {\n element = $(element);\n var pos = Position.cumulativeOffset(element);\n window.scrollTo(pos[0], pos[1]);\n return element;\n },\n\n getStyle: function(element, style) {\n element = $(element);\n style = style == 'float' ? 'cssFloat' : style.camelize();\n var value = element.style[style];\n if (!value) {\n var css = document.defaultView.getComputedStyle(element, null);\n value = css ? css[style] : null;\n }\n if (style == 'opacity') return value ? parseFloat(value) : 1.0;\n return value == 'auto' ? null : value;\n },\n\n getOpacity: function(element) {\n return $(element).getStyle('opacity');\n },\n\n setStyle: function(element, styles, camelized) {\n element = $(element);\n var elementStyle = element.style;\n\n for (var property in styles)\n if (property == 'opacity') element.setOpacity(styles[property])\n else\n elementStyle[(property == 'float' || property == 'cssFloat') ?\n (elementStyle.styleFloat === undefined ? 'cssFloat' : 'styleFloat') :\n (camelized ? property : property.camelize())] = styles[property];\n\n return element;\n },\n\n setOpacity: function(element, value) {\n element = $(element);\n element.style.opacity = (value == 1 || value === '') ? '' :\n (value < 0.00001) ? 0 : value;\n return element;\n },\n\n getDimensions: function(element) {\n element = $(element);\n var display = $(element).getStyle('display');\n if (display != 'none' && display != null) // Safari bug\n return {width: element.offsetWidth, height: element.offsetHeight};\n\n // All *Width and *Height properties give 0 on elements with display none,\n // so enable the element temporarily\n var els = element.style;\n var originalVisibility = els.visibility;\n var originalPosition = els.position;\n var originalDisplay = els.display;\n els.visibility = 'hidden';\n els.position = 'absolute';\n els.display = 'block';\n var originalWidth = element.clientWidth;\n var originalHeight = element.clientHeight;\n els.display = originalDisplay;\n els.position = originalPosition;\n els.visibility = originalVisibility;\n return {width: originalWidth, height: originalHeight};\n },\n\n makePositioned: function(element) {\n element = $(element);\n var pos = Element.getStyle(element, 'position');\n if (pos == 'static' || !pos) {\n element._madePositioned = true;\n element.style.position = 'relative';\n // Opera returns the offset relative to the positioning context, when an\n // element is position relative but top and left have not been defined\n if (window.opera) {\n element.style.top = 0;\n element.style.left = 0;\n }\n }\n return element;\n },\n\n undoPositioned: function(element) {\n element = $(element);\n if (element._madePositioned) {\n element._madePositioned = undefined;\n element.style.position =\n element.style.top =\n element.style.left =\n element.style.bottom =\n element.style.right = '';\n }\n return element;\n },\n\n makeClipping: function(element) {\n element = $(element);\n if (element._overflow) return element;\n element._overflow = element.style.overflow || 'auto';\n if ((Element.getStyle(element, 'overflow') || 'visible') != 'hidden')\n element.style.overflow = 'hidden';\n return element;\n },\n\n undoClipping: function(element) {\n element = $(element);\n if (!element._overflow) return element;\n element.style.overflow = element._overflow == 'auto' ? '' : element._overflow;\n element._overflow = null;\n return element;\n }\n};\n\nObject.extend(Element.Methods, {\n childOf: Element.Methods.descendantOf,\n childElements: Element.Methods.immediateDescendants\n});\n\nif (Prototype.Browser.Opera) {\n Element.Methods._getStyle = Element.Methods.getStyle;\n Element.Methods.getStyle = function(element, style) {\n switch(style) {\n case 'left':\n case 'top':\n case 'right':\n case 'bottom':\n if (Element._getStyle(element, 'position') == 'static') return null;\n default: return Element._getStyle(element, style);\n }\n };\n}\nelse if (Prototype.Browser.IE) {\n Element.Methods.getStyle = function(element, style) {\n element = $(element);\n style = (style == 'float' || style == 'cssFloat') ? 'styleFloat' : style.camelize();\n var value = element.style[style];\n if (!value && element.currentStyle) value = element.currentStyle[style];\n\n if (style == 'opacity') {\n if (value = (element.getStyle('filter') || '').match(/alpha\\(opacity=(.*)\\)/))\n if (value[1]) return parseFloat(value[1]) / 100;\n return 1.0;\n }\n\n if (value == 'auto') {\n if ((style == 'width' || style == 'height') && (element.getStyle('display') != 'none'))\n return element['offset'+style.capitalize()] + 'px';\n return null;\n }\n return value;\n };\n\n Element.Methods.setOpacity = function(element, value) {\n element = $(element);\n var filter = element.getStyle('filter'), style = element.style;\n if (value == 1 || value === '') {\n style.filter = filter.replace(/alpha\\([^\\)]*\\)/gi,'');\n return element;\n } else if (value < 0.00001) value = 0;\n style.filter = filter.replace(/alpha\\([^\\)]*\\)/gi, '') +\n 'alpha(opacity=' + (value * 100) + ')';\n return element;\n };\n\n // IE is missing .innerHTML support for TABLE-related elements\n Element.Methods.update = function(element, html) {\n element = $(element);\n html = typeof html == 'undefined' ? '' : html.toString();\n var tagName = element.tagName.toUpperCase();\n if (['THEAD','TBODY','TR','TD'].include(tagName)) {\n var div = document.createElement('div');\n switch (tagName) {\n case 'THEAD':\n case 'TBODY':\n div.innerHTML = '' + html.stripScripts() + '
';\n depth = 2;\n break;\n case 'TR':\n div.innerHTML = '' + html.stripScripts() + '
';\n depth = 3;\n break;\n case 'TD':\n div.innerHTML = '
' + html.stripScripts() + '
';\n depth = 4;\n }\n $A(element.childNodes).each(function(node) { element.removeChild(node) });\n depth.times(function() { div = div.firstChild });\n $A(div.childNodes).each(function(node) { element.appendChild(node) });\n } else {\n element.innerHTML = html.stripScripts();\n }\n setTimeout(function() { html.evalScripts() }, 10);\n return element;\n }\n}\nelse if (Prototype.Browser.Gecko) {\n Element.Methods.setOpacity = function(element, value) {\n element = $(element);\n element.style.opacity = (value == 1) ? 0.999999 :\n (value === '') ? '' : (value < 0.00001) ? 0 : value;\n return element;\n };\n}\n\nElement._attributeTranslations = {\n names: {\n colspan: \"colSpan\",\n rowspan: \"rowSpan\",\n valign: \"vAlign\",\n datetime: \"dateTime\",\n accesskey: \"accessKey\",\n tabindex: \"tabIndex\",\n enctype: \"encType\",\n maxlength: \"maxLength\",\n readonly: \"readOnly\",\n longdesc: \"longDesc\"\n },\n values: {\n _getAttr: function(element, attribute) {\n return element.getAttribute(attribute, 2);\n },\n _flag: function(element, attribute) {\n return $(element).hasAttribute(attribute) ? attribute : null;\n },\n style: function(element) {\n return element.style.cssText.toLowerCase();\n },\n title: function(element) {\n var node = element.getAttributeNode('title');\n return node.specified ? node.nodeValue : null;\n }\n }\n};\n\n(function() {\n Object.extend(this, {\n href: this._getAttr,\n src: this._getAttr,\n type: this._getAttr,\n disabled: this._flag,\n checked: this._flag,\n readonly: this._flag,\n multiple: this._flag\n });\n}).call(Element._attributeTranslations.values);\n\nElement.Methods.Simulated = {\n hasAttribute: function(element, attribute) {\n var t = Element._attributeTranslations, node;\n attribute = t.names[attribute] || attribute;\n node = $(element).getAttributeNode(attribute);\n return node && node.specified;\n }\n};\n\nElement.Methods.ByTag = {};\n\nObject.extend(Element, Element.Methods);\n\nif (!Prototype.BrowserFeatures.ElementExtensions &&\n document.createElement('div').__proto__) {\n window.HTMLElement = {};\n window.HTMLElement.prototype = document.createElement('div').__proto__;\n Prototype.BrowserFeatures.ElementExtensions = true;\n}\n\nElement.hasAttribute = function(element, attribute) {\n if (element.hasAttribute) return element.hasAttribute(attribute);\n return Element.Methods.Simulated.hasAttribute(element, attribute);\n};\n\nElement.addMethods = function(methods) {\n var F = Prototype.BrowserFeatures, T = Element.Methods.ByTag;\n\n if (!methods) {\n Object.extend(Form, Form.Methods);\n Object.extend(Form.Element, Form.Element.Methods);\n Object.extend(Element.Methods.ByTag, {\n \"FORM\": Object.clone(Form.Methods),\n \"INPUT\": Object.clone(Form.Element.Methods),\n \"SELECT\": Object.clone(Form.Element.Methods),\n \"TEXTAREA\": Object.clone(Form.Element.Methods)\n });\n }\n\n if (arguments.length == 2) {\n var tagName = methods;\n methods = arguments[1];\n }\n\n if (!tagName) Object.extend(Element.Methods, methods || {});\n else {\n if (tagName.constructor == Array) tagName.each(extend);\n else extend(tagName);\n }\n\n function extend(tagName) {\n tagName = tagName.toUpperCase();\n if (!Element.Methods.ByTag[tagName])\n Element.Methods.ByTag[tagName] = {};\n Object.extend(Element.Methods.ByTag[tagName], methods);\n }\n\n function copy(methods, destination, onlyIfAbsent) {\n onlyIfAbsent = onlyIfAbsent || false;\n var cache = Element.extend.cache;\n for (var property in methods) {\n var value = methods[property];\n if (!onlyIfAbsent || !(property in destination))\n destination[property] = cache.findOrStore(value);\n }\n }\n\n function findDOMClass(tagName) {\n var klass;\n var trans = {\n \"OPTGROUP\": \"OptGroup\", \"TEXTAREA\": \"TextArea\", \"P\": \"Paragraph\",\n \"FIELDSET\": \"FieldSet\", \"UL\": \"UList\", \"OL\": \"OList\", \"DL\": \"DList\",\n \"DIR\": \"Directory\", \"H1\": \"Heading\", \"H2\": \"Heading\", \"H3\": \"Heading\",\n \"H4\": \"Heading\", \"H5\": \"Heading\", \"H6\": \"Heading\", \"Q\": \"Quote\",\n \"INS\": \"Mod\", \"DEL\": \"Mod\", \"A\": \"Anchor\", \"IMG\": \"Image\", \"CAPTION\":\n \"TableCaption\", \"COL\": \"TableCol\", \"COLGROUP\": \"TableCol\", \"THEAD\":\n \"TableSection\", \"TFOOT\": \"TableSection\", \"TBODY\": \"TableSection\", \"TR\":\n \"TableRow\", \"TH\": \"TableCell\", \"TD\": \"TableCell\", \"FRAMESET\":\n \"FrameSet\", \"IFRAME\": \"IFrame\"\n };\n if (trans[tagName]) klass = 'HTML' + trans[tagName] + 'Element';\n if (window[klass]) return window[klass];\n klass = 'HTML' + tagName + 'Element';\n if (window[klass]) return window[klass];\n klass = 'HTML' + tagName.capitalize() + 'Element';\n if (window[klass]) return window[klass];\n\n window[klass] = {};\n window[klass].prototype = document.createElement(tagName).__proto__;\n return window[klass];\n }\n\n if (F.ElementExtensions) {\n copy(Element.Methods, HTMLElement.prototype);\n copy(Element.Methods.Simulated, HTMLElement.prototype, true);\n }\n\n if (F.SpecificElementExtensions) {\n for (var tag in Element.Methods.ByTag) {\n var klass = findDOMClass(tag);\n if (typeof klass == \"undefined\") continue;\n copy(T[tag], klass.prototype);\n }\n }\n\n Object.extend(Element, Element.Methods);\n delete Element.ByTag;\n};\n\nvar Toggle = { display: Element.toggle };\n\n/*--------------------------------------------------------------------------*/\n\nAbstract.Insertion = function(adjacency) {\n this.adjacency = adjacency;\n}\n\nAbstract.Insertion.prototype = {\n initialize: function(element, content) {\n this.element = $(element);\n this.content = content.stripScripts();\n\n if (this.adjacency && this.element.insertAdjacentHTML) {\n try {\n this.element.insertAdjacentHTML(this.adjacency, this.content);\n } catch (e) {\n var tagName = this.element.tagName.toUpperCase();\n if (['TBODY', 'TR'].include(tagName)) {\n this.insertContent(this.contentFromAnonymousTable());\n } else {\n throw e;\n }\n }\n } else {\n this.range = this.element.ownerDocument.createRange();\n if (this.initializeRange) this.initializeRange();\n this.insertContent([this.range.createContextualFragment(this.content)]);\n }\n\n setTimeout(function() {content.evalScripts()}, 10);\n },\n\n contentFromAnonymousTable: function() {\n var div = document.createElement('div');\n div.innerHTML = '' + this.content + '
';\n return $A(div.childNodes[0].childNodes[0].childNodes);\n }\n}\n\nvar Insertion = new Object();\n\nInsertion.Before = Class.create();\nInsertion.Before.prototype = Object.extend(new Abstract.Insertion('beforeBegin'), {\n initializeRange: function() {\n this.range.setStartBefore(this.element);\n },\n\n insertContent: function(fragments) {\n fragments.each((function(fragment) {\n this.element.parentNode.insertBefore(fragment, this.element);\n }).bind(this));\n }\n});\n\nInsertion.Top = Class.create();\nInsertion.Top.prototype = Object.extend(new Abstract.Insertion('afterBegin'), {\n initializeRange: function() {\n this.range.selectNodeContents(this.element);\n this.range.collapse(true);\n },\n\n insertContent: function(fragments) {\n fragments.reverse(false).each((function(fragment) {\n this.element.insertBefore(fragment, this.element.firstChild);\n }).bind(this));\n }\n});\n\nInsertion.Bottom = Class.create();\nInsertion.Bottom.prototype = Object.extend(new Abstract.Insertion('beforeEnd'), {\n initializeRange: function() {\n this.range.selectNodeContents(this.element);\n this.range.collapse(this.element);\n },\n\n insertContent: function(fragments) {\n fragments.each((function(fragment) {\n this.element.appendChild(fragment);\n }).bind(this));\n }\n});\n\nInsertion.After = Class.create();\nInsertion.After.prototype = Object.extend(new Abstract.Insertion('afterEnd'), {\n initializeRange: function() {\n this.range.setStartAfter(this.element);\n },\n\n insertContent: function(fragments) {\n fragments.each((function(fragment) {\n this.element.parentNode.insertBefore(fragment,\n this.element.nextSibling);\n }).bind(this));\n }\n});\n\n/*--------------------------------------------------------------------------*/\n\nElement.ClassNames = Class.create();\nElement.ClassNames.prototype = {\n initialize: function(element) {\n this.element = $(element);\n },\n\n _each: function(iterator) {\n this.element.className.split(/\\s+/).select(function(name) {\n return name.length > 0;\n })._each(iterator);\n },\n\n set: function(className) {\n this.element.className = className;\n },\n\n add: function(classNameToAdd) {\n if (this.include(classNameToAdd)) return;\n this.set($A(this).concat(classNameToAdd).join(' '));\n },\n\n remove: function(classNameToRemove) {\n if (!this.include(classNameToRemove)) return;\n this.set($A(this).without(classNameToRemove).join(' '));\n },\n\n toString: function() {\n return $A(this).join(' ');\n }\n};\n\nObject.extend(Element.ClassNames.prototype, Enumerable);\n/* Portions of the Selector class are derived from Jack Slocum’s DomQuery,\n * part of YUI-Ext version 0.40, distributed under the terms of an MIT-style\n * license. Please see http://www.yui-ext.com/ for more information. */\n\nvar Selector = Class.create();\n\nSelector.prototype = {\n initialize: function(expression) {\n this.expression = expression.strip();\n this.compileMatcher();\n },\n\n compileMatcher: function() {\n // Selectors with namespaced attributes can't use the XPath version\n if (Prototype.BrowserFeatures.XPath && !(/\\[[\\w-]*?:/).test(this.expression))\n return this.compileXPathMatcher();\n\n var e = this.expression, ps = Selector.patterns, h = Selector.handlers,\n c = Selector.criteria, le, p, m;\n\n if (Selector._cache[e]) {\n this.matcher = Selector._cache[e]; return;\n }\n this.matcher = [\"this.matcher = function(root) {\",\n \"var r = root, h = Selector.handlers, c = false, n;\"];\n\n while (e && le != e && (/\\S/).test(e)) {\n le = e;\n for (var i in ps) {\n p = ps[i];\n if (m = e.match(p)) {\n this.matcher.push(typeof c[i] == 'function' ? c[i](m) :\n \t new Template(c[i]).evaluate(m));\n e = e.replace(m[0], '');\n break;\n }\n }\n }\n\n this.matcher.push(\"return h.unique(n);\\n}\");\n eval(this.matcher.join('\\n'));\n Selector._cache[this.expression] = this.matcher;\n },\n\n compileXPathMatcher: function() {\n var e = this.expression, ps = Selector.patterns,\n x = Selector.xpath, le, m;\n\n if (Selector._cache[e]) {\n this.xpath = Selector._cache[e]; return;\n }\n\n this.matcher = ['.//*'];\n while (e && le != e && (/\\S/).test(e)) {\n le = e;\n for (var i in ps) {\n if (m = e.match(ps[i])) {\n this.matcher.push(typeof x[i] == 'function' ? x[i](m) :\n new Template(x[i]).evaluate(m));\n e = e.replace(m[0], '');\n break;\n }\n }\n }\n\n this.xpath = this.matcher.join('');\n Selector._cache[this.expression] = this.xpath;\n },\n\n findElements: function(root) {\n root = root || document;\n if (this.xpath) return document._getElementsByXPath(this.xpath, root);\n return this.matcher(root);\n },\n\n match: function(element) {\n return this.findElements(document).include(element);\n },\n\n toString: function() {\n return this.expression;\n },\n\n inspect: function() {\n return \"#\";\n }\n};\n\nObject.extend(Selector, {\n _cache: {},\n\n xpath: {\n descendant: \"//*\",\n child: \"/*\",\n adjacent: \"/following-sibling::*[1]\",\n laterSibling: '/following-sibling::*',\n tagName: function(m) {\n if (m[1] == '*') return '';\n return \"[local-name()='\" + m[1].toLowerCase() +\n \"' or local-name()='\" + m[1].toUpperCase() + \"']\";\n },\n className: \"[contains(concat(' ', @class, ' '), ' #{1} ')]\",\n id: \"[@id='#{1}']\",\n attrPresence: \"[@#{1}]\",\n attr: function(m) {\n m[3] = m[5] || m[6];\n return new Template(Selector.xpath.operators[m[2]]).evaluate(m);\n },\n pseudo: function(m) {\n var h = Selector.xpath.pseudos[m[1]];\n if (!h) return '';\n if (typeof h === 'function') return h(m);\n return new Template(Selector.xpath.pseudos[m[1]]).evaluate(m);\n },\n operators: {\n '=': \"[@#{1}='#{3}']\",\n '!=': \"[@#{1}!='#{3}']\",\n '^=': \"[starts-with(@#{1}, '#{3}')]\",\n '$=': \"[substring(@#{1}, (string-length(@#{1}) - string-length('#{3}') + 1))='#{3}']\",\n '*=': \"[contains(@#{1}, '#{3}')]\",\n '~=': \"[contains(concat(' ', @#{1}, ' '), ' #{3} ')]\",\n '|=': \"[contains(concat('-', @#{1}, '-'), '-#{3}-')]\"\n },\n pseudos: {\n 'first-child': '[not(preceding-sibling::*)]',\n 'last-child': '[not(following-sibling::*)]',\n 'only-child': '[not(preceding-sibling::* or following-sibling::*)]',\n 'empty': \"[count(*) = 0 and (count(text()) = 0 or translate(text(), ' \\t\\r\\n', '') = '')]\",\n 'checked': \"[@checked]\",\n 'disabled': \"[@disabled]\",\n 'enabled': \"[not(@disabled)]\",\n 'not': function(m) {\n var e = m[6], p = Selector.patterns,\n x = Selector.xpath, le, m, v;\n\n var exclusion = [];\n while (e && le != e && (/\\S/).test(e)) {\n le = e;\n for (var i in p) {\n if (m = e.match(p[i])) {\n v = typeof x[i] == 'function' ? x[i](m) : new Template(x[i]).evaluate(m);\n exclusion.push(\"(\" + v.substring(1, v.length - 1) + \")\");\n e = e.replace(m[0], '');\n break;\n }\n }\n }\n return \"[not(\" + exclusion.join(\" and \") + \")]\";\n },\n 'nth-child': function(m) {\n return Selector.xpath.pseudos.nth(\"(count(./preceding-sibling::*) + 1) \", m);\n },\n 'nth-last-child': function(m) {\n return Selector.xpath.pseudos.nth(\"(count(./following-sibling::*) + 1) \", m);\n },\n 'nth-of-type': function(m) {\n return Selector.xpath.pseudos.nth(\"position() \", m);\n },\n 'nth-last-of-type': function(m) {\n return Selector.xpath.pseudos.nth(\"(last() + 1 - position()) \", m);\n },\n 'first-of-type': function(m) {\n m[6] = \"1\"; return Selector.xpath.pseudos['nth-of-type'](m);\n },\n 'last-of-type': function(m) {\n m[6] = \"1\"; return Selector.xpath.pseudos['nth-last-of-type'](m);\n },\n 'only-of-type': function(m) {\n var p = Selector.xpath.pseudos; return p['first-of-type'](m) + p['last-of-type'](m);\n },\n nth: function(fragment, m) {\n var mm, formula = m[6], predicate;\n if (formula == 'even') formula = '2n+0';\n if (formula == 'odd') formula = '2n+1';\n if (mm = formula.match(/^(\\d+)$/)) // digit only\n return '[' + fragment + \"= \" + mm[1] + ']';\n if (mm = formula.match(/^(-?\\d*)?n(([+-])(\\d+))?/)) { // an+b\n if (mm[1] == \"-\") mm[1] = -1;\n var a = mm[1] ? Number(mm[1]) : 1;\n var b = mm[2] ? Number(mm[2]) : 0;\n predicate = \"[((#{fragment} - #{b}) mod #{a} = 0) and \" +\n \"((#{fragment} - #{b}) div #{a} >= 0)]\";\n return new Template(predicate).evaluate({\n fragment: fragment, a: a, b: b });\n }\n }\n }\n },\n\n criteria: {\n tagName: 'n = h.tagName(n, r, \"#{1}\", c); c = false;',\n className: 'n = h.className(n, r, \"#{1}\", c); c = false;',\n id: 'n = h.id(n, r, \"#{1}\", c); c = false;',\n attrPresence: 'n = h.attrPresence(n, r, \"#{1}\"); c = false;',\n attr: function(m) {\n m[3] = (m[5] || m[6]);\n return new Template('n = h.attr(n, r, \"#{1}\", \"#{3}\", \"#{2}\"); c = false;').evaluate(m);\n },\n pseudo: function(m) {\n if (m[6]) m[6] = m[6].replace(/\"/g, '\\\\\"');\n return new Template('n = h.pseudo(n, \"#{1}\", \"#{6}\", r, c); c = false;').evaluate(m);\n },\n descendant: 'c = \"descendant\";',\n child: 'c = \"child\";',\n adjacent: 'c = \"adjacent\";',\n laterSibling: 'c = \"laterSibling\";'\n },\n\n patterns: {\n // combinators must be listed first\n // (and descendant needs to be last combinator)\n laterSibling: /^\\s*~\\s*/,\n child: /^\\s*>\\s*/,\n adjacent: /^\\s*\\+\\s*/,\n descendant: /^\\s/,\n\n // selectors follow\n tagName: /^\\s*(\\*|[\\w\\-]+)(\\b|$)?/,\n id: /^#([\\w\\-\\*]+)(\\b|$)/,\n className: /^\\.([\\w\\-\\*]+)(\\b|$)/,\n pseudo: /^:((first|last|nth|nth-last|only)(-child|-of-type)|empty|checked|(en|dis)abled|not)(\\((.*?)\\))?(\\b|$|\\s|(?=:))/,\n attrPresence: /^\\[([\\w]+)\\]/,\n attr: /\\[((?:[\\w-]*:)?[\\w-]+)\\s*(?:([!^$*~|]?=)\\s*((['\"])([^\\]]*?)\\4|([^'\"][^\\]]*?)))?\\]/\n },\n\n handlers: {\n // UTILITY FUNCTIONS\n // joins two collections\n concat: function(a, b) {\n for (var i = 0, node; node = b[i]; i++)\n a.push(node);\n return a;\n },\n\n // marks an array of nodes for counting\n mark: function(nodes) {\n for (var i = 0, node; node = nodes[i]; i++)\n node._counted = true;\n return nodes;\n },\n\n unmark: function(nodes) {\n for (var i = 0, node; node = nodes[i]; i++)\n node._counted = undefined;\n return nodes;\n },\n\n // mark each child node with its position (for nth calls)\n // \"ofType\" flag indicates whether we're indexing for nth-of-type\n // rather than nth-child\n index: function(parentNode, reverse, ofType) {\n parentNode._counted = true;\n if (reverse) {\n for (var nodes = parentNode.childNodes, i = nodes.length - 1, j = 1; i >= 0; i--) {\n node = nodes[i];\n if (node.nodeType == 1 && (!ofType || node._counted)) node.nodeIndex = j++;\n }\n } else {\n for (var i = 0, j = 1, nodes = parentNode.childNodes; node = nodes[i]; i++)\n if (node.nodeType == 1 && (!ofType || node._counted)) node.nodeIndex = j++;\n }\n },\n\n // filters out duplicates and extends all nodes\n unique: function(nodes) {\n if (nodes.length == 0) return nodes;\n var results = [], n;\n for (var i = 0, l = nodes.length; i < l; i++)\n if (!(n = nodes[i])._counted) {\n n._counted = true;\n results.push(Element.extend(n));\n }\n return Selector.handlers.unmark(results);\n },\n\n // COMBINATOR FUNCTIONS\n descendant: function(nodes) {\n var h = Selector.handlers;\n for (var i = 0, results = [], node; node = nodes[i]; i++)\n h.concat(results, node.getElementsByTagName('*'));\n return results;\n },\n\n child: function(nodes) {\n var h = Selector.handlers;\n for (var i = 0, results = [], node; node = nodes[i]; i++) {\n for (var j = 0, children = [], child; child = node.childNodes[j]; j++)\n if (child.nodeType == 1 && child.tagName != '!') results.push(child);\n }\n return results;\n },\n\n adjacent: function(nodes) {\n for (var i = 0, results = [], node; node = nodes[i]; i++) {\n var next = this.nextElementSibling(node);\n if (next) results.push(next);\n }\n return results;\n },\n\n laterSibling: function(nodes) {\n var h = Selector.handlers;\n for (var i = 0, results = [], node; node = nodes[i]; i++)\n h.concat(results, Element.nextSiblings(node));\n return results;\n },\n\n nextElementSibling: function(node) {\n while (node = node.nextSibling)\n\t if (node.nodeType == 1) return node;\n return null;\n },\n\n previousElementSibling: function(node) {\n while (node = node.previousSibling)\n if (node.nodeType == 1) return node;\n return null;\n },\n\n // TOKEN FUNCTIONS\n tagName: function(nodes, root, tagName, combinator) {\n tagName = tagName.toUpperCase();\n var results = [], h = Selector.handlers;\n if (nodes) {\n if (combinator) {\n // fastlane for ordinary descendant combinators\n if (combinator == \"descendant\") {\n for (var i = 0, node; node = nodes[i]; i++)\n h.concat(results, node.getElementsByTagName(tagName));\n return results;\n } else nodes = this[combinator](nodes);\n if (tagName == \"*\") return nodes;\n }\n for (var i = 0, node; node = nodes[i]; i++)\n if (node.tagName.toUpperCase() == tagName) results.push(node);\n return results;\n } else return root.getElementsByTagName(tagName);\n },\n\n id: function(nodes, root, id, combinator) {\n var targetNode = $(id), h = Selector.handlers;\n if (!nodes && root == document) return targetNode ? [targetNode] : [];\n if (nodes) {\n if (combinator) {\n if (combinator == 'child') {\n for (var i = 0, node; node = nodes[i]; i++)\n if (targetNode.parentNode == node) return [targetNode];\n } else if (combinator == 'descendant') {\n for (var i = 0, node; node = nodes[i]; i++)\n if (Element.descendantOf(targetNode, node)) return [targetNode];\n } else if (combinator == 'adjacent') {\n for (var i = 0, node; node = nodes[i]; i++)\n if (Selector.handlers.previousElementSibling(targetNode) == node)\n return [targetNode];\n } else nodes = h[combinator](nodes);\n }\n for (var i = 0, node; node = nodes[i]; i++)\n if (node == targetNode) return [targetNode];\n return [];\n }\n return (targetNode && Element.descendantOf(targetNode, root)) ? [targetNode] : [];\n },\n\n className: function(nodes, root, className, combinator) {\n if (nodes && combinator) nodes = this[combinator](nodes);\n return Selector.handlers.byClassName(nodes, root, className);\n },\n\n byClassName: function(nodes, root, className) {\n if (!nodes) nodes = Selector.handlers.descendant([root]);\n var needle = ' ' + className + ' ';\n for (var i = 0, results = [], node, nodeClassName; node = nodes[i]; i++) {\n nodeClassName = node.className;\n if (nodeClassName.length == 0) continue;\n if (nodeClassName == className || (' ' + nodeClassName + ' ').include(needle))\n results.push(node);\n }\n return results;\n },\n\n attrPresence: function(nodes, root, attr) {\n var results = [];\n for (var i = 0, node; node = nodes[i]; i++)\n if (Element.hasAttribute(node, attr)) results.push(node);\n return results;\n },\n\n attr: function(nodes, root, attr, value, operator) {\n if (!nodes) nodes = root.getElementsByTagName(\"*\");\n var handler = Selector.operators[operator], results = [];\n for (var i = 0, node; node = nodes[i]; i++) {\n var nodeValue = Element.readAttribute(node, attr);\n if (nodeValue === null) continue;\n if (handler(nodeValue, value)) results.push(node);\n }\n return results;\n },\n\n pseudo: function(nodes, name, value, root, combinator) {\n if (nodes && combinator) nodes = this[combinator](nodes);\n if (!nodes) nodes = root.getElementsByTagName(\"*\");\n return Selector.pseudos[name](nodes, value, root);\n }\n },\n\n pseudos: {\n 'first-child': function(nodes, value, root) {\n for (var i = 0, results = [], node; node = nodes[i]; i++) {\n if (Selector.handlers.previousElementSibling(node)) continue;\n results.push(node);\n }\n return results;\n },\n 'last-child': function(nodes, value, root) {\n for (var i = 0, results = [], node; node = nodes[i]; i++) {\n if (Selector.handlers.nextElementSibling(node)) continue;\n results.push(node);\n }\n return results;\n },\n 'only-child': function(nodes, value, root) {\n var h = Selector.handlers;\n for (var i = 0, results = [], node; node = nodes[i]; i++)\n if (!h.previousElementSibling(node) && !h.nextElementSibling(node))\n results.push(node);\n return results;\n },\n 'nth-child': function(nodes, formula, root) {\n return Selector.pseudos.nth(nodes, formula, root);\n },\n 'nth-last-child': function(nodes, formula, root) {\n return Selector.pseudos.nth(nodes, formula, root, true);\n },\n 'nth-of-type': function(nodes, formula, root) {\n return Selector.pseudos.nth(nodes, formula, root, false, true);\n },\n 'nth-last-of-type': function(nodes, formula, root) {\n return Selector.pseudos.nth(nodes, formula, root, true, true);\n },\n 'first-of-type': function(nodes, formula, root) {\n return Selector.pseudos.nth(nodes, \"1\", root, false, true);\n },\n 'last-of-type': function(nodes, formula, root) {\n return Selector.pseudos.nth(nodes, \"1\", root, true, true);\n },\n 'only-of-type': function(nodes, formula, root) {\n var p = Selector.pseudos;\n return p['last-of-type'](p['first-of-type'](nodes, formula, root), formula, root);\n },\n\n // handles the an+b logic\n getIndices: function(a, b, total) {\n if (a == 0) return b > 0 ? [b] : [];\n return $R(1, total).inject([], function(memo, i) {\n if (0 == (i - b) % a && (i - b) / a >= 0) memo.push(i);\n return memo;\n });\n },\n\n // handles nth(-last)-child, nth(-last)-of-type, and (first|last)-of-type\n nth: function(nodes, formula, root, reverse, ofType) {\n if (nodes.length == 0) return [];\n if (formula == 'even') formula = '2n+0';\n if (formula == 'odd') formula = '2n+1';\n var h = Selector.handlers, results = [], indexed = [], m;\n h.mark(nodes);\n for (var i = 0, node; node = nodes[i]; i++) {\n if (!node.parentNode._counted) {\n h.index(node.parentNode, reverse, ofType);\n indexed.push(node.parentNode);\n }\n }\n if (formula.match(/^\\d+$/)) { // just a number\n formula = Number(formula);\n for (var i = 0, node; node = nodes[i]; i++)\n if (node.nodeIndex == formula) results.push(node);\n } else if (m = formula.match(/^(-?\\d*)?n(([+-])(\\d+))?/)) { // an+b\n if (m[1] == \"-\") m[1] = -1;\n var a = m[1] ? Number(m[1]) : 1;\n var b = m[2] ? Number(m[2]) : 0;\n var indices = Selector.pseudos.getIndices(a, b, nodes.length);\n for (var i = 0, node, l = indices.length; node = nodes[i]; i++) {\n for (var j = 0; j < l; j++)\n if (node.nodeIndex == indices[j]) results.push(node);\n }\n }\n h.unmark(nodes);\n h.unmark(indexed);\n return results;\n },\n\n 'empty': function(nodes, value, root) {\n for (var i = 0, results = [], node; node = nodes[i]; i++) {\n // IE treats comments as element nodes\n if (node.tagName == '!' || (node.firstChild && !node.innerHTML.match(/^\\s*$/))) continue;\n results.push(node);\n }\n return results;\n },\n\n 'not': function(nodes, selector, root) {\n var h = Selector.handlers, selectorType, m;\n var exclusions = new Selector(selector).findElements(root);\n h.mark(exclusions);\n for (var i = 0, results = [], node; node = nodes[i]; i++)\n if (!node._counted) results.push(node);\n h.unmark(exclusions);\n return results;\n },\n\n 'enabled': function(nodes, value, root) {\n for (var i = 0, results = [], node; node = nodes[i]; i++)\n if (!node.disabled) results.push(node);\n return results;\n },\n\n 'disabled': function(nodes, value, root) {\n for (var i = 0, results = [], node; node = nodes[i]; i++)\n if (node.disabled) results.push(node);\n return results;\n },\n\n 'checked': function(nodes, value, root) {\n for (var i = 0, results = [], node; node = nodes[i]; i++)\n if (node.checked) results.push(node);\n return results;\n }\n },\n\n operators: {\n '=': function(nv, v) { return nv == v; },\n '!=': function(nv, v) { return nv != v; },\n '^=': function(nv, v) { return nv.startsWith(v); },\n '$=': function(nv, v) { return nv.endsWith(v); },\n '*=': function(nv, v) { return nv.include(v); },\n '~=': function(nv, v) { return (' ' + nv + ' ').include(' ' + v + ' '); },\n '|=': function(nv, v) { return ('-' + nv.toUpperCase() + '-').include('-' + v.toUpperCase() + '-'); }\n },\n\n matchElements: function(elements, expression) {\n var matches = new Selector(expression).findElements(), h = Selector.handlers;\n h.mark(matches);\n for (var i = 0, results = [], element; element = elements[i]; i++)\n if (element._counted) results.push(element);\n h.unmark(matches);\n return results;\n },\n\n findElement: function(elements, expression, index) {\n if (typeof expression == 'number') {\n index = expression; expression = false;\n }\n return Selector.matchElements(elements, expression || '*')[index || 0];\n },\n\n findChildElements: function(element, expressions) {\n var exprs = expressions.join(','), expressions = [];\n exprs.scan(/(([\\w#:.~>+()\\s-]+|\\*|\\[.*?\\])+)\\s*(,|$)/, function(m) {\n expressions.push(m[1].strip());\n });\n var results = [], h = Selector.handlers;\n for (var i = 0, l = expressions.length, selector; i < l; i++) {\n selector = new Selector(expressions[i].strip());\n h.concat(results, selector.findElements(element));\n }\n return (l > 1) ? h.unique(results) : results;\n }\n});\n\nfunction $$() {\n return Selector.findChildElements(document, $A(arguments));\n}\nvar Form = {\n reset: function(form) {\n $(form).reset();\n return form;\n },\n\n serializeElements: function(elements, getHash) {\n var data = elements.inject({}, function(result, element) {\n if (!element.disabled && element.name) {\n var key = element.name, value = $(element).getValue();\n if (value != null) {\n \tif (key in result) {\n if (result[key].constructor != Array) result[key] = [result[key]];\n result[key].push(value);\n }\n else result[key] = value;\n }\n }\n return result;\n });\n\n return getHash ? data : Hash.toQueryString(data);\n }\n};\n\nForm.Methods = {\n serialize: function(form, getHash) {\n return Form.serializeElements(Form.getElements(form), getHash);\n },\n\n getElements: function(form) {\n return $A($(form).getElementsByTagName('*')).inject([],\n function(elements, child) {\n if (Form.Element.Serializers[child.tagName.toLowerCase()])\n elements.push(Element.extend(child));\n return elements;\n }\n );\n },\n\n getInputs: function(form, typeName, name) {\n form = $(form);\n var inputs = form.getElementsByTagName('input');\n\n if (!typeName && !name) return $A(inputs).map(Element.extend);\n\n for (var i = 0, matchingInputs = [], length = inputs.length; i < length; i++) {\n var input = inputs[i];\n if ((typeName && input.type != typeName) || (name && input.name != name))\n continue;\n matchingInputs.push(Element.extend(input));\n }\n\n return matchingInputs;\n },\n\n disable: function(form) {\n form = $(form);\n Form.getElements(form).invoke('disable');\n return form;\n },\n\n enable: function(form) {\n form = $(form);\n Form.getElements(form).invoke('enable');\n return form;\n },\n\n findFirstElement: function(form) {\n return $(form).getElements().find(function(element) {\n return element.type != 'hidden' && !element.disabled &&\n ['input', 'select', 'textarea'].include(element.tagName.toLowerCase());\n });\n },\n\n focusFirstElement: function(form) {\n form = $(form);\n form.findFirstElement().activate();\n return form;\n },\n\n request: function(form, options) {\n form = $(form), options = Object.clone(options || {});\n\n var params = options.parameters;\n options.parameters = form.serialize(true);\n\n if (params) {\n if (typeof params == 'string') params = params.toQueryParams();\n Object.extend(options.parameters, params);\n }\n\n if (form.hasAttribute('method') && !options.method)\n options.method = form.method;\n\n return new Ajax.Request(form.readAttribute('action'), options);\n }\n}\n\n/*--------------------------------------------------------------------------*/\n\nForm.Element = {\n focus: function(element) {\n $(element).focus();\n return element;\n },\n\n select: function(element) {\n $(element).select();\n return element;\n }\n}\n\nForm.Element.Methods = {\n serialize: function(element) {\n element = $(element);\n if (!element.disabled && element.name) {\n var value = element.getValue();\n if (value != undefined) {\n var pair = {};\n pair[element.name] = value;\n return Hash.toQueryString(pair);\n }\n }\n return '';\n },\n\n getValue: function(element) {\n element = $(element);\n var method = element.tagName.toLowerCase();\n return Form.Element.Serializers[method](element);\n },\n\n clear: function(element) {\n $(element).value = '';\n return element;\n },\n\n present: function(element) {\n return $(element).value != '';\n },\n\n activate: function(element) {\n element = $(element);\n try {\n element.focus();\n if (element.select && (element.tagName.toLowerCase() != 'input' ||\n !['button', 'reset', 'submit'].include(element.type)))\n element.select();\n } catch (e) {}\n return element;\n },\n\n disable: function(element) {\n element = $(element);\n element.blur();\n element.disabled = true;\n return element;\n },\n\n enable: function(element) {\n element = $(element);\n element.disabled = false;\n return element;\n }\n}\n\n/*--------------------------------------------------------------------------*/\n\nvar Field = Form.Element;\nvar $F = Form.Element.Methods.getValue;\n\n/*--------------------------------------------------------------------------*/\n\nForm.Element.Serializers = {\n input: function(element) {\n switch (element.type.toLowerCase()) {\n case 'checkbox':\n case 'radio':\n return Form.Element.Serializers.inputSelector(element);\n default:\n return Form.Element.Serializers.textarea(element);\n }\n },\n\n inputSelector: function(element) {\n return element.checked ? element.value : null;\n },\n\n textarea: function(element) {\n return element.value;\n },\n\n select: function(element) {\n return this[element.type == 'select-one' ?\n 'selectOne' : 'selectMany'](element);\n },\n\n selectOne: function(element) {\n var index = element.selectedIndex;\n return index >= 0 ? this.optionValue(element.options[index]) : null;\n },\n\n selectMany: function(element) {\n var values, length = element.length;\n if (!length) return null;\n\n for (var i = 0, values = []; i < length; i++) {\n var opt = element.options[i];\n if (opt.selected) values.push(this.optionValue(opt));\n }\n return values;\n },\n\n optionValue: function(opt) {\n // extend element because hasAttribute may not be native\n return Element.extend(opt).hasAttribute('value') ? opt.value : opt.text;\n }\n}\n\n/*--------------------------------------------------------------------------*/\n\nAbstract.TimedObserver = function() {}\nAbstract.TimedObserver.prototype = {\n initialize: function(element, frequency, callback) {\n this.frequency = frequency;\n this.element = $(element);\n this.callback = callback;\n\n this.lastValue = this.getValue();\n this.registerCallback();\n },\n\n registerCallback: function() {\n setInterval(this.onTimerEvent.bind(this), this.frequency * 1000);\n },\n\n onTimerEvent: function() {\n var value = this.getValue();\n var changed = ('string' == typeof this.lastValue && 'string' == typeof value\n ? this.lastValue != value : String(this.lastValue) != String(value));\n if (changed) {\n this.callback(this.element, value);\n this.lastValue = value;\n }\n }\n}\n\nForm.Element.Observer = Class.create();\nForm.Element.Observer.prototype = Object.extend(new Abstract.TimedObserver(), {\n getValue: function() {\n return Form.Element.getValue(this.element);\n }\n});\n\nForm.Observer = Class.create();\nForm.Observer.prototype = Object.extend(new Abstract.TimedObserver(), {\n getValue: function() {\n return Form.serialize(this.element);\n }\n});\n\n/*--------------------------------------------------------------------------*/\n\nAbstract.EventObserver = function() {}\nAbstract.EventObserver.prototype = {\n initialize: function(element, callback) {\n this.element = $(element);\n this.callback = callback;\n\n this.lastValue = this.getValue();\n if (this.element.tagName.toLowerCase() == 'form')\n this.registerFormCallbacks();\n else\n this.registerCallback(this.element);\n },\n\n onElementEvent: function() {\n var value = this.getValue();\n if (this.lastValue != value) {\n this.callback(this.element, value);\n this.lastValue = value;\n }\n },\n\n registerFormCallbacks: function() {\n Form.getElements(this.element).each(this.registerCallback.bind(this));\n },\n\n registerCallback: function(element) {\n if (element.type) {\n switch (element.type.toLowerCase()) {\n case 'checkbox':\n case 'radio':\n Event.observe(element, 'click', this.onElementEvent.bind(this));\n break;\n default:\n Event.observe(element, 'change', this.onElementEvent.bind(this));\n break;\n }\n }\n }\n}\n\nForm.Element.EventObserver = Class.create();\nForm.Element.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), {\n getValue: function() {\n return Form.Element.getValue(this.element);\n }\n});\n\nForm.EventObserver = Class.create();\nForm.EventObserver.prototype = Object.extend(new Abstract.EventObserver(), {\n getValue: function() {\n return Form.serialize(this.element);\n }\n});\nif (!window.Event) {\n var Event = new Object();\n}\n\nObject.extend(Event, {\n KEY_BACKSPACE: 8,\n KEY_TAB: 9,\n KEY_RETURN: 13,\n KEY_ESC: 27,\n KEY_LEFT: 37,\n KEY_UP: 38,\n KEY_RIGHT: 39,\n KEY_DOWN: 40,\n KEY_DELETE: 46,\n KEY_HOME: 36,\n KEY_END: 35,\n KEY_PAGEUP: 33,\n KEY_PAGEDOWN: 34,\n\n element: function(event) {\n return $(event.target || event.srcElement);\n },\n\n isLeftClick: function(event) {\n return (((event.which) && (event.which == 1)) ||\n ((event.button) && (event.button == 1)));\n },\n\n pointerX: function(event) {\n return event.pageX || (event.clientX +\n (document.documentElement.scrollLeft || document.body.scrollLeft));\n },\n\n pointerY: function(event) {\n return event.pageY || (event.clientY +\n (document.documentElement.scrollTop || document.body.scrollTop));\n },\n\n stop: function(event) {\n if (event.preventDefault) {\n event.preventDefault();\n event.stopPropagation();\n } else {\n event.returnValue = false;\n event.cancelBubble = true;\n }\n },\n\n // find the first node with the given tagName, starting from the\n // node the event was triggered on; traverses the DOM upwards\n findElement: function(event, tagName) {\n var element = Event.element(event);\n while (element.parentNode && (!element.tagName ||\n (element.tagName.toUpperCase() != tagName.toUpperCase())))\n element = element.parentNode;\n return element;\n },\n\n observers: false,\n\n _observeAndCache: function(element, name, observer, useCapture) {\n if (!this.observers) this.observers = [];\n if (element.addEventListener) {\n this.observers.push([element, name, observer, useCapture]);\n element.addEventListener(name, observer, useCapture);\n } else if (element.attachEvent) {\n this.observers.push([element, name, observer, useCapture]);\n element.attachEvent('on' + name, observer);\n }\n },\n\n unloadCache: function() {\n if (!Event.observers) return;\n for (var i = 0, length = Event.observers.length; i < length; i++) {\n Event.stopObserving.apply(this, Event.observers[i]);\n Event.observers[i][0] = null;\n }\n Event.observers = false;\n },\n\n observe: function(element, name, observer, useCapture) {\n element = $(element);\n useCapture = useCapture || false;\n\n if (name == 'keypress' &&\n (Prototype.Browser.WebKit || element.attachEvent))\n name = 'keydown';\n\n Event._observeAndCache(element, name, observer, useCapture);\n },\n\n stopObserving: function(element, name, observer, useCapture) {\n element = $(element);\n useCapture = useCapture || false;\n\n if (name == 'keypress' &&\n (Prototype.Browser.WebKit || element.attachEvent))\n name = 'keydown';\n\n if (element.removeEventListener) {\n element.removeEventListener(name, observer, useCapture);\n } else if (element.detachEvent) {\n try {\n element.detachEvent('on' + name, observer);\n } catch (e) {}\n }\n }\n});\n\n/* prevent memory leaks in IE */\nif (Prototype.Browser.IE)\n Event.observe(window, 'unload', Event.unloadCache, false);\nvar Position = {\n // set to true if needed, warning: firefox performance problems\n // NOT neeeded for page scrolling, only if draggable contained in\n // scrollable elements\n includeScrollOffsets: false,\n\n // must be called before calling withinIncludingScrolloffset, every time the\n // page is scrolled\n prepare: function() {\n this.deltaX = window.pageXOffset\n || document.documentElement.scrollLeft\n || document.body.scrollLeft\n || 0;\n this.deltaY = window.pageYOffset\n || document.documentElement.scrollTop\n || document.body.scrollTop\n || 0;\n },\n\n realOffset: function(element) {\n var valueT = 0, valueL = 0;\n do {\n valueT += element.scrollTop || 0;\n valueL += element.scrollLeft || 0;\n element = element.parentNode;\n } while (element);\n return [valueL, valueT];\n },\n\n cumulativeOffset: function(element) {\n var valueT = 0, valueL = 0;\n do {\n valueT += element.offsetTop || 0;\n valueL += element.offsetLeft || 0;\n element = element.offsetParent;\n } while (element);\n return [valueL, valueT];\n },\n\n positionedOffset: function(element) {\n var valueT = 0, valueL = 0;\n do {\n valueT += element.offsetTop || 0;\n valueL += element.offsetLeft || 0;\n element = element.offsetParent;\n if (element) {\n if(element.tagName=='BODY') break;\n var p = Element.getStyle(element, 'position');\n if (p == 'relative' || p == 'absolute') break;\n }\n } while (element);\n return [valueL, valueT];\n },\n\n offsetParent: function(element) {\n if (element.offsetParent) return element.offsetParent;\n if (element == document.body) return element;\n\n while ((element = element.parentNode) && element != document.body)\n if (Element.getStyle(element, 'position') != 'static')\n return element;\n\n return document.body;\n },\n\n // caches x/y coordinate pair to use with overlap\n within: function(element, x, y) {\n if (this.includeScrollOffsets)\n return this.withinIncludingScrolloffsets(element, x, y);\n this.xcomp = x;\n this.ycomp = y;\n this.offset = this.cumulativeOffset(element);\n\n return (y >= this.offset[1] &&\n y < this.offset[1] + element.offsetHeight &&\n x >= this.offset[0] &&\n x < this.offset[0] + element.offsetWidth);\n },\n\n withinIncludingScrolloffsets: function(element, x, y) {\n var offsetcache = this.realOffset(element);\n\n this.xcomp = x + offsetcache[0] - this.deltaX;\n this.ycomp = y + offsetcache[1] - this.deltaY;\n this.offset = this.cumulativeOffset(element);\n\n return (this.ycomp >= this.offset[1] &&\n this.ycomp < this.offset[1] + element.offsetHeight &&\n this.xcomp >= this.offset[0] &&\n this.xcomp < this.offset[0] + element.offsetWidth);\n },\n\n // within must be called directly before\n overlap: function(mode, element) {\n if (!mode) return 0;\n if (mode == 'vertical')\n return ((this.offset[1] + element.offsetHeight) - this.ycomp) /\n element.offsetHeight;\n if (mode == 'horizontal')\n return ((this.offset[0] + element.offsetWidth) - this.xcomp) /\n element.offsetWidth;\n },\n\n page: function(forElement) {\n var valueT = 0, valueL = 0;\n\n var element = forElement;\n do {\n valueT += element.offsetTop || 0;\n valueL += element.offsetLeft || 0;\n\n // Safari fix\n if (element.offsetParent == document.body)\n if (Element.getStyle(element,'position')=='absolute') break;\n\n } while (element = element.offsetParent);\n\n element = forElement;\n do {\n if (!window.opera || element.tagName=='BODY') {\n valueT -= element.scrollTop || 0;\n valueL -= element.scrollLeft || 0;\n }\n } while (element = element.parentNode);\n\n return [valueL, valueT];\n },\n\n clone: function(source, target) {\n var options = Object.extend({\n setLeft: true,\n setTop: true,\n setWidth: true,\n setHeight: true,\n offsetTop: 0,\n offsetLeft: 0\n }, arguments[2] || {})\n\n // find page position of source\n source = $(source);\n var p = Position.page(source);\n\n // find coordinate system to use\n target = $(target);\n var delta = [0, 0];\n var parent = null;\n // delta [0,0] will do fine with position: fixed elements,\n // position:absolute needs offsetParent deltas\n if (Element.getStyle(target,'position') == 'absolute') {\n parent = Position.offsetParent(target);\n delta = Position.page(parent);\n }\n\n // correct by body offsets (fixes Safari)\n if (parent == document.body) {\n delta[0] -= document.body.offsetLeft;\n delta[1] -= document.body.offsetTop;\n }\n\n // set position\n if(options.setLeft) target.style.left = (p[0] - delta[0] + options.offsetLeft) + 'px';\n if(options.setTop) target.style.top = (p[1] - delta[1] + options.offsetTop) + 'px';\n if(options.setWidth) target.style.width = source.offsetWidth + 'px';\n if(options.setHeight) target.style.height = source.offsetHeight + 'px';\n },\n\n absolutize: function(element) {\n element = $(element);\n if (element.style.position == 'absolute') return;\n Position.prepare();\n\n var offsets = Position.positionedOffset(element);\n var top = offsets[1];\n var left = offsets[0];\n var width = element.clientWidth;\n var height = element.clientHeight;\n\n element._originalLeft = left - parseFloat(element.style.left || 0);\n element._originalTop = top - parseFloat(element.style.top || 0);\n element._originalWidth = element.style.width;\n element._originalHeight = element.style.height;\n\n element.style.position = 'absolute';\n element.style.top = top + 'px';\n element.style.left = left + 'px';\n element.style.width = width + 'px';\n element.style.height = height + 'px';\n },\n\n relativize: function(element) {\n element = $(element);\n if (element.style.position == 'relative') return;\n Position.prepare();\n\n element.style.position = 'relative';\n var top = parseFloat(element.style.top || 0) - (element._originalTop || 0);\n var left = parseFloat(element.style.left || 0) - (element._originalLeft || 0);\n\n element.style.top = top + 'px';\n element.style.left = left + 'px';\n element.style.height = element._originalHeight;\n element.style.width = element._originalWidth;\n }\n}\n\n// Safari returns margins on body which is incorrect if the child is absolutely\n// positioned. For performance reasons, redefine Position.cumulativeOffset for\n// KHTML/WebKit only.\nif (Prototype.Browser.WebKit) {\n Position.cumulativeOffset = function(element) {\n var valueT = 0, valueL = 0;\n do {\n valueT += element.offsetTop || 0;\n valueL += element.offsetLeft || 0;\n if (element.offsetParent == document.body)\n if (Element.getStyle(element, 'position') == 'absolute') break;\n\n element = element.offsetParent;\n } while (element);\n\n return [valueL, valueT];\n }\n}\n\nElement.addMethods();" + }, + "redirectURL": "", + "headersSize": 329, + "bodySize": 96311, + "_transferSize": 96640 + }, + "cache": {}, + "timings": { + "blocked": 438.928999996278, + "dns": -1, + "connect": -1, + "send": 36.55299999809404, + "wait": 19.916999997803998, + "receive": 248.54100000811735, + "ssl": -1 + }, + "connection": "138426", + "pageref": "page_3" + }, + { + "startedDateTime": "2015-09-10T17:16:15.243Z", + "time": 799.7710000054212, + "request": { + "method": "GET", + "url": "https://secure11.oscarhost.ca/kensington/js/jquery.js", + "httpVersion": "HTTP/1.1", + "headers": [ + { + "name": "Accept-Encoding", + "value": "gzip, deflate, lzma, sdch" + }, + { + "name": "Host", + "value": "secure11.oscarhost.ca" + }, + { + "name": "Accept-Language", + "value": "en-US,en;q=0.8" + }, + { + "name": "User-Agent", + "value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.155 Safari/537.36 OPR/31.0.1889.174" + }, + { + "name": "Accept", + "value": "*/*" + }, + { + "name": "Referer", + "value": "https://secure11.oscarhost.ca/kensington/demographic/demographiccontrol.jsp?demographic_no=189164&displaymode=edit&dboperation=search_detail" + }, + { + "name": "Cookie", + "value": "JSESSIONID=C89CFAAB236CC41DEBBEEDA066552DC9; _ga=GA1.2.1898936923.1439425583; oscrcpid=\"\"; oscadmid=\"\"; oscprvid=35426861898535181493410519511693164429969; RT=" + }, + { + "name": "Connection", + "value": "keep-alive" + } + ], + "queryString": [], + "cookies": [ + { + "name": "JSESSIONID", + "value": "C89CFAAB236CC41DEBBEEDA066552DC9", + "expires": null, + "httpOnly": false, + "secure": false + }, + { + "name": "_ga", + "value": "GA1.2.1898936923.1439425583", + "expires": null, + "httpOnly": false, + "secure": false + }, + { + "name": "oscrcpid", + "value": "\"\"", + "expires": null, + "httpOnly": false, + "secure": false + }, + { + "name": "oscadmid", + "value": "\"\"", + "expires": null, + "httpOnly": false, + "secure": false + }, + { + "name": "oscprvid", + "value": "35426861898535181493410519511693164429969", + "expires": null, + "httpOnly": false, + "secure": false + }, + { + "name": "RT", + "value": "", + "expires": null, + "httpOnly": false, + "secure": false + } + ], + "headersSize": 656, + "bodySize": 0 + }, + "response": { + "status": 200, + "statusText": "OK", + "httpVersion": "HTTP/1.1", + "headers": [ + { + "name": "Date", + "value": "Thu, 10 Sep 2015 17:16:16 GMT" + }, + { + "name": "Last-Modified", + "value": "Mon, 09 Mar 2015 19:32:54 GMT" + }, + { + "name": "ETag", + "value": "\"120654-1425929574000\"" + }, + { + "name": "Content-Type", + "value": "text/javascript;charset=UTF-8" + }, + { + "name": "Cache-Control", + "value": "no-store, no-cache, must-revalidate" + }, + { + "name": "Connection", + "value": "Keep-Alive" + }, + { + "name": "Accept-Ranges", + "value": "bytes" + }, + { + "name": "Keep-Alive", + "value": "timeout=15, max=100" + }, + { + "name": "Content-Length", + "value": "120654" + } + ], + "cookies": [], + "content": { + "size": 120654, + "mimeType": "text/javascript", + "compression": 0, + "text": "/*!\n * jQuery JavaScript Library v1.3.2\n * http://jquery.com/\n *\n * Copyright (c) 2009 John Resig\n * Dual licensed under the MIT and GPL licenses.\n * http://docs.jquery.com/License\n *\n * Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)\n * Revision: 6246\n */\n(function(){\n\nvar \n\t// Will speed up references to window, and allows munging its name.\n\twindow = this,\n\t// Will speed up references to undefined, and allows munging its name.\n\tundefined,\n\t// Map over jQuery in case of overwrite\n\t_jQuery = window.jQuery,\n\t// Map over the $ in case of overwrite\n\t_$ = window.$,\n\n\tjQuery = window.jQuery = window.$ = function( selector, context ) {\n\t\t// The jQuery object is actually just the init constructor 'enhanced'\n\t\treturn new jQuery.fn.init( selector, context );\n\t},\n\n\t// A simple way to check for HTML strings or ID strings\n\t// (both of which we optimize for)\n\tquickExpr = /^[^<]*(<(.|\\s)+>)[^>]*$|^#([\\w-]+)$/,\n\t// Is it a simple selector\n\tisSimple = /^.[^:#\\[\\.,]*$/;\n\njQuery.fn = jQuery.prototype = {\n\tinit: function( selector, context ) {\n\t\t// Make sure that a selection was provided\n\t\tselector = selector || document;\n\n\t\t// Handle $(DOMElement)\n\t\tif ( selector.nodeType ) {\n\t\t\tthis[0] = selector;\n\t\t\tthis.length = 1;\n\t\t\tthis.context = selector;\n\t\t\treturn this;\n\t\t}\n\t\t// Handle HTML strings\n\t\tif ( typeof selector === \"string\" ) {\n\t\t\t// Are we dealing with HTML string or an ID?\n\t\t\tvar match = quickExpr.exec( selector );\n\n\t\t\t// Verify a match, and that no context was specified for #id\n\t\t\tif ( match && (match[1] || !context) ) {\n\n\t\t\t\t// HANDLE: $(html) -> $(array)\n\t\t\t\tif ( match[1] )\n\t\t\t\t\tselector = jQuery.clean( [ match[1] ], context );\n\n\t\t\t\t// HANDLE: $(\"#id\")\n\t\t\t\telse {\n\t\t\t\t\tvar elem = document.getElementById( match[3] );\n\n\t\t\t\t\t// Handle the case where IE and Opera return items\n\t\t\t\t\t// by name instead of ID\n\t\t\t\t\tif ( elem && elem.id != match[3] )\n\t\t\t\t\t\treturn jQuery().find( selector );\n\n\t\t\t\t\t// Otherwise, we inject the element directly into the jQuery object\n\t\t\t\t\tvar ret = jQuery( elem || [] );\n\t\t\t\t\tret.context = document;\n\t\t\t\t\tret.selector = selector;\n\t\t\t\t\treturn ret;\n\t\t\t\t}\n\n\t\t\t// HANDLE: $(expr, [context])\n\t\t\t// (which is just equivalent to: $(content).find(expr)\n\t\t\t} else\n\t\t\t\treturn jQuery( context ).find( selector );\n\n\t\t// HANDLE: $(function)\n\t\t// Shortcut for document ready\n\t\t} else if ( jQuery.isFunction( selector ) )\n\t\t\treturn jQuery( document ).ready( selector );\n\n\t\t// Make sure that old selector state is passed along\n\t\tif ( selector.selector && selector.context ) {\n\t\t\tthis.selector = selector.selector;\n\t\t\tthis.context = selector.context;\n\t\t}\n\n\t\treturn this.setArray(jQuery.isArray( selector ) ?\n\t\t\tselector :\n\t\t\tjQuery.makeArray(selector));\n\t},\n\n\t// Start with an empty selector\n\tselector: \"\",\n\n\t// The current version of jQuery being used\n\tjquery: \"1.3.2\",\n\n\t// The number of elements contained in the matched element set\n\tsize: function() {\n\t\treturn this.length;\n\t},\n\n\t// Get the Nth element in the matched element set OR\n\t// Get the whole matched element set as a clean array\n\tget: function( num ) {\n\t\treturn num === undefined ?\n\n\t\t\t// Return a 'clean' array\n\t\t\tArray.prototype.slice.call( this ) :\n\n\t\t\t// Return just the object\n\t\t\tthis[ num ];\n\t},\n\n\t// Take an array of elements and push it onto the stack\n\t// (returning the new matched element set)\n\tpushStack: function( elems, name, selector ) {\n\t\t// Build a new jQuery matched element set\n\t\tvar ret = jQuery( elems );\n\n\t\t// Add the old object onto the stack (as a reference)\n\t\tret.prevObject = this;\n\n\t\tret.context = this.context;\n\n\t\tif ( name === \"find\" )\n\t\t\tret.selector = this.selector + (this.selector ? \" \" : \"\") + selector;\n\t\telse if ( name )\n\t\t\tret.selector = this.selector + \".\" + name + \"(\" + selector + \")\";\n\n\t\t// Return the newly-formed element set\n\t\treturn ret;\n\t},\n\n\t// Force the current matched set of elements to become\n\t// the specified array of elements (destroying the stack in the process)\n\t// You should use pushStack() in order to do this, but maintain the stack\n\tsetArray: function( elems ) {\n\t\t// Resetting the length to 0, then using the native Array push\n\t\t// is a super-fast way to populate an object with array-like properties\n\t\tthis.length = 0;\n\t\tArray.prototype.push.apply( this, elems );\n\n\t\treturn this;\n\t},\n\n\t// Execute a callback for every element in the matched set.\n\t// (You can seed the arguments with an array of args, but this is\n\t// only used internally.)\n\teach: function( callback, args ) {\n\t\treturn jQuery.each( this, callback, args );\n\t},\n\n\t// Determine the position of an element within\n\t// the matched set of elements\n\tindex: function( elem ) {\n\t\t// Locate the position of the desired element\n\t\treturn jQuery.inArray(\n\t\t\t// If it receives a jQuery object, the first element is used\n\t\t\telem && elem.jquery ? elem[0] : elem\n\t\t, this );\n\t},\n\n\tattr: function( name, value, type ) {\n\t\tvar options = name;\n\n\t\t// Look for the case where we're accessing a style value\n\t\tif ( typeof name === \"string\" )\n\t\t\tif ( value === undefined )\n\t\t\t\treturn this[0] && jQuery[ type || \"attr\" ]( this[0], name );\n\n\t\t\telse {\n\t\t\t\toptions = {};\n\t\t\t\toptions[ name ] = value;\n\t\t\t}\n\n\t\t// Check to see if we're setting style values\n\t\treturn this.each(function(i){\n\t\t\t// Set all the styles\n\t\t\tfor ( name in options )\n\t\t\t\tjQuery.attr(\n\t\t\t\t\ttype ?\n\t\t\t\t\t\tthis.style :\n\t\t\t\t\t\tthis,\n\t\t\t\t\tname, jQuery.prop( this, options[ name ], type, i, name )\n\t\t\t\t);\n\t\t});\n\t},\n\n\tcss: function( key, value ) {\n\t\t// ignore negative width and height values\n\t\tif ( (key == 'width' || key == 'height') && parseFloat(value) < 0 )\n\t\t\tvalue = undefined;\n\t\treturn this.attr( key, value, \"curCSS\" );\n\t},\n\n\ttext: function( text ) {\n\t\tif ( typeof text !== \"object\" && text != null )\n\t\t\treturn this.empty().append( (this[0] && this[0].ownerDocument || document).createTextNode( text ) );\n\n\t\tvar ret = \"\";\n\n\t\tjQuery.each( text || this, function(){\n\t\t\tjQuery.each( this.childNodes, function(){\n\t\t\t\tif ( this.nodeType != 8 )\n\t\t\t\t\tret += this.nodeType != 1 ?\n\t\t\t\t\t\tthis.nodeValue :\n\t\t\t\t\t\tjQuery.fn.text( [ this ] );\n\t\t\t});\n\t\t});\n\n\t\treturn ret;\n\t},\n\n\twrapAll: function( html ) {\n\t\tif ( this[0] ) {\n\t\t\t// The elements to wrap the target around\n\t\t\tvar wrap = jQuery( html, this[0].ownerDocument ).clone();\n\n\t\t\tif ( this[0].parentNode )\n\t\t\t\twrap.insertBefore( this[0] );\n\n\t\t\twrap.map(function(){\n\t\t\t\tvar elem = this;\n\n\t\t\t\twhile ( elem.firstChild )\n\t\t\t\t\telem = elem.firstChild;\n\n\t\t\t\treturn elem;\n\t\t\t}).append(this);\n\t\t}\n\n\t\treturn this;\n\t},\n\n\twrapInner: function( html ) {\n\t\treturn this.each(function(){\n\t\t\tjQuery( this ).contents().wrapAll( html );\n\t\t});\n\t},\n\n\twrap: function( html ) {\n\t\treturn this.each(function(){\n\t\t\tjQuery( this ).wrapAll( html );\n\t\t});\n\t},\n\n\tappend: function() {\n\t\treturn this.domManip(arguments, true, function(elem){\n\t\t\tif (this.nodeType == 1)\n\t\t\t\tthis.appendChild( elem );\n\t\t});\n\t},\n\n\tprepend: function() {\n\t\treturn this.domManip(arguments, true, function(elem){\n\t\t\tif (this.nodeType == 1)\n\t\t\t\tthis.insertBefore( elem, this.firstChild );\n\t\t});\n\t},\n\n\tbefore: function() {\n\t\treturn this.domManip(arguments, false, function(elem){\n\t\t\tthis.parentNode.insertBefore( elem, this );\n\t\t});\n\t},\n\n\tafter: function() {\n\t\treturn this.domManip(arguments, false, function(elem){\n\t\t\tthis.parentNode.insertBefore( elem, this.nextSibling );\n\t\t});\n\t},\n\n\tend: function() {\n\t\treturn this.prevObject || jQuery( [] );\n\t},\n\n\t// For internal use only.\n\t// Behaves like an Array's method, not like a jQuery method.\n\tpush: [].push,\n\tsort: [].sort,\n\tsplice: [].splice,\n\n\tfind: function( selector ) {\n\t\tif ( this.length === 1 ) {\n\t\t\tvar ret = this.pushStack( [], \"find\", selector );\n\t\t\tret.length = 0;\n\t\t\tjQuery.find( selector, this[0], ret );\n\t\t\treturn ret;\n\t\t} else {\n\t\t\treturn this.pushStack( jQuery.unique(jQuery.map(this, function(elem){\n\t\t\t\treturn jQuery.find( selector, elem );\n\t\t\t})), \"find\", selector );\n\t\t}\n\t},\n\n\tclone: function( events ) {\n\t\t// Do the clone\n\t\tvar ret = this.map(function(){\n\t\t\tif ( !jQuery.support.noCloneEvent && !jQuery.isXMLDoc(this) ) {\n\t\t\t\t// IE copies events bound via attachEvent when\n\t\t\t\t// using cloneNode. Calling detachEvent on the\n\t\t\t\t// clone will also remove the events from the orignal\n\t\t\t\t// In order to get around this, we use innerHTML.\n\t\t\t\t// Unfortunately, this means some modifications to\n\t\t\t\t// attributes in IE that are actually only stored\n\t\t\t\t// as properties will not be copied (such as the\n\t\t\t\t// the name attribute on an input).\n\t\t\t\tvar html = this.outerHTML;\n\t\t\t\tif ( !html ) {\n\t\t\t\t\tvar div = this.ownerDocument.createElement(\"div\");\n\t\t\t\t\tdiv.appendChild( this.cloneNode(true) );\n\t\t\t\t\thtml = div.innerHTML;\n\t\t\t\t}\n\n\t\t\t\treturn jQuery.clean([html.replace(/ jQuery\\d+=\"(?:\\d+|null)\"/g, \"\").replace(/^\\s*/, \"\")])[0];\n\t\t\t} else\n\t\t\t\treturn this.cloneNode(true);\n\t\t});\n\n\t\t// Copy the events from the original to the clone\n\t\tif ( events === true ) {\n\t\t\tvar orig = this.find(\"*\").andSelf(), i = 0;\n\n\t\t\tret.find(\"*\").andSelf().each(function(){\n\t\t\t\tif ( this.nodeName !== orig[i].nodeName )\n\t\t\t\t\treturn;\n\n\t\t\t\tvar events = jQuery.data( orig[i], \"events\" );\n\n\t\t\t\tfor ( var type in events ) {\n\t\t\t\t\tfor ( var handler in events[ type ] ) {\n\t\t\t\t\t\tjQuery.event.add( this, type, events[ type ][ handler ], events[ type ][ handler ].data );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\ti++;\n\t\t\t});\n\t\t}\n\n\t\t// Return the cloned set\n\t\treturn ret;\n\t},\n\n\tfilter: function( selector ) {\n\t\treturn this.pushStack(\n\t\t\tjQuery.isFunction( selector ) &&\n\t\t\tjQuery.grep(this, function(elem, i){\n\t\t\t\treturn selector.call( elem, i );\n\t\t\t}) ||\n\n\t\t\tjQuery.multiFilter( selector, jQuery.grep(this, function(elem){\n\t\t\t\treturn elem.nodeType === 1;\n\t\t\t}) ), \"filter\", selector );\n\t},\n\n\tclosest: function( selector ) {\n\t\tvar pos = jQuery.expr.match.POS.test( selector ) ? jQuery(selector) : null,\n\t\t\tcloser = 0;\n\n\t\treturn this.map(function(){\n\t\t\tvar cur = this;\n\t\t\twhile ( cur && cur.ownerDocument ) {\n\t\t\t\tif ( pos ? pos.index(cur) > -1 : jQuery(cur).is(selector) ) {\n\t\t\t\t\tjQuery.data(cur, \"closest\", closer);\n\t\t\t\t\treturn cur;\n\t\t\t\t}\n\t\t\t\tcur = cur.parentNode;\n\t\t\t\tcloser++;\n\t\t\t}\n\t\t});\n\t},\n\n\tnot: function( selector ) {\n\t\tif ( typeof selector === \"string\" )\n\t\t\t// test special case where just one selector is passed in\n\t\t\tif ( isSimple.test( selector ) )\n\t\t\t\treturn this.pushStack( jQuery.multiFilter( selector, this, true ), \"not\", selector );\n\t\t\telse\n\t\t\t\tselector = jQuery.multiFilter( selector, this );\n\n\t\tvar isArrayLike = selector.length && selector[selector.length - 1] !== undefined && !selector.nodeType;\n\t\treturn this.filter(function() {\n\t\t\treturn isArrayLike ? jQuery.inArray( this, selector ) < 0 : this != selector;\n\t\t});\n\t},\n\n\tadd: function( selector ) {\n\t\treturn this.pushStack( jQuery.unique( jQuery.merge(\n\t\t\tthis.get(),\n\t\t\ttypeof selector === \"string\" ?\n\t\t\t\tjQuery( selector ) :\n\t\t\t\tjQuery.makeArray( selector )\n\t\t)));\n\t},\n\n\tis: function( selector ) {\n\t\treturn !!selector && jQuery.multiFilter( selector, this ).length > 0;\n\t},\n\n\thasClass: function( selector ) {\n\t\treturn !!selector && this.is( \".\" + selector );\n\t},\n\n\tval: function( value ) {\n\t\tif ( value === undefined ) {\t\t\t\n\t\t\tvar elem = this[0];\n\n\t\t\tif ( elem ) {\n\t\t\t\tif( jQuery.nodeName( elem, 'option' ) )\n\t\t\t\t\treturn (elem.attributes.value || {}).specified ? elem.value : elem.text;\n\t\t\t\t\n\t\t\t\t// We need to handle select boxes special\n\t\t\t\tif ( jQuery.nodeName( elem, \"select\" ) ) {\n\t\t\t\t\tvar index = elem.selectedIndex,\n\t\t\t\t\t\tvalues = [],\n\t\t\t\t\t\toptions = elem.options,\n\t\t\t\t\t\tone = elem.type == \"select-one\";\n\n\t\t\t\t\t// Nothing was selected\n\t\t\t\t\tif ( index < 0 )\n\t\t\t\t\t\treturn null;\n\n\t\t\t\t\t// Loop through all the selected options\n\t\t\t\t\tfor ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) {\n\t\t\t\t\t\tvar option = options[ i ];\n\n\t\t\t\t\t\tif ( option.selected ) {\n\t\t\t\t\t\t\t// Get the specifc value for the option\n\t\t\t\t\t\t\tvalue = jQuery(option).val();\n\n\t\t\t\t\t\t\t// We don't need an array for one selects\n\t\t\t\t\t\t\tif ( one )\n\t\t\t\t\t\t\t\treturn value;\n\n\t\t\t\t\t\t\t// Multi-Selects return an array\n\t\t\t\t\t\t\tvalues.push( value );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn values;\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\t// Everything else, we just grab the value\n\t\t\t\treturn (elem.value || \"\").replace(/\\r/g, \"\");\n\n\t\t\t}\n\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif ( typeof value === \"number\" )\n\t\t\tvalue += '';\n\n\t\treturn this.each(function(){\n\t\t\tif ( this.nodeType != 1 )\n\t\t\t\treturn;\n\n\t\t\tif ( jQuery.isArray(value) && /radio|checkbox/.test( this.type ) )\n\t\t\t\tthis.checked = (jQuery.inArray(this.value, value) >= 0 ||\n\t\t\t\t\tjQuery.inArray(this.name, value) >= 0);\n\n\t\t\telse if ( jQuery.nodeName( this, \"select\" ) ) {\n\t\t\t\tvar values = jQuery.makeArray(value);\n\n\t\t\t\tjQuery( \"option\", this ).each(function(){\n\t\t\t\t\tthis.selected = (jQuery.inArray( this.value, values ) >= 0 ||\n\t\t\t\t\t\tjQuery.inArray( this.text, values ) >= 0);\n\t\t\t\t});\n\n\t\t\t\tif ( !values.length )\n\t\t\t\t\tthis.selectedIndex = -1;\n\n\t\t\t} else\n\t\t\t\tthis.value = value;\n\t\t});\n\t},\n\n\thtml: function( value ) {\n\t\treturn value === undefined ?\n\t\t\t(this[0] ?\n\t\t\t\tthis[0].innerHTML.replace(/ jQuery\\d+=\"(?:\\d+|null)\"/g, \"\") :\n\t\t\t\tnull) :\n\t\t\tthis.empty().append( value );\n\t},\n\n\treplaceWith: function( value ) {\n\t\treturn this.after( value ).remove();\n\t},\n\n\teq: function( i ) {\n\t\treturn this.slice( i, +i + 1 );\n\t},\n\n\tslice: function() {\n\t\treturn this.pushStack( Array.prototype.slice.apply( this, arguments ),\n\t\t\t\"slice\", Array.prototype.slice.call(arguments).join(\",\") );\n\t},\n\n\tmap: function( callback ) {\n\t\treturn this.pushStack( jQuery.map(this, function(elem, i){\n\t\t\treturn callback.call( elem, i, elem );\n\t\t}));\n\t},\n\n\tandSelf: function() {\n\t\treturn this.add( this.prevObject );\n\t},\n\n\tdomManip: function( args, table, callback ) {\n\t\tif ( this[0] ) {\n\t\t\tvar fragment = (this[0].ownerDocument || this[0]).createDocumentFragment(),\n\t\t\t\tscripts = jQuery.clean( args, (this[0].ownerDocument || this[0]), fragment ),\n\t\t\t\tfirst = fragment.firstChild;\n\n\t\t\tif ( first )\n\t\t\t\tfor ( var i = 0, l = this.length; i < l; i++ )\n\t\t\t\t\tcallback.call( root(this[i], first), this.length > 1 || i > 0 ?\n\t\t\t\t\t\t\tfragment.cloneNode(true) : fragment );\n\t\t\n\t\t\tif ( scripts )\n\t\t\t\tjQuery.each( scripts, evalScript );\n\t\t}\n\n\t\treturn this;\n\t\t\n\t\tfunction root( elem, cur ) {\n\t\t\treturn table && jQuery.nodeName(elem, \"table\") && jQuery.nodeName(cur, \"tr\") ?\n\t\t\t\t(elem.getElementsByTagName(\"tbody\")[0] ||\n\t\t\t\telem.appendChild(elem.ownerDocument.createElement(\"tbody\"))) :\n\t\t\t\telem;\n\t\t}\n\t}\n};\n\n// Give the init function the jQuery prototype for later instantiation\njQuery.fn.init.prototype = jQuery.fn;\n\nfunction evalScript( i, elem ) {\n\tif ( elem.src )\n\t\tjQuery.ajax({\n\t\t\turl: elem.src,\n\t\t\tasync: false,\n\t\t\tdataType: \"script\"\n\t\t});\n\n\telse\n\t\tjQuery.globalEval( elem.text || elem.textContent || elem.innerHTML || \"\" );\n\n\tif ( elem.parentNode )\n\t\telem.parentNode.removeChild( elem );\n}\n\nfunction now(){\n\treturn +new Date;\n}\n\njQuery.extend = jQuery.fn.extend = function() {\n\t// copy reference to target object\n\tvar target = arguments[0] || {}, i = 1, length = arguments.length, deep = false, options;\n\n\t// Handle a deep copy situation\n\tif ( typeof target === \"boolean\" ) {\n\t\tdeep = target;\n\t\ttarget = arguments[1] || {};\n\t\t// skip the boolean and the target\n\t\ti = 2;\n\t}\n\n\t// Handle case when target is a string or something (possible in deep copy)\n\tif ( typeof target !== \"object\" && !jQuery.isFunction(target) )\n\t\ttarget = {};\n\n\t// extend jQuery itself if only one argument is passed\n\tif ( length == i ) {\n\t\ttarget = this;\n\t\t--i;\n\t}\n\n\tfor ( ; i < length; i++ )\n\t\t// Only deal with non-null/undefined values\n\t\tif ( (options = arguments[ i ]) != null )\n\t\t\t// Extend the base object\n\t\t\tfor ( var name in options ) {\n\t\t\t\tvar src = target[ name ], copy = options[ name ];\n\n\t\t\t\t// Prevent never-ending loop\n\t\t\t\tif ( target === copy )\n\t\t\t\t\tcontinue;\n\n\t\t\t\t// Recurse if we're merging object values\n\t\t\t\tif ( deep && copy && typeof copy === \"object\" && !copy.nodeType )\n\t\t\t\t\ttarget[ name ] = jQuery.extend( deep, \n\t\t\t\t\t\t// Never move original objects, clone them\n\t\t\t\t\t\tsrc || ( copy.length != null ? [ ] : { } )\n\t\t\t\t\t, copy );\n\n\t\t\t\t// Don't bring in undefined values\n\t\t\t\telse if ( copy !== undefined )\n\t\t\t\t\ttarget[ name ] = copy;\n\n\t\t\t}\n\n\t// Return the modified object\n\treturn target;\n};\n\n// exclude the following css properties to add px\nvar\texclude = /z-?index|font-?weight|opacity|zoom|line-?height/i,\n\t// cache defaultView\n\tdefaultView = document.defaultView || {},\n\ttoString = Object.prototype.toString;\n\njQuery.extend({\n\tnoConflict: function( deep ) {\n\t\twindow.$ = _$;\n\n\t\tif ( deep )\n\t\t\twindow.jQuery = _jQuery;\n\n\t\treturn jQuery;\n\t},\n\n\t// See test/unit/core.js for details concerning isFunction.\n\t// Since version 1.3, DOM methods and functions like alert\n\t// aren't supported. They return false on IE (#2968).\n\tisFunction: function( obj ) {\n\t\treturn toString.call(obj) === \"[object Function]\";\n\t},\n\n\tisArray: function( obj ) {\n\t\treturn toString.call(obj) === \"[object Array]\";\n\t},\n\n\t// check if an element is in a (or is an) XML document\n\tisXMLDoc: function( elem ) {\n\t\treturn elem.nodeType === 9 && elem.documentElement.nodeName !== \"HTML\" ||\n\t\t\t!!elem.ownerDocument && jQuery.isXMLDoc( elem.ownerDocument );\n\t},\n\n\t// Evalulates a script in a global context\n\tglobalEval: function( data ) {\n\t\tif ( data && /\\S/.test(data) ) {\n\t\t\t// Inspired by code by Andrea Giammarchi\n\t\t\t// http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html\n\t\t\tvar head = document.getElementsByTagName(\"head\")[0] || document.documentElement,\n\t\t\t\tscript = document.createElement(\"script\");\n\n\t\t\tscript.type = \"text/javascript\";\n\t\t\tif ( jQuery.support.scriptEval )\n\t\t\t\tscript.appendChild( document.createTextNode( data ) );\n\t\t\telse\n\t\t\t\tscript.text = data;\n\n\t\t\t// Use insertBefore instead of appendChild to circumvent an IE6 bug.\n\t\t\t// This arises when a base node is used (#2709).\n\t\t\thead.insertBefore( script, head.firstChild );\n\t\t\thead.removeChild( script );\n\t\t}\n\t},\n\n\tnodeName: function( elem, name ) {\n\t\treturn elem.nodeName && elem.nodeName.toUpperCase() == name.toUpperCase();\n\t},\n\n\t// args is for internal usage only\n\teach: function( object, callback, args ) {\n\t\tvar name, i = 0, length = object.length;\n\n\t\tif ( args ) {\n\t\t\tif ( length === undefined ) {\n\t\t\t\tfor ( name in object )\n\t\t\t\t\tif ( callback.apply( object[ name ], args ) === false )\n\t\t\t\t\t\tbreak;\n\t\t\t} else\n\t\t\t\tfor ( ; i < length; )\n\t\t\t\t\tif ( callback.apply( object[ i++ ], args ) === false )\n\t\t\t\t\t\tbreak;\n\n\t\t// A special, fast, case for the most common use of each\n\t\t} else {\n\t\t\tif ( length === undefined ) {\n\t\t\t\tfor ( name in object )\n\t\t\t\t\tif ( callback.call( object[ name ], name, object[ name ] ) === false )\n\t\t\t\t\t\tbreak;\n\t\t\t} else\n\t\t\t\tfor ( var value = object[0];\n\t\t\t\t\ti < length && callback.call( value, i, value ) !== false; value = object[++i] ){}\n\t\t}\n\n\t\treturn object;\n\t},\n\n\tprop: function( elem, value, type, i, name ) {\n\t\t// Handle executable functions\n\t\tif ( jQuery.isFunction( value ) )\n\t\t\tvalue = value.call( elem, i );\n\n\t\t// Handle passing in a number to a CSS property\n\t\treturn typeof value === \"number\" && type == \"curCSS\" && !exclude.test( name ) ?\n\t\t\tvalue + \"px\" :\n\t\t\tvalue;\n\t},\n\n\tclassName: {\n\t\t// internal only, use addClass(\"class\")\n\t\tadd: function( elem, classNames ) {\n\t\t\tjQuery.each((classNames || \"\").split(/\\s+/), function(i, className){\n\t\t\t\tif ( elem.nodeType == 1 && !jQuery.className.has( elem.className, className ) )\n\t\t\t\t\telem.className += (elem.className ? \" \" : \"\") + className;\n\t\t\t});\n\t\t},\n\n\t\t// internal only, use removeClass(\"class\")\n\t\tremove: function( elem, classNames ) {\n\t\t\tif (elem.nodeType == 1)\n\t\t\t\telem.className = classNames !== undefined ?\n\t\t\t\t\tjQuery.grep(elem.className.split(/\\s+/), function(className){\n\t\t\t\t\t\treturn !jQuery.className.has( classNames, className );\n\t\t\t\t\t}).join(\" \") :\n\t\t\t\t\t\"\";\n\t\t},\n\n\t\t// internal only, use hasClass(\"class\")\n\t\thas: function( elem, className ) {\n\t\t\treturn elem && jQuery.inArray( className, (elem.className || elem).toString().split(/\\s+/) ) > -1;\n\t\t}\n\t},\n\n\t// A method for quickly swapping in/out CSS properties to get correct calculations\n\tswap: function( elem, options, callback ) {\n\t\tvar old = {};\n\t\t// Remember the old values, and insert the new ones\n\t\tfor ( var name in options ) {\n\t\t\told[ name ] = elem.style[ name ];\n\t\t\telem.style[ name ] = options[ name ];\n\t\t}\n\n\t\tcallback.call( elem );\n\n\t\t// Revert the old values\n\t\tfor ( var name in options )\n\t\t\telem.style[ name ] = old[ name ];\n\t},\n\n\tcss: function( elem, name, force, extra ) {\n\t\tif ( name == \"width\" || name == \"height\" ) {\n\t\t\tvar val, props = { position: \"absolute\", visibility: \"hidden\", display:\"block\" }, which = name == \"width\" ? [ \"Left\", \"Right\" ] : [ \"Top\", \"Bottom\" ];\n\n\t\t\tfunction getWH() {\n\t\t\t\tval = name == \"width\" ? elem.offsetWidth : elem.offsetHeight;\n\n\t\t\t\tif ( extra === \"border\" )\n\t\t\t\t\treturn;\n\n\t\t\t\tjQuery.each( which, function() {\n\t\t\t\t\tif ( !extra )\n\t\t\t\t\t\tval -= parseFloat(jQuery.curCSS( elem, \"padding\" + this, true)) || 0;\n\t\t\t\t\tif ( extra === \"margin\" )\n\t\t\t\t\t\tval += parseFloat(jQuery.curCSS( elem, \"margin\" + this, true)) || 0;\n\t\t\t\t\telse\n\t\t\t\t\t\tval -= parseFloat(jQuery.curCSS( elem, \"border\" + this + \"Width\", true)) || 0;\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif ( elem.offsetWidth !== 0 )\n\t\t\t\tgetWH();\n\t\t\telse\n\t\t\t\tjQuery.swap( elem, props, getWH );\n\n\t\t\treturn Math.max(0, Math.round(val));\n\t\t}\n\n\t\treturn jQuery.curCSS( elem, name, force );\n\t},\n\n\tcurCSS: function( elem, name, force ) {\n\t\tvar ret, style = elem.style;\n\n\t\t// We need to handle opacity special in IE\n\t\tif ( name == \"opacity\" && !jQuery.support.opacity ) {\n\t\t\tret = jQuery.attr( style, \"opacity\" );\n\n\t\t\treturn ret == \"\" ?\n\t\t\t\t\"1\" :\n\t\t\t\tret;\n\t\t}\n\n\t\t// Make sure we're using the right name for getting the float value\n\t\tif ( name.match( /float/i ) )\n\t\t\tname = styleFloat;\n\n\t\tif ( !force && style && style[ name ] )\n\t\t\tret = style[ name ];\n\n\t\telse if ( defaultView.getComputedStyle ) {\n\n\t\t\t// Only \"float\" is needed here\n\t\t\tif ( name.match( /float/i ) )\n\t\t\t\tname = \"float\";\n\n\t\t\tname = name.replace( /([A-Z])/g, \"-$1\" ).toLowerCase();\n\n\t\t\tvar computedStyle = defaultView.getComputedStyle( elem, null );\n\n\t\t\tif ( computedStyle )\n\t\t\t\tret = computedStyle.getPropertyValue( name );\n\n\t\t\t// We should always get a number back from opacity\n\t\t\tif ( name == \"opacity\" && ret == \"\" )\n\t\t\t\tret = \"1\";\n\n\t\t} else if ( elem.currentStyle ) {\n\t\t\tvar camelCase = name.replace(/\\-(\\w)/g, function(all, letter){\n\t\t\t\treturn letter.toUpperCase();\n\t\t\t});\n\n\t\t\tret = elem.currentStyle[ name ] || elem.currentStyle[ camelCase ];\n\n\t\t\t// From the awesome hack by Dean Edwards\n\t\t\t// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291\n\n\t\t\t// If we're not dealing with a regular pixel number\n\t\t\t// but a number that has a weird ending, we need to convert it to pixels\n\t\t\tif ( !/^\\d+(px)?$/i.test( ret ) && /^\\d/.test( ret ) ) {\n\t\t\t\t// Remember the original values\n\t\t\t\tvar left = style.left, rsLeft = elem.runtimeStyle.left;\n\n\t\t\t\t// Put in the new values to get a computed value out\n\t\t\t\telem.runtimeStyle.left = elem.currentStyle.left;\n\t\t\t\tstyle.left = ret || 0;\n\t\t\t\tret = style.pixelLeft + \"px\";\n\n\t\t\t\t// Revert the changed values\n\t\t\t\tstyle.left = left;\n\t\t\t\telem.runtimeStyle.left = rsLeft;\n\t\t\t}\n\t\t}\n\n\t\treturn ret;\n\t},\n\n\tclean: function( elems, context, fragment ) {\n\t\tcontext = context || document;\n\n\t\t// !context.createElement fails in IE with an error but returns typeof 'object'\n\t\tif ( typeof context.createElement === \"undefined\" )\n\t\t\tcontext = context.ownerDocument || context[0] && context[0].ownerDocument || document;\n\n\t\t// If a single string is passed in and it's a single tag\n\t\t// just do a createElement and skip the rest\n\t\tif ( !fragment && elems.length === 1 && typeof elems[0] === \"string\" ) {\n\t\t\tvar match = /^<(\\w+)\\s*\\/?>$/.exec(elems[0]);\n\t\t\tif ( match )\n\t\t\t\treturn [ context.createElement( match[1] ) ];\n\t\t}\n\n\t\tvar ret = [], scripts = [], div = context.createElement(\"div\");\n\n\t\tjQuery.each(elems, function(i, elem){\n\t\t\tif ( typeof elem === \"number\" )\n\t\t\t\telem += '';\n\n\t\t\tif ( !elem )\n\t\t\t\treturn;\n\n\t\t\t// Convert html string into DOM nodes\n\t\t\tif ( typeof elem === \"string\" ) {\n\t\t\t\t// Fix \"XHTML\"-style tags in all browsers\n\t\t\t\telem = elem.replace(/(<(\\w+)[^>]*?)\\/>/g, function(all, front, tag){\n\t\t\t\t\treturn tag.match(/^(abbr|br|col|img|input|link|meta|param|hr|area|embed)$/i) ?\n\t\t\t\t\t\tall :\n\t\t\t\t\t\tfront + \">\";\n\t\t\t\t});\n\n\t\t\t\t// Trim whitespace, otherwise indexOf won't work as expected\n\t\t\t\tvar tags = elem.replace(/^\\s+/, \"\").substring(0, 10).toLowerCase();\n\n\t\t\t\tvar wrap =\n\t\t\t\t\t// option or optgroup\n\t\t\t\t\t!tags.indexOf(\"\", \"\" ] ||\n\n\t\t\t\t\t!tags.indexOf(\"\", \"\" ] ||\n\n\t\t\t\t\ttags.match(/^<(thead|tbody|tfoot|colg|cap)/) &&\n\t\t\t\t\t[ 1, \"\", \"
\" ] ||\n\n\t\t\t\t\t!tags.indexOf(\"\", \"\" ] ||\n\n\t\t\t\t \t// matched above\n\t\t\t\t\t(!tags.indexOf(\"\", \"\" ] ||\n\n\t\t\t\t\t!tags.indexOf(\"\", \"\" ] ||\n\n\t\t\t\t\t// IE can't serialize and