var str;
var bUseByline;
var changed = false;

function AddProduct(site, product, byline, page)
{
   str += "<option value='" + site + page + "'>" + product;
   if (bUseByLine) str += " - " + byline;
}

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");
   AddNCHSoftwareProduct("Barillo", "Barcode Generator", "barcode/index.html");
   AddNCHSoftwareProduct("Bolt PDF", "PDF Printer", "pdfprinter/index.html");
   AddNCHSoftwareProduct("BroadCam", "Video Streaming", "broadcam/index.html");
   AddNCHSwiftProduct("BroadWave", "Audio Streaming", "streaming/index.html");
   AddNCHSoftwareProduct("CardWorks", "Business Card Software", "businesscard/index.html");
   AddNCHSoftwareProduct("Classic FTP", "FTP Uploader", "classic/index.html");
   AddNCHSoftwareProduct("Copper", "Point of Sales System", "point-of-sale/index.html");
   AddNCHSwiftProduct("Crescendo", "Music Notation Editor", "notation/index.html");
   AddNCHSoftwareProduct("Debut", "Video Recorder", "capture/index.html");
   AddNCHSoftwareProduct("DesktopNow", "Remote Computer Access", "remotedesktop/index.html");
   AddNCHSwiftProduct("DialDictate", "Phone Dictation System", "dialdictate/index.html");
   AddNCHSoftwareProduct("Disketch", "CD Label Software", "cdlabeler/index.html");
   AddNCHSoftwareProduct("Doxillion", "Document Converter", "documentconvert/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 Dictate", "Dictation Recorder", "express/index.html");
   AddNCHSoftwareProduct("Express Invoice", "Invoicing Software", "invoice/index.html");
   AddNCHSwiftProduct("Express Rip", "CD Ripper", "rip/index.html");
   AddNCHSwiftProduct("Express Scribe", "Transcription Software", "scribe/index.html");
   AddNCHSwiftProduct("Express Talk", "VoIP Softphone", "talk/index.html");
   AddNCHSoftwareProduct("Express Zip", "File Compression Software", "zip/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("FlexiServer", "Employee Management Software", "flexi/index.html");
   AddNCHSoftwareProduct("Fling", "Automatic FTP Uploader", "fling/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("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("Lightning PDF", "PDF Printer", "pdfprinter/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");
   AddNCHSoftwareProduct("Orion", "File Recovery", "data-recovery/index.html");
   AddNCHSwiftProduct("Pedable", "Foot Pedal Software", "footpedal/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("Pocket Dictate", "iPhone Dictation App", "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");
   AddNCHSoftwareProduct("Reflect", "CRM Customer Relationship Software", "crm/index.html");
   AddNCHSwiftProduct("SoundTap", "Audio Stream Recorder", "soundtap/index.html");
   AddNCHSwiftProduct("Stamp", "ID3 Tag Editor", "tageditor/index.html");
   AddNCHSwiftProduct("Switch", "Audio File Converter", "switch/index.html");
   AddNCHSwiftProduct("TempoPerfect", "Metronome Software", "metronome/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("Verity", "Child Monitoring Software", "childmonitoring/index.html");
   AddNCHSoftwareProduct("VideoPad", "Video Editing Software", "videopad/index.html");
   AddNCHSoftwareProduct("Voxal", "Voice Changer", "voicechanger/index.html");
   AddNCHSwiftProduct("VRS", "Multiple Line Voice Recorder", "vrs/index.html");
   AddNCHSoftwareProduct("Warp", "PC Accelerator", "registry-cleaner/index.html");
   AddNCHSwiftProduct("WavePad", "Audio Editing Software", "wavepad/index.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;
}
