Index: options_element.js
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/options_element/options_element.js,v
retrieving revision 1.10
diff -u -p -r1.10 options_element.js
--- options_element.js	5 Sep 2010 00:52:27 -0000	1.10
+++ options_element.js	22 Oct 2010 12:06:51 -0000
@@ -72,7 +72,7 @@ Drupal.optionsElement = function(element
         var options = self.optionsFromText();
         var confirm = false;
         if (self.keyType == 'associative') {
-          for (var n in options) {
+          for (var n = 0; n < options.length; n++) {
             if (options[n].key != options[n].value) {
               confirm = true;
               break;
@@ -586,7 +586,7 @@ Drupal.optionsElement.prototype.optionsF
   if (this.manualDefaultValueElement) {
     if (this.multiple) {
       var defaults = this.manualDefaultValueElement.value.split(',');
-      for (var n in defaults) {
+      for (var n = 0; n < options.length; n++) {
         var defaultValue = defaults[n].replace(/^[ ]*(.*?)[ ]*$/, '$1'); // trim().
         defaultValues[defaultValue] = defaultValue;
       }
@@ -650,7 +650,7 @@ Drupal.optionsElement.prototype.optionsF
   // Convert options to numeric if no key is specified.
   if (this.keyType == 'numeric') {
     var nextKey = this.nextNumericKey();
-    for (var n in options) {
+    for (var n = 0; n < options.length; n++) {
       if (options[n].key == '') {
         options[n].key = nextKey;
         nextKey++;
@@ -670,7 +670,7 @@ Drupal.optionsElement.prototype.nextNume
   this.keyType = 'numeric';
 
   var maxKey = -1;
-  for (var n in options) {
+  for (var n = 0; n < options.length; n++) {
     if (options[n].key.match(/^[0-9]+$/)) {
       maxKey = Math.max(maxKey, options[n].key);
     }
@@ -742,7 +742,7 @@ Drupal.theme.prototype.optionsElement = 
     options.push(newOption);
   }
 
-  for (var n in options) {
+  for (var n = 0; n < options.length; n++) {
     var option = options[n];
     var depth = option.parent === '' ? 0 : 1;
     var checked = !option.hasChildren && option.checked;
