function autoLinkMarkup(n,c,e){
	if(typeof(n)!='string')n='current';
	if(typeof(e)!='object')e=document;
	var w=window.location,u=w.href.match(/^[^#]*/)[0],l=e.getElementsByTagName('A'),h;
	for(var i=0;i<l.length;i++){
		h=(l[i].getAttribute('HREF')||'').match(/^[^#]*/)[0];
		if(!h.length)continue;
		if(!h.match(/^https?:\/\/\w/i))h=w.protocol+'//'+w.host+(h.substr(0,1)=='/'?'':w.pathname)+h;
		if(h==u){
			l[i].className+=' '+n;
			if(!c)l[i].removeAttribute('HREF');
		}
	}
}

function disableSelection(target){
    if(typeof target.onselectstart!="undefined")target.onselectstart=function(){return false}; //IE
    else if(typeof target.style.MozUserSelect!="undefined")target.style.MozUserSelect="-moz-none";
    else if(typeof target.style.KhtmlUserSelect!="undefined")target.style.KhtmlUserSelect="none";
    else if(typeof target.style.WebkitUserSelect!="undefined")target.style.WebkitUserSelect="none";
    else target.onmousedown=function(){return false};
    target.style.cursor="default";
}

