/*
===============================================================================
ASTRONOMY.COM WEBSITE SCRIPTS
Version 1.0 - Modified: 08/04/2003 (drv)
===============================================================================
*/

function DisplayError(error_message) {
	alert(error_message);
	return false;
}

function GlossaryWindow(idGlossaryTerm) {
	var strDestURL = '/glossary/glossary_popup.asp?idGlossaryTerm=' + idGlossaryTerm;
	var GlossaryPopup = window.open( strDestURL, 'GlossaryPopup', 'status=no,menubar=yes,scrollbars=yes,width=400,height=400' );
	GlossaryPopup.focus();
}

function SearchPhotoGallery(strDestURL) {
	var PhotoGallery = window.open( strDestURL, 'PhotoGallery', 'status=no,menubar=yes,scrollbars=yes,width=630,height=470' );
	PhotoGallery.focus();
}

function SearchBubbleSubmit() {
	document.frmSearchBubble.submit();
}

function StarChartWindow(id) {
	var today = new Date();
	var timezone = today.getTimezoneOffset()/60;
	var strURL = 'http://64.73.42.18/default.asp?tz=' + timezone + '&id=' + id ;
	var StarChartPopup = window.open(strURL, 'StarChartPopup', 'status=yes,menubar=yes,scrollbars=yes,width=643,height=675');
}

function SearchSubmit() {
	document.frmContentSearch.submit();
}

function SearchReset() {
	document.frmContentSearch.chrKeywords.value = '';
}

function ClubSubmitUpdate () {
	document.ClubServices.update.value = "submit";
	document.ClubServices.submit();
}

function ClubSaveSubmit() {
	document.ClubLogo.chrSubmit.value = "SAVE";
	document.ClubLogo.submit();
}

function ClubDelete() {
	if(confirm("Are you sure you wish to delete your Logo?"))
	{
		document.ClubLogo.chrSubmit.value = "DELETE";
		document.ClubLogo.submit();
	}
}

function ClubSetChanged() {
	document.ClubLogo.bitChanged.value = "1";
}

function Month(direction,m,y) {
	if (direction == "previous")
	{direction = -1;}
	else
	{direction = 1;}
	var month, year;
	month = m;
	year = y;
	month = month + direction;
	if (month == 0)
	{
		month = 12;
		year--;
	}
	if (month == 13)
	{
		month = 1;
		year++;
	}
	location.href = ("calendar.asp?pardtDate=" + month + "/" + year);
}

function ScrollSelect () {document.cal.submit();}

function Search() {location.href = ("EventSearch.asp?query=" + document.cal.query.value);}

function StarChartWindow(strDestURL) {
	var today = new Date()
	var timezone = today.getTimezoneOffset()/60
	var StarChartPopup = window.open( strDestURL + 'tz=' + timezone, 'StarChartPopup', 'status=yes,menubar=yes,scrollbars=yes,width=643,height=675' );
	StarChartPopup.focus();
}

function StarChartWindow2(strDestURL) {
	var StarChartPopup = window.open( strDestURL, 'StarChartPopup', 'status=yes,menubar=no,scrollbars=no,width=657,height=620' );
	StarChartPopup.focus();
}
