function l_seo() {

	// assign titles to hrefs

	l_items = document.getElementsByTagName('a');

	for (i = 0; i < l_items.length; i++) {

		thisi = l_items[i];
		thistitle = thisi['title'];
		thisCN = thisi.className;
		
		if (thistitle == '' && thisCN.indexOf("notitle") == -1) {

			// if it's a text link, or has a text link
			thistext = thisi['innerHTML'];

			prettyText = strip_and_clean(thistext);

			if (prettyText != '') {
				thisi.setAttribute('title',prettyText);
			} else {
				thisi.setAttribute('title',thisi['href']);
			}

		}

	}

	// assign titles to images

	l_items = document.getElementsByTagName('img');

	for (i = 0; i < l_items.length; i++) {

		thisi = l_items[i];
		thistitle = thisi['title'];
		thisCN = thisi.className;
	
		if (thistitle == '' && thisCN.indexOf("notitle") == -1) {

			// if it's a text link, or has a text link
			thistext = thisi['src'];
			srcparts = thistext.split("/");
			thistext = srcparts.pop();

			l_title = document.title;	

//			thetitle = strip_and_clean(''+l_title+' ['+thistext+']');
			thetitle = strip_and_clean('['+thistext+']');

			thisi.setAttribute('title',thetitle);

		}

	}
	

}

function strip_and_clean(what) {

	var newtext;

	// strip HTML
	newtext = what.replace(/<\/?[^>]+(>|$)/g, "");

	// strip line breaks
	prettyText = newtext.replace(/\r|\n/g,'');

	// replace &amp;
	newtext = prettyText.replace(/&amp;/g,'&');

	// remove space at start of strong
	newtext = newtext.replace(/^ /g,'');

	return newtext;

}