function checkForm(the_form){
the_form.submit();
}

function goBack()
  {
  window.history.back()
  }

function check_password(the_form)
{
	var oops = "";
	if(the_form.txtUserID.value == "")
	{
		oops += "Please enter a userid.\n";
	}

	if(the_form.txtPassword.value == "")
	{
		oops += "Please enter a password.\n";
	}

	if((the_form.txtPasswordConfirm.value == "") || (MD5(the_form.txtPassword.value) != MD5(the_form.txtPasswordConfirm.value)))
	{
		oops += "Please confirm the password.\n";
	}

	if(oops)
	{
		alert(oops);
		return(false);
	}

	the_form.txtPassword.value = the_form.txtPassword.value;
	the_form.txtPasswordConfirm.value = the_form.txtPasswordConfirm.value;

	return(true);
}

function checkEvent(this_event)
{
	if(this_event == "Dual Meet")
	{
		location = "add_meet.asp";
	}

}

function findDest(this_dest)
{
	location = "meets.asp?lnv=Driving Directions#" + this_dest;
}

function popup(mylink, windowname)
{
var width=200;
var height=240;
var left   = 0;
var top    = (screen.height - height)/2;
var params = 'width='+width+', height='+height;
params += ', top='+top+', left='+left;
params += ',scrollbars=no';
 
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
window.open(href, windowname, params);
return false;
}

function printContent(id){
str=document.getElementById(id).innerHTML
newwin=window.open('','printwin','left=100,top=100,width=800,height=400')
newwin.document.write('<HTML>\n<HEAD>\n')
newwin.document.write('<TITLE>Print Page</TITLE>\n')
newwin.document.write('<script>\n')
newwin.document.write('function chkstate(){\n')
newwin.document.write('if(document.readyState=="complete"){\n')
newwin.document.write('window.close()\n')
newwin.document.write('}\n')
newwin.document.write('else{\n')
newwin.document.write('setTimeout("chkstate()",2000)\n')
newwin.document.write('}\n')
newwin.document.write('}\n')
newwin.document.write('function print_win(){\n')
newwin.document.write('window.print();\n')
newwin.document.write('chkstate();\n')
newwin.document.write('}\n')
newwin.document.write('<\/script>\n')
newwin.document.write('</HEAD>\n')
newwin.document.write('<BODY onload="print_win()">\n')
newwin.document.write(str)
newwin.document.write('</BODY>\n')
newwin.document.write('</HTML>\n')
newwin.document.close()
}

