var hK;
function hurriKane(winurl,winname,winfeatures)
{
	hK = window.open(winurl,winname,winfeatures);
 	setTimeout('hK.focus();',250);
}

function backOver(src,colorOver){ 
	if (!src.contains(event.fromElement)){ 
		src.style.cursor = 'hand'; 
		src.bgColor = colorOver; 
	} 
} 
function backOut(src,colorOut){ 
	if (!src.contains(event.toElement)){ 
		src.style.cursor = 'default'; 
		src.bgColor = colorOut; 
	} 
} 
function goToURL(myLink) {
	window.location = "secure_cal_detail.asp?date=" + myLink;
}
function goToURL2(myLink) {
	window.location = "secure_cal_detail.asp?add=yes&date=" + myLink;
}

function publicURL(myLink) {
	window.location = "calendar_detail.asp?date=" + myLink;
}
function publicURL2(myLink) {
	window.location = "calendar_detail.asp?add=yes&date=" + myLink;
}

function addEditCalendar(theForm)
{
 if (theForm.liId.value == "")
  {
    alert("Please enter a value for the \"Date Type\" field.");
    theForm.liId.focus();
    return (false);
  }
 if (theForm.startDate.value == "")
  {
    alert("Please enter a value for the \"Start Date\" field.");
    theForm.startDate.focus();
    return (false);
  }
   if (theForm.eventTitle.value == "")
  {
    alert("Please enter a value for the \"Event Title\" field.");
    theForm.eventTitle.focus();
    return (false);
  }
  return (true);
}



function newImage(arg) {
if (document.images) {
rslt = new Image();
rslt.src = arg;
return rslt;
}
}

function changeImages() {
if (document.images && (preloadFlag == true)) {
for (var i=0; i<changeImages.arguments.length; i+=2) {
document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
}
}
}

var preloadFlag = false;
function preloadImages() {
if (document.images) {
nav_program_over = newImage("navigation/nav_program_over.gif");
nav_teaminfo_over = newImage("navigation/nav_teaminfo_over.gif");
nav_practice_over = newImage("navigation/nav_practice_over.gif");
nav_learnto_over = newImage("navigation/nav_learnto_over.gif");
nav_thecoaches_over = newImage("navigation/nav_thecoaches_over.gif");
nav_teammembers_over = newImage("navigation/nav_teammembers_over.gif");
nav_video_over = newImage("navigation/nav_video_over.gif");
nav_photoalbum_over = newImage("navigation/nav_photoalbum_over.gif");
nav_contact_over = newImage("navigation/nav_contact_over.gif");
nav_parents_over = newImage("navigation/nav_parents_over.gif");
nav_results_over = newImage("navigation/nav_results_over.gif");
nav_links_over = newImage("navigation/nav_links_over.gif");
nav_calendar_over = newImage("navigation/nav_calendar_over.gif");
preloadFlag = true;
}
}


function naming()
{
window.name = "parentwindow";
}

function setFocus(){
document.secure.user.focus();
}


function registration(theForm)
{
 if (theForm.name.value == "")
  {
    alert("Please enter a value for the \"name\" field.");
    theForm.name.focus();
    return (false);
  }
   if (theForm.address.value == "")
  {
    alert("Please enter a value for the \"address\" field.");
    theForm.address.focus();
    return (false);
  }
    if (theForm.city.value == "")
  {
    alert("Please enter a value for the \"city\" field.");
    theForm.city.focus();
    return (false);
  }
    if (theForm.state.value == "")
  {
    alert("Please enter a value for the \"state\" field.");
    theForm.state.focus();
    return (false);
  }
    if (theForm.zip.value == "")
  {
    alert("Please enter a value for the \"zip\" field.");
    theForm.zip.focus();
    return (false);
  }
      if (theForm.phone.value == "")
  {
    alert("Please enter a value for the \"phone\" field.");
    theForm.phone.focus();
    return (false);
  }
  
 if (theForm.email.value == "")
  {
    alert("Please enter a value for the \"email\" field.");
    theForm.email.focus();
    return (false);
  }
  


  return (true);
}

function addDiver(theForm)
{
 if (theForm.firstName.value == "")
  {
    alert("Please enter a value for the \"First Name\" field.");
    theForm.firstName.focus();
    return (false);
  }
 if (theForm.lastName.value == "")
  {
    alert("Please enter a value for the \"Last Name\" field.");
    theForm.lastName.focus();
    return (false);
  }
  return (true);
}

function results(theForm)
{
if (theForm.event.value == "")
  {
    alert("Please enter a value for the \"event\" field.");
    theForm.event.focus();
    return (false);
  }
if (theForm.board.value == "")
  {
alert("Please enter a value for the \"board\" field.");
    theForm.board.focus();
    return (false);
  }
if (theForm.place.value == "")
  {
    alert("Please enter a value for the \"place\" field.");
    theForm.place.focus();
    return (false);
  }
if (theForm.diver_id.value == "")
  {
    alert("Please enter a value for the \"Name\" field.");
    theForm.diver_id.focus();
    return (false);
  }
if (theForm.points.value == "")
  {
    alert("Please enter a value for the \"points\" field.");
    theForm.points.focus();
    return (false);
  }
  return (true);
}

function schedule(theForm)
{
if (theForm.startDate.value == "")
  {
    alert("Please enter a value for the \"Start Date\" field.");
    theForm.startDate.focus();
    return (false);
  }
if (theForm.name.value == "")
  {
    alert("Please enter a value for the \"name\" field.");
    theForm.name.focus();
    return (false);
  }
 if (theForm.results.value == "")
  {
    alert("Please enter a value for the \"results\" field.");
    theForm.results.focus();
    return (false);
  }
  return (true);
}

function contact(theForm)
{
 if (theForm.from.value == "")
  {
    alert("Please enter a value for the \"From\" field.");
    theForm.from.focus();
    return (false);
  }
  return (true);
}
