--- /dev/null
+// Returns true if the array contains the element
+function webdeveloper_contains(array, element)
+{
+ // If the array and element are set
+ if(array && element)
+ {
+ try
+ {
+ // If the element does not exist in the array
+ if(array.indexOf(element) == -1)
+ {
+ return false;
+ }
+ else
+ {
+ return true;
+ }
+ }
+ catch(exception)
+ {
+ var arrayLength = array.length;
+
+ // Loop through the array
+ for(var i = 0; i < arrayLength; i++)
+ {
+ // If the element is found
+ if(array[i] == element)
+ {
+ return true;
+ }
+ }
+ }
+ }
+
+ return false;
+}
+
+// Returns true if the array contains media with the given URL
+function webdeveloper_mediaArrayContains(array, url)
+{
+ // If the array and url are set
+ if(array && url)
+ {
+ var arrayLength = array.length;
+
+ // Loop through the array
+ for(var i = 0; i < arrayLength; i++)
+ {
+ // If media with the given URL is found
+ if(array[i].src == url)
+ {
+ return true;
+ }
+ }
+ }
+
+ return false;
+}