var allPageTags = new Array(); 
var allClassFields = new Array(); 

function getElementByClass(theClass) {
	//Populate the array with all the page tags
	var allPageTags=document.getElementsByTagName("*");
	//Cycle through the tags using a for loop
	var a=0;
	for (i=0; i<allPageTags.length; i++) {
		//Pick out the tags with our class name
		if (allPageTags[i].className==theClass) {
			//Manipulate this in whatever way you want
			allClassFields[a]=allPageTags[i];
			a++;
		}
	}
	return allClassFields;
} 

function reset_colors(){
	var colors=getElementByClass('swatch_color');
	for(i=0; i<colors.length; i++){	
		colors[i].style.border="1px solid #BBBBBB";
		colors[i].style.margin="-1px";
	}

}