function openWindow(url) {
  newWin = open(url,'winName','width=500,height=500,top=100,left=100,toolbar=yes');  //,resizable=yes' );
}

function openRegistration(url) {
  newWin = open(url,'winName','width=700,height=800,top=100,left=100,toolbar=yes');  //,resizable=yes' );
}
  function openLink(num) {
    var message = "NOTICE/DISCLAIMER Links to non-Coast Guard entities are not under the control ";
    message += "of the United States Coast Guard or the United States Coast Guard Auxiliary, and ";
    message += "are provided for the convenience of our customers. They do not, in any way, ";
    message += "constitute an endorsement of the linked pages or any commercial or private ";
    message += "issues or products presented there. We cannot make any warranty or representation ";
    message += "concerning the content of these sites, or secondary sites from the pages to ";
    message += "which they link.";

    var yesNo = window.confirm(message);

    if (yesNo) {
      if (num == 1) {
        window.open("http://www.boatus.com/courseline/default.asp");
      } else if (num == 2) {
        window.open("http://www.uscg.mil/d5/station/annapolis/");
      } else if (num == 3) {
        window.open("http://www.uscg.mil/d5/sectbaltimore/default.asp");
      } else if (num == 4) {
        window.open("http://www.uscg.mil/d5/station/StaWashDC/Index.htm");
      } else if (num == 5) {
        window.open("http://maps.yahoo.com/maps_result?addr=19401+Crystal+Rock+Drive&csz=Germantown%2C+Maryland+20874&country=us&new=1&name=&qty=");
      } else if (num == 6) {
        window.open("http://maps.yahoo.com/maps_result?addr=5250+Randolph+Road&csz=Rockville%2C+Maryland+20852&country=us&new=1&name=&qty=");
      } else if (num == 7) {
        window.open("http://maps.yahoo.com/maps_result?addr=2401+Hawkins+Point+Road&csz=Baltimore%2C+Maryland+21226&country=us&new=1&name=&qty=");
      } else if (num == 8) {
        window.open("http://maps.yahoo.com/maps_result?addr=4400+Solomons+Island+Road%2C+Route+2&csz=Harwood%2C+Maryland+20776&country=us&new=1&name=&qty=");
      } else if (num == 9) {
        window.open("http://maps.yahoo.com/maps_result?addr=1150+Carnation+Drive&csz=Rockville%2C+Maryland+20852&country=us&new=1&name=&qty=");
      } else if (num == 10) {
        window.open("http://auxadept.org/navigator/");
      } else if (num == 11) {
        window.open("http://a0540703.uscgaux.info/");
      } else if (num == 12) {
        window.open("http://a0540710.uscgaux.info/");
      } else if (num == 13) {
        window.open("http://www.uscg.mil/d5/sectbaltimore/default.asp");
      } else if (num == 14) {
        window.open("http://www.uscg.mil/d5/station/annapolis/index.html");
      } else if (num == 15) {
        window.open("http://www.navcen.uscg.gov/");
      } else if (num == 16) {
        window.open("http://www.noaa.gov/charts.html");
      } else if (num == 17) {
        window.open("http://tidesandcurrents.noaa.gov/");
      } else if (num == 18) {
        window.open("http://nws.cgaux.org/index.html");
      } else if (num == 19) {
        window.open("http://www.usace.army.mil/");
      }
    }
  }

 function openPage(num) {
	  if (num == 1) {
	    window.location = "index.html";
	  } else if (num == 2) {
	    window.location = "BoatingSafetyCourses.html";
	  } else if (num == 3) {
	    window.location = "VesselChecks.html";
	  } else if (num == 4) {
	    window.location = "Links.html";
	  } else if (num == 5) {
	    window.location = "MemberInformation.html";
	  } else if (num == 6) {
	    window.location = "FlotillaPhotoGallery.html";
	  } else if (num == 7) {
	    window.location = "WhoWeAre.html";
	  } else if (num == 8) {
	    window.location = "JoinUs.html";
	  } else if (num == 9) {
	    window.location = "ContactUs.html";
	  } else if (num == 10) {
	    window.location = "PrivacyStatement.html";
	  } else if (num == 11) {
	    window.location = "Publications.html";
	  } else if (num == 12) {
	    window.location = "FlotillaTraining.html";
	  } else if (num == 13) {
	    window.location = "CourseRegistration.html";
	  }
  }

// need to modify to use the same as http://
 function openImg(num) {
   window.open("images/photo/photo_original/photo" + num + ".jpg");
 }

function goCourse() {
  if (courseprice.options[courseprice.selectedIndex].value != "") {
    location = "BoatingSafetyCourses.html#" + courseprice.options[courseprice.selectedIndex].value;
  }
}

function mail(){
  who=prompt("Enter recipient's email address: ","Wu.Ynghorng@bls.gov");
  what=prompt("Enter the subject: ","Contact");
  if (confirm("Are you sure you want to mail "+who+" with the subject of "+what+"?")==true) {
    parent.location.href='mailto:'+who+'?subject='+what+'';
  }
}

function displayCourseBegin(num) {
  // num: 1=1br, 2=2 br, 3=anothercourse
  var displayDate = "";
  var today = new Date();
  var year = today.getFullYear();
  var month = today.getMonth() + 1;
  if (month < 10) {
    displayDate = year+"0"+month;
  } else {
    displayDate = year+""+month;
  }
  var day = today.getDate();
  if (day < 10) {
    displayDate += "0"+day;
  } else {
    displayDate += ""+day;
  }

  //window.alert("what is display date: "+displayDate);
  if (num == 1) {
    if (parseInt(displayDate) < 20080305) {
      //window.alert("what is update number: "+num);
      document.write("<br><font color=blue>COURSE BEGINS ON MARCH 4.&nbsp;&nbsp;SEE COURSE CALENDAR.</font><br><br>");
    }
  } else if (num == 2) {
    if (parseInt(displayDate) < 20080305) {
      //window.alert("what is update number: "+num);
      document.write("<br><br><font color=blue>COURSE BEGINS ON MARCH 4.&nbsp;&nbsp;SEE COURSE CALENDAR.</font><br><br>");
    }
  }else {
    if (parseInt(displayDate) < 20080213) {
      document.write("<font color=blue>COURSE BEGINS ON FEBRUARY 12.&nbsp;&nbsp;SEE COURSE CALENDAR.</font><br><br>");
    }
  }
}