//
// © Graham Johnson 2003
//
// 
// Targets are not part of HTML 4.01 Strict so to keep the code clean
// I'll add them once the page has been parsed by calling code in the footer.
//
// If any targets are found without a class then assign the target to the class
// and display a warning on screen.
//

function rectargets()
{
	for (var i = 0 ; i < document.links.length; i++)

	{
		var d = document.links[i];

		// document.write('<span class="recdefluff">Note for webmaster:'+d.href+' '+d.className+'</span><br>');

		// Look for stray targets without a class
		if ( d.target != "" && d.className == "")
		{
			 d.className = d.target;
			 document.write('<span class="recdefluff">Note for webmaster: class '+d.className+' assigned to link to '+d.href+'</span><br>');
		}
		
		if (d.className.slice(0,3) == "rec" )
		{
			switch (d.className)
			{
				case "rectop":		d.target = "_top";
								break;
				case "recoffsite":	d.target = "_blank";
								break;
				default:			d.target = d.className;
								break;
			}
			
			// document.write('<span class="recdefluff">Note for webmaster: target '+d.target+' assigned to link to '+d.href+'</span><br>');
		}
	}
}

function recbookmark()
{
	var root='http://web.onetel.com/~ggj/recollection/';

	document.write('<scan class="bookmark"><a href="http://www.recollection.co.uk/'+self.location.href.substring(root.length)+'" class="ggjtop">http://www.recollection.co.uk/'+self.location.href.substring(root.length)+'</a></scan>');
}
