CAPTION_SEARCH = "RandomCaption";
EMAIL_SEARCH = "randomemail";
STATUS_TEXT_SEARCH = "RandomStatusText";

EMAIL_CAPTION_IDX = 0;
EMAIL_ADDRESS_IDX = 1;

EMAIL_DATA = new Array(
new Array("Elvis", "theking"),
new Array("Bill the Cat", "btc"),
new Array("Opus", "opus"),
new Array("Frankenstein", "frankenstein"),
new Array("Alice in Wonderland", "alice"),
new Array("Spanky", "spanky"),
new Array("Alfalfa", "alfalfa"),
new Array("Spiderman", "spiderman"),
new Array("Scooby", "scooby"),
new Array("Shaggy", "shaggy"),
new Array("Pinky", "pinky"),
new Array("The Brain", "thebrain"),
new Array("Brak", "brak"),
new Array("Zorak", "zorak"),
new Array("Space Ghost", "sg"),
new Array("Spot", "spot"),
new Array("My Big Toe", "mybigtoe"),
new Array("My Little Toe", "mylittletoe"),
new Array("The Squirrel Out Back", "sob"),
new Array("Bill Gates", "bill.gates@microsoft.com"),
new Array("Beaver Cleaver", "thebeav"),
new Array("Bullwinkle", "bullwinkle"),
new Array("Puff the Magic Dragon", "puff"),
new Array("Mr. Ed", "ed"),
new Array("Horton", "horton"),
new Array("Speed Racer", "speed.racer"),
new Array("Mr. Bill", "mr.bill"),
new Array("Cap&rsquo;n Crunch", "capn.crunch"),
new Array("Herman Munster", "herman"),
new Array("Count Chocula", "count.chocula"),
new Array("Frankenberry", "frankenberry"),
new Array("Boo Berry", "booberry"),
new Array("Kermit the Frog", "kermit"),
new Array("Fozzie Bear", "fozzie"),
new Array("Miss Piggy", "misspiggy"),
new Array("Beaker", "beaker"),
new Array("Gonzo", "gonzo"),
new Array("Animal", "animal"),
new Array("Snuffleupagus", "snuffy"),
new Array("Sam I Am", "sam"),
new Array("A Sleestack", "sleestack"),
new Array("Cha-ka", "cha-ka"),
new Array("Big Bird", "big.bird"),
new Array("Ernie", "ernie"),
new Array("Bert", "bert"),
new Array("Elmo", "elmo"),
new Array("A Zizzer Zazzer Zuzz", "zzz"),
new Array("Conway Twitty", "conway"),
new Array("Heat Miser", "heat"),
new Array("Cold Miser", "cold")
)

/**
* Returns a random integer between nMinVal (inclusive) and nMaxVal (exclusive).
*
* nMinVal  the lower bound for the random integer (inclusive)
* nMaxVal  the upper bound for the random integer (exclusive)
*/
function getRandomInt(nMinVal, nMaxVal)
{
    return Math.min(Math.floor(nMinVal + Math.random() * (nMaxVal - nMinVal)), nMaxVal - 1);
}


/**
* Returns a fully qualified email address for stalker-herron.com given a name.
*
* strEmailName the name to fully qualify
*/
function getEmailAddress(strEmailName) {
    var strEmailAddress;
    
    if (strEmailName.indexOf("@") == -1) {
        strEmailAddress = strEmailName + "@stalker-herron.com";
    } else {
	   strEmailAddress = strEmailName;
    }
    
    return strEmailAddress;
}

var nEmailIdx = getRandomInt(0, EMAIL_DATA.length);

strRandomCaption = EMAIL_DATA[nEmailIdx][EMAIL_CAPTION_IDX];
strRandomEmail = getEmailAddress(EMAIL_DATA[nEmailIdx][EMAIL_ADDRESS_IDX]);
strRandomStatusText = "Send an e-mail to " + strRandomCaption;


