function CheckStuff () {
  alert("navigator.appVersion=" + navigator.appVersion + "\nnavigator.platform=" + navigator.platform)
}

function isMac() {
  if(navigator.appVersion.indexOf("Mac") != -1) {
    return true
  } else {
    return false
  }
}

function DesignAGrid() {
  if(isMac()) {
    alert("Design-a-Grid is not implemented on Macintosh.")
  } else {
    self.location.href='./griddata/template.g98'
  }
}


function HelpWindow(topic) {
var helpwin=window.open("","GeodasHelpWindow","resizable=yes,width=610,height=460")
if(helpwin != null) {
var apage = ''
apage += '<HTML><HEAD><TITLE>Geodas Help System</TITLE></HEAD>'
apage += '<FRAMESET ROWS="68,*">'
apage += '<FRAME SRC="/mgg/coastal/help/helpbar.htm" NAME="helpbuttons" SCROLLING="no">'
apage += '<FRAME src="/mgg/coastal/help/' + topic.toLowerCase() + '.htm" NAME="helpdoc">'
apage += '</FRAMESET>'
apage += '</HTML>'
helpwin.focus()
helpwin.document.write(apage)
helpwin.document.close()
}}


function HelpTip(topic) {
var tipwin=window.open("","GeodasHelpTip","resizable=yes,width=440,height=380")
if(tipwin != null) {
var apage = ''
//alert("/mgg/gdas/hg_" + topic.toLowerCase() +".Html")
apage += '<HTML><HEAD><TITLE>Geodas Help Tip</TITLE></HEAD>'
apage += '<FRAMESET ROWS="68,*">'
apage += '<FRAME SRC="/mgg/gdas/hg_tbar.Html" NAME="buttons" SCROLLING="no">'
apage += '<FRAME src="/mgg/gdas/hg_' + topic.toLowerCase() + '.Html" NAME="topic">'
apage += '</FRAMESET>'
apage += '</HTML>'
tipwin.focus()
tipwin.document.write(apage)
tipwin.document.close()
}}

function WarningWindow() {
//alert("BEENWARNED=" + self.document.FORMWARNING.BEENWARNED.checked)
if(!self.document.FORMWARNING.BEENWARNED.checked) {
  alert("THIS DATA IS NOT TO BE USED FOR NAVIGATION\n\n"
    + "Although these data are of high quality and useful for planning and modeling purposes, "
    + "they do not necessarily reflect current conditions, "
    + "nor do they depict data which is on a nautical chart.\n\n"
    + "For navigation please refer to the NOS nautical chart series.")
  self.document.FORMWARNING.BEENWARNED.checked = true
}
}
