
function externalLinks() { 
 if (!document.getElementsByTagName) return; 
 var anchors = document.getElementsByTagName("a"); 
 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;

var loc = 0;
var timer_id;



function scroll(element, inc) {
	height = $(element).getHeight();
	parent_height = $(element).up().getHeight();
	if (timer_id) clearTimeout(timer_id);
	loc = loc - inc;
	
	if ((loc < 0)&&(loc > (-(height) + parent_height))) {
		$(element).setStyle({
			top: loc+'px'
		});	
	}

   timer_id = setTimeout("scroll('" + element + "'," + inc + ")", 20);
	return false;
}

function stopScroll() { if (timer_id) clearTimeout(timer_id); }