
/*add to the template_ .html

<script src="vspfiles/templates/custom/js/change_by_tag.js" type="text/javascript"></script>

after the item that you want to change and ad this file to a js folder in the template_name folder*/
	//the name of the tag type that you want to change
	var tagName = 'table';
	
	//the name of the id that the tag appears in
	var idName = 'content_area';
	
	//the name of the attribute you want to check against - the original Attribute - the new Attribute
	var attributeName = new Array('cellpadding','cellspacing');
	var origAttribute = new Array(10,10);
	var newAttribute = 	new Array(0,0);
	var changer;
	var number;
	//the name or names of the page the item appears on separated by commas
	var pageName = new Array ('/SearchResults.asp','/default.asp');

    for (var p = 0; p < pageName.length; p++) {
		if (location.pathname.toLowerCase() == pageName[p].toLowerCase()) {
			//if you need something outside of the content_area you can change
			var el = document.getElementById(idName).getElementsByTagName(tagName);
			for (var e = 0; e < el.length; e++) {
				
			//unhide this to test the attribute values of each tag;
			//alert(tables[i].getAttribute(attributeName));
			
				for (var a = 0; a < attributeName.length; a++) {			
				   if (el[e].getAttribute(attributeName[a]) != origAttribute[a]) {
						el[e].setAttribute(attributeName[a], newAttribute[a]);
						//changer = el[e];
						//number = a;
						//break;
					}
				}
			}
			//changer.setAttribute(attributeName[number], newAttribute[number])
		}
	}