	function altfixer()
	{
		
		//Get all images in an array
		var images = document.getElementsByTagName('img');
		var alttext;
		var i;
		
		alert(images.length);
		
		//For each image
		for(i in images)
		{
			
			if(images[i].alt == '' || images[i].longDesc == '')
			{
				//get the url
				alttext = images[i].src;
				
				//Get rid of funky character set
				alttext = decodeURI(alttext);
				
				//take off the path and extension
				var m = alttext.match(/(.*)[\/\\]([^\/\\]+)\.\w+$/);
				
				//var path = m[1];
				
				alttext = m[2];
				//alert(alttext);
				
				//Assign that value to the alt attribute
				images[i].alt = alttext;
				//images[i].setAttribute('alt', alttext);
			}
        }
	}
	
	
	function addLoadEvent(newLoad)
	{ 
		var existingLoad = window.onload; 
		if (typeof window.onload != 'function')
		{ 
			window.onload = newLoad; 
		} 
		else
		{ 
			window.onload = function()
			{ 
				if (existingLoad)
				{ 
					existingLoad(); 
				} 
				newLoad(); 
			} 
		} 
	} 

	//addLoadEvent(altfixer());