var Root
// NOTE: this file is in use on SCRIPTS/READ.HTM if I want to see how the Javascript should look
// NOTE: Ive added ROOT to LinkTo, LinkToScripts & LinkToPlayScript, but not to ANY OTHER functions just yet. I want to make sure its working.
document.write("") // accesses LIBRARY.TXT database - list of plays
document.write("") // accesses THEATRES.TXT database - list of theatres
function LinkTo(CodeSought) { // creates link to the HOMEPAGE of a play
pointer=""
for (var loop = 0; loop <= Library.length-1; loop++) {
if (Library[loop].code == CodeSought) {pointer = loop}
}
if (pointer) {
document.write("")
}
document.write(Library[pointer].title+"")
}
function LinkToScripts(CodeSought) { // creates link to the SCRIPTS/SC page OR ONLINE SCRIPT of a play
pointer=""
for (var loop = 0; loop <= Library.length-1; loop++) {
if (Library[loop].code == CodeSought) {pointer = loop}
}
if (pointer) {
document.write("")
}
document.write(Library[pointer].title+"")
}
function LinkToText(CodeSought) { // creates link to the SCRIPTS/SC page OR ONLINE SCRIPT of a play
pointer=""
for (var loop = 0; loop <= Library.length-1; loop++) {
if (Library[loop].code == CodeSought) {pointer = loop}
}
if (pointer) {
document.write("")
}
document.write(Library[pointer].title+"")
}
function HREFonly(CodeSought) { // creates JUST the HREF=URL (in case I want a link with a different name than the play*s title
pointer=""
for (var loop = 0; loop <= Library.length-1; loop++) {
if (Library[loop].code == CodeSought) {pointer = loop}
}
if (pointer) {
document.write("")
}
}
function HREFonlyScripts(CodeSought) { // creates JUST the HREF=URL (in case I want a link with a different name than the play*s title
pointer=""
for (var loop = 0; loop <= Library.length-1; loop++) {
if (Library[loop].code == CodeSought) {pointer = loop}
}
if (pointer) {
document.write("")
}
}
function HREFonlyShop(CodeSought) { // LIBRARY2.SHOP: creates JUST the HREF=URL (in case I want a link with a different name than the play*s title)
pointer=""
for (var loop = 0; loop <= Library2.length-1; loop++) {
if (Library2[loop].code == CodeSought) {pointer = loop}
}
if (pointer) {
document.write("")
}
}
function HREFonlyText(CodeSought) { // creates JUST the HREF=URL (in case I want a link with a different name than the play*s title
pointer=""
for (var loop = 0; loop <= Library.length-1; loop++) {
if (Library[loop].code == CodeSought) {pointer = loop}
}
if (pointer) {
document.write("")
}
}
// LinkToPlayScript is obsolete - use LinkToScripts above OR LinkToText
function LinkToPlayScript(CodeSought) {
pointer=""
for (var loop = 0; loop <= Library.length-1; loop++) {
if (Library[loop].code == CodeSought) {pointer = loop}
}
if (pointer) {
document.write("")
}
document.write(Library[pointer].title+"")
}
// FUNCTIONS below this mark do NOT have the ROOT variable incorporated:
function LinkToTheatre(CodeSought) {
PointAtTheatre(CodeSought)
document.write(""+Theatres[pointer].name+"")
}
function AnchorToTheatre(CodeSought) {
PointAtTheatre(CodeSought)
document.write("")
}
function LogoToTheatre(CodeSought) {
PointAtTheatre(CodeSought)
document.write("")
}
function ShopURL(CodeSought) { // creates JUST the URL to an external site - for example the publisher page for a play
pointer=""
for (var loop = 0; loop <= Library2.length-1; loop++) {
if (Library2[loop].code == CodeSought) {pointer = loop}
}
if (pointer) {
document.write(Library2[pointer].shop)
}
}