function PutImagesAltName()
{
	for (i=0; i<document.images.length; i++)
	{
		var tag = document.images[i];
		if( tag.src && !tag.alt )
		{
			if( tag.title )
				alt = tag.title;
			else
			{
				src = tag.src;
				if( src.lastIndexOf('/')!=-1 )
					src = src.substring(src.lastIndexOf('/')+1,src.lastIndexOf('.'));
				else
					src = src.substring(0,src.lastIndexOf('.'));
				alt = src.replace(/_/gi,' ');
			}
			
			tag.setAttribute('alt', alt);
		}
		
		if( !tag.name )
			tag.setAttribute('name', tag.alt);
	}
}

function PutLinksTitle()
{
	if(document.all)
		childNodes = 0;
	else
		childNodes = 1;
	
	for (i=0; i<document.links.length; i++)
	{
		var tag = document.links[i];
		if( !tag.title )
		{
			innerHTML = tag.innerHTML;
			title = innerHTML.replace(/<.*?>/g,'');
			title = title.replace(/&nbsp;/gi,' ');
			if( title && innerHTML.toLowerCase().indexOf('<img')==-1 )
			{
				tag.setAttribute('title', title);
			}
			if( innerHTML.toLowerCase().indexOf('<img')!=-1 )
			{
					img = tag.childNodes[childNodes];
					tag.setAttribute('title', img.alt);
			}
		}
	}
}
