// script written by Becky
// website http://www.123giggle.com
// and http://www.gigglesngrins.com

// define your title array
var titleArray = new Array("To the One I Love...","Thinking of You","You're An Angel","Words from the Heart","I Cherish You","To My True Love","A Small Celebration of Love","Just a Note to Say...","To My Best Friend","Guess Who!","Just a Thought","For My Friend","Wishing You Blessings","Good Morning","Just For You","Welcome Back","Time To Party!","Wassup?!","Hi!","Can We Talk?");


var greetArray = new Array("My Dearest Love","My Sweet Petunia,","My Baby,","Dear Snookums,","My Darling,","My Little Pea,","Dear Lover,","My Love,","Dear Snookums,","Dear Sugar Pie,","Dear Sweetcakes,","Dear Peaches,","My Honeybun,","Hey Loverbaby,","Dear Love,","My Friend,","Hey Buddy,","Hey You,","To Whom It May Concern,","Howdy Ma'Am,","Howdy Stranger,","My Best Friend,","Hey Sexy!","My Snugglebunny,");


var closeArray = new Array("Sweet Dreams","With Love","Your Humble Servant","I Love You","Until Then","Faithfully","All My Heart","Love Always","Hugs & Kisses","With Fond Wishes","Forever Yours","Completely Yours","Eternally","Devoted","Fondly","With My Heartfelt Love","Until Next We Meet","Missing You","Thinking Of You Often","Your Secret Admirer","Regretfully","In Sympathy","Until Next We Meet","Passionately","Love Always & Forever");



function doTitle() {

// generate a random number for Title

var firstNo = titleArray.length - 1;
var firstNo = Math.round(Math.random() * firstNo);
document.theCard.htext.value = titleArray[firstNo]
}

function doGreet() {

// generate a random number for Greeting

var secondNo = greetArray.length - 1;
var secondNo = Math.round(Math.random() * secondNo);
if(document.theCard.message.value.length=0)
{
document.theCard.message.value = greetArray[secondNo]
}
else
{
document.theCard.message.value = greetArray[secondNo] + " " + document.theCard.message.value
}
}

function doClose() {

// generate a random number for Closing

var thirdNo = closeArray.length - 1;
var thirdNo = Math.round(Math.random() * thirdNo);
document.theCard.ctext.value = closeArray[thirdNo]
}

