

function changeInputs()
{
	var els = document.getElementsByTagName('input');
	var elsLen = els.length;
	var i = 0;
	for (i = 0; i < elsLen; i++)
	{
		var type = els[i].getAttribute("type");
		if (type)
		{
			var c = els[i].getAttribute("class");
			if (c)
				continue;
			if (type == "submit")
				els[i].className = "genericButton";
			// add more defaults here with else statements...
		}
	}
}

function patchIEAndOpera()
{
	var isOpera, isIE = false;
	if (typeof(window.opera) != 'undefined') { isOpera = true; }
	if (! isOpera && navigator.userAgent.indexOf('Internet Explorer')) { isIE = true; }
	
	//fix both IE and Opera (adjust when they implement this method properly)
	if (isOpera || isIE)
	{
		document.nativeGetElementById = document.getElementById;
		document.getElementById = function(id) // redefine it!
		{
			var elem = document.nativeGetElementById(id);
			if (elem)
			{
				//verify it is a valid match!
				if (elem.attributes['id'] && elem.attributes['id'].value == id)
				{
					//valid match!
					return elem;
				} 
				else 
				{
					//not a valid match!
					//the non-standard, document.all array has keys for all name'd, and id'd elements
					//start at one, because we know the first match, is wrong!
					for (var i = 1; i < document.all[id].length; i++)
					{
						if (document.all[id][i].attributes['id'] && document.all[id][i].attributes['id'].value == id)
							return document.all[id][i];
					}
				}
			}
			return null;
		};
	}
}