
//
//Copyright (c) 2002-2003 Lexabean Consulting, LLC. All Rights Reserved.
//
// This computer software is owned by Lexabean Consulting, LLC and is
// protected by U.S. copyright laws and other laws and by international
// treaties. This computer software is furnished by Lexabean Consulting, LLC,
// pursuant to a written license agreement and may be used, copied,
//transmitted, and stored only in accordance with the terms of such
// license and with the inclusion of the above copyright notice. This
// computer software or any other copies thereof may not be provided or
// otherwise made available to any other person.
//
//version 1.01 1) Removed hardcoded paths in html to index.js and wrband.js. This was causing some problems in popup
//		2) Added parseint(url_split_secs) in wrband.js calc_and_display() bec. found in some instances this
//was treated as a string and appended to the end of the number instead of numerically added.

//
//For Email Addresses
//

function ShowPopup(url)
{
   var bName=navigator.appName;
   var bVer=parseInt(navigator.appVersion);
   var popupName = "PaceChart";

   if (bName=="Netscape" && bVer<=3)
   {
      var popupWin = window.open(url, popupName,'toolbar=0,location=0,directories=0,status=0,menubar=1,scrollbars=1,resizable=0,width=200,height=600');
  	  popupWin.focus();
   }
   else
   {
      var popupWin = window.open(url, popupName,'toolbar=0,location=0,directories=0,status=0,menubar=1,scrollbars=1,resizable=0,width=200,height=600');
      popupWin.focus();
   }
   popupWin.location = url;
}
function crtWBMiles(form)
{

	var SelDist = (form.D1.options[form.D1.selectedIndex].value)
	var SelHRs= (form.HRs.options[form.HRs.selectedIndex].value)
	var SelMins = (form.Mins.options[form.Mins.selectedIndex].value)
	var SelSecs = (form.Secs.options[form.Secs.selectedIndex].value)
	
	var url= "wristband.html?H=" + SelHRs + "+M=" + SelMins + "+S=" + SelSecs + "+D=" + SelDist + "+U=Mile"

	ShowPopup(url)
	
	return true
}

function crtWBKMs(form)
{
	var SelDist = (form.D1.options[form.D1.selectedIndex].value)
	var SelHRs= (form.HRs.options[form.HRs.selectedIndex].value)
	var SelMins = (form.Mins.options[form.Mins.selectedIndex].value)
	var SelSecs = (form.Secs.options[form.Secs.selectedIndex].value)
	
	if (String(SelDist) == "3.11")
	{
		SelDist = "5"
	}
	else if (String(SelDist) == "4.98")
	{
		SelDist = "8"
	}
	else if (String(SelDist) == "6.22")
	{
		SelDist = "10"
	}
	else if (String(SelDist) == "9.32")
	{
		SelDist = "15"
	}
	else if (String(SelDist) == "12.43")
	{
		SelDist = "20"
	}
	else if (String(SelDist) == "18.64")
	{
		SelDist = "30"
	}
	else if (String(SelDist) == "31.1")
	{
		SelDist = "50"
	}
	else if (String(SelDist) == "5")
	{
		SelDist = "8.05"
	}
	else if (String(SelDist) == "10")
	{
		SelDist = "16.1"
	}
	else if (String(SelDist) == "13.11")
	{
		SelDist = "21.1"
	}
	else if (String(SelDist) == "26.22")
	{
		SelDist = "42.2"
	}
	else if (String(SelDist) == "50")
	{
		SelDist = "80.48"
	}
	else if (String(SelDist) == "62.2")
	{
		SelDist = "100"
	}
	else if (String(SelDist) == "100")
	{
		SelDist = "160.1"
	}
	var url= "wristband.html?H=" + SelHRs + "+M=" + SelMins + "+S=" + SelSecs + "+D=" + SelDist  + "+U=KM"
	ShowPopup(url)
	
	return true
}



