rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
event.type = "wheel";
event.type = "mousewheel";
function wheelHandler( event ) { switch ( event.type ) { // FF2 has incorrect event positions case "mousemove": return $.extend( event.data, { // store the correct properties clientX: event.clientX, clientY: event.clientY, pageX: event.pageX, pageY: event.pageY }); // firefox case "DOMMouseScroll": $.extend( event, event.data ); // fix event properties in FF2 event.delta = -event.detail / 3; // normalize delta break; // IE, opera, safari case "mousewheel": event.delta = event.wheelDelta / 120; break; } event.type = "wheel"; // hijack the event return $.event.handle.call( this, event, event.delta ); }
var startPosition = el.getCoordinates(); var dropNew; if (room.rid == 0 && privateRoom == 0 ) { dropNew = $('chatList'); } else { dropNew = $('inputContainer'); } var dropZones = $$('.whisperBox'); var dragMan = new Element('div',{'class':'dragBox'}); dragMan.setStyles(startPosition); var dragDestroy = function() { dragMan.destroy(); $('content').setStyles(contentSize); } el.addEvent('mouseup', dragDestroy); displayUser(user,dragMan); var dragReturn = new Fx.Morph(dragMan, { link: 'cancel', duration: 500, transition: Fx.Transitions.Quad.easeOut, onComplete: function (dragged) { dragged.destroy(); $('content').setStyles(contentSize); } }); dragMan.inject(document.body); dragMan.addEvent('mouseup',dragDestroy); dropZones.include(dropNew); var drag = new Drag.Move(dragMan,{ droppables:dropZones, onSnap: function(element) { element.removeEvent('mouseup',dragDestroy); }, onDrop: function(element, droppable){ dropZones.removeClass('dragOver'); if(droppable) { if(droppable == dropNew && privateRoom == 0) { var whisperBoxes = $$('.whisperBox'); if (whisperBoxes.every(function(whisperBox,i) { var widStr = whisperBox.get('id'); var whisperers = whisperBox.getElement('.whisperList').getChildren(); if (whisperers.length == 1) { if (whisperers[0].get('id').substr(widStr.length+1).toInt() == user.uid) { this.start(whisperBox.getCoordinates()); if(activeWb) { activeWb.removeClass('wBactive'); } activeWb = whisperBox; whisperBox.addClass('wBactive'); whisperBox.getElement('.whisperInput').focus(); return false; } } return true; }, dragReturn)){ var getNewWhisperReq = new ServerReq('client/newwhisper.php',function(response) { if(response.wid != 0) { var user = response.user user.uid = user.uid.toInt(); var whisper = createWhisperBox(response.wid.toInt(),user); dragReturn.start(whisper.getCoordinates()); } else { dragReturn.start($('onlineList').getCoordinates()); } }); getNewWhisperReq.transmit({'wuid':user.uid}); } } else { if (droppable == dropNew) { droppable = $('W'+privateRoom); $('U'+user.uid).addClass('priv'); dragReturn.start($('chatList').getCoordinates()); } else { dragReturn.start(droppable.getCoordinates()); } if (addUser (user,droppable) ) { var addUserToWhisperReq = new ServerReq('client/joinwhisper.php',function(response) {}); addUserToWhisperReq.transmit({ 'wuid':user.uid, 'wid':droppable.get('id').substr(1).toInt()}); } } } else { dragReturn.start(startPosition); } }, onEnter: function(element, droppable){ droppable.addClass('dragOver'); }, onLeave: function(element, droppable){ droppable.removeClass('dragOver'); } }); drag.start(event);
if(me.can(BLIND)) { if(privateRoom == 0) { var whisperBoxes = $$('.whisperBox'); if (whisperBoxes.every(function(whisperBox,i) { var widStr = whisperBox.get('id'); var whisperers = whisperBox.getElement('.whisperList').getChildren(); if (whisperers.length == 1) { if (whisperers[0].get('id').substr(widStr.length+1).toInt() == user.uid) { this.start(whisperBox.getCoordinates()); if(activeWb) { activeWb.removeClass('wBactive'); } activeWb = whisperBox; whisperBox.addClass('wBactive'); whisperBox.getElement('.whisperInput').focus(); return false; } } return true; })){ var getNewWhisperReq = new ServerReq('client/newwhisper.php',function(response) { if(response.wid != 0) { var user = response.user user.uid = user.uid.toInt(); var whisper = createWhisperBox(response.wid.toInt(),user); } }); getNewWhisperReq.transmit({'wuid':user.uid}); } } else { droppable = $('W'+privateRoom); $('U'+user.uid).addClass('priv'); if (addUser (user,droppable) ) { var addUserToWhisperReq = new ServerReq('client/joinwhisper.php',function(response) {}); addUserToWhisperReq.transmit({ 'wuid':user.uid, 'wid':droppable.get('id').substr(1).toInt()}); } } } else { var startPosition = el.getCoordinates(); var dropNew; if (room.rid == 0 && privateRoom == 0 ) { dropNew = $('chatList'); } else { dropNew = $('inputContainer'); } var dropZones = $$('.whisperBox'); var dragMan = new Element('div',{'class':'dragBox'}); dragMan.setStyles(startPosition); var dragDestroy = function() { dragMan.destroy(); $('content').setStyles(contentSize); } el.addEvent('mouseup', dragDestroy); displayUser(user,dragMan); var dragReturn = new Fx.Morph(dragMan, { link: 'cancel', duration: 500, transition: Fx.Transitions.Quad.easeOut, onComplete: function (dragged) { dragged.destroy(); $('content').setStyles(contentSize); } }); dragMan.inject(document.body); dragMan.addEvent('mouseup',dragDestroy); dropZones.include(dropNew); var drag = new Drag.Move(dragMan,{ droppables:dropZones, onSnap: function(element) { element.removeEvent('mouseup',dragDestroy); }, onDrop: function(element, droppable){ dropZones.removeClass('dragOver'); if(droppable) { if(droppable == dropNew && privateRoom == 0) { var whisperBoxes = $$('.whisperBox'); if (whisperBoxes.every(function(whisperBox,i) { var widStr = whisperBox.get('id'); var whisperers = whisperBox.getElement('.whisperList').getChildren(); if (whisperers.length == 1) { if (whisperers[0].get('id').substr(widStr.length+1).toInt() == user.uid) { this.start(whisperBox.getCoordinates()); if(activeWb) { activeWb.removeClass('wBactive'); } activeWb = whisperBox; whisperBox.addClass('wBactive'); whisperBox.getElement('.whisperInput').focus(); return false; } } return true; }, dragReturn)){ var getNewWhisperReq = new ServerReq('client/newwhisper.php',function(response) { if(response.wid != 0) { var user = response.user user.uid = user.uid.toInt(); var whisper = createWhisperBox(response.wid.toInt(),user); dragReturn.start(whisper.getCoordinates()); } else { dragReturn.start($('onlineList').getCoordinates()); } }); getNewWhisperReq.transmit({'wuid':user.uid}); } } else { if (droppable == dropNew) { droppable = $('W'+privateRoom); $('U'+user.uid).addClass('priv'); dragReturn.start($('chatList').getCoordinates()); } else { dragReturn.start(droppable.getCoordinates()); } if (addUser (user,droppable) ) { var addUserToWhisperReq = new ServerReq('client/joinwhisper.php',function(response) {}); addUserToWhisperReq.transmit({ 'wuid':user.uid, 'wid':droppable.get('id').substr(1).toInt()}); } } } else { dragReturn.start(startPosition); } }, onEnter: function(element, droppable){ droppable.addClass('dragOver'); }, onLeave: function(element, droppable){ droppable.removeClass('dragOver'); } }); drag.start(event); }
whispers : function () { var lastId = null; var channels = null; var activeWb = null; var addUser = function (user,whisperBox) { var widStr = whisperBox.get('id'); var whisperList = whisperBox.getElement('.whisperList'); var whisperers = whisperList.getChildren(); if( whisperers.every(function(whisperer) { if (whisperer.get('id').substr(widStr.length+1).toInt() == user.uid ) { return false; // Found it, so do nothing } return true; })) { // if we get here, we haven't found the user, so we need to add him var span = displayUser(user,whisperList); span.addClass('whisperer'); span.set('id',widStr+'U'+user.uid); return true } return false; } var whisperSubmit = function(whisper,wid) { whisperReq.transmit({ 'wid':wid, 'rid':room.rid, 'lid':MBchat.updateables.poller.getLastId(), 'text':whisper.getElement('.whisperInput').value}); whisper.getElement('.whisperInput').value = ''; MBchat.sounds.resetTimer(); } var createWhisperBox = function (wid,user) { var template = $('whisperBoxTemplate'); var whisper = template.clone(); whisper.addClass('whisperBox'); whisper.set('id','W'+wid); var whisperList = whisper.getElement('.whisperList'); whisperList.addClass('loading'); if (user) { //inject a user element into box var whisperer = displayUser(user,whisperList); whisperer.addClass('whisperer'); whisperer.set('id', 'W'+wid+'U'+user.uid); } var getWhisperersReq = new ServerReq('client/getwhisperers.php',function(response) { whisperList.removeClass('loading'); response.whisperers.each(function(whisperer) { whisperer.uid = whisperer.uid.toInt(); if(me.uid != whisperer.uid) addUser(whisperer,whisper); }); }); getWhisperersReq.transmit({'wid':wid}); //Now we have to make the whole thing draggable. var closeBox = whisper.getElement('.closeBox'); var leaveWhisper = new ServerReq('client/leavewhisper.php',function(response) { whisper.destroy(); $('content').setStyles(contentSize); }); closeBox.addEvent('click', function(e) { leaveWhisper.transmit({'wid': wid}); }); var privateBox = whisper.getElement('.private'); //can't go private if a key character in a modded room if (room.type == 'M' && (me.is('M') || me.is('S'))) { privateBox.removeClass('private'); privateBox.addClass('nonprivate'); } else { privateBox.addEvent('click', goPrivate); } whisper.getElement('form').addEvent('submit', function(e) { e.stop(); whisperSubmit(whisper,wid); }); whisper.addEvent('keydown',function(e) { if(!e.alt) return; switch (e.key) { case 'p' : if (!(room.type == 'M' && (me.is('M') || me.is('S')))) { e.stop(); var boundPrivateBox = goPrivate.bind(privateBox); boundPrivateBox(); } break; case 's' : e.stop(); whisperSubmit(whisper,wid); break; case 'x' : e.stop(); leaveWhisper.transmit({'wid': wid}); break; default: break; } }); whisper.addClass('wBactive'); whisper.inject(document.body); activeWb = whisper; var position = whisper.getCoordinates(); position.top = position.top + (Math.random()-0.5) * 50; position.left = position.left + (Math.random()-0.5) * 150; whisper.setStyles(position);//(see if helps usability) whisper.getElement('.whisperInput').focus(); var drag = new Drag(whisper,{ handle:whisper.getElement('.dragHandle'), snap:0, onStart: function(el) { if (activeWb) { activeWb.removeClass('wBactive'); } activeWb = el; el.addClass('wBactive'); }, onComplete: function(el) { el.getElement('.whisperInput').focus(); } }); $('content').setStyles(contentSize); return whisper; } var removeUser = function(whisperBox,uid) { if (me.uid == uid) { whisperBox.destroy(); $('content').setStyles(contentSize); } else { var span = $(whisperBox.get('id')+'U'+uid); if (span) { span.destroy(); } if (whisperBox.getElement('.whisperList').getChildren().length == 0 ) { whisperBox.destroy(); $('content').setStyles(contentSize); } } } return { init: function (lid) { lastId = lid; }, whisperWith : function (user,el,event) { var startPosition = el.getCoordinates(); var dropNew; if (room.rid == 0 && privateRoom == 0 ) { dropNew = $('chatList'); } else { dropNew = $('inputContainer'); } var dropZones = $$('.whisperBox'); var dragMan = new Element('div',{'class':'dragBox'}); dragMan.setStyles(startPosition); var dragDestroy = function() { dragMan.destroy(); $('content').setStyles(contentSize); } el.addEvent('mouseup', dragDestroy); displayUser(user,dragMan); var dragReturn = new Fx.Morph(dragMan, { link: 'cancel', duration: 500, transition: Fx.Transitions.Quad.easeOut, onComplete: function (dragged) { dragged.destroy(); $('content').setStyles(contentSize); } }); dragMan.inject(document.body); dragMan.addEvent('mouseup',dragDestroy); dropZones.include(dropNew); var drag = new Drag.Move(dragMan,{ droppables:dropZones, onSnap: function(element) { element.removeEvent('mouseup',dragDestroy); }, onDrop: function(element, droppable){ dropZones.removeClass('dragOver'); if(droppable) { if(droppable == dropNew && privateRoom == 0) { //See if we are already in a whisper with this user var whisperBoxes = $$('.whisperBox'); if (whisperBoxes.every(function(whisperBox,i) { var widStr = whisperBox.get('id'); var whisperers = whisperBox.getElement('.whisperList').getChildren(); //gets users in whisper if (whisperers.length == 1) { //we only want to worry about this if only other person if (whisperers[0].get('id').substr(widStr.length+1).toInt() == user.uid) { this.start(whisperBox.getCoordinates()); if(activeWb) { activeWb.removeClass('wBactive'); } activeWb = whisperBox; whisperBox.addClass('wBactive'); whisperBox.getElement('.whisperInput').focus(); return false; } } return true; }, dragReturn)){ //If we get here we have not found that we already in a one on one whisper with this person, so now we have to create a new Whisper var getNewWhisperReq = new ServerReq('client/newwhisper.php',function(response) { if(response.wid != 0) { var user = response.user user.uid = user.uid.toInt(); var whisper = createWhisperBox(response.wid.toInt(),user); dragReturn.start(whisper.getCoordinates()); //move towards it } else { //logged out before we started whisper dragReturn.start($('onlineList').getCoordinates()); } }); getNewWhisperReq.transmit({'wuid':user.uid}); } } else { if (droppable == dropNew) { droppable = $('W'+privateRoom); //This was a private room drop $('U'+user.uid).addClass('priv'); //Show in room on online list dragReturn.start($('chatList').getCoordinates()); } else { dragReturn.start(droppable.getCoordinates()); } //See if already in whisper with this user if (addUser (user,droppable) ) { var addUserToWhisperReq = new ServerReq('client/joinwhisper.php',function(response) {}); addUserToWhisperReq.transmit({ 'wuid':user.uid, 'wid':droppable.get('id').substr(1).toInt()}); } } } else { dragReturn.start(startPosition); // should make dragman return on online list } }, onEnter: function(element, droppable){ droppable.addClass('dragOver'); }, onLeave: function(element, droppable){ droppable.removeClass('dragOver'); } }); drag.start(event); $('content').setStyles(contentSize); }, processMessage: function (msg) { var lid = msg.lid.toInt(); if (lastId < lid) { lastId = lid; switch(msg.type) { case 'WJ' : if ($$('.whisperBox').every(function(whisperBox) { var whisperStr = whisperBox.get('id'); if(whisperStr.substr(1).toInt() == msg.rid) { if (me.uid != msg.user.uid) { addUser(msg.user,whisperBox); } return false; } return true; })) { // If we get here, this is a WJ for a whisper box we don't have if (me.uid == msg.user.uid ) { //OK - someone else has selected me to be in a whisper createWhisperBox(msg.rid.toInt()); //but without (yet) any other user MBchat.sounds.newWhisper(); } // Throw others away } break; case 'LT': case 'LO': var whisperBoxes = $$('.whisperBox'); if (whisperBoxes) { whisperBoxes.each(function(whisperBox) { removeUser(whisperBox,msg.user.uid); }); } break; case 'WL' : var whisperBox = $('W'+msg.rid); if(whisperBox) { removeUser(whisperBox,msg.user.uid); } break; default: //ignore the rest of the messages break; } } }, updateWhisperers: function(wid,whisperers) { whisperBox = $('W'+wid); if (whisperBox) { //just in case it disappeared in the mean time var whisperList = whisperBox.getElement('.whisperList'); whisperList.removeClass('loading'); whisperers.each(function(whisperer) { whisperer.uid = whisperer.uid.toInt(); //inject a user element into box if(me.uid != whisperer.uid) { addUser(whisperer,whisperBox); } }); } }, isWhisperingIn : function (wid) { var whisperBoxes = $$('.whisperBox'); return !whisperBoxes.every(function(whisperBox) { if(wid == whisperBox.get('id').substr(1).toInt()) { return false; } return true; }); } }; }(),
var startPosition = el.getCoordinates(); var dropNew; if (room.rid == 0 && privateRoom == 0 ) { dropNew = $('chatList'); } else { dropNew = $('inputContainer');
if(me.can(BLIND)) { if(privateRoom == 0) { var whisperBoxes = $$('.whisperBox'); if (whisperBoxes.every(function(whisperBox,i) { var widStr = whisperBox.get('id'); var whisperers = whisperBox.getElement('.whisperList').getChildren(); if (whisperers.length == 1) { if (whisperers[0].get('id').substr(widStr.length+1).toInt() == user.uid) { this.start(whisperBox.getCoordinates()); if(activeWb) { activeWb.removeClass('wBactive'); } activeWb = whisperBox; whisperBox.addClass('wBactive'); whisperBox.getElement('.whisperInput').focus(); return false; } } return true; })){ var getNewWhisperReq = new ServerReq('client/newwhisper.php',function(response) { if(response.wid != 0) { var user = response.user user.uid = user.uid.toInt(); var whisper = createWhisperBox(response.wid.toInt(),user); } }); getNewWhisperReq.transmit({'wuid':user.uid}); } } else { droppable = $('W'+privateRoom); $('U'+user.uid).addClass('priv'); if (addUser (user,droppable) ) { var addUserToWhisperReq = new ServerReq('client/joinwhisper.php',function(response) {}); addUserToWhisperReq.transmit({ 'wuid':user.uid, 'wid':droppable.get('id').substr(1).toInt()}); } } } else { var startPosition = el.getCoordinates(); var dropNew; if (room.rid == 0 && privateRoom == 0 ) { dropNew = $('chatList'); } else { dropNew = $('inputContainer'); } var dropZones = $$('.whisperBox'); var dragMan = new Element('div',{'class':'dragBox'}); dragMan.setStyles(startPosition); var dragDestroy = function() { dragMan.destroy(); $('content').setStyles(contentSize); } el.addEvent('mouseup', dragDestroy); displayUser(user,dragMan); var dragReturn = new Fx.Morph(dragMan, { link: 'cancel', duration: 500, transition: Fx.Transitions.Quad.easeOut, onComplete: function (dragged) { dragged.destroy(); $('content').setStyles(contentSize); } }); dragMan.inject(document.body); dragMan.addEvent('mouseup',dragDestroy); dropZones.include(dropNew); var drag = new Drag.Move(dragMan,{ droppables:dropZones, onSnap: function(element) { element.removeEvent('mouseup',dragDestroy); }, onDrop: function(element, droppable){ dropZones.removeClass('dragOver'); if(droppable) { if(droppable == dropNew && privateRoom == 0) { var whisperBoxes = $$('.whisperBox'); if (whisperBoxes.every(function(whisperBox,i) { var widStr = whisperBox.get('id'); var whisperers = whisperBox.getElement('.whisperList').getChildren(); if (whisperers.length == 1) { if (whisperers[0].get('id').substr(widStr.length+1).toInt() == user.uid) { this.start(whisperBox.getCoordinates()); if(activeWb) { activeWb.removeClass('wBactive'); } activeWb = whisperBox; whisperBox.addClass('wBactive'); whisperBox.getElement('.whisperInput').focus(); return false; } } return true; }, dragReturn)){ var getNewWhisperReq = new ServerReq('client/newwhisper.php',function(response) { if(response.wid != 0) { var user = response.user user.uid = user.uid.toInt(); var whisper = createWhisperBox(response.wid.toInt(),user); dragReturn.start(whisper.getCoordinates()); } else { dragReturn.start($('onlineList').getCoordinates()); } }); getNewWhisperReq.transmit({'wuid':user.uid}); } } else { if (droppable == dropNew) { droppable = $('W'+privateRoom); $('U'+user.uid).addClass('priv'); dragReturn.start($('chatList').getCoordinates()); } else { dragReturn.start(droppable.getCoordinates()); } if (addUser (user,droppable) ) { var addUserToWhisperReq = new ServerReq('client/joinwhisper.php',function(response) {}); addUserToWhisperReq.transmit({ 'wuid':user.uid, 'wid':droppable.get('id').substr(1).toInt()}); } } } else { dragReturn.start(startPosition); } }, onEnter: function(element, droppable){ droppable.addClass('dragOver'); }, onLeave: function(element, droppable){ droppable.removeClass('dragOver'); } }); drag.start(event);
whisperWith : function (user,el,event) { var startPosition = el.getCoordinates(); var dropNew; if (room.rid == 0 && privateRoom == 0 ) { dropNew = $('chatList'); } else { dropNew = $('inputContainer'); } var dropZones = $$('.whisperBox'); var dragMan = new Element('div',{'class':'dragBox'}); dragMan.setStyles(startPosition); var dragDestroy = function() { dragMan.destroy(); $('content').setStyles(contentSize); } el.addEvent('mouseup', dragDestroy); displayUser(user,dragMan); var dragReturn = new Fx.Morph(dragMan, { link: 'cancel', duration: 500, transition: Fx.Transitions.Quad.easeOut, onComplete: function (dragged) { dragged.destroy(); $('content').setStyles(contentSize); } }); dragMan.inject(document.body); dragMan.addEvent('mouseup',dragDestroy); dropZones.include(dropNew); var drag = new Drag.Move(dragMan,{ droppables:dropZones, onSnap: function(element) { element.removeEvent('mouseup',dragDestroy); }, onDrop: function(element, droppable){ dropZones.removeClass('dragOver'); if(droppable) { if(droppable == dropNew && privateRoom == 0) { //See if we are already in a whisper with this user var whisperBoxes = $$('.whisperBox'); if (whisperBoxes.every(function(whisperBox,i) { var widStr = whisperBox.get('id'); var whisperers = whisperBox.getElement('.whisperList').getChildren(); //gets users in whisper if (whisperers.length == 1) { //we only want to worry about this if only other person if (whisperers[0].get('id').substr(widStr.length+1).toInt() == user.uid) { this.start(whisperBox.getCoordinates()); if(activeWb) { activeWb.removeClass('wBactive'); } activeWb = whisperBox; whisperBox.addClass('wBactive'); whisperBox.getElement('.whisperInput').focus(); return false; } } return true; }, dragReturn)){ //If we get here we have not found that we already in a one on one whisper with this person, so now we have to create a new Whisper var getNewWhisperReq = new ServerReq('client/newwhisper.php',function(response) { if(response.wid != 0) { var user = response.user user.uid = user.uid.toInt(); var whisper = createWhisperBox(response.wid.toInt(),user); dragReturn.start(whisper.getCoordinates()); //move towards it } else { //logged out before we started whisper dragReturn.start($('onlineList').getCoordinates()); } }); getNewWhisperReq.transmit({'wuid':user.uid}); } } else { if (droppable == dropNew) { droppable = $('W'+privateRoom); //This was a private room drop $('U'+user.uid).addClass('priv'); //Show in room on online list dragReturn.start($('chatList').getCoordinates()); } else { dragReturn.start(droppable.getCoordinates()); } //See if already in whisper with this user if (addUser (user,droppable) ) { var addUserToWhisperReq = new ServerReq('client/joinwhisper.php',function(response) {}); addUserToWhisperReq.transmit({ 'wuid':user.uid, 'wid':droppable.get('id').substr(1).toInt()}); } } } else { dragReturn.start(startPosition); // should make dragman return on online list } }, onEnter: function(element, droppable){ droppable.addClass('dragOver'); }, onLeave: function(element, droppable){ droppable.removeClass('dragOver'); } }); drag.start(event); $('content').setStyles(contentSize); },
var dropZones = $$('.whisperBox'); var dragMan = new Element('div',{'class':'dragBox'}); dragMan.setStyles(startPosition); var dragDestroy = function() { dragMan.destroy(); $('content').setStyles(contentSize); } el.addEvent('mouseup', dragDestroy); displayUser(user,dragMan); var dragReturn = new Fx.Morph(dragMan, { link: 'cancel', duration: 500, transition: Fx.Transitions.Quad.easeOut, onComplete: function (dragged) { dragged.destroy(); $('content').setStyles(contentSize); } }); dragMan.inject(document.body); dragMan.addEvent('mouseup',dragDestroy); dropZones.include(dropNew); var drag = new Drag.Move(dragMan,{ droppables:dropZones, onSnap: function(element) { element.removeEvent('mouseup',dragDestroy); }, onDrop: function(element, droppable){ dropZones.removeClass('dragOver'); if(droppable) { if(droppable == dropNew && privateRoom == 0) { var whisperBoxes = $$('.whisperBox'); if (whisperBoxes.every(function(whisperBox,i) { var widStr = whisperBox.get('id'); var whisperers = whisperBox.getElement('.whisperList').getChildren(); if (whisperers.length == 1) { if (whisperers[0].get('id').substr(widStr.length+1).toInt() == user.uid) { this.start(whisperBox.getCoordinates()); if(activeWb) { activeWb.removeClass('wBactive'); } activeWb = whisperBox; whisperBox.addClass('wBactive'); whisperBox.getElement('.whisperInput').focus(); return false; } } return true; }, dragReturn)){ var getNewWhisperReq = new ServerReq('client/newwhisper.php',function(response) { if(response.wid != 0) { var user = response.user user.uid = user.uid.toInt(); var whisper = createWhisperBox(response.wid.toInt(),user); dragReturn.start(whisper.getCoordinates()); } else { dragReturn.start($('onlineList').getCoordinates()); } }); getNewWhisperReq.transmit({'wuid':user.uid}); } } else { if (droppable == dropNew) { droppable = $('W'+privateRoom); $('U'+user.uid).addClass('priv'); dragReturn.start($('chatList').getCoordinates()); } else { dragReturn.start(droppable.getCoordinates()); } if (addUser (user,droppable) ) { var addUserToWhisperReq = new ServerReq('client/joinwhisper.php',function(response) {}); addUserToWhisperReq.transmit({ 'wuid':user.uid, 'wid':droppable.get('id').substr(1).toInt()}); } } } else { dragReturn.start(startPosition); } }, onEnter: function(element, droppable){ droppable.addClass('dragOver'); }, onLeave: function(element, droppable){ droppable.removeClass('dragOver'); } }); drag.start(event);
whisperWith : function (user,el,event) { var startPosition = el.getCoordinates(); var dropNew; if (room.rid == 0 && privateRoom == 0 ) { dropNew = $('chatList'); } else { dropNew = $('inputContainer'); } var dropZones = $$('.whisperBox'); var dragMan = new Element('div',{'class':'dragBox'}); dragMan.setStyles(startPosition); var dragDestroy = function() { dragMan.destroy(); $('content').setStyles(contentSize); } el.addEvent('mouseup', dragDestroy); displayUser(user,dragMan); var dragReturn = new Fx.Morph(dragMan, { link: 'cancel', duration: 500, transition: Fx.Transitions.Quad.easeOut, onComplete: function (dragged) { dragged.destroy(); $('content').setStyles(contentSize); } }); dragMan.inject(document.body); dragMan.addEvent('mouseup',dragDestroy); dropZones.include(dropNew); var drag = new Drag.Move(dragMan,{ droppables:dropZones, onSnap: function(element) { element.removeEvent('mouseup',dragDestroy); }, onDrop: function(element, droppable){ dropZones.removeClass('dragOver'); if(droppable) { if(droppable == dropNew && privateRoom == 0) { //See if we are already in a whisper with this user var whisperBoxes = $$('.whisperBox'); if (whisperBoxes.every(function(whisperBox,i) { var widStr = whisperBox.get('id'); var whisperers = whisperBox.getElement('.whisperList').getChildren(); //gets users in whisper if (whisperers.length == 1) { //we only want to worry about this if only other person if (whisperers[0].get('id').substr(widStr.length+1).toInt() == user.uid) { this.start(whisperBox.getCoordinates()); if(activeWb) { activeWb.removeClass('wBactive'); } activeWb = whisperBox; whisperBox.addClass('wBactive'); whisperBox.getElement('.whisperInput').focus(); return false; } } return true; }, dragReturn)){ //If we get here we have not found that we already in a one on one whisper with this person, so now we have to create a new Whisper var getNewWhisperReq = new ServerReq('client/newwhisper.php',function(response) { if(response.wid != 0) { var user = response.user user.uid = user.uid.toInt(); var whisper = createWhisperBox(response.wid.toInt(),user); dragReturn.start(whisper.getCoordinates()); //move towards it } else { //logged out before we started whisper dragReturn.start($('onlineList').getCoordinates()); } }); getNewWhisperReq.transmit({'wuid':user.uid}); } } else { if (droppable == dropNew) { droppable = $('W'+privateRoom); //This was a private room drop $('U'+user.uid).addClass('priv'); //Show in room on online list dragReturn.start($('chatList').getCoordinates()); } else { dragReturn.start(droppable.getCoordinates()); } //See if already in whisper with this user if (addUser (user,droppable) ) { var addUserToWhisperReq = new ServerReq('client/joinwhisper.php',function(response) {}); addUserToWhisperReq.transmit({ 'wuid':user.uid, 'wid':droppable.get('id').substr(1).toInt()}); } } } else { dragReturn.start(startPosition); // should make dragman return on online list } }, onEnter: function(element, droppable){ droppable.addClass('dragOver'); }, onLeave: function(element, droppable){ droppable.removeClass('dragOver'); } }); drag.start(event); $('content').setStyles(contentSize); },
a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;f+=a.offsetTop;if(w(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;f+=document.body.scrollTop+document.documentElement.scrollTop;break}l=a.offsetParent;if(l==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a,"DIV")){b-=a.scrollLeft;f-=a.scrollTop}}while(a!=null&&a!=l)}}return{x:b,y:f}};this.widgetCoordinates=function(a,b){b=g.pageCoordinates(b);a=g.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=
a!=l)}}return{x:b,y:f}};this.widgetCoordinates=function(a,b){b=g.pageCoordinates(b);a=g.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,f=0;if(a.pageX||a.pageY){b=a.pageX;f=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;f=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,y:f}};this.windowCoordinates=function(a){a=g.pageCoordinates(a);return{x:a.x-
a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;f+=a.offsetTop;if(w(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;f+=document.body.scrollTop+document.documentElement.scrollTop;break}l=a.offsetParent;if(l==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a,"DIV")){b-=a.scrollLeft;f-=a.scrollTop}}while(a!=null&&a!=l)}}return{x:b,y:f}};this.widgetCoordinates=function(a,b){b=g.pageCoordinates(b);a=g.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=
for(;a;){b+=a.offsetLeft;f+=a.offsetTop;if(w(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;f+=document.body.scrollTop+document.documentElement.scrollTop;break}l=a.offsetParent;if(l==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a,"DIV")){b-=a.scrollLeft;f-=a.scrollTop}}while(a!=null&&a!=l)}}return{x:b,y:f}};this.widgetCoordinates=function(a,b){b=g.pageCoordinates(b);a=g.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=
a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;f+=a.offsetTop;if(w(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;f+=document.body.scrollTop+document.documentElement.scrollTop;break}l=a.offsetParent;if(l==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a,"DIV")){b-=a.scrollLeft;f-=a.scrollTop}}while(a!=null&&a!=l)}}return{x:b,y:f}};this.widgetCoordinates=function(a,b){b=g.pageCoordinates(b);a=g.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=
for(;a;){b+=a.offsetLeft;f+=a.offsetTop;if(w(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;f+=document.body.scrollTop+document.documentElement.scrollTop;break}l=a.offsetParent;if(l==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a,"DIV")){b-=a.scrollLeft;f-=a.scrollTop}}while(a!=null&&a!=l)}}return{x:b,y:f}};this.widgetCoordinates=function(a,b){b=g.pageCoordinates(b);a=g.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=
if(k==null)a=null;else{do{a=a.parentNode;if(h.hasTag(a,"DIV")){b-=a.scrollLeft;e-=a.scrollTop}}while(a!=null&&a!=k)}}return{x:b,y:e}};this.widgetCoordinates=function(a,b){b=h.pageCoordinates(b);a=h.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,e=0;if(a.pageX||a.pageY){b=a.pageX;e=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;e=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,
if(j==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a,"DIV")){b-=a.scrollLeft;e-=a.scrollTop}}while(a!=null&&a!=j)}}return{x:b,y:e}};this.widgetCoordinates=function(a,b){b=g.pageCoordinates(b);a=g.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,e=0;if(a.pageX||a.pageY){b=a.pageX;e=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;e=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,
if(k==null)a=null;else{do{a=a.parentNode;if(h.hasTag(a,"DIV")){b-=a.scrollLeft;e-=a.scrollTop}}while(a!=null&&a!=k)}}return{x:b,y:e}};this.widgetCoordinates=function(a,b){b=h.pageCoordinates(b);a=h.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,e=0;if(a.pageX||a.pageY){b=a.pageX;e=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;e=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,
this.getElement=function(a){var b=document.getElementById(a);if(!b)for(var e=0;e<window.frames.length;++e)try{if(b=window.frames[e].document.getElementById(a))return b}catch(k){}return b};this.widgetPageCoordinates=function(a){var b=0,e=0,k;if(g.hasTag(a,"AREA"))a=a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;e+=a.offsetTop;k=a.offsetParent;if(k==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a,"DIV")){b-=a.scrollLeft;e-=a.scrollTop}}while(a!=null&&a!=k)}}return{x:b,y:e}};this.widgetCoordinates= function(a,b){b=g.pageCoordinates(b);a=g.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,e=0;if(a.pageX||a.pageY){b=a.pageX;e=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;e=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,y:e}};this.scrollIntoView=function(a){(a=document.getElementById(a))&&a.scrollIntoView&&a.scrollIntoView(true)};this.getSelectionRange=
this.getElement=function(a){var b=document.getElementById(a);if(!b)for(var e=0;e<window.frames.length;++e)try{if(b=window.frames[e].document.getElementById(a))return b}catch(k){}return b};this.widgetPageCoordinates=function(a){var b=0,e=0,k;if(h.hasTag(a,"AREA"))a=a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;e+=a.offsetTop;k=a.offsetParent;if(k==null)a=null;else{do{a=a.parentNode;if(h.hasTag(a,"DIV")){b-=a.scrollLeft;e-=a.scrollTop}}while(a!=null&&a!=k)}}return{x:b,y:e}};this.widgetCoordinates= function(a,b){b=h.pageCoordinates(b);a=h.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,e=0;if(a.pageX||a.pageY){b=a.pageX;e=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;e=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,y:e}};this.scrollIntoView=function(a){(a=document.getElementById(a))&&a.scrollIntoView&&a.scrollIntoView(true)};this.getSelectionRange=
this.getElement=function(a){var b=document.getElementById(a);if(!b)for(var e=0;e<window.frames.length;++e)try{if(b=window.frames[e].document.getElementById(a))return b}catch(k){}return b};this.widgetPageCoordinates=function(a){var b=0,e=0,k;if(g.hasTag(a,"AREA"))a=a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;e+=a.offsetTop;k=a.offsetParent;if(k==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a,"DIV")){b-=a.scrollLeft;e-=a.scrollTop}}while(a!=null&&a!=k)}}return{x:b,y:e}};this.widgetCoordinates=function(a,b){b=g.pageCoordinates(b);a=g.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,e=0;if(a.pageX||a.pageY){b=a.pageX;e=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;e=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,y:e}};this.scrollIntoView=function(a){(a=document.getElementById(a))&&a.scrollIntoView&&a.scrollIntoView(true)};this.getSelectionRange=
this.getElement=function(a){var b=document.getElementById(a);if(!b)for(var f=0;f<window.frames.length;++f)try{if(b=window.frames[f].document.getElementById(a))return b}catch(m){}return b};this.widgetPageCoordinates=function(a){var b=0,f=0,m;if(k.hasTag(a,"AREA"))a=a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;f+=a.offsetTop;m=a.offsetParent;if(m==null)a=null;else{do{a=a.parentNode;if(k.hasTag(a,"DIV")){b-=a.scrollLeft;f-=a.scrollTop}}while(a!=null&&a!=m)}}return{x:b,y:f}};this.widgetCoordinates= function(a,b){b=k.pageCoordinates(b);a=k.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,f=0;if(a.pageX||a.pageY){b=a.pageX;f=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;f=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,y:f}};this.scrollIntoView=function(a){(a=document.getElementById(a))&&a.scrollIntoView&&a.scrollIntoView(true)};this.getSelectionRange=
if(m==null)a=null;else{do{a=a.parentNode;if(k.hasTag(a,"DIV")){b-=a.scrollLeft;f-=a.scrollTop}}while(a!=null&&a!=m)}}return{x:b,y:f}};this.widgetCoordinates=function(a,b){b=k.pageCoordinates(b);a=k.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,f=0;if(a.pageX||a.pageY){b=a.pageX;f=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;f=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,
this.getElement=function(a){var b=document.getElementById(a);if(!b)for(var f=0;f<window.frames.length;++f)try{if(b=window.frames[f].document.getElementById(a))return b}catch(m){}return b};this.widgetPageCoordinates=function(a){var b=0,f=0,m;if(k.hasTag(a,"AREA"))a=a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;f+=a.offsetTop;m=a.offsetParent;if(m==null)a=null;else{do{a=a.parentNode;if(k.hasTag(a,"DIV")){b-=a.scrollLeft;f-=a.scrollTop}}while(a!=null&&a!=m)}}return{x:b,y:f}};this.widgetCoordinates=function(a,b){b=k.pageCoordinates(b);a=k.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,f=0;if(a.pageX||a.pageY){b=a.pageX;f=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;f=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,y:f}};this.scrollIntoView=function(a){(a=document.getElementById(a))&&a.scrollIntoView&&a.scrollIntoView(true)};this.getSelectionRange=
false;if(b&g.CancelPropagate){if(a.stopPropagation)a.stopPropagation();else a.cancelBubble=true;try{document.activeElement&&document.activeElement.blur&&g.hasTag(document.activeElement,"TEXTAREA")&&document.activeElement.blur()}catch(f){}}}};this.getElement=function(a){var b=document.getElementById(a);if(!b)for(var f=0;f<window.frames.length;++f)try{if(b=window.frames[f].document.getElementById(a))return b}catch(l){}return b};this.widgetPageCoordinates=function(a){var b=0,f=0,l;if(g.hasTag(a,"AREA"))a= a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;f+=a.offsetTop;if(w(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;f+=document.body.scrollTop+document.documentElement.scrollTop;break}l=a.offsetParent;if(l==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a,"DIV")){b-=a.scrollLeft;f-=a.scrollTop}}while(a!=null&&a!=l)}}return{x:b,y:f}};this.widgetCoordinates=function(a,b){b=g.pageCoordinates(b);a=g.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=
window.frames[f].document.getElementById(a))return b}catch(l){}return b};this.widgetPageCoordinates=function(a){var b=0,f=0,l;if(g.hasTag(a,"AREA"))a=a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;f+=a.offsetTop;if(w(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;f+=document.body.scrollTop+document.documentElement.scrollTop;break}l=a.offsetParent;if(l==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a,"DIV")){b-=a.scrollLeft;f-=a.scrollTop}}while(a!=null&& a!=l)}}return{x:b,y:f}};this.widgetCoordinates=function(a,b){b=g.pageCoordinates(b);a=g.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,f=0;if(a.pageX||a.pageY){b=a.pageX;f=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;f=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,y:f}};this.windowCoordinates=function(a){a=g.pageCoordinates(a);return{x:a.x-
false;if(b&g.CancelPropagate){if(a.stopPropagation)a.stopPropagation();else a.cancelBubble=true;try{document.activeElement&&document.activeElement.blur&&g.hasTag(document.activeElement,"TEXTAREA")&&document.activeElement.blur()}catch(f){}}}};this.getElement=function(a){var b=document.getElementById(a);if(!b)for(var f=0;f<window.frames.length;++f)try{if(b=window.frames[f].document.getElementById(a))return b}catch(l){}return b};this.widgetPageCoordinates=function(a){var b=0,f=0,l;if(g.hasTag(a,"AREA"))a=a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;f+=a.offsetTop;if(w(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;f+=document.body.scrollTop+document.documentElement.scrollTop;break}l=a.offsetParent;if(l==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a,"DIV")){b-=a.scrollLeft;f-=a.scrollTop}}while(a!=null&&a!=l)}}return{x:b,y:f}};this.widgetCoordinates=function(a,b){b=g.pageCoordinates(b);a=g.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=
if(!b)for(var f=0;f<window.frames.length;++f)try{if(b=window.frames[f].document.getElementById(a))return b}catch(k){}return b};this.widgetPageCoordinates=function(a){var b=0,f=0,k;if(g.hasTag(a,"AREA"))a=a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;f+=a.offsetTop;if(w(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;f+=document.body.scrollTop+document.documentElement.scrollTop;break}k=a.offsetParent;if(k==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a,
if(!b)for(var f=0;f<window.frames.length;++f)try{if(b=window.frames[f].document.getElementById(a))return b}catch(k){}return b};this.widgetPageCoordinates=function(a){var b=0,f=0,k;if(g.hasTag(a,"AREA"))a=a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;f+=a.offsetTop;if(x(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;f+=document.body.scrollTop+document.documentElement.scrollTop;break}k=a.offsetParent;if(k==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a,
if(!b)for(var f=0;f<window.frames.length;++f)try{if(b=window.frames[f].document.getElementById(a))return b}catch(k){}return b};this.widgetPageCoordinates=function(a){var b=0,f=0,k;if(g.hasTag(a,"AREA"))a=a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;f+=a.offsetTop;if(w(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;f+=document.body.scrollTop+document.documentElement.scrollTop;break}k=a.offsetParent;if(k==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a,"DIV")){b-=a.scrollLeft;f-=a.scrollTop}}while(a!=null&&a!=k)}}return{x:b,y:f}};this.widgetCoordinates=function(a,b){b=g.pageCoordinates(b);a=g.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,f=0;if(a.pageX||a.pageY){b=a.pageX;f=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;f=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,y:f}};this.windowCoordinates=
g.CancelPropagate){if(a.stopPropagation)a.stopPropagation();else a.cancelBubble=true;try{document.activeElement&&document.activeElement.blur&&g.hasTag(document.activeElement,"TEXTAREA")&&document.activeElement.blur()}catch(f){}}};this.getElement=function(a){var b=document.getElementById(a);if(!b)for(var f=0;f<window.frames.length;++f)try{if(b=window.frames[f].document.getElementById(a))return b}catch(l){}return b};this.widgetPageCoordinates=function(a){var b=0,f=0,l;if(g.hasTag(a,"AREA"))a=a.parentNode.nextSibling; for(;a;){b+=a.offsetLeft;f+=a.offsetTop;if(w(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;f+=document.body.scrollTop+document.documentElement.scrollTop;break}l=a.offsetParent;if(l==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a,"DIV")){b-=a.scrollLeft;f-=a.scrollTop}}while(a!=null&&a!=l)}}return{x:b,y:f}};this.widgetCoordinates=function(a,b){b=g.pageCoordinates(b);a=g.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=
false;if(b&g.CancelPropagate){if(a.stopPropagation)a.stopPropagation();else a.cancelBubble=true;try{document.activeElement&&document.activeElement.blur&&g.hasTag(document.activeElement,"TEXTAREA")&&document.activeElement.blur()}catch(f){}}}};this.getElement=function(a){var b=document.getElementById(a);if(!b)for(var f=0;f<window.frames.length;++f)try{if(b=window.frames[f].document.getElementById(a))return b}catch(l){}return b};this.widgetPageCoordinates=function(a){var b=0,f=0,l;if(g.hasTag(a,"AREA"))a= a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;f+=a.offsetTop;if(w(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;f+=document.body.scrollTop+document.documentElement.scrollTop;break}l=a.offsetParent;if(l==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a,"DIV")){b-=a.scrollLeft;f-=a.scrollTop}}while(a!=null&&a!=l)}}return{x:b,y:f}};this.widgetCoordinates=function(a,b){b=g.pageCoordinates(b);a=g.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=
g.CancelPropagate){if(a.stopPropagation)a.stopPropagation();else a.cancelBubble=true;try{document.activeElement&&document.activeElement.blur&&g.hasTag(document.activeElement,"TEXTAREA")&&document.activeElement.blur()}catch(f){}}};this.getElement=function(a){var b=document.getElementById(a);if(!b)for(var f=0;f<window.frames.length;++f)try{if(b=window.frames[f].document.getElementById(a))return b}catch(l){}return b};this.widgetPageCoordinates=function(a){var b=0,f=0,l;if(g.hasTag(a,"AREA"))a=a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;f+=a.offsetTop;if(w(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;f+=document.body.scrollTop+document.documentElement.scrollTop;break}l=a.offsetParent;if(l==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a,"DIV")){b-=a.scrollLeft;f-=a.scrollTop}}while(a!=null&&a!=l)}}return{x:b,y:f}};this.widgetCoordinates=function(a,b){b=g.pageCoordinates(b);a=g.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=
this.getElement=function(a){var b=document.getElementById(a);if(!b)for(var e=0;e<window.frames.length;++e)try{if(b=window.frames[e].document.getElementById(a))return b}catch(k){}return b};this.widgetPageCoordinates=function(a){var b=0,e=0,k;if(h.hasTag(a,"AREA"))a=a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;e+=a.offsetTop;if(w(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;e+=document.body.scrollTop+document.documentElement.scrollTop;break}k=a.offsetParent; if(k==null)a=null;else{do{a=a.parentNode;if(h.hasTag(a,"DIV")){b-=a.scrollLeft;e-=a.scrollTop}}while(a!=null&&a!=k)}}return{x:b,y:e}};this.widgetCoordinates=function(a,b){b=h.pageCoordinates(b);a=h.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,e=0;if(a.pageX||a.pageY){b=a.pageX;e=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;e=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,
this.getElement=function(a){var b=document.getElementById(a);if(!b)for(var e=0;e<window.frames.length;++e)try{if(b=window.frames[e].document.getElementById(a))return b}catch(j){}return b};this.widgetPageCoordinates=function(a){var b=0,e=0,j;if(g.hasTag(a,"AREA"))a=a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;e+=a.offsetTop;if(v(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;e+=document.body.scrollTop+document.documentElement.scrollTop;break}j=a.offsetParent; if(j==null)a=null;else{do{a=a.parentNode;if(g.hasTag(a,"DIV")){b-=a.scrollLeft;e-=a.scrollTop}}while(a!=null&&a!=j)}}return{x:b,y:e}};this.widgetCoordinates=function(a,b){b=g.pageCoordinates(b);a=g.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,e=0;if(a.pageX||a.pageY){b=a.pageX;e=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;e=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,
this.getElement=function(a){var b=document.getElementById(a);if(!b)for(var e=0;e<window.frames.length;++e)try{if(b=window.frames[e].document.getElementById(a))return b}catch(k){}return b};this.widgetPageCoordinates=function(a){var b=0,e=0,k;if(h.hasTag(a,"AREA"))a=a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;e+=a.offsetTop;if(w(a,"position")=="fixed"){b+=document.body.scrollLeft+document.documentElement.scrollLeft;e+=document.body.scrollTop+document.documentElement.scrollTop;break}k=a.offsetParent;if(k==null)a=null;else{do{a=a.parentNode;if(h.hasTag(a,"DIV")){b-=a.scrollLeft;e-=a.scrollTop}}while(a!=null&&a!=k)}}return{x:b,y:e}};this.widgetCoordinates=function(a,b){b=h.pageCoordinates(b);a=h.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,e=0;if(a.pageX||a.pageY){b=a.pageX;e=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;e=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,
this.getElement=function(a){var b=document.getElementById(a);if(!b)for(var f=0;f<window.frames.length;++f)try{if(b=window.frames[f].document.getElementById(a))return b}catch(m){}return b};this.widgetPageCoordinates=function(a){var b=0,f=0,m;if(k.hasTag(a,"AREA"))a=a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;f+=a.offsetTop;m=a.offsetParent;if(m==null)a=null;else{do{a=a.parentNode;if(k.hasTag(a,"DIV")){b-=a.scrollLeft;f-=a.scrollTop}}while(a!=null&&a!=m)}}return{x:b,y:f}};this.widgetCoordinates=
else a.cancelBubble=true;document.activeElement&&document.activeElement.blur&&k.hasTag(document.activeElement,"TEXTAREA")&&document.activeElement.blur()}};this.getElement=function(a){var b=document.getElementById(a);if(!b)for(var f=0;f<window.frames.length;++f)try{if(b=window.frames[f].document.getElementById(a))return b}catch(m){}return b};this.widgetPageCoordinates=function(a){var b=0,f=0,m;if(k.hasTag(a,"AREA"))a=a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;f+=a.offsetTop;m=a.offsetParent; if(m==null)a=null;else{do{a=a.parentNode;if(k.hasTag(a,"DIV")){b-=a.scrollLeft;f-=a.scrollTop}}while(a!=null&&a!=m)}}return{x:b,y:f}};this.widgetCoordinates=function(a,b){b=k.pageCoordinates(b);a=k.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,f=0;if(a.pageX||a.pageY){b=a.pageX;f=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;f=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,
this.getElement=function(a){var b=document.getElementById(a);if(!b)for(var f=0;f<window.frames.length;++f)try{if(b=window.frames[f].document.getElementById(a))return b}catch(m){}return b};this.widgetPageCoordinates=function(a){var b=0,f=0,m;if(k.hasTag(a,"AREA"))a=a.parentNode.nextSibling;for(;a;){b+=a.offsetLeft;f+=a.offsetTop;m=a.offsetParent;if(m==null)a=null;else{do{a=a.parentNode;if(k.hasTag(a,"DIV")){b-=a.scrollLeft;f-=a.scrollTop}}while(a!=null&&a!=m)}}return{x:b,y:f}};this.widgetCoordinates=
function(a){if(!a)a=window.event;var b=0,f=0;if(a.pageX||a.pageY){b=a.pageX;f=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;f=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,y:f}};this.windowCoordinates=function(a){a=g.pageCoordinates(a);return{x:a.x-document.body.scrollLeft-document.documentElement.scrollLeft,y:a.y-document.body.scrollTop-document.documentElement.scrollTop}};this.wheelDelta=function(a){var b=
a!=l)}}return{x:b,y:f}};this.widgetCoordinates=function(a,b){b=g.pageCoordinates(b);a=g.widgetPageCoordinates(a);return{x:b.x-a.x,y:b.y-a.y}};this.pageCoordinates=function(a){if(!a)a=window.event;var b=0,f=0;if(a.pageX||a.pageY){b=a.pageX;f=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;f=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,y:f}};this.windowCoordinates=function(a){a=g.pageCoordinates(a);return{x:a.x- document.body.scrollLeft-document.documentElement.scrollLeft,y:a.y-document.body.scrollTop-document.documentElement.scrollTop}};this.wheelDelta=function(a){var b=0;if(a.wheelDelta)b=a.wheelDelta>0?1:-1;else if(a.detail)b=a.detail<0?1:-1;return b};this.scrollIntoView=function(a){(a=document.getElementById(a))&&a.scrollIntoView&&a.scrollIntoView(true)};this.getSelectionRange=function(a){if(document.selection)if(g.hasTag(a,"TEXTAREA")){var b=document.selection.createRange(),f=b.duplicate();f.moveToElementText(a);
function(a){if(!a)a=window.event;var b=0,f=0;if(a.pageX||a.pageY){b=a.pageX;f=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;f=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,y:f}};this.windowCoordinates=function(a){a=g.pageCoordinates(a);return{x:a.x-document.body.scrollLeft-document.documentElement.scrollLeft,y:a.y-document.body.scrollTop-document.documentElement.scrollTop}};this.wheelDelta=function(a){var b=
window.event;var b=0,f=0;if(a.pageX||a.pageY){b=a.pageX;f=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;f=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,y:f}};this.windowCoordinates=function(a){a=g.pageCoordinates(a);return{x:a.x-document.body.scrollLeft-document.documentElement.scrollLeft,y:a.y-document.body.scrollTop-document.documentElement.scrollTop}};this.wheelDelta=function(a){var b=0;if(a.wheelDelta)b=
function(a){if(!a)a=window.event;var b=0,f=0;if(a.pageX||a.pageY){b=a.pageX;f=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;f=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,y:f}};this.windowCoordinates=function(a){a=g.pageCoordinates(a);return{x:a.x-document.body.scrollLeft-document.documentElement.scrollLeft,y:a.y-document.body.scrollTop-document.documentElement.scrollTop}};this.wheelDelta=function(a){var b=
window.event;var b=0,f=0;if(a.pageX||a.pageY){b=a.pageX;f=a.pageY}else if(a.clientX||a.clientY){b=a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;f=a.clientY+document.body.scrollTop+document.documentElement.scrollTop}return{x:b,y:f}};this.windowCoordinates=function(a){a=g.pageCoordinates(a);return{x:a.x-document.body.scrollLeft-document.documentElement.scrollLeft,y:a.y-document.body.scrollTop-document.documentElement.scrollTop}};this.wheelDelta=function(a){var b=0;if(a.wheelDelta)b=
b);document.getElementsByTagName("head")[0].appendChild(f)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,f,l,n){var o=g.windowSize(),L=document.body.scrollLeft+document.documentElement.scrollLeft,u=document.body.scrollTop+document.documentElement.scrollTop,q=g.widgetPageCoordinates(a.offsetParent),
a);f.setAttribute("type","text/css");f.setAttribute("rel","stylesheet");b!=""&&b!="all"&&f.setAttribute("media",b);document.getElementsByTagName("head")[0].appendChild(f)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,f,l,n){var o=g.windowSize(),L=document.body.scrollLeft+document.documentElement.scrollLeft,
b);document.getElementsByTagName("head")[0].appendChild(f)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,f,l,n){var o=g.windowSize(),L=document.body.scrollLeft+document.documentElement.scrollLeft,u=document.body.scrollTop+document.documentElement.scrollTop,q=g.widgetPageCoordinates(a.offsetParent),
"stylesheet");b!=""&&b!="all"&&f.setAttribute("media",b);document.getElementsByTagName("head")[0].appendChild(f)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,f,k,h){var o=g.windowSize(),E=document.body.scrollLeft+document.documentElement.scrollLeft,u=document.body.scrollTop+document.documentElement.scrollTop,
"stylesheet");b!=""&&b!="all"&&f.setAttribute("media",b);document.getElementsByTagName("head")[0].appendChild(f)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,f,k,h){var o=g.windowSize(),E=document.body.scrollLeft+document.documentElement.scrollLeft,v=document.body.scrollTop+document.documentElement.scrollTop,
"stylesheet");b!=""&&b!="all"&&f.setAttribute("media",b);document.getElementsByTagName("head")[0].appendChild(f)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,f,k,h){var o=g.windowSize(),E=document.body.scrollLeft+document.documentElement.scrollLeft,u=document.body.scrollTop+document.documentElement.scrollTop,
function(a,b){if(document.createStyleSheet)setTimeout(function(){document.createStyleSheet(a)},15);else{var e=document.createElement("link");e.setAttribute("type","text/css");e.setAttribute("href",a);e.setAttribute("type","text/css");e.setAttribute("rel","stylesheet");b!=""&&b!="all"&&e.setAttribute("media",b);document.getElementsByTagName("head")[0].appendChild(e)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth; b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,e,k,i){var n=h.windowSize(),K=document.body.scrollLeft+document.documentElement.scrollLeft,u=document.body.scrollTop+document.documentElement.scrollTop,q=h.widgetPageCoordinates(a.offsetParent),D=["left","right"],x=["top","bottom"],A=h.px(a,"maxWidth")||a.offsetWidth,F=h.px(a,"maxHeight")||a.offsetHeight;if(b+A>K+n.x){k-=q.x;b=a.offsetParent.offsetWidth-(k+h.px(a,"marginRight"));k=1}else{b-=q.x;b-=h.px(a,"marginLeft");
this.addStyleSheet=function(a,b){if(document.createStyleSheet)setTimeout(function(){document.createStyleSheet(a)},15);else{var e=document.createElement("link");e.setAttribute("type","text/css");e.setAttribute("href",a);e.setAttribute("type","text/css");e.setAttribute("rel","stylesheet");b!=""&&b!="all"&&e.setAttribute("media",b);document.getElementsByTagName("head")[0].appendChild(e)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a= document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,e,j,i){var n=g.windowSize(),J=document.body.scrollLeft+document.documentElement.scrollLeft,u=document.body.scrollTop+document.documentElement.scrollTop,q=g.widgetPageCoordinates(a.offsetParent),C=["left","right"],w=["top","bottom"],z=g.px(a,"maxWidth")||a.offsetWidth,E=g.px(a,"maxHeight")||a.offsetHeight;if(b+z>J+n.x){j-=q.x;b=a.offsetParent.offsetWidth-(j+g.px(a,"marginRight"));
function(a,b){if(document.createStyleSheet)setTimeout(function(){document.createStyleSheet(a)},15);else{var e=document.createElement("link");e.setAttribute("type","text/css");e.setAttribute("href",a);e.setAttribute("type","text/css");e.setAttribute("rel","stylesheet");b!=""&&b!="all"&&e.setAttribute("media",b);document.getElementsByTagName("head")[0].appendChild(e)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,e,k,i){var n=h.windowSize(),K=document.body.scrollLeft+document.documentElement.scrollLeft,u=document.body.scrollTop+document.documentElement.scrollTop,q=h.widgetPageCoordinates(a.offsetParent),D=["left","right"],x=["top","bottom"],A=h.px(a,"maxWidth")||a.offsetWidth,F=h.px(a,"maxHeight")||a.offsetHeight;if(b+A>K+n.x){k-=q.x;b=a.offsetParent.offsetWidth-(k+h.px(a,"marginRight"));k=1}else{b-=q.x;b-=h.px(a,"marginLeft");
++k}while(o)}return false};this.removeCssRule=function(a){return g.getCssRule(a,"delete")};this.addStyleSheet=function(a,b){if(document.createStyleSheet)setTimeout(function(){document.createStyleSheet(a)},15);else{var f=document.createElement("link");f.setAttribute("type","text/css");f.setAttribute("href",a);f.setAttribute("type","text/css");f.setAttribute("rel","stylesheet");b!=""&&b!="all"&&f.setAttribute("media",b);document.getElementsByTagName("head")[0].appendChild(f)}};this.windowSize=function(){var a, b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,f,h,k){var o=g.windowSize(),E=document.body.scrollLeft+document.documentElement.scrollLeft,u=document.body.scrollTop+document.documentElement.scrollTop,r=g.widgetPageCoordinates(a.offsetParent),y=["left","right"],x=["top","bottom"],F=g.px(a,"maxWidth")||a.offsetWidth,v=g.px(a,"maxHeight")||
a);f.setAttribute("type","text/css");f.setAttribute("rel","stylesheet");b!=""&&b!="all"&&f.setAttribute("media",b);document.getElementsByTagName("head")[0].appendChild(f)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,f,h,k){var o=g.windowSize(),E=document.body.scrollLeft+document.documentElement.scrollLeft,
++k}while(o)}return false};this.removeCssRule=function(a){return g.getCssRule(a,"delete")};this.addStyleSheet=function(a,b){if(document.createStyleSheet)setTimeout(function(){document.createStyleSheet(a)},15);else{var f=document.createElement("link");f.setAttribute("type","text/css");f.setAttribute("href",a);f.setAttribute("type","text/css");f.setAttribute("rel","stylesheet");b!=""&&b!="all"&&f.setAttribute("media",b);document.getElementsByTagName("head")[0].appendChild(f)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,f,h,k){var o=g.windowSize(),E=document.body.scrollLeft+document.documentElement.scrollLeft,u=document.body.scrollTop+document.documentElement.scrollTop,r=g.widgetPageCoordinates(a.offsetParent),y=["left","right"],x=["top","bottom"],F=g.px(a,"maxWidth")||a.offsetWidth,v=g.px(a,"maxHeight")||
"text/css");b.setAttribute("rel","stylesheet");document.getElementsByTagName("head")[0].appendChild(b)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,f,m,l){var o=k.windowSize(),B=document.body.scrollLeft+document.documentElement.scrollLeft,r=document.body.scrollTop+document.documentElement.scrollTop;
m.deleteRule(l):m.removeRule(l);return true}else return n;++l}while(n)}return false};this.removeCssRule=function(a){return k.getCssRule(a,"delete")};this.addStyleSheet=function(a){if(document.createStyleSheet)setTimeout(function(){document.createStyleSheet(a)},15);else{var b=document.createElement("link");b.setAttribute("type","text/css");b.setAttribute("href",a);b.setAttribute("type","text/css");b.setAttribute("rel","stylesheet");document.getElementsByTagName("head")[0].appendChild(b)}};this.windowSize= function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,f,m,l){var n=k.windowSize(),E=document.body.scrollLeft+document.documentElement.scrollLeft,q=document.body.scrollTop+document.documentElement.scrollTop;if(b+a.offsetWidth>E+n.x)b=m-a.offsetWidth-k.px(a,"marginRight");else b-=k.px(a,"marginLeft");if(f+a.offsetHeight>q+n.y){if(l>
"text/css");b.setAttribute("rel","stylesheet");document.getElementsByTagName("head")[0].appendChild(b)}};this.windowSize=function(){var a,b;if(typeof window.innerWidth==="number"){a=window.innerWidth;b=window.innerHeight}else{a=document.documentElement.clientWidth;b=document.documentElement.clientHeight}return{x:a,y:b}};this.fitToWindow=function(a,b,f,m,l){var o=k.windowSize(),B=document.body.scrollLeft+document.documentElement.scrollLeft,r=document.body.scrollTop+document.documentElement.scrollTop;
_default:[0,"",""]};y.optgroup=y.option;y.tbody=y.tfoot=y.colgroup=y.caption=y.thead;y.th=y.td;if(!d.support.htmlSerialize)y._default=[1,"div<div>","</div>"];d.fn.extend({text:function(a){if(d.isFunction(a))return this.each(function(b){var e=d(this);return e.text(a.call(this,b,e.text()))});if(typeof a!=="object"&&a!==v)return this.empty().append((this[0]&&this[0].ownerDocument||r).createTextNode(a));return d.getText(this)},wrapAll:function(a){if(d.isFunction(a))return this.each(function(e){d(this).wrapAll(a.call(this, e))});if(this[0]){var b=d(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var e=this;e.firstChild&&e.firstChild.nodeType===1;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(a){return this.each(function(){d(this).contents().wrapAll(a)})},wrap:function(a){return this.each(function(){d(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){d.nodeName(this,"body")||d(this).replaceWith(this.childNodes)}).end()},
this[0].ownerDocument||r).createTextNode(a));return c.getText(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(e){c(this).wrapAll(a.call(this,e))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var e=this;e.firstChild&&e.firstChild.nodeType===1;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(a){return this.each(function(){c(this).contents().wrapAll(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},
_default:[0,"",""]};y.optgroup=y.option;y.tbody=y.tfoot=y.colgroup=y.caption=y.thead;y.th=y.td;if(!d.support.htmlSerialize)y._default=[1,"div<div>","</div>"];d.fn.extend({text:function(a){if(d.isFunction(a))return this.each(function(b){var e=d(this);return e.text(a.call(this,b,e.text()))});if(typeof a!=="object"&&a!==v)return this.empty().append((this[0]&&this[0].ownerDocument||r).createTextNode(a));return d.getText(this)},wrapAll:function(a){if(d.isFunction(a))return this.each(function(e){d(this).wrapAll(a.call(this,e))});if(this[0]){var b=d(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var e=this;e.firstChild&&e.firstChild.nodeType===1;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(a){return this.each(function(){d(this).contents().wrapAll(a)})},wrap:function(a){return this.each(function(){d(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){d.nodeName(this,"body")||d(this).replaceWith(this.childNodes)}).end()},
this.setValue(store || this.id, this.stringify(obj || this.readVals));
this.setValue(store || this.id, this.stringify(obj || readVals));
write: function (store, obj) { try { this.setValue(store || this.id, this.stringify(obj || this.readVals)); } catch(e) { this.log("GM_config failed to save settings!"); } this.readVals = {}; },
this.readVals = {};
write: function (store, obj) { try { this.setValue(store || this.id, this.stringify(obj || this.readVals)); } catch(e) { this.log("GM_config failed to save settings!"); } this.readVals = {}; },
var i, num, b, c, v, newEl, HTML_str = "", chapter_text = "", psalm_title_re = /^(?:1(?:0[4-7]?|1[1-9]|3[5-7]|4[6-9]|50)?|2|33|43|71|9[13-79])$/, start_key = 0, stop_key = verse_ids.length;
var b, c, chapter_text = "", i, HTML_str = "", newEl, num, psalm_title_re = /^(?:1(?:0[4-7]?|1[1-9]|3[5-7]|4[6-9]|50)?|2|33|43|71|9[13-79])$/, start_key = 0, stop_key = verse_ids.length, v;
function write_verses(action, direction, verse_ids, verse_HTML) { ///NOTE: psalm_title_re determines if a psalm does not have a title. ///TODO: Determine if psalm_title_re should be global for performance reasons or otherwise. var i, num, b, c, v, newEl, HTML_str = "", chapter_text = "", ///TODO: Determine if this should be a global variable. psalm_title_re = /^(?:1(?:0[4-7]?|1[1-9]|3[5-7]|4[6-9]|50)?|2|33|43|71|9[13-79])$/, start_key = 0, stop_key = verse_ids.length; /// Currently only MORPHOLOGICAL_SEARCH searches data at the word level, so it is the only action that might stop in the middle of a verse and find more words in the same verse as the user scrolls. if (action == MORPHOLOGICAL_SEARCH) { if (direction == ADDITIONAL) { /// Is the first verse returned the same as the bottom verse on the page? if (bottom_verse == verse_ids[0]) start_key = 1; } else { /// Is the last verse returned the same as the top verse on the page? if (top_verse == verse_ids[stop_key - 1]) --start_key; } } for (i = start_key; i < stop_key; ++i) { num = verse_ids[i]; /// Calculate the verse. v = num % 1000; /// Calculate the chapter. c = ((num - v) % 1000000) / 1000; /// Calculate the book by number (e.g., Genesis == 1). b = (num - v - c * 1000) / 1000000; ///TODO: Determine if it would be better to have two for loops instead of the if statement inside of this one. if (action == VERSE_LOOKUP) { /// Is this the first verse or the Psalm title? if (v < 2) { /// Is this chapter 1? (We need to know if we should display the book name.) if (c == 1) { HTML_str += "<div class=book id=" + num + "_title>" + lang.books_long_pretitle[b] + "<h1>" + lang.books_long_main[b] + "</h1>" + lang.books_long_posttitle[b] + "</div>"; } else if (b != 19 || v == 0 || psalm_title_re.test(c)) { /// Display chapter/psalm number (but not on verse 1 of psalms that have titles). /// Is this the book of Psalms? (Psalms have a special name.) if (b == 19) { chapter_text = lang.psalm; } else { chapter_text = lang.chapter; } HTML_str += "<h3 class=chapter id=" + num + "_chapter>" + chapter_text + " " + c + "</h3>"; } /// Is this a Psalm title (i.e., verse 0)? (Psalm titles are displayed specially.) if (v == 0) { HTML_str += "<div class=pslam_title id=" + num + "_verse>" + verse_HTML[i] + "</div>"; } else { HTML_str += "<div class=first_verse id=" + num + "_verse>" + verse_HTML[i] + "</div>"; } } else { HTML_str += "<div class=verse id=" + num + "_verse>" + v + " " + verse_HTML[i] + "</div>"; } /// Searching } else { /// Change verse 0 to "title" (i.e., Psalm titles). (Display Psalm 3:title instead of Psalm 3:0.) if (v == 0) v = lang.title; /// Is this verse from a different book than the last verse? if (b != last_book) { /// We only need to print out the book if it is different from the last verse. last_book = b; HTML_str += "<h1 class=book id=" + num + "_title>" + lang.books_short[b] + "</h1>"; /// Convert the book number to text. } HTML_str += "<div class=search_verse id=" + num + "_search>" + c + ":" + v + " " + verse_HTML[i] + "</div>"; } } newEl = doc.createElement("div"); ///NOTE: If innerHTML disappears in the future (because it is not (yet) in the "standards"), /// a simple (but slow) alternative is to use the innerDOM script from http://innerdom.sourceforge.net/ or BetterInnerHTML from http://www.optimalworks.net/resources/betterinnerhtml/. /// Also using "var range = doc.createRange();var newEl = range.createContextualFragment(HTML_str); is also a possibility. newEl.innerHTML = HTML_str; if (direction == ADDITIONAL) { page.appendChild(newEl); /// Record the bottom most verse reference and id so that we know where to start from for the next search or verse lookup as the user scrolls. ///NOTE: For VERSE_LOOKUP and STANDARD_SEARCH, the bottom_id and bottom_verse are the same because the search is preformed at the verse level. /// MORPHOLOGICAL_SEARCH is performed at the word level, so the id is different from the verse. /// The id for MORPHOLOGICAL_SEARCH is recorded in handle_new_verses(), currently. ///TODO: Determine the pros/cons of using an if statement to prevent morphological searches from recording the id here, since it is overwritten later. bottom_id = bottom_verse = num; } else { page.insertBefore(newEl, page.childNodes[0]); /// The new content that was just added to the top of the page will push the other contents downward. /// Therefore, the page must be instantly scrolled down the same amount as the height of the content that was added. win.scrollTo(0, scroll_pos = win.pageYOffset + newEl.clientHeight); /// Record the top most verse reference and id so that we know where to start from for the next search or verse lookup as the user scrolls. ///NOTE: For VERSE_LOOKUP and STANDARD_SEARCH, the top_id and top_verse are the same because the search is preformed at the verse level. /// MORPHOLOGICAL_SEARCH is performed at the word level, so the id is different from the verse. /// The id for MORPHOLOGICAL_SEARCH is recorded in handle_new_verses(), currently. ///TODO: Determine the pros/cons of using an if statement to prevent morphological searches from recording the id here, since it is overwritten later. top_id = top_verse = verse_ids[0]; } /// If it is not going to already, figure out which verses are presently displayed on the screen. if (!looking_up_verse_range) { looking_up_verse_range = true; setTimeout(find_current_range, look_up_range_speed); } }
} else if (b != 19 || v == 0 || psalm_title_re.test(c)) {
} else if (b != 19 || v === 0 || psalm_title_re.test(c)) {
function write_verses(action, direction, verse_ids, verse_HTML) { ///NOTE: psalm_title_re determines if a psalm does not have a title. ///TODO: Determine if psalm_title_re should be global for performance reasons or otherwise. var b, c, chapter_text = "", i, HTML_str = "", newEl, num, psalm_title_re = /^(?:1(?:0[4-7]?|1[1-9]|3[5-7]|4[6-9]|50)?|2|33|43|71|9[13-79])$/, ///TODO: Determine if this should be a global variable. start_key = 0, stop_key = verse_ids.length, v; /// Currently only MORPHOLOGICAL_SEARCH searches data at the word level, so it is the only action that might stop in the middle of a verse and find more words in the same verse as the user scrolls. if (action == MORPHOLOGICAL_SEARCH) { if (direction == ADDITIONAL) { /// Is the first verse returned the same as the bottom verse on the page? if (bottom_verse == verse_ids[0]) start_key = 1; } else { /// Is the last verse returned the same as the top verse on the page? if (top_verse == verse_ids[stop_key - 1]) --start_key; } } for (i = start_key; i < stop_key; ++i) { num = verse_ids[i]; v = num % 1000; /// Calculate the verse. c = ((num - v) % 1000000) / 1000; /// Calculate the chapter. b = (num - v - c * 1000) / 1000000; /// Calculate the book by number (e.g., Genesis == 1). ///TODO: Determine if it would be better to have two for loops instead of the if statement inside of this one. if (action == VERSE_LOOKUP) { /// Is this the first verse or the Psalm title? if (v < 2) { /// Is this chapter 1? (We need to know if we should display the book name.) if (c == 1) { HTML_str += "<div class=book id=" + num + "_title>" + lang.books_long_pretitle[b] + "<h1>" + lang.books_long_main[b] + "</h1>" + lang.books_long_posttitle[b] + "</div>"; } else if (b != 19 || v == 0 || psalm_title_re.test(c)) { /// Display chapter/psalm number (but not on verse 1 of psalms that have titles). /// Is this the book of Psalms? (Psalms have a special name.) if (b == 19) { chapter_text = lang.psalm; } else { chapter_text = lang.chapter; } HTML_str += "<h3 class=chapter id=" + num + "_chapter>" + chapter_text + " " + c + "</h3>"; } /// Is this a Psalm title (i.e., verse 0)? (Psalm titles are displayed specially.) if (v == 0) { HTML_str += "<div class=pslam_title id=" + num + "_verse>" + verse_HTML[i] + "</div>"; } else { HTML_str += "<div class=first_verse id=" + num + "_verse>" + verse_HTML[i] + "</div>"; } } else { HTML_str += "<div class=verse id=" + num + "_verse>" + v + " " + verse_HTML[i] + "</div>"; } /// Searching } else { /// Change verse 0 to "title" (i.e., Psalm titles). (Display Psalm 3:title instead of Psalm 3:0.) if (v == 0) v = lang.title; /// Is this verse from a different book than the last verse? if (b != last_book) { /// We only need to print out the book if it is different from the last verse. last_book = b; HTML_str += "<h1 class=book id=" + num + "_title>" + lang.books_short[b] + "</h1>"; /// Convert the book number to text. } HTML_str += "<div class=search_verse id=" + num + "_search>" + c + ":" + v + " " + verse_HTML[i] + "</div>"; } } newEl = doc.createElement("div"); ///NOTE: If innerHTML disappears in the future (because it is not (yet) in the "standards"), /// a simple (but slow) alternative is to use the innerDOM script from http://innerdom.sourceforge.net/ or BetterInnerHTML from http://www.optimalworks.net/resources/betterinnerhtml/. /// Also using "var range = doc.createRange();var newEl = range.createContextualFragment(HTML_str); is also a possibility. newEl.innerHTML = HTML_str; if (direction == ADDITIONAL) { page.appendChild(newEl); /// Record the bottom most verse reference and id so that we know where to start from for the next search or verse lookup as the user scrolls. ///NOTE: For VERSE_LOOKUP and STANDARD_SEARCH, the bottom_id and bottom_verse are the same because the search is preformed at the verse level. /// MORPHOLOGICAL_SEARCH is performed at the word level, so the id is different from the verse. /// The id for MORPHOLOGICAL_SEARCH is recorded in handle_new_verses(), currently. ///TODO: Determine the pros/cons of using an if statement to prevent morphological searches from recording the id here, since it is overwritten later. bottom_id = bottom_verse = num; } else { page.insertBefore(newEl, page.childNodes[0]); /// The new content that was just added to the top of the page will push the other contents downward. /// Therefore, the page must be instantly scrolled down the same amount as the height of the content that was added. win.scrollTo(0, scroll_pos = win.pageYOffset + newEl.clientHeight); /// Record the top most verse reference and id so that we know where to start from for the next search or verse lookup as the user scrolls. ///NOTE: For VERSE_LOOKUP and STANDARD_SEARCH, the top_id and top_verse are the same because the search is preformed at the verse level. /// MORPHOLOGICAL_SEARCH is performed at the word level, so the id is different from the verse. /// The id for MORPHOLOGICAL_SEARCH is recorded in handle_new_verses(), currently. ///TODO: Determine the pros/cons of using an if statement to prevent morphological searches from recording the id here, since it is overwritten later. top_id = top_verse = verse_ids[0]; } /// If it is not going to already, figure out which verses are presently displayed on the screen. if (!looking_up_verse_range) { looking_up_verse_range = true; setTimeout(find_current_range, lookup_range_speed); } }
if (v == 0) {
if (v === 0) {
function write_verses(action, direction, verse_ids, verse_HTML) { ///NOTE: psalm_title_re determines if a psalm does not have a title. ///TODO: Determine if psalm_title_re should be global for performance reasons or otherwise. var b, c, chapter_text = "", i, HTML_str = "", newEl, num, psalm_title_re = /^(?:1(?:0[4-7]?|1[1-9]|3[5-7]|4[6-9]|50)?|2|33|43|71|9[13-79])$/, ///TODO: Determine if this should be a global variable. start_key = 0, stop_key = verse_ids.length, v; /// Currently only MORPHOLOGICAL_SEARCH searches data at the word level, so it is the only action that might stop in the middle of a verse and find more words in the same verse as the user scrolls. if (action == MORPHOLOGICAL_SEARCH) { if (direction == ADDITIONAL) { /// Is the first verse returned the same as the bottom verse on the page? if (bottom_verse == verse_ids[0]) start_key = 1; } else { /// Is the last verse returned the same as the top verse on the page? if (top_verse == verse_ids[stop_key - 1]) --start_key; } } for (i = start_key; i < stop_key; ++i) { num = verse_ids[i]; v = num % 1000; /// Calculate the verse. c = ((num - v) % 1000000) / 1000; /// Calculate the chapter. b = (num - v - c * 1000) / 1000000; /// Calculate the book by number (e.g., Genesis == 1). ///TODO: Determine if it would be better to have two for loops instead of the if statement inside of this one. if (action == VERSE_LOOKUP) { /// Is this the first verse or the Psalm title? if (v < 2) { /// Is this chapter 1? (We need to know if we should display the book name.) if (c == 1) { HTML_str += "<div class=book id=" + num + "_title>" + lang.books_long_pretitle[b] + "<h1>" + lang.books_long_main[b] + "</h1>" + lang.books_long_posttitle[b] + "</div>"; } else if (b != 19 || v == 0 || psalm_title_re.test(c)) { /// Display chapter/psalm number (but not on verse 1 of psalms that have titles). /// Is this the book of Psalms? (Psalms have a special name.) if (b == 19) { chapter_text = lang.psalm; } else { chapter_text = lang.chapter; } HTML_str += "<h3 class=chapter id=" + num + "_chapter>" + chapter_text + " " + c + "</h3>"; } /// Is this a Psalm title (i.e., verse 0)? (Psalm titles are displayed specially.) if (v == 0) { HTML_str += "<div class=pslam_title id=" + num + "_verse>" + verse_HTML[i] + "</div>"; } else { HTML_str += "<div class=first_verse id=" + num + "_verse>" + verse_HTML[i] + "</div>"; } } else { HTML_str += "<div class=verse id=" + num + "_verse>" + v + " " + verse_HTML[i] + "</div>"; } /// Searching } else { /// Change verse 0 to "title" (i.e., Psalm titles). (Display Psalm 3:title instead of Psalm 3:0.) if (v == 0) v = lang.title; /// Is this verse from a different book than the last verse? if (b != last_book) { /// We only need to print out the book if it is different from the last verse. last_book = b; HTML_str += "<h1 class=book id=" + num + "_title>" + lang.books_short[b] + "</h1>"; /// Convert the book number to text. } HTML_str += "<div class=search_verse id=" + num + "_search>" + c + ":" + v + " " + verse_HTML[i] + "</div>"; } } newEl = doc.createElement("div"); ///NOTE: If innerHTML disappears in the future (because it is not (yet) in the "standards"), /// a simple (but slow) alternative is to use the innerDOM script from http://innerdom.sourceforge.net/ or BetterInnerHTML from http://www.optimalworks.net/resources/betterinnerhtml/. /// Also using "var range = doc.createRange();var newEl = range.createContextualFragment(HTML_str); is also a possibility. newEl.innerHTML = HTML_str; if (direction == ADDITIONAL) { page.appendChild(newEl); /// Record the bottom most verse reference and id so that we know where to start from for the next search or verse lookup as the user scrolls. ///NOTE: For VERSE_LOOKUP and STANDARD_SEARCH, the bottom_id and bottom_verse are the same because the search is preformed at the verse level. /// MORPHOLOGICAL_SEARCH is performed at the word level, so the id is different from the verse. /// The id for MORPHOLOGICAL_SEARCH is recorded in handle_new_verses(), currently. ///TODO: Determine the pros/cons of using an if statement to prevent morphological searches from recording the id here, since it is overwritten later. bottom_id = bottom_verse = num; } else { page.insertBefore(newEl, page.childNodes[0]); /// The new content that was just added to the top of the page will push the other contents downward. /// Therefore, the page must be instantly scrolled down the same amount as the height of the content that was added. win.scrollTo(0, scroll_pos = win.pageYOffset + newEl.clientHeight); /// Record the top most verse reference and id so that we know where to start from for the next search or verse lookup as the user scrolls. ///NOTE: For VERSE_LOOKUP and STANDARD_SEARCH, the top_id and top_verse are the same because the search is preformed at the verse level. /// MORPHOLOGICAL_SEARCH is performed at the word level, so the id is different from the verse. /// The id for MORPHOLOGICAL_SEARCH is recorded in handle_new_verses(), currently. ///TODO: Determine the pros/cons of using an if statement to prevent morphological searches from recording the id here, since it is overwritten later. top_id = top_verse = verse_ids[0]; } /// If it is not going to already, figure out which verses are presently displayed on the screen. if (!looking_up_verse_range) { looking_up_verse_range = true; setTimeout(find_current_range, lookup_range_speed); } }
if (v == 0) v = lang.title;
if (v === 0) v = lang.title;
function write_verses(action, direction, verse_ids, verse_HTML) { ///NOTE: psalm_title_re determines if a psalm does not have a title. ///TODO: Determine if psalm_title_re should be global for performance reasons or otherwise. var b, c, chapter_text = "", i, HTML_str = "", newEl, num, psalm_title_re = /^(?:1(?:0[4-7]?|1[1-9]|3[5-7]|4[6-9]|50)?|2|33|43|71|9[13-79])$/, ///TODO: Determine if this should be a global variable. start_key = 0, stop_key = verse_ids.length, v; /// Currently only MORPHOLOGICAL_SEARCH searches data at the word level, so it is the only action that might stop in the middle of a verse and find more words in the same verse as the user scrolls. if (action == MORPHOLOGICAL_SEARCH) { if (direction == ADDITIONAL) { /// Is the first verse returned the same as the bottom verse on the page? if (bottom_verse == verse_ids[0]) start_key = 1; } else { /// Is the last verse returned the same as the top verse on the page? if (top_verse == verse_ids[stop_key - 1]) --start_key; } } for (i = start_key; i < stop_key; ++i) { num = verse_ids[i]; v = num % 1000; /// Calculate the verse. c = ((num - v) % 1000000) / 1000; /// Calculate the chapter. b = (num - v - c * 1000) / 1000000; /// Calculate the book by number (e.g., Genesis == 1). ///TODO: Determine if it would be better to have two for loops instead of the if statement inside of this one. if (action == VERSE_LOOKUP) { /// Is this the first verse or the Psalm title? if (v < 2) { /// Is this chapter 1? (We need to know if we should display the book name.) if (c == 1) { HTML_str += "<div class=book id=" + num + "_title>" + lang.books_long_pretitle[b] + "<h1>" + lang.books_long_main[b] + "</h1>" + lang.books_long_posttitle[b] + "</div>"; } else if (b != 19 || v == 0 || psalm_title_re.test(c)) { /// Display chapter/psalm number (but not on verse 1 of psalms that have titles). /// Is this the book of Psalms? (Psalms have a special name.) if (b == 19) { chapter_text = lang.psalm; } else { chapter_text = lang.chapter; } HTML_str += "<h3 class=chapter id=" + num + "_chapter>" + chapter_text + " " + c + "</h3>"; } /// Is this a Psalm title (i.e., verse 0)? (Psalm titles are displayed specially.) if (v == 0) { HTML_str += "<div class=pslam_title id=" + num + "_verse>" + verse_HTML[i] + "</div>"; } else { HTML_str += "<div class=first_verse id=" + num + "_verse>" + verse_HTML[i] + "</div>"; } } else { HTML_str += "<div class=verse id=" + num + "_verse>" + v + " " + verse_HTML[i] + "</div>"; } /// Searching } else { /// Change verse 0 to "title" (i.e., Psalm titles). (Display Psalm 3:title instead of Psalm 3:0.) if (v == 0) v = lang.title; /// Is this verse from a different book than the last verse? if (b != last_book) { /// We only need to print out the book if it is different from the last verse. last_book = b; HTML_str += "<h1 class=book id=" + num + "_title>" + lang.books_short[b] + "</h1>"; /// Convert the book number to text. } HTML_str += "<div class=search_verse id=" + num + "_search>" + c + ":" + v + " " + verse_HTML[i] + "</div>"; } } newEl = doc.createElement("div"); ///NOTE: If innerHTML disappears in the future (because it is not (yet) in the "standards"), /// a simple (but slow) alternative is to use the innerDOM script from http://innerdom.sourceforge.net/ or BetterInnerHTML from http://www.optimalworks.net/resources/betterinnerhtml/. /// Also using "var range = doc.createRange();var newEl = range.createContextualFragment(HTML_str); is also a possibility. newEl.innerHTML = HTML_str; if (direction == ADDITIONAL) { page.appendChild(newEl); /// Record the bottom most verse reference and id so that we know where to start from for the next search or verse lookup as the user scrolls. ///NOTE: For VERSE_LOOKUP and STANDARD_SEARCH, the bottom_id and bottom_verse are the same because the search is preformed at the verse level. /// MORPHOLOGICAL_SEARCH is performed at the word level, so the id is different from the verse. /// The id for MORPHOLOGICAL_SEARCH is recorded in handle_new_verses(), currently. ///TODO: Determine the pros/cons of using an if statement to prevent morphological searches from recording the id here, since it is overwritten later. bottom_id = bottom_verse = num; } else { page.insertBefore(newEl, page.childNodes[0]); /// The new content that was just added to the top of the page will push the other contents downward. /// Therefore, the page must be instantly scrolled down the same amount as the height of the content that was added. win.scrollTo(0, scroll_pos = win.pageYOffset + newEl.clientHeight); /// Record the top most verse reference and id so that we know where to start from for the next search or verse lookup as the user scrolls. ///NOTE: For VERSE_LOOKUP and STANDARD_SEARCH, the top_id and top_verse are the same because the search is preformed at the verse level. /// MORPHOLOGICAL_SEARCH is performed at the word level, so the id is different from the verse. /// The id for MORPHOLOGICAL_SEARCH is recorded in handle_new_verses(), currently. ///TODO: Determine the pros/cons of using an if statement to prevent morphological searches from recording the id here, since it is overwritten later. top_id = top_verse = verse_ids[0]; } /// If it is not going to already, figure out which verses are presently displayed on the screen. if (!looking_up_verse_range) { looking_up_verse_range = true; setTimeout(find_current_range, lookup_range_speed); } }
log.debug("writeData: [" + str1 + "]");
writeData: function(data, dataLen) { try { if (!this.transport || !this.transport.isAlive()) { log.error("Session.transport is not available"); this.disconnect(); this.connect(); return -1; } if (arguments.length == 0) { log.debug("Session.writeData called with no args"); return -1; } else if (arguments.length == 1) { dataLen = data.length; } var str1 = this.expand(data); log.debug("writeData: [" + str1 + "]"); var num_written = this.ostream.writeString(data); return num_written; } catch(ex) { log.debug(ex, "writeData failed: "); } return -1; },
log.debug(ex, "writeData failed: ");
log.debug("writeData failed: " + ex);
writeData: function(data, dataLen) { try { if (!this.transport || !this.transport.isAlive()) { log.error("Session.transport is not available"); this.disconnect(); this.connect(); return -1; } if (arguments.length == 0) { log.debug("Session.writeData called with no args"); return -1; } else if (arguments.length == 1) { dataLen = data.length; } var str1 = this.expand(data); log.debug("writeData: [" + str1 + "]"); var num_written = this.ostream.writeString(data); return num_written; } catch(ex) { log.debug(ex, "writeData failed: "); } return -1; },
if(!value) return;
if(!value && typeof value != "number") return;
function writeField(field, value, isMacro) { if(!value) return; value = value + ""; // convert integers to strings Zotero.write(",\n\t"+field+" = "); if(!isMacro) Zotero.write("{"); // url field is preserved, for use with \href and \url // Other fields (DOI?) may need similar treatment if(!((field == "url") || (field == "doi"))) { // I hope these are all the escape characters! value = value.replace(/[|\<\>\~\^\\]/g, mapEscape).replace(/([\#\$\%\&\_])/g, "\\$1"); // Case of words with uppercase characters in non-initial positions is preserved with braces. if(!isMacro&&field != "pages") value = value.replace(/([^\s]+[A-Z][^\s]*)/g, "{$1}"); } if (Zotero.getOption("exportCharset") != "UTF-8") { value = value.replace(/[\u0080-\uFFFF]/g, mapAccent); } Zotero.write(value); if(!isMacro) Zotero.write("}");}
if(!((field == "url") || (field == "doi"))) {
if(!((field == "url") || (field == "doi") | (field == "file"))) {
function writeField(field, value, isMacro) { if(!value && typeof value != "number") return; value = value + ""; // convert integers to strings Zotero.write(",\n\t"+field+" = "); if(!isMacro) Zotero.write("{"); // url field is preserved, for use with \href and \url // Other fields (DOI?) may need similar treatment if(!((field == "url") || (field == "doi"))) { // I hope these are all the escape characters! value = value.replace(/[|\<\>\~\^\\]/g, mapEscape).replace(/([\#\$\%\&\_])/g, "\\$1"); // Case of words with uppercase characters in non-initial positions is preserved with braces. if(!isMacro&&field != "pages") value = value.replace(/([^\s]+[A-Z][^\s]*)/g, "{$1}"); } if (Zotero.getOption("exportCharset") != "UTF-8") { value = value.replace(/[\u0080-\uFFFF]/g, mapAccent); } Zotero.write(value); if(!isMacro) Zotero.write("}");}
if (ABCMidiWriter) { midiwriter = new ABCMidiWriter(); midiwriter.writeABC(tune); }
function writeOneTune(tune, warnings, count) { if (warnings) { if (warnings.join) { warnings = warnings.join("<br />"); $('warnings').innerHTML = warnings; } else { throw warnings; } } else $('warnings').innerHTML = 'No errors'; var canvas = $("canvas"+count); paper = Raphael(canvas, 1500, 1500); printer = new ABCPrinter(paper); printer.printABC(tune); printer.addSelectListener(editArea); abc_mousemove(); }
$('warnings').update(warnings);
$('warnings').innerHTML = warnings;
function writeOneTune(tune, warnings, count) { if (warnings) { if (warnings.join) { warnings = warnings.join("<br />"); $('warnings').update(warnings); } else { throw warnings; } } else $('warnings').update('No errors'); var canvas = $("canvas"+count); paper = Raphael(canvas, 1500, 1500); printer = new ABCPrinter(paper); printer.printABC(tune); printer.addSelectListener(editArea); abc_mousemove(); }
$('warnings').update('No errors');
$('warnings').innerHTML = 'No errors';
function writeOneTune(tune, warnings, count) { if (warnings) { if (warnings.join) { warnings = warnings.join("<br />"); $('warnings').update(warnings); } else { throw warnings; } } else $('warnings').update('No errors'); var canvas = $("canvas"+count); paper = Raphael(canvas, 1500, 1500); printer = new ABCPrinter(paper); printer.printABC(tune); printer.addSelectListener(editArea); abc_mousemove(); }
} else { throw warnings; }
function writeOneTune(tune, warnings, count) { if (warnings) { warnings = warnings.join("<br />"); $('warnings').update(warnings); } else $('warnings').update('No errors'); var canvas = $("canvas"+count); paper = Raphael(canvas, 1500, 1500); printer = new ABCPrinter(paper); printer.printABC(tune); printer.addSelectListener(editArea); abc_mousemove(); }
_$_$if_DYNAMIC_JS_$_();function WT_DECLARE_WT_MEMBER(w,t,D){w=t.indexOf(".prototype");if(w==-1)_$_WT_CLASS_$_[t]=D;else _$_WT_CLASS_$_[t.substr(0,w)].prototype[t.substr(w+11)]=D}function WT_DECLARE_APP_MEMBER(w,t,D){w=t.indexOf(".prototype");if(w==-1)_$_APP_CLASS_$_[t]=D;else _$_APP_CLASS_$_[t.substr(0,w)].prototype[t.substr(w+11)]=D}_$_$endif_$_();
_$_$if_DYNAMIC_JS_$_();function WT_DECLARE_WT_MEMBER(x,u,D){x=u.indexOf(".prototype");if(x==-1)_$_WT_CLASS_$_[u]=D;else _$_WT_CLASS_$_[u.substr(0,x)].prototype[u.substr(x+11)]=D}function WT_DECLARE_APP_MEMBER(x,u,D){x=u.indexOf(".prototype");if(x==-1)_$_APP_CLASS_$_[u]=D;else _$_APP_CLASS_$_[u.substr(0,x)].prototype[u.substr(x+11)]=D}_$_$endif_$_();
_$_$if_DYNAMIC_JS_$_();function WT_DECLARE_WT_MEMBER(w,t,D){w=t.indexOf(".prototype");if(w==-1)_$_WT_CLASS_$_[t]=D;else _$_WT_CLASS_$_[t.substr(0,w)].prototype[t.substr(w+11)]=D}function WT_DECLARE_APP_MEMBER(w,t,D){w=t.indexOf(".prototype");if(w==-1)_$_APP_CLASS_$_[t]=D;else _$_APP_CLASS_$_[t.substr(0,w)].prototype[t.substr(w+11)]=D}_$_$endif_$_();
_$_$if_DYNAMIC_JS_$_();function WT_DECLARE_WT_MEMBER(w,t,B){w=t.indexOf(".prototype");if(w==-1)_$_WT_CLASS_$_[t]=B;else _$_WT_CLASS_$_[t.substr(0,w)].prototype[t.substr(w+11)]=B}function WT_DECLARE_APP_MEMBER(w,t,B){w=t.indexOf(".prototype");if(w==-1)_$_APP_CLASS_$_[t]=B;else _$_APP_CLASS_$_[t.substr(0,w)].prototype[t.substr(w+11)]=B}_$_$endif_$_();
_$_$if_DYNAMIC_JS_$_();function WT_DECLARE_WT_MEMBER(v,t,A){v=t.indexOf(".prototype");if(v==-1)_$_WT_CLASS_$_[t]=A;else _$_WT_CLASS_$_[t.substr(0,v)].prototype[t.substr(v+11)]=A}function WT_DECLARE_APP_MEMBER(v,t,A){v=t.indexOf(".prototype");if(v==-1)_$_APP_CLASS_$_[t]=A;else _$_APP_CLASS_$_[t.substr(0,v)].prototype[t.substr(v+11)]=A}_$_$endif_$_();
_$_$if_DYNAMIC_JS_$_();function WT_DECLARE_WT_MEMBER(w,t,B){w=t.indexOf(".prototype");if(w==-1)_$_WT_CLASS_$_[t]=B;else _$_WT_CLASS_$_[t.substr(0,w)].prototype[t.substr(w+11)]=B}function WT_DECLARE_APP_MEMBER(w,t,B){w=t.indexOf(".prototype");if(w==-1)_$_APP_CLASS_$_[t]=B;else _$_APP_CLASS_$_[t.substr(0,w)].prototype[t.substr(w+11)]=B}_$_$endif_$_();
_$_$if_DYNAMIC_JS_$_();function WT_DECLARE_WT_MEMBER(v,s,F){v=s.indexOf(".prototype");if(v==-1)_$_WT_CLASS_$_[s]=F;else _$_WT_CLASS_$_[s.substr(0,v)].prototype[s.substr(v+11)]=F}function WT_DECLARE_APP_MEMBER(v,s,F){v=s.indexOf(".prototype");if(v==-1)_$_APP_CLASS_$_[s]=F;else _$_APP_CLASS_$_[s.substr(0,v)].prototype[s.substr(v+11)]=F}_$_$endif_$_();
_$_$if_DYNAMIC_JS_$_();function WT_DECLARE_WT_MEMBER(x,t,C){x=t.indexOf(".prototype");if(x==-1)_$_WT_CLASS_$_[t]=C;else _$_WT_CLASS_$_[t.substr(0,x)].prototype[t.substr(x+11)]=C}function WT_DECLARE_APP_MEMBER(x,t,C){x=t.indexOf(".prototype");if(x==-1)_$_APP_CLASS_$_[t]=C;else _$_APP_CLASS_$_[t.substr(0,x)].prototype[t.substr(x+11)]=C}_$_$endif_$_();
_$_$if_DYNAMIC_JS_$_();function WT_DECLARE_WT_MEMBER(v,s,F){v=s.indexOf(".prototype");if(v==-1)_$_WT_CLASS_$_[s]=F;else _$_WT_CLASS_$_[s.substr(0,v)].prototype[s.substr(v+11)]=F}function WT_DECLARE_APP_MEMBER(v,s,F){v=s.indexOf(".prototype");if(v==-1)_$_APP_CLASS_$_[s]=F;else _$_APP_CLASS_$_[s.substr(0,v)].prototype[s.substr(v+11)]=F}_$_$endif_$_();
null){b=e=null;this.centerDialog=function(){}}else if(b.style.display!="none"){if(!j){var a=c.windowSize(),f=b.offsetWidth,d=b.offsetHeight;b.style.left=Math.round((a.x-f)/2+(c.isIE6?document.documentElement.scrollLeft:0))+"px";b.style.top=Math.round((a.y-d)/2+(c.isIE6?document.documentElement.scrollTop:0))+"px";b.style.marginLeft="0px";b.style.marginTop="0px";b.style.width!=null&&b.style.height!=null&&l.wtResize(b,f,d)}b.style.visibility="visible"}};this.wtResize=function(a,f,d){d-=2;f-=2;a.style.height= d+"px";a.style.width=f+"px";a=a.lastChild;d-=a.previousSibling.offsetHeight+8;if(d>0){a.style.height=d+"px";g.layoutsAdjust&&g.layoutsAdjust()}}});
null&&l.wtResize(b,c,e)}b.style.visibility="visible"}};this.wtResize=function(a,c,e){e-=2;c-=2;a.style.height=e+"px";a.style.width=c+"px";a=a.lastChild;e-=a.previousSibling.offsetHeight+8;if(e>0){a.style.height=e+"px";g.layoutsAdjust&&g.layoutsAdjust()}}});
null){b=e=null;this.centerDialog=function(){}}else if(b.style.display!="none"){if(!j){var a=c.windowSize(),f=b.offsetWidth,d=b.offsetHeight;b.style.left=Math.round((a.x-f)/2+(c.isIE6?document.documentElement.scrollLeft:0))+"px";b.style.top=Math.round((a.y-d)/2+(c.isIE6?document.documentElement.scrollTop:0))+"px";b.style.marginLeft="0px";b.style.marginTop="0px";b.style.width!=null&&b.style.height!=null&&l.wtResize(b,f,d)}b.style.visibility="visible"}};this.wtResize=function(a,f,d){d-=2;f-=2;a.style.height=d+"px";a.style.width=f+"px";a=a.lastChild;d-=a.previousSibling.offsetHeight+8;if(d>0){a.style.height=d+"px";g.layoutsAdjust&&g.layoutsAdjust()}}});
null&&l.wtResize(b,c,e)}b.style.visibility="visible"}};this.wtResize=function(a,c,e){e-=2;c-=2;a.style.height=e+"px";a.style.width=c+"px";a=a.lastChild;e-=a.previousSibling.offsetHeight+8;if(e>0){a.style.height=e+"px";g.layouts&&g.layouts.adjust()}}});
""&&b.style.height!=""&&l.wtResize(b,c,e)}b.style.visibility="visible"}};this.wtResize=function(a,c,e){e-=2;c-=2;a.style.height=e+"px";a.style.width=c+"px";a=a.lastChild;e-=a.previousSibling.offsetHeight+8;if(e>0){a.style.height=e+"px";g.layouts&&g.layouts.adjust()}}});
null&&l.wtResize(b,c,e)}b.style.visibility="visible"}};this.wtResize=function(a,c,e){e-=2;c-=2;a.style.height=e+"px";a.style.width=c+"px";a=a.lastChild;e-=a.previousSibling.offsetHeight+8;if(e>0){a.style.height=e+"px";g.layouts&&g.layouts.adjust()}}});
});
};
var ww = function(e) { MBchat.updateables.whispers.whisperWith(user,span,e); });
0)if(d==1){d=Math.min(12E4,Math.exp(X)*500);Q=setTimeout(function(){v()},d)}else v()}}function s(){K.abort();L=K=null;P||v()}function z(d,c,e,j){m.checkReleaseCapture(d,e);_$_$if_STRICTLY_SERIALIZED_EVENTS_$_();if(!K){_$_$endif_$_();var n={},i=A.length;n.object=d;n.signal=c;n.event=e;n.feedback=j;A[i]=B(n,i);x();E();_$_$if_STRICTLY_SERIALIZED_EVENTS_$_()}_$_$endif_$_()}function x(){if(K!=null&&L!=null){clearTimeout(L);K.abort();K=null}if(K==null)if(Q==null){Q=setTimeout(function(){v()},m.updateDelay); ia=(new Date).getTime()}else if(X){clearTimeout(Q);v()}else if((new Date).getTime()-ia>m.updateDelay){clearTimeout(Q);v()}}function F(d){ea=d;q._p_.comm.responseReceived(d)}function v(){Q=null;if(P){if(!ja){if(confirm("The application was quited, do you want to restart?"))document.location=document.location;ja=true}}else{var d,c,e,j="&rand="+Math.round(Math.random(ka)*1E5);if(A.length>0){d=S();c=d.feedback?setTimeout(h,_$_INDICATOR_TIMEOUT_$_):null;e=false}else{d={result:"signal=poll"};c=null;e=true}K=
var _$_WT_CLASS_$_=new (function(){function x(a,b){return a.style[b]?a.style[b]:document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(a,null)[b]:a.currentStyle?a.currentStyle[b]:null}function u(a){if(B==null)return null;if(!a)a=window.event;if(a){for(var b=a=g.target(a);b&&b!=B;)b=b.parentNode;return b==B?g.isIE?a:null:B}else return B}function D(a){var b=u(a);if(b&&!S){if(!a)a=window.event;S=true;if(g.isIE){g.firedTarget=a.srcElement||b;b.fireEvent("onmousemove",
0)if(d==1){d=Math.min(12E4,Math.exp(X)*500);Q=setTimeout(function(){v()},d)}else v()}}function s(){K.abort();L=K=null;P||v()}function z(d,c,e,j){m.checkReleaseCapture(d,e);_$_$if_STRICTLY_SERIALIZED_EVENTS_$_();if(!K){_$_$endif_$_();var n={},i=A.length;n.object=d;n.signal=c;n.event=e;n.feedback=j;A[i]=B(n,i);x();E();_$_$if_STRICTLY_SERIALIZED_EVENTS_$_()}_$_$endif_$_()}function x(){if(K!=null&&L!=null){clearTimeout(L);K.abort();K=null}if(K==null)if(Q==null){Q=setTimeout(function(){v()},m.updateDelay);ia=(new Date).getTime()}else if(X){clearTimeout(Q);v()}else if((new Date).getTime()-ia>m.updateDelay){clearTimeout(Q);v()}}function F(d){ea=d;q._p_.comm.responseReceived(d)}function v(){Q=null;if(P){if(!ja){if(confirm("The application was quited, do you want to restart?"))document.location=document.location;ja=true}}else{var d,c,e,j="&rand="+Math.round(Math.random(ka)*1E5);if(A.length>0){d=S();c=d.feedback?setTimeout(h,_$_INDICATOR_TIMEOUT_$_):null;e=false}else{d={result:"signal=poll"};c=null;e=true}K=
i;if(typeof j.keyCode!=="undefined")e+=d+"keyCode="+j.keyCode;if(typeof j.charCode!=="undefined")e+=d+"charCode="+j.charCode;if(j.altKey)e+=d+"altKey=1";if(j.ctrlKey)e+=d+"ctrlKey=1";if(j.metaKey)e+=d+"metaKey=1";if(j.shiftKey)e+=d+"shiftKey=1";if(j.touches)e+=W(d+"touches",j.touches,m);if(j.targetTouches)e+=W(d+"ttouches",j.targetTouches,m);if(j.changedTouches)e+=W(d+"ctouches",j.changedTouches,m);if(j.scale)e+=d+"scale="+j.scale;if(j.rotation)e+=d+"rotation="+j.rotation;c.data=e;return c}function X(){for(var c= "",d=false,e=0;e<y.length;++e){d=d||y[e].feedback;c+=y[e].data}ga=y;y=[];return{feedback:d,result:c}}function z(){R=true;if(aa){clearTimeout(aa);aa=null}var c=$("#Wt-timers");c.size()>0&&h.setHtml(c.get(0),"",false)}function P(){h.history._initTimeout();ba==0&&u(null,"none",null,false);aa=setTimeout(P,_$_KEEP_ALIVE_$_000)}function da(c){if(!h.isIEMobile)document.title=c}function a(){if(!document.activeElement){function c(e){if(e&&e.target)document.activeElement=e.target==document?null:e.target}function d(){document.activeElement=
d+"rotation="+j.rotation;c.data=e;return c}function X(){for(var c="",d=false,e=0;e<y.length;++e){d=d||y[e].feedback;c+=y[e].data}ga=y;y=[];return{feedback:d,result:c}}function N(){R=true;if(aa){clearTimeout(aa);aa=null}var c=$("#Wt-timers");c.size()>0&&h.setHtml(c.get(0),"",false)}function z(){h.history._initTimeout();ba==0&&u(null,"none",null,false);aa=setTimeout(z,_$_KEEP_ALIVE_$_000)}function da(c){if(!h.isIEMobile)document.title=c}function a(){if(!document.activeElement){function c(e){if(e&&e.target)document.activeElement=
i;if(typeof j.keyCode!=="undefined")e+=d+"keyCode="+j.keyCode;if(typeof j.charCode!=="undefined")e+=d+"charCode="+j.charCode;if(j.altKey)e+=d+"altKey=1";if(j.ctrlKey)e+=d+"ctrlKey=1";if(j.metaKey)e+=d+"metaKey=1";if(j.shiftKey)e+=d+"shiftKey=1";if(j.touches)e+=W(d+"touches",j.touches,m);if(j.targetTouches)e+=W(d+"ttouches",j.targetTouches,m);if(j.changedTouches)e+=W(d+"ctouches",j.changedTouches,m);if(j.scale)e+=d+"scale="+j.scale;if(j.rotation)e+=d+"rotation="+j.rotation;c.data=e;return c}function X(){for(var c="",d=false,e=0;e<y.length;++e){d=d||y[e].feedback;c+=y[e].data}ga=y;y=[];return{feedback:d,result:c}}function z(){R=true;if(aa){clearTimeout(aa);aa=null}var c=$("#Wt-timers");c.size()>0&&h.setHtml(c.get(0),"",false)}function P(){h.history._initTimeout();ba==0&&u(null,"none",null,false);aa=setTimeout(P,_$_KEEP_ALIVE_$_000)}function da(c){if(!h.isIEMobile)document.title=c}function a(){if(!document.activeElement){function c(e){if(e&&e.target)document.activeElement=e.target==document?null:e.target}function d(){document.activeElement=
o.capture(null);o.capture(f.object);f.object.onmousemove=X;f.object.onmouseup=C;f.offsetX=-4;f.offsetY=-4;f.dropTarget=null;f.mimeType=d.getAttribute("dmt");f.xy=o.pageCoordinates(c);o.cancelEvent(c);return false}function X(d){if(Y.object!=null){var c=Y,f=o.pageCoordinates(d);if(c.object.style.display!=""&&c.xy.x!=f.x&&c.xy.y!=f.y)c.object.style.display="";c.object.style.left=f.x-c.offsetX+"px";c.object.style.top=f.y-c.offsetY+"px";f=c.dropTarget;var j=d.target||d.srcElement,m="{"+c.mimeType+":", g=null;for(c.dropTarget=null;j;){g=j.getAttribute("amts");if(g!=null&&g.indexOf(m)!=-1){c.dropTarget=j;break}j=j.parentNode;if(!j.tagName||o.hasTag(j,"HTML"))break}if(c.dropTarget!=f){if(c.dropTarget){j=g.indexOf(m)+m.length;var s=g.indexOf("}",j);g=g.substring(j,s);if(g.length!=0){c.dropTarget.setAttribute("dos",c.dropTarget.className);c.dropTarget.className=c.dropTarget.className+" "+g}}else c.object.styleClass="";if(f!=null){f.handleDragDrop&&f.handleDragDrop("end",c.object,d,"",m);g=f.getAttribute("dos"); if(g!=null)f.className=g}}if(c.dropTarget)if(c.dropTarget.handleDragDrop)c.dropTarget.handleDragDrop("drag",c.object,d,"",m);else c.object.className="Wt-valid-drop";o.cancelEvent(d);return false}return true}function C(d){o.capture(null);var c=Y;if(c.object){if(c.dropTarget){var f=c.dropTarget.getAttribute("dos");if(f!=null)c.dropTarget.className=f;c.dropTarget.handleDragDrop?c.dropTarget.handleDragDrop("drop",c.object,d,c.sourceId,c.mimeType):M(c.dropTarget,{name:"_drop",eventObject:c.dropTarget,
f.object.className="";document.body.appendChild(f.object);o.capture(null);o.capture(f.object);f.object.onmousemove=X;f.object.onmouseup=B;f.offsetX=-4;f.offsetY=-4;f.dropTarget=null;f.mimeType=d.getAttribute("dmt");f.xy=o.pageCoordinates(c);o.cancelEvent(c);return false}function X(d){if(Y.object!=null){var c=Y,f=o.pageCoordinates(d);if(c.object.style.display!=""&&c.xy.x!=f.x&&c.xy.y!=f.y)c.object.style.display="";c.object.style.left=f.x-c.offsetX+"px";c.object.style.top=f.y-c.offsetY+"px";f=c.dropTarget; var k=d.target||d.srcElement,h="{"+c.mimeType+":",m=null;for(c.dropTarget=null;k;){m=k.getAttribute("amts");if(m!=null&&m.indexOf(h)!=-1){c.dropTarget=k;break}k=k.parentNode;if(!k.tagName||o.hasTag(k,"HTML"))break}if(c.dropTarget!=f){if(c.dropTarget){k=m.indexOf(h)+h.length;var s=m.indexOf("}",k);m=m.substring(k,s);if(m.length!=0){c.dropTarget.setAttribute("dos",c.dropTarget.className);c.dropTarget.className=c.dropTarget.className+" "+m}}else c.object.styleClass="";if(f!=null){f.handleDragDrop&&f.handleDragDrop("end", c.object,d,"",h);m=f.getAttribute("dos");if(m!=null)f.className=m}}if(c.dropTarget)if(c.dropTarget.handleDragDrop)c.dropTarget.handleDragDrop("drag",c.object,d,"",h);else c.object.className="Wt-valid-drop";o.cancelEvent(d);return false}return true}function B(d){o.capture(null);var c=Y;if(c.object){if(c.dropTarget){var f=c.dropTarget.getAttribute("dos");if(f!=null)c.dropTarget.className=f;c.dropTarget.handleDragDrop?c.dropTarget.handleDragDrop("drop",c.object,d,c.sourceId,c.mimeType):L(c.dropTarget,
o.capture(null);o.capture(f.object);f.object.onmousemove=X;f.object.onmouseup=C;f.offsetX=-4;f.offsetY=-4;f.dropTarget=null;f.mimeType=d.getAttribute("dmt");f.xy=o.pageCoordinates(c);o.cancelEvent(c);return false}function X(d){if(Y.object!=null){var c=Y,f=o.pageCoordinates(d);if(c.object.style.display!=""&&c.xy.x!=f.x&&c.xy.y!=f.y)c.object.style.display="";c.object.style.left=f.x-c.offsetX+"px";c.object.style.top=f.y-c.offsetY+"px";f=c.dropTarget;var j=d.target||d.srcElement,m="{"+c.mimeType+":",g=null;for(c.dropTarget=null;j;){g=j.getAttribute("amts");if(g!=null&&g.indexOf(m)!=-1){c.dropTarget=j;break}j=j.parentNode;if(!j.tagName||o.hasTag(j,"HTML"))break}if(c.dropTarget!=f){if(c.dropTarget){j=g.indexOf(m)+m.length;var s=g.indexOf("}",j);g=g.substring(j,s);if(g.length!=0){c.dropTarget.setAttribute("dos",c.dropTarget.className);c.dropTarget.className=c.dropTarget.className+" "+g}}else c.object.styleClass="";if(f!=null){f.handleDragDrop&&f.handleDragDrop("end",c.object,d,"",m);g=f.getAttribute("dos");if(g!=null)f.className=g}}if(c.dropTarget)if(c.dropTarget.handleDragDrop)c.dropTarget.handleDragDrop("drag",c.object,d,"",m);else c.object.className="Wt-valid-drop";o.cancelEvent(d);return false}return true}function C(d){o.capture(null);var c=Y;if(c.object){if(c.dropTarget){var f=c.dropTarget.getAttribute("dos");if(f!=null)c.dropTarget.className=f;c.dropTarget.handleDragDrop?c.dropTarget.handleDragDrop("drop",c.object,d,c.sourceId,c.mimeType):M(c.dropTarget,{name:"_drop",eventObject:c.dropTarget,
X;f.object.onmouseup=C;f.offsetX=-4;f.offsetY=-4;f.dropTarget=null;f.mimeType=d.getAttribute("dmt");f.xy=o.pageCoordinates(c);o.cancelEvent(c);return false}function X(d){if(Y.object!=null){var c=Y,f=o.pageCoordinates(d);if(c.object.style.display!=""&&c.xy.x!=f.x&&c.xy.y!=f.y)c.object.style.display="";c.object.style.left=f.x-c.offsetX+"px";c.object.style.top=f.y-c.offsetY+"px";f=c.dropTarget;var j=d.target||d.srcElement,m="{"+c.mimeType+":",h=null;for(c.dropTarget=null;j;){h=j.getAttribute("amts"); if(h!=null&&h.indexOf(m)!=-1){c.dropTarget=j;break}j=j.parentNode;if(!j.tagName||o.hasTag(j,"HTML"))break}if(c.dropTarget!=f){if(c.dropTarget){j=h.indexOf(m)+m.length;var s=h.indexOf("}",j);h=h.substring(j,s);if(h.length!=0){c.dropTarget.setAttribute("dos",c.dropTarget.className);c.dropTarget.className=c.dropTarget.className+" "+h}}else c.object.styleClass="";if(f!=null){f.handleDragDrop&&f.handleDragDrop("end",c.object,d,"",m);h=f.getAttribute("dos");if(h!=null)f.className=h}}if(c.dropTarget)if(c.dropTarget.handleDragDrop)c.dropTarget.handleDragDrop("drag",
X;f.object.onmouseup=C;f.offsetX=-4;f.offsetY=-4;f.dropTarget=null;f.mimeType=d.getAttribute("dmt");f.xy=o.pageCoordinates(c);o.cancelEvent(c);return false}function X(d){if(Y.object!=null){var c=Y,f=o.pageCoordinates(d);if(c.object.style.display!=""&&c.xy.x!=f.x&&c.xy.y!=f.y)c.object.style.display="";c.object.style.left=f.x-c.offsetX+"px";c.object.style.top=f.y-c.offsetY+"px";f=c.dropTarget;var j=d.target||d.srcElement,m="{"+c.mimeType+":",g=null;for(c.dropTarget=null;j;){g=j.getAttribute("amts"); if(g!=null&&g.indexOf(m)!=-1){c.dropTarget=j;break}j=j.parentNode;if(!j.tagName||o.hasTag(j,"HTML"))break}if(c.dropTarget!=f){if(c.dropTarget){j=g.indexOf(m)+m.length;var s=g.indexOf("}",j);g=g.substring(j,s);if(g.length!=0){c.dropTarget.setAttribute("dos",c.dropTarget.className);c.dropTarget.className=c.dropTarget.className+" "+g}}else c.object.styleClass="";if(f!=null){f.handleDragDrop&&f.handleDragDrop("end",c.object,d,"",m);g=f.getAttribute("dos");if(g!=null)f.className=g}}if(c.dropTarget)if(c.dropTarget.handleDragDrop)c.dropTarget.handleDragDrop("drag",
X;f.object.onmouseup=C;f.offsetX=-4;f.offsetY=-4;f.dropTarget=null;f.mimeType=d.getAttribute("dmt");f.xy=o.pageCoordinates(c);o.cancelEvent(c);return false}function X(d){if(Y.object!=null){var c=Y,f=o.pageCoordinates(d);if(c.object.style.display!=""&&c.xy.x!=f.x&&c.xy.y!=f.y)c.object.style.display="";c.object.style.left=f.x-c.offsetX+"px";c.object.style.top=f.y-c.offsetY+"px";f=c.dropTarget;var j=d.target||d.srcElement,m="{"+c.mimeType+":",h=null;for(c.dropTarget=null;j;){h=j.getAttribute("amts");if(h!=null&&h.indexOf(m)!=-1){c.dropTarget=j;break}j=j.parentNode;if(!j.tagName||o.hasTag(j,"HTML"))break}if(c.dropTarget!=f){if(c.dropTarget){j=h.indexOf(m)+m.length;var s=h.indexOf("}",j);h=h.substring(j,s);if(h.length!=0){c.dropTarget.setAttribute("dos",c.dropTarget.className);c.dropTarget.className=c.dropTarget.className+" "+h}}else c.object.styleClass="";if(f!=null){f.handleDragDrop&&f.handleDragDrop("end",c.object,d,"",m);h=f.getAttribute("dos");if(h!=null)f.className=h}}if(c.dropTarget)if(c.dropTarget.handleDragDrop)c.dropTarget.handleDragDrop("drag",c.object,d,"",m);else c.object.className="Wt-valid-drop";o.cancelEvent(d);return false}return true}function C(d){o.capture(null);var c=Y;if(c.object){if(c.dropTarget){var f=c.dropTarget.getAttribute("dos");if(f!=null)c.dropTarget.className=f;c.dropTarget.handleDragDrop?c.dropTarget.handleDragDrop("drop",c.object,d,c.sourceId,c.mimeType):M(c.dropTarget,{name:"_drop",eventObject:c.dropTarget,event:d},c.sourceId,c.mimeType)}c.object.style.position=c.objectPrevStyle.position;c.object.style.display=c.objectPrevStyle.display;
if(!K){_$_$endif_$_();var m={},i=A.length;m.object=d;m.signal=c;m.event=e;m.feedback=j;A[i]=B(m,i);x();E();_$_$if_STRICTLY_SERIALIZED_EVENTS_$_()}_$_$endif_$_()}function x(){if(K!=null&&L!=null){clearTimeout(L);K.abort();K=null}if(K==null)if(Q==null){Q=setTimeout(function(){v()},n.updateDelay);ia=(new Date).getTime()}else if(X){clearTimeout(Q);v()}else if((new Date).getTime()-ia>n.updateDelay){clearTimeout(Q);v()}}function F(d){ea=d;q._p_.comm.responseReceived(d)}function v(){Q=null;if(P){if(!ja){if(confirm("The application was quited, do you want to restart?"))document.location=
L=K=null;P||v()}function y(d,c,e,j){n.checkReleaseCapture(d,e);_$_$if_STRICTLY_SERIALIZED_EVENTS_$_();if(!K){_$_$endif_$_();var m={},i=A.length;m.object=d;m.signal=c;m.event=e;m.feedback=j;A[i]=B(m,i);x();E();_$_$if_STRICTLY_SERIALIZED_EVENTS_$_()}_$_$endif_$_()}function x(){if(K!=null&&L!=null){clearTimeout(L);K.abort();K=null}if(K==null)if(Q==null){Q=setTimeout(function(){v()},n.updateDelay);ia=(new Date).getTime()}else if(X){clearTimeout(Q);v()}else if((new Date).getTime()-ia>n.updateDelay){clearTimeout(Q); v()}}function F(d){ea=d;q._p_.comm.responseReceived(d)}function v(){Q=null;if(P){if(!ja){if(confirm("The application was quited, do you want to restart?"))document.location=document.location;ja=true}}else{var d,c,e,j="&rand="+Math.round(Math.random(ka)*1E5);if(A.length>0){d=S();c=d.feedback?setTimeout(k,_$_INDICATOR_TIMEOUT_$_):null;e=false}else{d={result:"signal=poll"};c=null;e=true}K=q._p_.comm.sendUpdate(la+j,"request=jsupdate&"+d.result+"&ackId="+ea,c,ea,-1);L=e?setTimeout(r,_$_SERVER_PUSH_TIMEOUT_$_):
if(!K){_$_$endif_$_();var m={},i=A.length;m.object=d;m.signal=c;m.event=e;m.feedback=j;A[i]=B(m,i);x();E();_$_$if_STRICTLY_SERIALIZED_EVENTS_$_()}_$_$endif_$_()}function x(){if(K!=null&&L!=null){clearTimeout(L);K.abort();K=null}if(K==null)if(Q==null){Q=setTimeout(function(){v()},n.updateDelay);ia=(new Date).getTime()}else if(X){clearTimeout(Q);v()}else if((new Date).getTime()-ia>n.updateDelay){clearTimeout(Q);v()}}function F(d){ea=d;q._p_.comm.responseReceived(d)}function v(){Q=null;if(P){if(!ja){if(confirm("The application was quited, do you want to restart?"))document.location=
var p=null,q=null,r=[],s=o;while(s){if(s.type==1){if(!u.lastElement)u.lastElement=s;var t=s.getName();if(c&&s.$.scopeName!='HTML')t=s.$.scopeName.toLowerCase()+':'+t;if(!q){if(!p&&l[t])p=s;if(m[t])if(!p&&t=='div'&&!n(s))p=s;else q=s;}r.push(s);if(t=='body')break;}s=s.getParent();}u.block=p;u.blockLimit=q;u.elements=r;};})();d.elementPath.prototype={compare:function(l){var m=this.elements,n=l&&l.elements;if(!n||m.length!=n.length)return false;for(var o=0;o<m.length;o++){if(!m[o].equals(n[o]))return false;}return true;}};d.text=function(l,m){if(typeof l=='string')l=(m?m.$:document).createTextNode(l);this.$=l;};d.text.prototype=new d.node();e.extend(d.text.prototype,{type:3,getLength:function(){return this.$.nodeValue.length;},getText:function(){return this.$.nodeValue;},split:function(l){var q=this;if(c&&l==q.getLength()){var m=q.getDocument().createText('');m.insertAfter(q);return m;}var n=q.getDocument(),o=new d.text(q.$.splitText(l),n);if(b.ie8){var p=new d.text('',n);p.insertAfter(o);p.remove();}return o;},substring:function(l,m){if(typeof m!='number')return this.$.nodeValue.substr(l);else return this.$.nodeValue.substring(l,m);}});d.documentFragment=function(l){l=l||a.document;this.$=l.$.createDocumentFragment();};e.extend(d.documentFragment.prototype,h.prototype,{type:11,insertAfterNode:function(l){l=l.$;l.parentNode.insertBefore(this.$,l.nextSibling);}},true,{append:1,appendBogus:1,getFirst:1,getLast:1,appendTo:1,moveChildren:1,insertBefore:1,insertAfterNode:1,replace:1,trim:1,type:1,ltrim:1,rtrim:1,getDocument:1,getChildCount:1,getChild:1,getChildren:1});(function(){function l(t,u){if(this._.end)return null;var v,w=this.range,x,y=this.guard,z=this.type,A=t?'getPreviousSourceNode':'getNextSourceNode';if(!this._.start){this._.start=1;w.trim();if(w.collapsed){this.end();return null;}}if(!t&&!this._.guardLTR){var B=w.endContainer,C=B.getChild(w.endOffset);this._.guardLTR=function(G,H){return(!H||!B.equals(G))&&(!C||!G.equals(C))&&(G.type!=1||!H||G.getName()!='body');};}if(t&&!this._.guardRTL){var D=w.startContainer,E=w.startOffset>0&&D.getChild(w.startOffset-1);this._.guardRTL=function(G,H){return(!H||!D.equals(G))&&(!E||!G.equals(E))&&(G.type!=1||!H||G.getName()!='body');};}var F=t?this._.guardRTL:this._.guardLTR;if(y)x=function(G,H){if(F(G,H)===false)return false;return y(G,H);};else x=F;if(this.current)v=this.current[A](false,z,x);else if(t){v=w.endContainer;if(w.endOffset>0){v=v.getChild(w.endOffset-1);if(x(v)===false)v=null;}else v=x(v,true)===false?null:v.getPreviousSourceNode(true,z,x);
j.forceBlur();},100);},forceBlur:function(){if(this.hasFocus){var j=this._.editor;j.container.getChild(1).removeClass('cke_focus');this.hasFocus=false;j.fire('blur');}}};(function(){var j={};a.lang={languages:{af:1,ar:1,bg:1,bn:1,bs:1,ca:1,cs:1,cy:1,da:1,de:1,el:1,'en-au':1,'en-ca':1,'en-gb':1,en:1,eo:1,es:1,et:1,eu:1,fa:1,fi:1,fo:1,'fr-ca':1,fr:1,gl:1,gu:1,he:1,hi:1,hr:1,hu:1,is:1,it:1,ja:1,km:1,ko:1,lt:1,lv:1,mn:1,ms:1,nb:1,nl:1,no:1,pl:1,'pt-br':1,pt:1,ro:1,ru:1,sk:1,sl:1,'sr-latn':1,sr:1,sv:1,th:1,tr:1,uk:1,vi:1,'zh-cn':1,zh:1},load:function(k,l,m){if(!k||!a.lang.languages[k])k=this.detect(l,k);if(!this[k])a.scriptLoader.load(a.getUrl('lang/'+k+'.js'),function(){m(k,this[k]);},this);else m(k,this[k]);},detect:function(k,l){var m=this.languages;l=l||navigator.userLanguage||navigator.language;var n=l.toLowerCase().match(/([a-z]+)(?:-([a-z]+))?/),o=n[1],p=n[2];if(m[o+'-'+p])o=o+'-'+p;else if(!m[o])o=null;a.lang.detect=o?function(){return o;}:function(q){return q;};return o||k;}};})();a.scriptLoader=(function(){var j={},k={};return{load:function(l,m,n,o,p){var q=typeof l=='string';if(q)l=[l];if(!n)n=a;var r=l.length,s=[],t=[],u=function(z){if(m)if(q)m.call(n,z);else m.call(n,s,t);};if(r===0){u(true);return;}var v=function(z,A){(A?s:t).push(z);if(--r<=0){p&&a.document.getDocumentElement().removeStyle('cursor');u(A);}},w=function(z,A){j[z]=1;var B=k[z];delete k[z];for(var C=0;C<B.length;C++)B[C](z,A);},x=function(z){if(o!==true&&j[z]){v(z,true);return;}var A=k[z]||(k[z]=[]);A.push(v);if(A.length>1)return;var B=new h('script');B.setAttributes({type:'text/javascript',src:z});if(m)if(c)B.$.onreadystatechange=function(){if(B.$.readyState=='loaded'||B.$.readyState=='complete'){B.$.onreadystatechange=null;w(z,true);}};else{B.$.onload=function(){setTimeout(function(){w(z,true);},0);};B.$.onerror=function(){w(z,false);};}B.appendTo(a.document.getHead());};p&&a.document.getDocumentElement().setStyle('cursor','wait');for(var y=0;y<r;y++)x(l[y]);},loadCode:function(l){var m=new h('script');m.setAttribute('type','text/javascript');m.appendText(l);m.appendTo(a.document.getHead());}};})();a.resourceManager=function(j,k){var l=this;l.basePath=j;l.fileName=k;l.registered={};l.loaded={};l.externals={};l._={waitingList:{}};};a.resourceManager.prototype={add:function(j,k){if(this.registered[j])throw '[CKEDITOR.resourceManager.add] The resource name "'+j+'" is already registered.';a.fire(j+e.capitalize(this.fileName)+'Ready',this.registered[j]=k||{});},get:function(j){return this.registered[j]||null;
var p=null,q=null,r=[],s=o;while(s){if(s.type==1){if(!u.lastElement)u.lastElement=s;var t=s.getName();if(c&&s.$.scopeName!='HTML')t=s.$.scopeName.toLowerCase()+':'+t;if(!q){if(!p&&l[t])p=s;if(m[t])if(!p&&t=='div'&&!n(s))p=s;else q=s;}r.push(s);if(t=='body')break;}s=s.getParent();}u.block=p;u.blockLimit=q;u.elements=r;};})();d.elementPath.prototype={compare:function(l){var m=this.elements,n=l&&l.elements;if(!n||m.length!=n.length)return false;for(var o=0;o<m.length;o++){if(!m[o].equals(n[o]))return false;}return true;}};d.text=function(l,m){if(typeof l=='string')l=(m?m.$:document).createTextNode(l);this.$=l;};d.text.prototype=new d.node();e.extend(d.text.prototype,{type:3,getLength:function(){return this.$.nodeValue.length;},getText:function(){return this.$.nodeValue;},split:function(l){var q=this;if(c&&l==q.getLength()){var m=q.getDocument().createText('');m.insertAfter(q);return m;}var n=q.getDocument(),o=new d.text(q.$.splitText(l),n);if(b.ie8){var p=new d.text('',n);p.insertAfter(o);p.remove();}return o;},substring:function(l,m){if(typeof m!='number')return this.$.nodeValue.substr(l);else return this.$.nodeValue.substring(l,m);}});d.documentFragment=function(l){l=l||a.document;this.$=l.$.createDocumentFragment();};e.extend(d.documentFragment.prototype,h.prototype,{type:11,insertAfterNode:function(l){l=l.$;l.parentNode.insertBefore(this.$,l.nextSibling);}},true,{append:1,appendBogus:1,getFirst:1,getLast:1,appendTo:1,moveChildren:1,insertBefore:1,insertAfterNode:1,replace:1,trim:1,type:1,ltrim:1,rtrim:1,getDocument:1,getChildCount:1,getChild:1,getChildren:1});(function(){function l(t,u){if(this._.end)return null;var v,w=this.range,x,y=this.guard,z=this.type,A=t?'getPreviousSourceNode':'getNextSourceNode';if(!this._.start){this._.start=1;w.trim();if(w.collapsed){this.end();return null;}}if(!t&&!this._.guardLTR){var B=w.endContainer,C=B.getChild(w.endOffset);this._.guardLTR=function(G,H){return(!H||!B.equals(G))&&(!C||!G.equals(C))&&(G.type!=1||!H||G.getName()!='body');};}if(t&&!this._.guardRTL){var D=w.startContainer,E=w.startOffset>0&&D.getChild(w.startOffset-1);this._.guardRTL=function(G,H){return(!H||!D.equals(G))&&(!E||!G.equals(E))&&(G.type!=1||!H||G.getName()!='body');};}var F=t?this._.guardRTL:this._.guardLTR;if(y)x=function(G,H){if(F(G,H)===false)return false;return y(G,H);};else x=F;if(this.current)v=this.current[A](false,z,x);else if(t){v=w.endContainer;if(w.endOffset>0){v=v.getChild(w.endOffset-1);if(x(v)===false)v=null;}else v=x(v,true)===false?null:v.getPreviousSourceNode(true,z,x);
b[c];return a}Xmla=function(a){this.listeners={};this.listeners[Xmla.EVENT_REQUEST]=[];this.listeners[Xmla.EVENT_SUCCESS]=[];this.listeners[Xmla.EVENT_ERROR]=[];this.listeners[Xmla.EVENT_DISCOVER]=[];this.listeners[Xmla.EVENT_DISCOVER_SUCCESS]=[];this.listeners[Xmla.EVENT_DISCOVER_ERROR]=[];this.listeners[Xmla.EVENT_EXECUTE]=[];this.listeners[Xmla.EVENT_EXECUTE_SUCCESS]=[];this.listeners[Xmla.EVENT_EXECUTE_ERROR]=[];this.options=h(h({},Xmla.defaultOptions,true),a,true);return this};Xmla.defaultOptions=
!a)a={};for(var c in b)if(b.hasOwnProperty(c))if(d||j(a[c]))a[c]=b[c];return a}Xmla=function(a){this.listeners={};this.listeners[Xmla.EVENT_REQUEST]=[];this.listeners[Xmla.EVENT_SUCCESS]=[];this.listeners[Xmla.EVENT_ERROR]=[];this.listeners[Xmla.EVENT_DISCOVER]=[];this.listeners[Xmla.EVENT_DISCOVER_SUCCESS]=[];this.listeners[Xmla.EVENT_DISCOVER_ERROR]=[];this.listeners[Xmla.EVENT_EXECUTE]=[];this.listeners[Xmla.EVENT_EXECUTE_SUCCESS]=[];this.listeners[Xmla.EVENT_EXECUTE_ERROR]=[];this.options=g(g({}, Xmla.defaultOptions,true),a,true);return this};Xmla.defaultOptions={requestTimeout:30000,async:false};Xmla.METHOD_DISCOVER="Discover";Xmla.METHOD_EXECUTE="Execute";var q="DISCOVER_",l="MDSCHEMA_",r="DBSCHEMA_";Xmla.DISCOVER_DATASOURCES=q+"DATASOURCES";Xmla.DISCOVER_PROPERTIES=q+"PROPERTIES";Xmla.DISCOVER_SCHEMA_ROWSETS=q+"SCHEMA_ROWSETS";Xmla.DISCOVER_ENUMERATORS=q+"ENUMERATORS";Xmla.DISCOVER_KEYWORDS=q+"KEYWORDS";Xmla.DISCOVER_LITERALS=q+"LITERALS";Xmla.DBSCHEMA_CATALOGS=r+"CATALOGS";Xmla.DBSCHEMA_COLUMNS=
b[c];return a}Xmla=function(a){this.listeners={};this.listeners[Xmla.EVENT_REQUEST]=[];this.listeners[Xmla.EVENT_SUCCESS]=[];this.listeners[Xmla.EVENT_ERROR]=[];this.listeners[Xmla.EVENT_DISCOVER]=[];this.listeners[Xmla.EVENT_DISCOVER_SUCCESS]=[];this.listeners[Xmla.EVENT_DISCOVER_ERROR]=[];this.listeners[Xmla.EVENT_EXECUTE]=[];this.listeners[Xmla.EVENT_EXECUTE_SUCCESS]=[];this.listeners[Xmla.EVENT_EXECUTE_ERROR]=[];this.options=h(h({},Xmla.defaultOptions,true),a,true);return this};Xmla.defaultOptions=
p?setTimeout(arguments.callee,0):z()}})()}o(z)}}var t=window.DomReady={},B=navigator.userAgent.toLowerCase(),y={version:(B.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(B),opera:/opera/.test(B),msie:/msie/.test(B)&&!/opera/.test(B),mozilla:/mozilla/.test(B)&&!/(compatible|webkit)/.test(B)},C=false,A=false,E=[];t.ready=function(p){v();A?p.call(window,[]):E.push(function(){return p.call(window,[])})};v()})();(function(z,o){function v(j,n){for(var u=[],x=0;x<j.length;x++)u.push(j[x]);for(x=0;x<u.length;x++)n(u[x])}function t(){v([p,d],function(j){v(o.getElementsByTagName(j),function(n){var u=true;if(n.canPlayType)if(n.src&&n.canPlayType(B(j,n.src)))u=false;else v(n.getElementsByTagName("source"),function(x){if(n.canPlayType(B(j,x.src,x.type)))u=false});u&&t.createFallback(j,n)})})}function B(j,n,u){return u||k[j][n.split(".").slice(-1)[0]]||F[j]}function y(j,n){var u=j.getAttribute(n);return u==true|| typeof u=="string"}function C(j){if(j.substr(0,1)=="/")return r+j;if(j.substr(0,1)=="."||!j.match(/^\s*\w+:\/\
n.addEventListener("click",function(){n.play()},false)})})}function B(j,n,u){return u||k[j][n.split(".").slice(-1)[0]]||F[j]}function y(j,n){var u=j.getAttribute(n);return u==true||typeof u=="string"}function C(j){if(j.substr(0,1)=="/")return r+j;if(j.substr(0,1)=="."||!j.match(/^\s*\w+:\/\
p?setTimeout(arguments.callee,0):z()}})()}o(z)}}var t=window.DomReady={},B=navigator.userAgent.toLowerCase(),y={version:(B.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(B),opera:/opera/.test(B),msie:/msie/.test(B)&&!/opera/.test(B),mozilla:/mozilla/.test(B)&&!/(compatible|webkit)/.test(B)},C=false,A=false,E=[];t.ready=function(p){v();A?p.call(window,[]):E.push(function(){return p.call(window,[])})};v()})();(function(z,o){function v(j,n){for(var u=[],x=0;x<j.length;x++)u.push(j[x]);for(x=0;x<u.length;x++)n(u[x])}function t(){v([p,d],function(j){v(o.getElementsByTagName(j),function(n){var u=true;if(n.canPlayType)if(n.src&&n.canPlayType(B(j,n.src)))u=false;else v(n.getElementsByTagName("source"),function(x){if(n.canPlayType(B(j,x.src,x.type)))u=false});u&&t.createFallback(j,n)})})}function B(j,n,u){return u||k[j][n.split(".").slice(-1)[0]]||F[j]}function y(j,n){var u=j.getAttribute(n);return u==true||typeof u=="string"}function C(j){if(j.substr(0,1)=="/")return r+j;if(j.substr(0,1)=="."||!j.match(/^\s*\w+:\/\//))return w+j;return j}function A(j,n,u){var x=j.getAttribute(n);if(x)return x+"px";if(j.currentStyle)j=j.currentStyle[n];else if(z.getComputedStyle)j=o.defaultView.getComputedStyle(j,null).getPropertyValue(n);else return u;if(j=="auto")return u;return j}function E(j){return j.match(/\s*([\w-]+\/[\w-]+)(;|\s|$)/)[1]}var p="video",d="audio";o.createElement(p).canPlayType||v(["abbr","article",
flashembed(this,f,e)});return f.api===false?this:a}})();(function(A,o){function v(j,n){for(var t=[],w=0;w<j.length;w++)t.push(j[w]);for(w=0;w<t.length;w++)n(t[w])}function s(){v([x,f],function(j){v(o.getElementsByTagName(j),function(n){var t=true;if(n.canPlayType)if(n.src&&n.canPlayType(F(j,n.src)))t=false;else v(n.getElementsByTagName("source"),function(w){if(n.canPlayType(F(j,w.src,w.type)))t=false});t&&s.createFallback(j,n)})})}function F(j,n,t){return t||k[j][n.split(".").slice(-1)[0]]||C[j]}function y(j,n){var t=j.getAttribute(n);return t==true|| typeof t=="string"}function B(j){if(j.substr(0,1)=="/")return q+j;if(j.substr(0,1)=="."||!j.match(/^\s*\w+:\/\
k[j][n.split(".").slice(-1)[0]]||C[j]}function y(j,n){var t=j.getAttribute(n);return t==true||typeof t=="string"}function B(j){if(j.substr(0,1)=="/")return q+j;if(j.substr(0,1)=="."||!j.match(/^\s*\w+:\/\
flashembed(this,f,e)});return f.api===false?this:a}})();(function(A,o){function v(j,n){for(var t=[],w=0;w<j.length;w++)t.push(j[w]);for(w=0;w<t.length;w++)n(t[w])}function s(){v([x,f],function(j){v(o.getElementsByTagName(j),function(n){var t=true;if(n.canPlayType)if(n.src&&n.canPlayType(F(j,n.src)))t=false;else v(n.getElementsByTagName("source"),function(w){if(n.canPlayType(F(j,w.src,w.type)))t=false});t&&s.createFallback(j,n)})})}function F(j,n,t){return t||k[j][n.split(".").slice(-1)[0]]||C[j]}function y(j,n){var t=j.getAttribute(n);return t==true||typeof t=="string"}function B(j){if(j.substr(0,1)=="/")return q+j;if(j.substr(0,1)=="."||!j.match(/^\s*\w+:\/\//))return u+j;return j}function D(j,n,t){var w=j.getAttribute(n);if(w)return w+"px";if(j.currentStyle)j=j.currentStyle[n];else if(A.getComputedStyle)j=o.defaultView.getComputedStyle(j,null).getPropertyValue(n);else return t;if(j=="auto")return t;return j}function E(j){return j.match(/\s*([\w-]+\/[\w-]+)(;|\s|$)/)[1]}var x="video",f="audio";o.createElement(x).canPlayType||v(["abbr","article",
N=f?setTimeout(n,_$_SERVER_PUSH_TIMEOUT_$_):null}}function y(d,c){var f={},k=z.length;f.signal="user";f.id=typeof d==="string"?d:d==E?"app":d.id;if(typeof c==="object"){f.name=c.name;f.object=c.eventObject;f.event=c.event}else{f.name=c;f.object=f.event=null}f.args=[];for(var m=2;m<arguments.length;++m){var i=arguments[m];i=i===false?0:i===true?1:i.toDateString?i.toDateString():i;f.args[m-2]=i}f.feedback=true;z[k]=aa(f,k);u()}function I(d,c,f){var k=function(){var i=g.getElement(d);if(i){if(f)i.timer=
ea,-1);N=f?setTimeout(n,_$_SERVER_PUSH_TIMEOUT_$_):null}}}function y(d,c){var f={},k=z.length;f.signal="user";f.id=typeof d==="string"?d:d==E?"app":d.id;if(typeof c==="object"){f.name=c.name;f.object=c.eventObject;f.event=c.event}else{f.name=c;f.object=f.event=null}f.args=[];for(var m=2;m<arguments.length;++m){var i=arguments[m];i=i===false?0:i===true?1:i.toDateString?i.toDateString():i;f.args[m-2]=i}f.feedback=true;z[k]=aa(f,k);u()}function I(d,c,f){var k=function(){var i=g.getElement(d);if(i){if(f)i.timer=
N=f?setTimeout(n,_$_SERVER_PUSH_TIMEOUT_$_):null}}function y(d,c){var f={},k=z.length;f.signal="user";f.id=typeof d==="string"?d:d==E?"app":d.id;if(typeof c==="object"){f.name=c.name;f.object=c.eventObject;f.event=c.event}else{f.name=c;f.object=f.event=null}f.args=[];for(var m=2;m<arguments.length;++m){var i=arguments[m];i=i===false?0:i===true?1:i.toDateString?i.toDateString():i;f.args[m-2]=i}f.feedback=true;z[k]=aa(f,k);u()}function I(d,c,f){var k=function(){var i=g.getElement(d);if(i){if(f)i.timer=
p.onreadystatechange=function(){var t=p.readyState;if(t=="loaded")h.isOpera?M(c):j();else t=="complete"&&M(c)};document.getElementsByTagName("head")[0].appendChild(p)}}function x(c,d){this.callback=d;this.work=c.length;this.images=[];if(c.length==0)d(this.images);else for(d=0;d<c.length;d++)this.preload(c[d])}function D(c){if(c.ieAlternativeExecuted)return"0";k.emit(c.parentNode,"IeAltnernative");c.style.width="";c.ieAlternativeExecuted=true;return"0"}function Y(c){window.onbeforeunload=c&&c!=""? function(d){if(d=d||window.event)d.returnValue=c;return c}:null}var k=this,h=_$_WT_CLASS_$_,s=0,A=0,H=null,E={object:null,sourceId:null,mimeType:null,dropOffsetX:null,dragOffsetY:null,dropTarget:null,objectPrevStyle:null,xy:null},Z=_$_FORM_OBJECTS_$_;h.button=function(c){return c.which?c.which==3?4:c.which==2?2:1:h.isIE&&typeof c.button!="undefined"?c.button==2?4:c.button==4?2:1:typeof c.button!="undefined"?c.button==2?4:c.button==1?2:1:0};var ga=[],y=[],ha=_$_RELATIVE_URL_$_,R=false,ma=false,ja=
true;return"0"}function Y(c){window.onbeforeunload=c&&c!=""?function(d){if(d=d||window.event)d.returnValue=c;return c}:null}var k=this,h=_$_WT_CLASS_$_,s=0,A=0,H=null,E={object:null,sourceId:null,mimeType:null,dropOffsetX:null,dragOffsetY:null,dropTarget:null,objectPrevStyle:null,xy:null},Z=_$_FORM_OBJECTS_$_;h.button=function(c){return c.which?c.which==3?4:c.which==2?2:1:h.isIE&&typeof c.button!="undefined"?c.button==2?4:c.button==4?2:1:typeof c.button!="undefined"?c.button==2?4:c.button==1?2:1:
p.onreadystatechange=function(){var t=p.readyState;if(t=="loaded")h.isOpera?M(c):j();else t=="complete"&&M(c)};document.getElementsByTagName("head")[0].appendChild(p)}}function x(c,d){this.callback=d;this.work=c.length;this.images=[];if(c.length==0)d(this.images);else for(d=0;d<c.length;d++)this.preload(c[d])}function D(c){if(c.ieAlternativeExecuted)return"0";k.emit(c.parentNode,"IeAltnernative");c.style.width="";c.ieAlternativeExecuted=true;return"0"}function Y(c){window.onbeforeunload=c&&c!=""?function(d){if(d=d||window.event)d.returnValue=c;return c}:null}var k=this,h=_$_WT_CLASS_$_,s=0,A=0,H=null,E={object:null,sourceId:null,mimeType:null,dropOffsetX:null,dragOffsetY:null,dropTarget:null,objectPrevStyle:null,xy:null},Z=_$_FORM_OBJECTS_$_;h.button=function(c){return c.which?c.which==3?4:c.which==2?2:1:h.isIE&&typeof c.button!="undefined"?c.button==2?4:c.button==4?2:1:typeof c.button!="undefined"?c.button==2?4:c.button==1?2:1:0};var ga=[],y=[],ha=_$_RELATIVE_URL_$_,R=false,ma=false,ja=
c,e){if(!P){if(d==0){_$_$ifnot_DEBUG_$_();try{_$_$endif_$_();E(c);_$_$ifnot_DEBUG_$_()}catch(j){alert("Wt internal error: "+j+", code: "+j.code+", description: "+j.description)}_$_$endif_$_();e&&h(e)}else A=da.concat(A);da=[];if(L){clearTimeout(L);L=null}K=null;if(d>0)++X;else X=0;if(!P)if(ha||A.length>0)if(d==1){d=Math.min(12E4,Math.exp(X)*500);Q=setTimeout(function(){v()},d)}else v()}}function r(){K.abort();L=K=null;P||v()}function y(d,c,e,j){n.checkReleaseCapture(d,e);_$_$if_STRICTLY_SERIALIZED_EVENTS_$_(); if(!K){_$_$endif_$_();var m={},i=A.length;m.object=d;m.signal=c;m.event=e;m.feedback=j;A[i]=B(m,i);x();E();_$_$if_STRICTLY_SERIALIZED_EVENTS_$_()}_$_$endif_$_()}function x(){if(K!=null&&L!=null){clearTimeout(L);K.abort();K=null}if(K==null)if(Q==null){Q=setTimeout(function(){v()},n.updateDelay);ia=(new Date).getTime()}else if(X){clearTimeout(Q);v()}else if((new Date).getTime()-ia>n.updateDelay){clearTimeout(Q);v()}}function F(d){ea=d;q._p_.comm.responseReceived(d)}function v(){Q=null;if(P){if(!ja){if(confirm("The application was quited, do you want to restart?"))document.location=
L=K=null;P||v()}function y(d,c,e,j){n.checkReleaseCapture(d,e);_$_$if_STRICTLY_SERIALIZED_EVENTS_$_();if(!K){_$_$endif_$_();var m={},i=A.length;m.object=d;m.signal=c;m.event=e;m.feedback=j;A[i]=B(m,i);x();E();_$_$if_STRICTLY_SERIALIZED_EVENTS_$_()}_$_$endif_$_()}function x(){if(K!=null&&L!=null){clearTimeout(L);K.abort();K=null}if(K==null)if(Q==null){Q=setTimeout(function(){v()},n.updateDelay);ia=(new Date).getTime()}else if(X){clearTimeout(Q);v()}else if((new Date).getTime()-ia>n.updateDelay){clearTimeout(Q);
c,e){if(!P){if(d==0){_$_$ifnot_DEBUG_$_();try{_$_$endif_$_();E(c);_$_$ifnot_DEBUG_$_()}catch(j){alert("Wt internal error: "+j+", code: "+j.code+", description: "+j.description)}_$_$endif_$_();e&&h(e)}else A=da.concat(A);da=[];if(L){clearTimeout(L);L=null}K=null;if(d>0)++X;else X=0;if(!P)if(ha||A.length>0)if(d==1){d=Math.min(12E4,Math.exp(X)*500);Q=setTimeout(function(){v()},d)}else v()}}function r(){K.abort();L=K=null;P||v()}function y(d,c,e,j){n.checkReleaseCapture(d,e);_$_$if_STRICTLY_SERIALIZED_EVENTS_$_();if(!K){_$_$endif_$_();var m={},i=A.length;m.object=d;m.signal=c;m.event=e;m.feedback=j;A[i]=B(m,i);x();E();_$_$if_STRICTLY_SERIALIZED_EVENTS_$_()}_$_$endif_$_()}function x(){if(K!=null&&L!=null){clearTimeout(L);K.abort();K=null}if(K==null)if(Q==null){Q=setTimeout(function(){v()},n.updateDelay);ia=(new Date).getTime()}else if(X){clearTimeout(Q);v()}else if((new Date).getTime()-ia>n.updateDelay){clearTimeout(Q);v()}}function F(d){ea=d;q._p_.comm.responseReceived(d)}function v(){Q=null;if(P){if(!ja){if(confirm("The application was quited, do you want to restart?"))document.location=
d+=A[e].data}da=A;A=[];return{feedback:c,result:d}}function Y(){P=true;if(W){clearTimeout(W);W=null}var d=$("#Wt-timers");d.size()>0&&n.setHtml(d.get(0),"",false)}function a(){n.history._initTimeout();X==0&&y(null,"none",null,false);W=setTimeout(a,_$_KEEP_ALIVE_$_000)}function b(d){if(!n.isIEMobile)document.title=d}function f(){if(!document.activeElement){function d(e){if(e&&e.target)document.activeElement=e.target==document?null:e.target}function c(){document.activeElement=null}document.addEventListener("focus",
c+"shiftKey=1";d.data=e;return d}function S(){for(var d="",c=false,e=0;e<A.length;++e){c=c||A[e].feedback;d+=A[e].data}da=A;A=[];return{feedback:c,result:d}}function Y(){P=true;if(W){clearTimeout(W);W=null}var d=$("#Wt-timers");d.size()>0&&n.setHtml(d.get(0),"",false)}function a(){n.history._initTimeout();X==0&&y(null,"none",null,false);W=setTimeout(a,_$_KEEP_ALIVE_$_000)}function b(d){if(!n.isIEMobile)document.title=d}function f(){if(!document.activeElement){function d(e){if(e&&e.target)document.activeElement=
d+=A[e].data}da=A;A=[];return{feedback:c,result:d}}function Y(){P=true;if(W){clearTimeout(W);W=null}var d=$("#Wt-timers");d.size()>0&&n.setHtml(d.get(0),"",false)}function a(){n.history._initTimeout();X==0&&y(null,"none",null,false);W=setTimeout(a,_$_KEEP_ALIVE_$_000)}function b(d){if(!n.isIEMobile)document.title=d}function f(){if(!document.activeElement){function d(e){if(e&&e.target)document.activeElement=e.target==document?null:e.target}function c(){document.activeElement=null}document.addEventListener("focus",
E=false,R=null,A=[],I,z,Q=function(){};if(!document.activeElement){function S(g){if(g&&g.target)document.activeElement=g.target==document?null:g.target}function Y(){document.activeElement=null}document.addEventListener("focus",S,true);document.addEventListener("blur",Y,true)}return{onReady:function(g){if(E)setTimeout(function(){g()},0);else D=g},_initialize:function(){H!=null&&B()},_initTimeout:function(){o()},register:function(g,p){if(!E){z=I=escape(g);Q=p}},initialize:function(g,p){if(!E){var n=
var _$_WT_CLASS_$_=new (function(){function x(a,b){return a.style[b]?a.style[b]:document.defaultView&&document.defaultView.getComputedStyle?document.defaultView.getComputedStyle(a,null)[b]:a.currentStyle?a.currentStyle[b]:null}function t(a){if(D!=null){if(!a)a=window.event;k.condCall(D,"onmousemove",a);return false}else return true}function C(a){if(D!=null){var b=D;k.capture(null);if(!a)a=window.event;k.condCall(b,"onmouseup",a);k.cancelEvent(a,k.CancelPropagate);return false}else return true}function Y(){if(!R){R= true;if(document.body.addEventListener){var a=document.body;a.addEventListener("mousemove",t,true);a.addEventListener("mouseup",C,true);k.isGecko&&window.addEventListener("mouseout",function(b){!b.relatedTarget&&k.hasTag(b.target,"HTML")&&C(b)},true)}else{a=document.body;a.attachEvent("onmousemove",t);a.attachEvent("onmouseup",C)}}}var k=this;this.arrayRemove=function(a,b,f){f=a.slice((f||b)+1||a.length);a.length=b<0?a.length+b:b;return a.push.apply(a,f)};this.isIE6=(this.isIE=navigator.userAgent.toLowerCase().indexOf("msie")!=
E=false,R=null,A=[],I,z,Q=function(){};if(!document.activeElement){function S(g){if(g&&g.target)document.activeElement=g.target==document?null:g.target}function Y(){document.activeElement=null}document.addEventListener("focus",S,true);document.addEventListener("blur",Y,true)}return{onReady:function(g){if(E)setTimeout(function(){g()},0);else D=g},_initialize:function(){H!=null&&B()},_initTimeout:function(){o()},register:function(g,p){if(!E){z=I=escape(g);Q=p}},initialize:function(g,p){if(!E){var n=
J>=0;J--)v(G[J]);if(I)x(I,true);else if(H)H.remove();}else if(F instanceof h){var K=F.getParent();if(K.getChildCount()==1)K.remove();else F.remove();}};function w(F){var G=F.getBogus();G&&G.remove();F.trim();};function x(F,G){var H=new d.range(F.getDocument());if(!H['moveToElementEdit'+(G?'End':'Start')](F)){H.selectNodeContents(F);H.collapse(G?false:true);}H.select(true);};function y(F){var G=F.$.rows,H=-1,I=[];for(var J=0;J<G.length;J++){H++;!I[H]&&(I[H]=[]);var K=-1;for(var L=0;L<G[J].cells.length;L++){var M=G[J].cells[L];K++;while(I[H][K])K++;var N=isNaN(M.colSpan)?1:M.colSpan,O=isNaN(M.rowSpan)?1:M.rowSpan;for(var P=0;P<O;P++){if(!I[H+P])I[H+P]=[];for(var Q=0;Q<N;Q++)I[H+P][K+Q]=G[J].cells[L];}K+=N-1;}}return I;};function z(F,G,H){var I=F[G];if(typeof H=='undefined')return I;for(var J=0;I&&J<I.length;J++){if(H.is&&I[J]==H.$)return J;else if(J==H)return new h(I[J]);}return H.is?-1:null;};function A(F,G,H){var I=[];for(var J=0;J<F.length;J++){var K=F[J];if(typeof H=='undefined')I.push(K[G]);else if(H.is&&K[G]==H.$)return J;else if(J==H)return new h(K[G]);}return typeof H=='undefined'?I:H.is?-1:null;};function B(F,G,H){var I=n(F),J;if((G?I.length!=1:I.length<2)||(J=F.getCommonAncestor())&&J.type==1&&J.is('table'))return false;var K,L=I[0],M=L.getAscendant('table'),N=y(M),O=N.length,P=N[0].length,Q=L.getParent().$.rowIndex,R=z(N,Q,L);if(G){var S;try{S=N[G=='up'?Q-1:G=='down'?Q+1:Q][G=='left'?R-1:G=='right'?R+1:R];}catch(ak){return false;}if(!S||L.$==S)return false;I[G=='up'||G=='left'?'unshift':'push'](new h(S));}var T=L.getDocument(),U=Q,V=0,W=0,X=!H&&new d.documentFragment(T),Y=0;for(var Z=0;Z<I.length;Z++){K=I[Z];var aa=K.getParent(),ab=K.getFirst(),ac=K.$.colSpan,ad=K.$.rowSpan,ae=aa.$.rowIndex,af=z(N,ae,K);Y+=ac*ad;W=Math.max(W,af-R+ac);V=Math.max(V,ae-Q+ad);if(!H){if(w(K),K.getChildren().count()){if(ae!=U&&ab&&!(ab.isBlockBoundary&&ab.isBlockBoundary({br:1}))){var ag=X.getLast(d.walker.whitespaces(true));if(ag&&!(ag.is&&ag.is('br')))X.append(new h('br'));}K.moveChildren(X);}Z?K.remove():K.setHtml('');}U=ae;}if(!H){X.moveChildren(L);if(!c)L.appendBogus();if(W>=P)L.removeAttribute('rowSpan');else L.$.rowSpan=V;if(V>=O)L.removeAttribute('colSpan');else L.$.colSpan=W;var ah=new d.nodeList(M.$.rows),ai=ah.count();for(Z=ai-1;Z>=0;Z--){var aj=ah.getItem(Z);if(!aj.$.cells.length){aj.remove();ai++;continue;}}return L;}else return V*W==Y;};function C(F,G){var H=n(F);if(H.length>1)return false;else if(G)return true;var I=H[0],J=I.getParent(),K=J.getAscendant('table'),L=y(K),M=J.$.rowIndex,N=z(L,M,I),O=I.$.rowSpan,P,Q,R,S;
if(!H)return;var I=H.clone(true);G?I.insertBefore(H):I.insertAfter(H);p(I.$);};function r(F){if(F instanceof d.selection){var G=n(F),H=G.length,I=[],J,K,L;for(var M=0;M<H;M++){var N=G[M].getParent(),O=N.$.rowIndex;!M&&(K=O-1);I[O]=N;M==H-1&&(L=O+1);}var P=N.getAscendant('table'),Q=P.$.rows,R=Q.length;J=new h(L<R&&P.$.rows[L]||K>0&&P.$.rows[K]||P.$.parentNode);for(M=I.length;M>=0;M--){if(I[M])r(I[M]);}return J;}else if(F instanceof h){P=F.getAscendant('table');if(P.$.rows.length==1)P.remove();else F.remove();}return 0;};function s(F,G){var H=F.getStartElement(),I=H.getAscendant('td',true)||H.getAscendant('th',true);if(!I)return;var J=I.getAscendant('table'),K=I.$.cellIndex;for(var L=0;L<J.$.rows.length;L++){var M=J.$.rows[L];if(M.cells.length<K+1)continue;I=new h(M.cells[K]).clone(false);if(!c)I.appendBogus();var N=new h(M.cells[K]);if(G)I.insertBefore(N);else I.insertAfter(N);}};function t(F){var G=[],H=F[0]&&F[0].getAscendant('table'),I,J,K,L;for(I=0,J=F.length;I<J;I++)G.push(F[I].$.cellIndex);G.sort();for(I=1,J=G.length;I<J;I++){if(G[I]-G[I-1]>1){K=G[I-1]+1;break;}}if(!K)K=G[0]>0?G[0]-1:G[G.length-1]+1;var M=H.$.rows;for(I=0,J=M.length;I<J;I++){L=M[I].cells[K];if(L)break;}return L?new h(L):H.getPrevious();};function u(F){if(F instanceof d.selection){var G=n(F),H=t(G);for(var I=G.length-1;I>=0;I--){if(G[I])u(G[I]);}return H;}else if(F instanceof h){var J=F.getAscendant('table');if(!J)return null;var K=F.$.cellIndex;for(I=J.$.rows.length-1;I>=0;I--){var L=new h(J.$.rows[I]);if(!K&&L.$.cells.length==1){r(L);continue;}if(L.$.cells[K])L.$.removeChild(L.$.cells[K]);}}return null;};function v(F,G){var H=F.getStartElement(),I=H.getAscendant('td',true)||H.getAscendant('th',true);if(!I)return;var J=I.clone();if(!c)J.appendBogus();if(G)J.insertBefore(I);else J.insertAfter(I);};function w(F){if(F instanceof d.selection){var G=n(F),H=G[0]&&G[0].getAscendant('table'),I=o(G);for(var J=G.length-1;J>=0;J--)w(G[J]);if(I)y(I,true);else if(H)H.remove();}else if(F instanceof h){var K=F.getParent();if(K.getChildCount()==1)K.remove();else F.remove();}};function x(F){var G=F.getBogus();G&&G.remove();F.trim();};function y(F,G){var H=new d.range(F.getDocument());if(!H['moveToElementEdit'+(G?'End':'Start')](F)){H.selectNodeContents(F);H.collapse(G?false:true);}H.select(true);};function z(F,G,H){var I=F[G];if(typeof H=='undefined')return I;for(var J=0;I&&J<I.length;J++){if(H.is&&I[J]==H.$)return J;else if(J==H)return new h(I[J]);}return H.is?-1:null;};function A(F,G,H){var I=[];for(var J=0;
J>=0;J--)v(G[J]);if(I)x(I,true);else if(H)H.remove();}else if(F instanceof h){var K=F.getParent();if(K.getChildCount()==1)K.remove();else F.remove();}};function w(F){var G=F.getBogus();G&&G.remove();F.trim();};function x(F,G){var H=new d.range(F.getDocument());if(!H['moveToElementEdit'+(G?'End':'Start')](F)){H.selectNodeContents(F);H.collapse(G?false:true);}H.select(true);};function y(F){var G=F.$.rows,H=-1,I=[];for(var J=0;J<G.length;J++){H++;!I[H]&&(I[H]=[]);var K=-1;for(var L=0;L<G[J].cells.length;L++){var M=G[J].cells[L];K++;while(I[H][K])K++;var N=isNaN(M.colSpan)?1:M.colSpan,O=isNaN(M.rowSpan)?1:M.rowSpan;for(var P=0;P<O;P++){if(!I[H+P])I[H+P]=[];for(var Q=0;Q<N;Q++)I[H+P][K+Q]=G[J].cells[L];}K+=N-1;}}return I;};function z(F,G,H){var I=F[G];if(typeof H=='undefined')return I;for(var J=0;I&&J<I.length;J++){if(H.is&&I[J]==H.$)return J;else if(J==H)return new h(I[J]);}return H.is?-1:null;};function A(F,G,H){var I=[];for(var J=0;J<F.length;J++){var K=F[J];if(typeof H=='undefined')I.push(K[G]);else if(H.is&&K[G]==H.$)return J;else if(J==H)return new h(K[G]);}return typeof H=='undefined'?I:H.is?-1:null;};function B(F,G,H){var I=n(F),J;if((G?I.length!=1:I.length<2)||(J=F.getCommonAncestor())&&J.type==1&&J.is('table'))return false;var K,L=I[0],M=L.getAscendant('table'),N=y(M),O=N.length,P=N[0].length,Q=L.getParent().$.rowIndex,R=z(N,Q,L);if(G){var S;try{S=N[G=='up'?Q-1:G=='down'?Q+1:Q][G=='left'?R-1:G=='right'?R+1:R];}catch(ak){return false;}if(!S||L.$==S)return false;I[G=='up'||G=='left'?'unshift':'push'](new h(S));}var T=L.getDocument(),U=Q,V=0,W=0,X=!H&&new d.documentFragment(T),Y=0;for(var Z=0;Z<I.length;Z++){K=I[Z];var aa=K.getParent(),ab=K.getFirst(),ac=K.$.colSpan,ad=K.$.rowSpan,ae=aa.$.rowIndex,af=z(N,ae,K);Y+=ac*ad;W=Math.max(W,af-R+ac);V=Math.max(V,ae-Q+ad);if(!H){if(w(K),K.getChildren().count()){if(ae!=U&&ab&&!(ab.isBlockBoundary&&ab.isBlockBoundary({br:1}))){var ag=X.getLast(d.walker.whitespaces(true));if(ag&&!(ag.is&&ag.is('br')))X.append(new h('br'));}K.moveChildren(X);}Z?K.remove():K.setHtml('');}U=ae;}if(!H){X.moveChildren(L);if(!c)L.appendBogus();if(W>=P)L.removeAttribute('rowSpan');else L.$.rowSpan=V;if(V>=O)L.removeAttribute('colSpan');else L.$.colSpan=W;var ah=new d.nodeList(M.$.rows),ai=ah.count();for(Z=ai-1;Z>=0;Z--){var aj=ah.getItem(Z);if(!aj.$.cells.length){aj.remove();ai++;continue;}}return L;}else return V*W==Y;};function C(F,G){var H=n(F);if(H.length>1)return false;else if(G)return true;var I=H[0],J=I.getParent(),K=J.getAscendant('table'),L=y(K),M=J.$.rowIndex,N=z(L,M,I),O=I.$.rowSpan,P,Q,R,S;
function Z(d){m.capture(null);var c=aa;if(c.object){if(c.dropTarget){var e=c.dropTarget.getAttribute("dos");if(e!=null)c.dropTarget.className=e;c.dropTarget.handleDragDrop?c.dropTarget.handleDragDrop("drop",c.object,d,c.sourceId,c.mimeType):I(c.dropTarget,{name:"_drop",eventObject:c.dropTarget,event:d},c.sourceId,c.mimeType)}c.object.style.position=c.objectPrevStyle.position;c.object.style.display=c.objectPrevStyle.display;c.object.style.left=c.objectPrevStyle.left;c.object.style.top=c.objectPrevStyle.top; c.object.className=c.objectPrevStyle.className;c.object=null}}function B(d,c){var e,j;j=d.event;c=c>0?"&e"+c:"&";e=c+"signal="+d.signal;if(d.id){e+=c+"id="+d.id+c+"name="+encodeURIComponent(d.name)+c+"an="+d.args.length;for(var n=0;n<d.args.length;++n)e+=c+"a"+n+"="+encodeURIComponent(d.args[n])}for(var i=0;i<V.length;++i){var r=m.getElement(V[i]),y=null,fa;if(r!=null){if(r.type=="select-multiple"){n=0;for(fa=r.options.length;n<fa;n++)if(r.options[n].selected)e+=c+V[i]+"="+encodeURIComponent(r.options[n].value)}else if(r.type==
c.object,d,"",n);else c.object.className="Wt-valid-drop";return false}return true}function Z(d){m.capture(null);var c=aa;if(c.object){if(c.dropTarget){var e=c.dropTarget.getAttribute("dos");if(e!=null)c.dropTarget.className=e;c.dropTarget.handleDragDrop?c.dropTarget.handleDragDrop("drop",c.object,d,c.sourceId,c.mimeType):I(c.dropTarget,{name:"_drop",eventObject:c.dropTarget,event:d},c.sourceId,c.mimeType)}c.object.style.position=c.objectPrevStyle.position;c.object.style.display=c.objectPrevStyle.display; c.object.style.left=c.objectPrevStyle.left;c.object.style.top=c.objectPrevStyle.top;c.object.className=c.objectPrevStyle.className;c.object=null}}function B(d,c){var e,j;j=d.event;c=c>0?"&e"+c:"&";e=c+"signal="+d.signal;if(d.id){e+=c+"id="+d.id+c+"name="+encodeURIComponent(d.name)+c+"an="+d.args.length;for(var n=0;n<d.args.length;++n)e+=c+"a"+n+"="+encodeURIComponent(d.args[n])}for(var i=0;i<W.length;++i){var p=m.getElement(W[i]),t=null,fa;if(p!=null){if(p.type=="select-multiple"){n=0;for(fa=p.options.length;n<
function Z(d){m.capture(null);var c=aa;if(c.object){if(c.dropTarget){var e=c.dropTarget.getAttribute("dos");if(e!=null)c.dropTarget.className=e;c.dropTarget.handleDragDrop?c.dropTarget.handleDragDrop("drop",c.object,d,c.sourceId,c.mimeType):I(c.dropTarget,{name:"_drop",eventObject:c.dropTarget,event:d},c.sourceId,c.mimeType)}c.object.style.position=c.objectPrevStyle.position;c.object.style.display=c.objectPrevStyle.display;c.object.style.left=c.objectPrevStyle.left;c.object.style.top=c.objectPrevStyle.top;c.object.className=c.objectPrevStyle.className;c.object=null}}function B(d,c){var e,j;j=d.event;c=c>0?"&e"+c:"&";e=c+"signal="+d.signal;if(d.id){e+=c+"id="+d.id+c+"name="+encodeURIComponent(d.name)+c+"an="+d.args.length;for(var n=0;n<d.args.length;++n)e+=c+"a"+n+"="+encodeURIComponent(d.args[n])}for(var i=0;i<V.length;++i){var r=m.getElement(V[i]),y=null,fa;if(r!=null){if(r.type=="select-multiple"){n=0;for(fa=r.options.length;n<fa;n++)if(r.options[n].selected)e+=c+V[i]+"="+encodeURIComponent(r.options[n].value)}else if(r.type==
c.dropTarget.className+" "+i}}else c.object.styleClass="";if(e!=null){e.handleDragDrop&&e.handleDragDrop("end",c.object,d,"",m);i=e.getAttribute("dos");if(i!=null)e.className=i}}if(c.dropTarget)if(c.dropTarget.handleDragDrop)c.dropTarget.handleDragDrop("drag",c.object,d,"",m);else c.object.className="Wt-valid-drop";n.cancelEvent(d);return false}return true}function Z(d){n.capture(null);var c=aa;if(c.object){if(c.dropTarget){var e=c.dropTarget.getAttribute("dos");if(e!=null)c.dropTarget.className= e;c.dropTarget.handleDragDrop?c.dropTarget.handleDragDrop("drop",c.object,d,c.sourceId,c.mimeType):I(c.dropTarget,{name:"_drop",eventObject:c.dropTarget,event:d},c.sourceId,c.mimeType)}c.object.style.position=c.objectPrevStyle.position;c.object.style.display=c.objectPrevStyle.display;c.object.style.left=c.objectPrevStyle.left;c.object.style.top=c.objectPrevStyle.top;c.object.className=c.objectPrevStyle.className;c.object=null}}function B(d,c){var e,j;j=d.event;c=c>0?"&e"+c:"&";e=c+"signal="+d.signal;
return false}return true}function Z(d){n.capture(null);var c=aa;if(c.object){if(c.dropTarget){var e=c.dropTarget.getAttribute("dos");if(e!=null)c.dropTarget.className=e;c.dropTarget.handleDragDrop?c.dropTarget.handleDragDrop("drop",c.object,d,c.sourceId,c.mimeType):I(c.dropTarget,{name:"_drop",eventObject:c.dropTarget,event:d},c.sourceId,c.mimeType)}c.object.style.position=c.objectPrevStyle.position;c.object.style.display=c.objectPrevStyle.display;c.object.style.left=c.objectPrevStyle.left;c.object.style.top= c.objectPrevStyle.top;c.object.className=c.objectPrevStyle.className;c.object=null}}function B(d,c){var e,j;j=d.event;c=c>0?"&e"+c:"&";e=c+"signal="+d.signal;if(d.id){e+=c+"id="+d.id+c+"name="+encodeURIComponent(d.name)+c+"an="+d.args.length;for(var m=0;m<d.args.length;++m)e+=c+"a"+m+"="+encodeURIComponent(d.args[m])}for(var i=0;i<V.length;++i){var s=n.getElement(V[i]),z=null,fa;if(s!=null){if(s.type=="select-multiple"){m=0;for(fa=s.options.length;m<fa;m++)if(s.options[m].selected)e+=c+V[i]+"="+encodeURIComponent(s.options[m].value)}else if(s.type==
c.dropTarget.className+" "+i}}else c.object.styleClass="";if(e!=null){e.handleDragDrop&&e.handleDragDrop("end",c.object,d,"",m);i=e.getAttribute("dos");if(i!=null)e.className=i}}if(c.dropTarget)if(c.dropTarget.handleDragDrop)c.dropTarget.handleDragDrop("drag",c.object,d,"",m);else c.object.className="Wt-valid-drop";n.cancelEvent(d);return false}return true}function Z(d){n.capture(null);var c=aa;if(c.object){if(c.dropTarget){var e=c.dropTarget.getAttribute("dos");if(e!=null)c.dropTarget.className=e;c.dropTarget.handleDragDrop?c.dropTarget.handleDragDrop("drop",c.object,d,c.sourceId,c.mimeType):I(c.dropTarget,{name:"_drop",eventObject:c.dropTarget,event:d},c.sourceId,c.mimeType)}c.object.style.position=c.objectPrevStyle.position;c.object.style.display=c.objectPrevStyle.display;c.object.style.left=c.objectPrevStyle.left;c.object.style.top=c.objectPrevStyle.top;c.object.className=c.objectPrevStyle.className;c.object=null}}function B(d,c){var e,j;j=d.event;c=c>0?"&e"+c:"&";e=c+"signal="+d.signal;
arguments[h];i=i===false?0:i===true?1:i.toDateString?i.toDateString():i;e.args[h-2]=i}e.feedback=true;v[g]=r(e,g);j()}function P(c,d,e){var g=function(){var i=p.getElement(c);if(i){if(e)i.timer=setTimeout(i.tm,d);else{i.timer=null;i.tm=null}i.onclick()}},h=p.getElement(c);h.timer=setTimeout(g,d);h.tm=g}function G(c,d){setTimeout(function(){if(N[c]===true)d();else N[c]=d},20)}function Z(c){if(N[c]!==true){typeof N[c]!=="undefined"&&N[c]();N[c]=true}}function ia(c,d){var e=false;if(d!="")try{e=!eval("typeof "+
null}e.args=[];for(var h=2;h<arguments.length;++h){var i=arguments[h];i=i===false?0:i===true?1:i.toDateString?i.toDateString():i;e.args[h-2]=i}e.feedback=true;v[g]=r(e,g);j()}function P(c,d,e){var g=function(){var i=p.getElement(c);if(i){if(e)i.timer=setTimeout(i.tm,d);else{i.timer=null;i.tm=null}i.onclick()}},h=p.getElement(c);h.timer=setTimeout(g,d);h.tm=g}function G(c,d){setTimeout(function(){if(N[c]===true)d();else N[c]=d},20)}function Z(c){if(N[c]!==true){typeof N[c]!=="undefined"&&N[c]();N[c]= true}}function ia(c,d){var e=false;if(d!="")try{e=!eval("typeof "+d+" === 'undefined'")}catch(g){e=false}if(e)Z(c);else{var h=document.createElement("script");h.setAttribute("src",c);h.onload=function(){Z(c)};h.onreadystatechange=function(){if(h.readyState=="complete"||h.readyState=="loaded")Z(c)};document.getElementsByTagName("head")[0].appendChild(h)}}function O(c,d){this.callback=d;this.work=c.length;this.images=[];if(c.length==0)d(this.images);else for(d=0;d<c.length;d++)this.preload(c[d])}var ea=
arguments[h];i=i===false?0:i===true?1:i.toDateString?i.toDateString():i;e.args[h-2]=i}e.feedback=true;v[g]=r(e,g);j()}function P(c,d,e){var g=function(){var i=p.getElement(c);if(i){if(e)i.timer=setTimeout(i.tm,d);else{i.timer=null;i.tm=null}i.onclick()}},h=p.getElement(c);h.timer=setTimeout(g,d);h.tm=g}function G(c,d){setTimeout(function(){if(N[c]===true)d();else N[c]=d},20)}function Z(c){if(N[c]!==true){typeof N[c]!=="undefined"&&N[c]();N[c]=true}}function ia(c,d){var e=false;if(d!="")try{e=!eval("typeof "+