function check(n) {
    pword = prompt('Enter password for administration area','');
    var manager=new Array("bible","street","bang","cuff");
    if (pword!=manager[n]) {
        alert("access denied");
        history.back()
	}
}

function title(txt) { // embolden text ending period
    txt = "<b>" + txt;
    txt = txt.replace(".","xxxx");
    fin = txt.search("xxxx") + 6;
    txt = txt.replace("xxxx","</b>. ");
    return txt.substring(0,fin)
}

function sample(txt) { // sample text between { }
    start = txt.search("{") + 1;
    fin = txt.search("}");
    return  txt.substring(start,fin)
}

function article(txt) {
    txt = txt.replace("{","");
    txt = txt.replace("}","");
    art = title(txt);
    x = art.length - 8;
    y = txt.length;
    return "<i>" + txt.substring(x,y) + "</i>"
}

function pop(mess) {   //	MESSAGE WINDOW & CLOSE BUTTON
		// the dimensions and position of the window
		x = 200
        y = 100;
		w = 750
		h = 450
		htmlHead = "<html><head><title>Pop</title></head>";
		htmlBody = "<body style='background-color: #ccccff;font-size=1em' onload='self.focus()'>";
		htmlFoot = "</tr></table></body></html>";
		PopWin = window.open( "","Pop", "width="+w+",height="+h+",top="+y+",left="+x+",scrollbars=1")
		PopWin.document.open(); // put html and mess in window
		PopWin.document.write(htmlHead);
		PopWin.document.write(htmlBody);
		PopWin.document.write("<table valign='top' width='98%'><tr>");
		PopWin.document.write("<td style='text-align:center'>");
		PopWin.document.write("<div style='text-align:left'>" + mess + "</div><br /><br />");
		PopWin.document.write("<div style='text-align:center'>");
		PopWin.document.write("<button onClick='window.close()'>Close</button>");
		PopWin.document.write("</div></td>" + htmlFoot);
		PopWin.document.close();
	}