// Copyright 2005 The Cyber Hymnal

var requestWindow = null
var parentWindowName = "parentWindow"

//------------------------------------------------
// PURPOSE	Initialization for list of non-English hymns

function init
(
	languageCode	// ISO 639 language code
)
{
	document.write('<link href="../../sty/tch-top.css" rel="stylesheet" type="text/css" />')
	par = new String(window.parent.location);
	if (par.indexOf("nonenglish.htm") == -1)
		location = "../nonenglish.htm?" + languageCode 
}
//------------------------------------------------
function closeRequest()
{
	if (requestWindow != null)
	{
		requestWindow.close()
		requestWindow = null
	}
}
//------------------------------------------------
// PURPOSE Draw end of the page
// ENTRY	Init() has been called

function end()
{
	document.write('<p class="footer">' + document.lastModified + '</p>')
}
//------------------------------------------------
function openRequest(child, language)
{
	closeRequest()
	requestWindow = open(child, language, "toolbar=no, status=no, menubar=yes, resizable=yes, scrollbars=yes, height=400, width=600")
	return false
}
//------------------------------------------------
function redirect(page)
{
	parentWindow = window.open('', parentWindowName)
	parentWindow.location = page
	closeRequest()
	return false
}
//------------------------------------------------
function showInstructions(language)
{
	location.href = "../submissions.htm?" + language
	return false
}
//------------------------------------------------
function showInstructionsLatin(language)
{
	location.href = "../submissions-latin.htm?" + language
	return false
}