includes/clientside/static/misc.js
changeset 581 5e8fd89c02ea
parent 550 685e839d934e
--- a/includes/clientside/static/misc.js	Wed Jun 18 22:43:16 2008 -0400
+++ b/includes/clientside/static/misc.js	Sun Jun 22 18:13:59 2008 -0400
@@ -639,4 +639,17 @@
   return haystack.split(needle);
 }
 
+/**
+ * Equivalent to PHP's in_array function.
+ */
+
+function in_array(needle, haystack)
+{
+  for(var i in haystack)
+  {
+    if(haystack[i] == needle) return i;
+  }
+  return false;
+}
+
 addOnloadHook(expander_onload);