<!--
function open_window(link, win_name, x, y, scrollbar) {
   if ( !scrollbar ) { scrollbar = 'yes' }
   winRef = window.open(link,win_name,'width='+x+',height='+y+',toolbar=0,directories=0,menubar=0,status=1,resizable=1,location=0,scrollbars='+scrollbar+',copyhistory=0,screenX=50,screenY=25,left=50,top=25');
   winRef.focus();
}
function open_printwin(link, win_name, x, y, scrollbar) {
   if ( !scrollbar ) { scrollbar = 'yes' }
   winRef = window.open(link,win_name,'width='+x+',height='+y+',toolbar=0,directories=0,menubar=1,status=1,resizable=1,location=0,scrollbars='+scrollbar+',copyhistory=0,screenX=50,screenY=25,left=50,top=25');
   winRef.focus();
}

function toggle_div(id) {
	if(document.all) {
		
		if (document.all(id).style.display == ""){
			show = "none";
		} else {
			show = "";
		}
		document.all(id).style.display = show;
	} else {
		if (document.getElementById(id).style.display == ""){
			show = "none";
		} else {
			show = "";
		}
		document.getElementById(id).style.display = show;
	}
}

function epost(name,domain) {
   window.location ='mailto:'+ name + '@' + domain;
   return true;
}
function epost_show(name,domain) {
   document.print( name + '@' + domain );
   return true;
}

function getElementsByClassName(classname, node) {
    if(!node) node = document.getElementsByTagName("body")[0];
    var a = [];
    var re = new RegExp('\\b' + classname + '\\b');
    var els = node.getElementsByTagName("*");
    for(var i=0,j=els.length; i<j; i++)
		if(re.test(els[i].className))a.push(els[i]);
    return a;
}

function open_chapters () {
	var elements = getElementsByClassName('chapter1',document.getElementById("peatykid")[0]);
	for(var i=0,j=elements.length; i<j; i++)
		elements[i].style.display = "block";
	document.getElementById("ch_link").style.display = "none";
}
// -->

