// ===========================
// st_javascript.js
// ===========================
//
// ==================================================================
// This function checks missing fields in the User Login Form

function valid_userlogin(stfrm_par)
{
	if(stfrm_par.theloginid.value == "")
	{
		alert("Please enter your Login ID\nand Submit again");
		stfrm_par.theloginid.focus();
		return false;
	}
	if(stfrm_par.theloginpw.value == "")
	{
		alert("Please enter your Password\nand Submit again");
		stfrm_par.theloginpw.focus();
		return false;
	}
	return true;
}
//
// ==================================================================
// This function checks missing fields in the 'Contact' Form
// on the contact.html webpage
function valid_contact(stcon) {
   if(stcon.thefirstname.value == "") {
   alert("Please enter your First Name\nand Submit again");
   stcon.thefirstname.focus();
   return false;
   }
   if(stcon.thesurname.value == "") {
   alert("Please enter your Surname\nand Submit again");
   stcon.thesurname.focus();
   return false;
   }
   if(stcon.themail.value == "" || stcon.themail.value != stcon.checkmail.value) {
   alert("Please re-enter your email address\nand Submit again");
   stcon.themail.focus();
   return false;
   }
   if(stcon.thecomment.value == "") {
   alert("Please enter a comment\nand Submit again");
   stcon.thecomment.focus();
   return false;
   }
   return true;
}
//
// ==================================================================
// This function displays a narrow window and fills it with the
// webpage data from a specified local URL -  It is for larger
// content that requires a scrolling window.
function subwinDisplay(mylocalurl)
{
	if(window.subWin) {
		subWin.close();
	}
	subWin = window.open(mylocalurl,"subWin","location=no, status=no, scrollbars=yes, menubar=no, resizable=no, width=500, height=660, top=10, left=60");
	subWin.focus(); 
	return;
}
//
//===================================================================
// This function throws up an alert message that document is not avaiable
function notavailable()
{
	alert("The requested document is not yet available on-line.\nCheck back later, or contact administrator.");
	return;
}
//
//===================================================================
// This function is one that does nothing on purpose
function donothing()
{
	junk = 'nothing';
	return;
}

