<!--

function loginfocus(){
document.loginform.Admin_ID.focus();
}

function VerifyDataSettings() {
	if (document.frmUser.Admin_Pass.value != document.frmUser.Admin_Pass2.value) {
		alert("Passwords do not Match.");
		return false;
	} else if (document.frmUser.Admin_ID.value == "") {
		alert("You must enter an Admin ID.");
		return false;
	} else if (document.frmUser.Admin_Email.value == "") {
		alert("You must enter an Admin Email.");
		return false;
	} else if (document.frmUser.Admin_Pass.value == "") {
		alert("You must enter an Admin Password.");
		return false;
	} else if (confirm("Are you sure you want to update your settings?")) {
		return true;
	}
		return false;
}

function VerifyDataSignup() {

	var form = document.subscribersform
	
	/* check if the email address field is empty */		
	var CheckEmptyEmail = form.Email.value
		
	if (CheckEmptyEmail == null || CheckEmptyEmail == "")
		{
		alert("Please enter your Email Address");
		form.Email.focus();
		return false
		}
		
/* The validation process determines if the email 
is less than 9 characters. If so, then it sets 
the return variable to true indicating a failed 
validation. It also adds the appropriate message 
to the existing message string. */
	if (CheckEmptyEmail != null || CheckEmptyEmail != "")
		{
		if (CheckEmptyEmail.length < 9)  {
			alert("Please enter a valid Email Address");
			form.Email.focus();
			return false
			}
		}
		
/* Next, we check for the existence of the @ character */
	if (CheckEmptyEmail != null || CheckEmptyEmail != "")
		{
 	    var charA = CheckEmptyEmail.indexOf("@");
		if (charA == -1)  {
			alert("Please enter a valid Email Address");
			form.Email.focus();
			return false
			}
		}
	
/* Once it has been determined that there is an 
@ character, the validation process checks to see if 
it is it more than two characters in from the left 
side of the string. */	
	if (CheckEmptyEmail != null || CheckEmptyEmail != "")
		{
 	    var charA = CheckEmptyEmail.indexOf("@");		
			if (charA < 2 )  {
			alert("Please enter a valid Email Address");
			form.Email.focus();
			return false
			}
		}

		
/* The check continues to determine if a . (period) 
exists. It begins the search from the right side of 
the string. */
	if (CheckEmptyEmail != null || CheckEmptyEmail != "")
		{
		var charP = CheckEmptyEmail.lastIndexOf(".");
		if (charP == -1)  {
			alert("Please enter a valid Email Address");
			form.Email.focus();
			return false
			}
		}

/* Now that we have a . (period), is it at
the proper place at the end of the string. */
	if (CheckEmptyEmail != null || CheckEmptyEmail != "")
		{
		var charP = CheckEmptyEmail.lastIndexOf(".");
		if (charP != CheckEmptyEmail.length - 3 && charP != CheckEmptyEmail.length - 4)  {
			alert("Please enter a valid Email Address");
			form.Email.focus();
			return false
			}
		}

/* Okay, now that we have both the @ and . (period)
characters, are they separated by at least two characters? */
	if (CheckEmptyEmail != null || CheckEmptyEmail != "")
		{
		var charP = CheckEmptyEmail.lastIndexOf(".");
			if (charP < charA + 3)  {
			alert("Please enter a valid Email Address");
			form.Email.focus();
			return false
			}
		}
	form.submit();
	return true
}


function VerifyDataUpdate() {
	if (document.subscribersform.EmailNew.value == "") {
		alert("You must enter an Email Address.");
		return false;
	} else
		document.subscribersform.submit()
}

function pop(location) { 
	var dx=503;
	var dy=412;

	var w = window.open(location+'.asp', 'popup', 'width=' + dx + ',height=' + dy + ',status=no,resizable=no,menubar=no,location=no,scrollbars=no,toolbar=no,screenX=50,screenY=50,top=50,left=50');
	w.focus();
}

function picture(picname,dx,dy) {
	var PicWin = window.open("", picname, 'width=' + dx + ',height=' + dy + ',status=no,resizable=no,menubar=no,location=no,scrollbars=no,toolbar=no,screenX=50,screenY=50,top=50,left=50');
	PicWin.document.open();
	PicWin.document.writeln('<html>');
	PicWin.document.writeln('<head>');
	PicWin.document.writeln('<title>Great Highway Photos</title>');
	PicWin.document.writeln('</head>');
	PicWin.document.writeln('<body background="photos/'+picname+'.jpg">');
	PicWin.document.writeln('</body>');
	PicWin.document.writeln('</html>');
	PicWin.document.close();
}


function sendform() {
	var Subject = document.sendmailform.Subject.value;
	var Body = document.sendmailform.Body.value;
	document.sendmailform.target = "_top";
	
	if (Subject == "") {
		alert("You must enter a Subject.");
		document.sendmailform.Subject.focus();
		return false;
	} else if (Body == "") {
		alert("You must enter a Body.");
		document.sendmailform.Body.focus();
		return false;
	} else 	

if (document.sendmailform.test.checked != true) {
			var ConfirmStatus = confirm("Send to All Subscribers?")
			if (ConfirmStatus == true) {
				document.sendmailform.action = "sendmail_send.asp";
				}
				else {
				return false;
				}
	} else {
			var ConfirmStatus = confirm("Send a Test?")
			if (ConfirmStatus == true) {
				document.sendmailform.action = "sendmail_test.asp";
				}
				else {
				return false;
				}
 			}
		}
		
function sendmail_view_open(action) {
	var Subject = document.sendmailform.Subject.value;
	var Body = document.sendmailform.Body.value;

	if (Subject == "") {
		alert("You must enter a Subject.");
		document.sendmailform.Subject.focus();
		return false;
	} else if (Body == "") {
		alert("You must enter a Body.");
		document.sendmailform.Body.focus();
		return false;
	} else 		

	document.sendmailform.action = action;
	document.sendmailform.target = "newwindow";
	newWindow = window.open(action,'newwindow','scrollbars=yes,status=no,menubar=no, resizable=no,width=810,height=560,screenX=10,screenY=10,top=10,left=10');
	newWindow.focus();
}


function archive_view_open(ID) {
	window.open('archive_view_html.asp?ID='+ID, 'archive_view_html_window', 'scrollbars=yes,status=no,menubar=no, resizable=no,width=810,height=560,screenX=10,screenY=10,top=10,left=10')
}

function VerifyDataEvents() {
	if (document.adminform.Location.value == "") {
		alert("You must select a Location.");
		return false;
	} else if ((document.adminform.Date_Month.value == "Blank") ||
				(document.adminform.Date_Day.value == "Blank") ||
				(document.adminform.Date_Year.value == "Blank") ||
				(document.adminform.Time_Hour.value == "Blank") ||
				(document.adminform.Time_Minute.value == "Blank") ||
				(document.adminform.Time_AMPM.value == "Blank")) {
		alert("You must complete the Date and Time fields.");
		return false;
	} else
		return true;
}

function VerifyDataQuit()
{
var ConfirmStatus = confirm("Are you sure you want to unsubscribe?")
if (ConfirmStatus == true) {
	document.subscribersform.submit()
	}
	else {
	return false
	}
}

function popup(photo) { 
	var dx=686;
	var dy=666;
	var w = window.open('photos_pop.htm?photo='+photo, 'popup', 'width=' + dx + ',height=' + dy + ',status=no,resizable=yes,menubar=no,location=no,scrollbars=yes,toolbar=no');
	w.focus();
}


//-->