var str;
var bUseByline;
var changed = false;

function AddProduct(site, product, byline, page)
{
   str += "<option value='" + site + page + "'>" + product;
   if (bUseByLine) {
     str += " - " + byline;
   }
   str += "</option>";
}

function AddNCHSwiftProduct(product, byline, page)
{
   AddProduct("http://www.nch.com.au/", product, byline, page);
}

function AddNCHSoftwareProduct(product, byline, page)
{
   AddProduct("http://www.nchsoftware.com/", product, byline, page);
}

function SetProductList(divid, usebyline)
{
   str;
   bUseByLine = usebyline;
   str = "<select id='selectcat' onchange='selectChanged();' onclick='changed = true;' onkeydown='selectKeyed(event);' ";
   if (!bUseByLine) { str += " style='width: 153px;'";}
   str += "><option selected>Select Product</option>";
   AddNCHSwiftProduct("Axon", "Virtual PBX System", "pbx/index.html");
   AddNCHSwiftProduct("BMS", "Business Music System", "bms/index.html");
   AddNCHSoftwareProduct("BroadCam", "Video Streaming", "broadcam/index.html");
   AddNCHSwiftProduct("BroadWave", "Audio Streaming", "streaming/index.html");
   AddNCHSoftwareProduct("Classic FTP", "FTP Uploader", "ftp/index.html");
   AddNCHSoftwareProduct("Debut", "Video Recorder", "capture/plus.html");
   AddNCHSwiftProduct("DialDictate", "Phone Dictation System", "dialdictate/index.html");
   AddNCHSoftwareProduct("Disketch", "CD Label Software", "cdlabeler/index.html");
   AddNCHSoftwareProduct("Express Accounts", "Accounting Simplicity", "accounting/index.html");
   AddNCHSwiftProduct("Express Burn", "CD/DVD/Blu-ray Burner", "burn/index.html");
   AddNCHSwiftProduct("Express Delegate", "Dictation Manager", "delegate/index.html");
   AddNCHSwiftProduct("Express Dial", "Automatic Dialer", "dial/index.html");
   AddNCHSwiftProduct("Express Dictate", "Dictation Recorder", "express/index.html");
   AddNCHSoftwareProduct("Express Invoice", "Invoicing Software", "invoice/index.html");
   AddNCHSwiftProduct("Express Notes", "Personal Information Manager", "notes/index.html");
   AddNCHSwiftProduct("Express Rip", "CD Ripper", "rip/plus.html");
   AddNCHSwiftProduct("Express Scribe", "Transcription Software", "scribe/index.html");
   AddNCHSwiftProduct("Express Talk", "VoIP Softphone", "talk/index.html");
   AddNCHSoftwareProduct("EyeLine", "Video Surveillance Software", "surveillance/index.html");
   AddNCHSwiftProduct("FastFox", "Typing Expander", "fastfox/index.html");
   AddNCHSoftwareProduct("FileFort", "Backup Software", "backup/index.html");
   AddNCHSoftwareProduct("FlashLynx", "Video Download Software", "streamvcr/plus.html");
   AddNCHSoftwareProduct("FlexiServer", "Employee Management Software", "flexi/index.html");
   AddNCHSoftwareProduct("Fling", "Automatic FTP Uploader", "ftp/index.html");
   AddNCHSwiftProduct("Golden Records", "Vinyl to CD Converter", "golden/index.html");
   AddNCHSoftwareProduct("GoldenVideos", "VHS to DVD Converter", "goldenvideos/index.html");
   AddNCHSoftwareProduct("HourGuard", "Record and create timesheets", "timesheet/index.html");
   AddNCHSwiftProduct("IAP", "Announcement Player", "ipap/index.html");
   AddNCHSwiftProduct("I-Producer2", "Produce On Hold Messages", "iproducer/index.html");
   AddNCHSwiftProduct("IMS", "On-Hold Messages Player", "ims/index.html");
   AddNCHSoftwareProduct("Inventoria", "Inventory Software", "inventory/index.html");
   AddNCHSwiftProduct("IVM", "Telephone Attendant", "ivm/index.html");
   AddNCHSoftwareProduct("KeyBlaze", "Typing Tutor", "typingtutor/index.html");
   AddNCHSoftwareProduct("MEO", "Encryption/Decryption Software ", "encrypt/index.html");
   AddNCHSwiftProduct("MixPad", "Audio File Mixer", "mixpad/index.html");
   AddNCHSwiftProduct("MSRS", "Court and Conference Recorder", "msrs/index.html");
   AddNCHSwiftProduct("Palm Dictate", "Dictation System for Palm PC", "palmdictate/index.html");
   AddNCHSoftwareProduct("PhotoPad", "Photo Editor", "photoeditor/index.html");
   AddNCHSoftwareProduct("Photostage", "Photo Slideshow Creator", "slideshow/index.html");
   AddNCHSwiftProduct("PitchPerfect", "Guitar Tuner", "tuner/index.html");
   AddNCHSoftwareProduct("Pixillion", "Image File Converter", "imageconverter/index.html");
   AddNCHSwiftProduct("PlayPad", "Audio Player", "playpad/index.html");
   AddNCHSwiftProduct("Pocket Dictate", "Dictation System for Pocket PC", "pocket/index.html");
   AddNCHSoftwareProduct("Prism", "Video File Converter", "prism/index.html");
   AddNCHSwiftProduct("Quorum", "Call Conferencing Software", "conference/index.html");
   AddNCHSwiftProduct("RecordPad", "Audio Recorder", "recordpad/index.html");
   AddNCHSwiftProduct("Slice", "Audio File Splitter", "splitter/index.html");
   AddNCHSwiftProduct("SoundTap", "Audio Stream Recorder", "soundtap/index.html");
   AddNCHSwiftProduct("Stamp", "ID3 Tag Editor", "tageditor/index.html");
   AddNCHSwiftProduct("Switch", "Audio File Converter", "switch/plus.html");
   AddNCHSwiftProduct("TempoPerfect", "Metronome Software", "metronome/index.html");
   AddNCHSwiftProduct("TexTally", "Word, Line and Character Counter", "counter/index.html");
   AddNCHSwiftProduct("Tone Generator", "Audio Test Tone Generator", "tonegen/index.html");
   AddNCHSwiftProduct("TRx", "Single Line Phone Recorder ", "trx/index.html");
   AddNCHSwiftProduct("TwelveKeys", "Transposing Assistant", "twelvekeys/index.html");
   AddNCHSwiftProduct("Verbose", "Text to Speech Converter", "verbose/index.html");
   AddNCHSoftwareProduct("VideoPad", "Video Editing software", "videopad/plus.html");
   AddNCHSwiftProduct("VRS", "Multiple Line Voice Recorder", "vrs/index.html");
   AddNCHSwiftProduct("WavePad", "Audio Editing Software", "wavepad/masters.html");
   AddNCHSwiftProduct("Web Dictate", "Internet Dictation System", "webdictate/index.html");

   AddNCHSwiftProduct("Zulu", "DJ Software", "dj/index.html");

   str += "</select>";
   document.getElementById(divid).innerHTML = str;
}

function selectChanged()
{
   if ((navigator.userAgent.indexOf("Safari") != -1) || changed) window.location = document.getElementById('selectcat').value;
   //if (changed) window.location = document.getElementById('selectcat').value;
}

function selectKeyed(e)
{
   var theEvent = e ? e : event;
   if (theEvent.keyCode == '13') {
      changed = true;
      selectChanged();
   } else changed = false;
}