rem: Possible values: 
add: Possible values: 
context: function chwPositionSelector(property, type, defaultPosition){  this.property = property;  this.type = type;  /*    The curently chosen position    Possible values:     - Type 1 (4 positions): Top, Left, Right, Bottom    - Type 2 (9 positions): TopLeft, TopCenter, TopRight,                            CenterLeft, CenterCenter, CenterRight,                            BottomLeft, BottomCenter, BottomRight   */  this.selected = defaultPosition;  /*     Is the left mouse button pressed at the moment?   */  this.leftButtonDown = false;  /*     Highlight the element     (set the apropriate css class)   */  this.onmouseover = function(element, position){    if (this.selected == position){      element.className = "chwSelectedCellHighlighted";    }    else if (this.leftButtonDown == true){      document.getElementById('chw' + this.property + this.selected).className = "normal";      this.selected = position;      element.className = "chwSelectedCellHighlighted";      switch(this.type){        case "Position":          document.getElementById('chw' + this.property + 'Input').value = position.toLowerCase();          break;        case "Alignment":          document.getElementById('chw' + this.property + 'HorizontalInput').value = position.substring(position.indexOf('_') + 1).toLowerCase();          document.getElementById('chw' + this.property + 'VerticalInput').value = position.substring(0, position.indexOf('_')).toLowerCase();          break;      }    }    else {      element.className = "chwNormalCellHighlighted";    }  }  /*     Highlight the element     (set the apropriate css class)   */  this.onmouseout = function(element, position){    if (this.selected == position){      element.className = "chwSelectedCell";    }    else {      element.className = "chwNormalCell";    }  }  /*     Selection started...   */  this.onmousedown = function(evt, position){    if (evt.button != window.wizard.LMB) return;    this.leftButtonDown = true;    if (this.selected == position) return;    document.getElementById('chw' + this.property + this.selected).className = "chwNormalCell";    this.selected = position;      switch(this.type){        case "Position":          document.getElementById('chw' + this.property + 'Input').value = position.toLowerCase();          break;        case "Alignment":          document.getElementById('chw' + this.property + 'HorizontalInput').value = position.substring(position.indexOf('_') + 1).toLowerCase();          document.getElementById('chw' + this.property + 'VerticalInput').value = position.substring(0, position.indexOf('_')).toLowerCase();          break;      }    document.getElementById('chw' + this.property + position).className = "chwSelectedCellHighlighted";  }  /*     ... Selection ended   */  this.onmouseup = function(evt){    if (evt.button != window.wizard.LMB) return;    this.leftButtonDown = false;  }}
meta: 6184	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6184/dd352e85541f4f0c03f7f567916b9a31621e2ad2/chwScripts.js/buggy/xwiki-platform-web/standard/src/main/webapp/skins/xwiki10/chwScripts.js