var peoplePane = Class.create(); var showAllInfo = 0; var wSearching; peoplePane.prototype = { _parentDIV : null, _curUser : null, _show : null, _overSection : null, _info : null, _hideEdit : null, initialize : function (divID, show, hideEdit) { this._hideEdit = (hideEdit) ? hideEdit : 0; this._curUserObj = $(divID); this._show = show; this._curUser = divID.replace(/^_/,''); this.positionLayers(); }, positionLayers : function() { if (this._show == 1) var imgDisplay = "block"; else var imgDisplay = "none"; var curBack = $(this._curUser+'_Back'); if ($(this._curUser+'_InfoBut')) { if (editingTags == 1 || this._hideEdit == 1) { showArea('editButtons_'+this._curUser); hideArea('infoButtons_'+this._curUser); } else { showArea('infoButtons_'+this._curUser); hideArea('editButtons_'+this._curUser); } if ($(this._curUser+'_Info')) $(this._curUser+'_Info').style.display='block'; if ($(this._curUser+'_Shout')) $(this._curUser+'_Shout').style.display='none'; if ($(this._curUser+'_Watch')) $(this._curUser+'_Watch').style.display='none'; var imgObj = $(this._curUser+'_InfoBut'); var curSrc = imgObj.src; imgObj.src = curSrc.replace("Off", "On"); var imgObj = $(this._curUser+'_ShoutBut'); var curSrc = imgObj.src; imgObj.src = curSrc.replace("On", "Off"); } curBack.style.opacity = '.82'; curBack.style.filter ='alpha(opacity=82)'; curBack.style.display = imgDisplay; curShout = $(this._curUser+'_Tools'); curShout.style.display = imgDisplay; Position.clone(this._curUserObj, curBack); Position.clone(this._curUserObj, curShout); this.overListener = this.selectPerson.bindAsEventListener(this); Event.observe(this._curUserObj, 'mouseover', this.overListener); this.overShoutListener = this.selectPerson.bindAsEventListener(this); Event.observe(curShout, 'mouseover', this.overShoutListener); this.outListener = this.deselectPerson.bindAsEventListener(this); Event.observe(this._curUserObj, 'mouseout', this.outListener); this.outShoutListener = this.deselectPerson.bindAsEventListener(this); Event.observe(curShout, 'mouseout', this.outShoutListener); }, selectPerson : function() { $(this._curUser+'_Tools').style.display='block'; $(this._curUser+'_Back').style.display='block'; this._overSection = true; }, deselectPerson : function() { this._overSection = false; if ((showAllInfo == 0 && editingTags == 0) ) { this.deselectListener = this.deselectPersonAction.bindAsEventListener(this); setTimeout(this.deselectListener, 10); } }, deselectPersonAction : function () { if (this._overSection == false) { $(this._curUser+'_Tools').style.display='none'; $(this._curUser+'_Back').style.display='none'; } } } Event.observe(window, 'load', function() { if ($('inlinePane')) pickShouts('inlinePane', 0, 0); }); function pickShouts(peopleArea, show, hideEdit) { if ($(peopleArea)) { var peopleArea = $(peopleArea); var peopleDIVS = peopleArea.getElementsByTagName('div'); for (var i=0;i