/* Filename:    J009_Tradshow.js
 * Description: Tradeshow Application (doesn't actually store the leads)
 * Copyright:   2006 The Code Corporation. Please see http://www.codecorp.com/jsLicensing.html for information regarding copyright and grant of license.
 * $Revision: 118 $
 * $Date: 2006-12-05 16:26:51 -0700 (Tue, 05 Dec 2006) $
 */
 
include(".crx.js");

//constants
var sepHeight  = 2;

//variables
var count = 0;
ready =  new gui.Text("");


ready.show = function(text)
{
    this.text = text? text: "Ready";
    gui.showDialog(this);
}

reader.onDecode = function(decode)
{  
    var scannedFields = decode.data.split(",");
    
    var fName   = scannedFields[1];
    var lName   = scannedFields[3];
    var company = scannedFields[5];

    if( !fName || !lName || !company )
        ready.show("unrecognized format");
    else
    {
        ++count;
        ready.caption = "Leads: " + count;
         
        ready.show(fName + " " + lName + "\n" + company);
    }
}


ready.onCancel = function()
{
    reader.runScript(".default.js");
}


ready.caption = "Leads: " + count;
ready.show();


//EOT

