// use with <a href"#" rel="external">
function externalLinks() {
	if (!document.getElementsByTagName) return;
	var anchors = document.getElementsByTagName("a");
	// loop
	for (var i=0; i<anchors.length; i++) 
	{
		var anchor = anchors[i];
		if (anchor.getAttribute("href") &&
		anchor.getAttribute("rel") == "external")
		anchor.target = "_blank";
	}
}
window.onload = externalLinks;


// clear out a text field on click 
// if you have default text in there.
// (currently uses <input ... id="search">)
function clearSearch() {
if (!document.getElementById) return;
	var thefield = document.getElementById("search");
	// the setAttribute flags avoid a nasty XULElement.selectedindex error
	thefield.setAttribute("autocomplete","off");
	thefield.onclick = function() 
	{
	if (thefield.defaultValue == thefield.value) 
	thefield.value = ""
	return false;
	}
}
window.onload = clearSearch;