// cl.js
// scripts for campbeltown life
var topPart = 17
function navLinksCode(x) {
	myStr = '<p class="smallish">\[<a href="index.html">Contents<\/a>|<a href="intro.htm">Intro<\/a>';
	for (i=1; i<=topPart; i++) {
		if (i == x) {
			myStr += '| <b>' + i + '<\/b> '
		}
		else {
			myStr += '|<a href="part' + i + '.htm">'+ i + '<\/a>'
		}
	}
	myStr += '|<a href="http:\/\/www.subtangent.com\/clgb\/cgi-bin\/eguestbook.cgi">Guestbook<\/a>'
	myStr += '|<a href="links.htm">Links<\/a>|<a href="xmas.html" style="color:red;">Christmas Stories</a>]<\/p>';
	return myStr;
}
function toNext(x) {
	if (x<topPart) {location.href='part' + (x+1) + '.htm'} else {location.href='index.html'}
}
function gloss(entry) {
	myWin= open("glossary.htm#" + entry, "displayWindow", "width=300,height=300,status=no,toolbar=no,menubar=no,scrollbars=yes,resizable=yes");
}
function panCod() {
	myWin= open("pan-cod.htm", "displayWindow", "width=400,height=300,status=no,toolbar=no,menubar=no,scrollbars=yes,resizable=yes");
}
function fImageWin(picname, title) {
  myWin = open(picname+".html", "picWin", "width=565,height=495,status=no,toolbar=no,menubar=no,scrollbars=no,resizable=no");
}

function imageWin(title, picName, w, h) {
	var props = 'width=' + (w+15) + ',height=' + (h+70) + ',status=no,toolbar=no,menubar=no,'
	props += 'scrollbars=no, resizable=no'
	var myHtml = '<html><head><title>' + title + '<\/title>\n'
	myHtml += '<link rel="stylesheet" type="text/css" href="cl.css">'
	myHtml +='<body bgcolor=#ffffff>\n<center>'
	myHtml +='<img src="' + picName + '.gif" width=' + w + ' height=' + h + ' alt="' + title + '">\n'
	myHtml +='<form onsubmit="window.close(); return false;"><input type=submit value="Close" class=butt></form>\n'
	myHtml += '</center></body></html>'
	var picWin = open('', 'picWin', props)
	picWin.document.open();
	picWin.document.write(myHtml);
	picWin.document.close();
}
