function checkAnchors()
{
var prefix = "_";
var newClass = "selfAnchor";

var rep = 0; 
var imgSrcOld = new Array(); 
	if (document.getElementById && document.createTextNode) 
	{
		var anchors = document.getElementsByTagName('a');
		for (var i=0;i<anchors.length;i++) 
		{                                
			if(anchors[i].href==location.href)
			{
				anchors[i].removeAttribute('href'); 
				anchors[i].className = newClass;
				
				var span = document.createElement('span');
				anchors[i].parentNode.insertBefore(span, anchors[i]);
				var span = anchors[i].previousSibling;
				span.innerHTML = anchors[i].innerHTML;
				span.parentNode.removeChild(anchors[i]);
				span.className = newClass;
				
				if(span.firstChild.nodeName=='IMG')
				{
					var img = span.firstChild; 
					var imgSrc = img.src;   
					var imgName = imgSrc.substring(imgSrc.lastIndexOf('/')+1, imgSrc.length);       
					imgSrcOld[i] = img.src;   
					img.setAttribute('num', i);        
					var newImg = new Image();
					newImg.name = prefix + imgName;
					newImg.src = imgSrc.substring(0,imgSrc.lastIndexOf('/')+1) + newImg.name;
					function wrongsrc () 
					{                                             
						rep++;
						if (rep == 2) 
						{          
							this.onerror = null; 
							rep = 0;
						}
						this.src = imgSrcOld[this.getAttribute('num')];
					}
					img.onerror = wrongsrc; 
					img.src = newImg.src; 
					
				}
				
			}
		}
	}
	return true;
}