<!--
//-- Morse and Signal Flags

flgs = new Array("1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "A", "B", "C", "D", "E", "F", "G", "H", 
"I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "ca", "s1", "s2", "s3");

ltrs = new Array("One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Zero",
"Alpha", "Bravo", "Charlie", "Delta", "Echo", "Foxtrot", "Golf", "Hotel", "India", "Juliet", "Kilo", 
"Lima", "Mike", "November", "Oscar", "Papa", "Quebec", "Romeo", "Sierra", "Tango", "Uniform", "Victor", 
"Whiskey", "X-ray", "Yankee", "Zulu", "", "", "", ""); 

phns = new Array("WUN", "TOO", "TREE", "FOW-er", "FIFE", "SIX", "SEV-en", "AIT", "NINE-er", "ZERO", 
"AL-fah", "BRA-voh", "CHAR-lee", "DELL-tah", "ECK-oh", "FOKS-trot", "GOLF", "hoh-TELL", "IN-dee-ah", "JEW-lee-ETT",
"KEE-loh", "LEE-mah", "MIKE", "no-VEM-bah", "OSS-kar", "pa-PAH", "key-BECK", "ROW-mee-oh", "see-AIR-rah", "TANG-go",
"YOU-nee-form", "VIK-tah", "WISS-key", "ECKS-ray", "YANG-key", "ZOO-loo", "", "", "", "");

mc = new Array("dit dah dah dah dah","dit dit dah dah dah","dit dit dit dah dah","dit dit dit dit dah","dit dit dit dit dit","dah dit dit dit dit","dah dah dit dit dit","dah dah dah dit dit","dah dah dah dah dit","dah dah dah dah dah", 
"dit dah", "dah dit dit dit", "dah dit dah dit", "dah dit dit", "dit", "dit dit dah dit", "dah dah dit", "dit dit dit dit", 
"dit dit", "dit dah dah dah", "dah dit dah", "dit dah dit dit", "dah dah", "dah dit", "dah dah dah", "dit dah dah dit", 
"dah dah dit dah", "dit dah dit", "dit dit dit", "dah", "dit dit dah", "dit dit dit dah", "dit dah dah", "dah dit dit dah", 
"dah dit dah dah", "dah dah dit dit", "", "", "", "", "");

sls = new Array("One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Zero", 
"I have a diver down; keep well clear at slow speed.", 
"I am taking in, or discharging, or carrying dangerous goods.", 
"Yes (affirmative).", 
"Keep clear of me; I am manoeuvring with difficulty.", 
"I am altering my course to starboard.", 
"I am disabled; communicate with me.", 
"I require a pilot. (Fishing = I am hauling nets).", 
"I have a pilot on board.", 
"I am altering my course to port.", 
"I am on fire and have a dangerous cargo on board; keep well clear of me.", 
"I wish to communicate with you.", 
"You should stop your vessel instantly.", 
"My vessel is stopped and making no way through the water.", 
"No (negative).", 
"Man overboard.", 
"Vessel is about to proceed to sea. (Fishing = My nets are caught fast).", 
"My vessel is healthy and I request free pratique.", 
"(No meaning).", 
"My engines are going astern.", 
"(Fishing = I am engaged in pair trawling).", 
"You are running into danger.", 
"I require assistance.", 
"I require medical assistance.", 
"Stop carrying out your intentions and watch for my signals.", 
"I am dragging my anchor.", 
"I require a tug. (Fishing = I am shooting nets).", 
"This signal should be read alphabetically.", 
"Repeat first letter of group.", 
"Repeat second letter of group.", 
"Repeat third letter of group.");

function ShowSignal()
   {
var flgcnt = flgs.length;
var thisflg = Math.floor(Math.random() * flgcnt);
var ident = flgs[thisflg];
if (ident=="ca") {
   ident="<P>Code & Answering</p>";
   }
else {
   if (ident=="s1") {
   ident="<P>First Substitute</p>";
   }
else {
   if (ident=="s2") {
   ident="<P>Second Substitute</p>";
   }
else {
   if (ident=="s3") {
   ident="<P>Third Substitute</p>";
   }
else {
   ident=""
   }}}}
var txtout = ident + "<img src='images/ic_" +  flgs[thisflg] + ".gif' alt='" + phns[thisflg] + "' title='" + phns[thisflg] + "'><P><font size='+2' style='bold'>" + ltrs[thisflg] + "</font></p>";
if (thisflg<36){
	txtout = txtout + "<P><img src='images/mc_" +  flgs[thisflg] + ".gif' alt='" +  mc[thisflg] + "' title='" + mc[thisflg] + "'></P>"
	} 
txtout = "<center>" + txtout + "<P>" + sls[thisflg] + "</p></center>";
return txtout;
   }
//-->