function getById(id) {
	return document.getElementById(id);
}
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";} }
}
function chkAll(pid,mid) {
	chkLst = document.getElementById(pid).getElementsByTagName('input'); 
	chkTst = document.getElementById(mid).checked; var c;
	for (c=0; c<chkLst.length; c++) { if (chkLst[c].type!=='checkbox') { continue; } 
		if (chkLst[c].id!==mid) { chkLst[c].checked=(chkTst==false) ? false : true; }
	}
}
function otherChk(sid,tid) {
	oList = document.getElementById(sid); curOp = oList.selectedIndex; curVal = oList.options[curOp].value;
	tgt = document.getElementById(tid);
	tgt.style.display = (curVal.indexOf('other')!==-1) ? 'block' : 'none';
}
function init() {
	externalLinks();
	if (document.getElementById('prod') && (typeof stripe)!=='undefined') {stripe('prod');}
}
window.onload = init;