var sectionbought=false;
figopen=0

function footnote(ch, fn) {
    var selectedfn="./ref.html#R_" + fn ;
	footwin = window.open(selectedfn,"fn",
	"status=0,menubar=0,directory=0,toolbar=0,scrollbars,resizable,width=600,height=125");
}

function figure(figchap,fig,figX,figY,figTitle,figWin,figDesc) {
	// This was
	/////ZZ 	var selectedfig="http://www.az-tec.com/himl/tgm/ch" + figchap + "/" + figchap + "-"+fig+".gif";
	// 970917
	// DZ changed it to  
	// var selectedfig="./" + figchap + "-"+fig+".gif";
	// 980731
	// DZ changed it to  
	var selectedfig="./ch" + figchap + "/" + figchap + "-"+fig+".gif";

	var winFig = figWin;
	if (figX < 200) {
		figX = 200;
	}
	figY=figY+100
	fixX=figX+20
	winFig = window.open('',figWin,"status=0,menubar=0,directory=0,toolbar=0,scrollbars,resizable,width="
				+ figX + ",height=" + figY);
   	winFig.document.open;
	winFig.document.clear;
	winFig.document.write('<html><head><title>' + figTitle + '</title></head>');
	winFig.document.write('<body><center>');
	winFig.document.write('<img src=' + selectedfig + '><br></center><font size=1><p>')
	winFig.document.write(figDesc);
	winFig.document.write('</p></font></body></html>');
	winFig.document.close
}

function gotoChapter(chap) {
// This was the following
//////ZZ //		top.tocwin.location="./ch" + chap + "/toc.wxn";
//////ZZ //		top.bodywin.location="./ch" + chap + "/buy" + chap + ".html";
//////ZZ 		top.tocwin.location="./ch" + chap + "/toc.html";
//////ZZ 		top.bodywin.location="https://zeus.wavesys.com/pricecheck/?http://www.az-tec.com/medwave/tgm/ch" + chap + "/buy" + chap + ".wxn";
//////ZZ 
// Dan made it 970917
	top.tocwin.location="./ch" + chap + "/toc.html";
	top.bodywin.location="./ch" + chap + "/buy" + chap + ".html";
}

function GotoSection(section) {
// 980731
// Dan modified this so that it does not ask!
// THIS WAS
////
////	if (sectionbought) {
////		top.bodywin.location=section;
////	} else {
////		alert("Please purchase the section first");
////	}
////
	top.bodywin.location=section;
}

function buychap() {
	sectionbought=true;
}

function titlepage() {
	top.tocwin.location="fulltoc.html";
	top.bodywin.location="tgm.html";
}

