var COMBO = {
 x : '',
 y : '',
 
 open : function(e) {
  var el = document.getElementById("IslandCombo");
  el.className = "enabled";
  
  if(!e.stopPropagation) {
   this.x = pageX(el);
   this.y = pageY(el);
   
   el.parentNode.removeChild(el);
   var b = document.getElementsByTagName('body');
   b = b[0];
   b.appendChild(el);
   el.style.left = this.x + "px";
   el.style.top = this.y + "px";
   el.className = "enabled";
   el.style.width = "144px";
  }
  
  if( e.stopPropagation ) { e.stopPropagation(); }
  e.cancelBubble = true;
  
  return false;
 }, 
 
 close : function(ev) {
  var el = document.getElementById("IslandCombo");
  el.className = "";
 },
 
 cancelBubble : function(e) {
  if( e.stopPropagation ) { e.stopPropagation(); }
  e.cancelBubble = true;  
 }
}

EXTRAS = {
 // Event listener by Scott Andrew (www.scottandrew.com):
 addEvent : function(obj, evType, fn, useCapture){
  if (obj.addEventListener){
   obj.addEventListener(evType, fn, useCapture);
   return true;
  } 
  else if (obj.attachEvent){
   var r = obj.attachEvent("on"+evType, fn);
   return r;
  } 
  else {
   return false;
  }
 }, 
 
 // Method adapted from Dan Pupius (pupius.co.uk):
 // does not work in IE<6 ?
 getElementsByClass : function(className,node) {
  if(!node) node=document;
  var refTags = document.all ? document.all : node.getElementsByTagName("*");
  var retVal = new Array();
  for(var z=0;z<refTags.length;z++) {
   if(refTags[z].className == className) 
   retVal.push(refTags[z]);
  }
  return retVal; 
 }
}
// adds 1 or more elements to an array (IE only)
if(!Array.prototype.push)
{
 Array.prototype.push =  function()
 {
  var i;
  for(i=0; j=arguments[i]; i++) this[this.length] = j;
  return this.length;
 }
}
// Find the X (Horizontal, Left) position of an element
function pageX(elem) {
 // See if we're at the root element, or not
 return elem.offsetParent ?
 // If we can still go up, add the current offset and recurse upwards
 elem.offsetLeft + pageX( elem.offsetParent ) :
 // Otherwise, just get the current offset
 elem.offsetLeft;
}
// Find the Y (Vertical, Top) position of an element
function pageY(elem) {
 // See if we're at the root element, or not
 return elem.offsetParent ?
 // If we can still go up, add the current offset and recurse upwards
 elem.offsetTop + pageY( elem.offsetParent ) :
 // Otherwise, just get the current offset
 elem.offsetTop;
}
  // A function for setting the horizontal position of an element
function setX(elem, pos) {
 // Set the 'left' CSS property, using pixel units
 elem.style.left = pos + "px";
}
// A function for setting the vertical position of an element
function setY(elem, pos) {
 // Set the 'left' CSS property, using pixel units
 elem.style.top = pos + "px";
}