﻿/* getElementByClass
/**********************/

var allHTMLTags = new Array();

function getElementByClass(theClass1,theClass2) {
//Create Array of All HTML Tags
var allHTMLTags=document.getElementsByTagName("*");
//Loop through all tags using a for loop
for (i=0; i<allHTMLTags.length; i++) {
//Get all tags with the specified class name.
if (allHTMLTags[i].className==theClass1) {
//Code you want to apply to all items with the class specified.
allHTMLTags[i].src=fileName1;
}
if (allHTMLTags[i].className==theClass2) {
//Code you want to apply to all items with the class specified.
allHTMLTags[i].src=fileName2;
}
}
}