//measurements and advice popup code
var advicewindow = null;
function popup(a)
{
	advicewindow = window.open(a.href +  "?popup=1", "advice", "height=630px,width=430px" );
	advicewindow.focus();
	return false;
}

function externalLinks() { 
// from http://articles.sitepoint.com/article/standards-compliant-world/3
// look for anchors with href and rel="external", and add target="_blank" to them so that they open in a new window
	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";
		}  
	}
$(document).ready(function() {externalLinks();});

