//form tags to omit in NS6+:
var omitformtags=["input", "textarea", "select"]

omitformtags=omitformtags.join("|")

function disableselect(e){
if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1)
return false
}

function reEnable(){
return true
}

if (typeof document.onselectstart!="undefined")
document.onselectstart=new Function ("return false")
else{
document.onmousedown=disableselect
document.onmouseup=reEnable
}
  
//if IE4+
document.onselectstart=new Function ('return false') 
  
//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}

<!--//--><![CDATA[//><!--

sfTopHover = function() {
	var sfTopEls = document.getElementById("topNav").getElementsByTagName("LI");
	for (var i=0; i<sfTopEls.length; i++) {
		sfTopEls[i].onmouseover=function() {
			this.className+=" sftophover";
		}
		sfTopEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sftophover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfTopHover);

//--><!]]>

var amazonaffiliate="";

var linkcount;
function checklinks() {
	if (!(linkcount==document.links.length)) {
		// Something changed the links!
		// Iterate for an id of _goog
		for (i=0; i < document.links.length; i++) {
			if (document.links[i].id.substring(0,5)=="_goog") {
				// If we find an id of _goog then do something
				if (amazonaffiliate=="") { 
					// No affiliate id defined so remove the links
					var tr = document.links[i].parentTextEdit.createTextRange();
					tr.moveToElementText(document.links[i]);
					tr.execCommand("Unlink",false);
					tr.execCommand("Unselect",false);
					i--;
				} else {
					// An affiliate id defined so rewrite ISBN links
					if (document.links[i].href.indexOf("isbn")>0) {
						var isbn=document.links[i].href.substring(document.links[i].href.indexOf("text")+5,document.links[i].href.length);
						document.links[i].href="http://www.amazon.com/exec/obidos/external-search?search-type=ss&tag=" + amazonaffiliate + "&keyword=" + isbn + "&index=books";
					}
				}
			}
		}
	}
		linkcount = document.links.length;
		setTimeout("checklinks()",500);
}
if (document.getElementById && document.createElement) {
	linkcount=document.links.length;
	setTimeout("checklinks()",500);
}

function linksExternos() {
                if (!document.getElementsByTagName) return;
                var anchors = document.getElementsByTagName("a");
                for (var i=0; i<anchors.length; i++) {
                        var anchor = anchors[i];
                        anchor.tabindex = i;
                        if (anchor.getAttribute("href") && 
anchor.getAttribute("rel") == "external")
                                anchor.target = "_blank";
                }
        }

        window.onload = linksExternos;


