function convertLinks(){
	if(document.links.length > 0){
		for(var i = 0; i < document.links.length; i++){
			if(document.links[i].href == window.location.href){
				if( document.links[i].firstChild.nodeValue){
					var new_span = document.createElement("span");
					var new_text = document.createTextNode(document.links[i].firstChild.nodeValue);
					new_span.appendChild(new_text);
					document.links[i].parentNode.replaceChild(new_span,document.links[i]);
				}
				else {
					document.links[i].parentNode.removeChild(document.links[i]);
				}
			}
		}
	}
}

window.onload = function(){
	convertLinks();
}
var iwin;

function imgWin(lnk,tgt,w,h,tit){
	if(iwin && !iwin.closed){
		iwin.close();
	}

	iwin = window.open("/blank.htm?r="+Math.random(1000),tgt,"width="+w+",height="+h);
	iwin.document.open();
	iwin.document.write('<html><head><title>'+tit+'</title></head><body leftmargin=0 topmargin=0><img src="'+lnk+'" /></body>');
	iwin.document.close();
//alert(window.iwin);
	iwin.focus();
}
