/************************************************
* File: exlinks.js
* Desc: Captain Black Web Site -- External Links.
* Auth: Kevin Machin.
************************************************/

/*jsl:import cb.js */

////////////////////////////////////////////////////////////////
// Func: cbExLinks
// Desc: External links database for Writing Resource Links.
// Retn: Database object reference (use oDB = new cbExLinks ()).
////////////////////////////////////////////////////////////////

function cbExLinks ()
{
    var iCountLinks = 0, aoLink = new Array;
    var sT, sC;
    
    // *** Set up the database ***
    // Types: Blog     -- Web log.
    //        Facebook -- Facebook site.
    //        Resource -- Information.
    //        Web      -- Web site.
    //
    // Categories: Author   -- Author's blog or site.
    //             Fiction  -- Fiction blog or site.
    //             Group    -- Group blog or site.
    //             Personal -- Personal blog or site.

    // Fiction blogs
    sT = "Blog"; sC = "Fiction";
    add ("Wave Lengths","Paige",sT,sC,"wave-lengths");

    // Group blogs
    sC = "Group";
    add ("Cloud Line",                 "Captain Black",sT,sC,"cloud-line");
    add ("Cutting It Fine",            "Fiona",        sT,sC,"cutting-it-fine");
    add ("Novel Racers",               "Liz",          sT,sC,"novelracers");
    add ("Novel Racers' Private Place","Liz",          sT,sC,"novel-racer-meet");
    add ("Novel Spaces",               "Various",      sT,sC,"novelspaces");
    add ("Wanna Meet-up",              "Captain Black",sT,sC,"wannameetup");

    // Personal blogs
    sC = "Personal";
    add ("Anita Loughrey's Blog",            "Anita",         sT,sC,"amloughrey");
    add ("The Write Eye",                    "Annieye",       sT,sC,"annieye");
    add ("Non-Geordie Writer",               "B",             sT,sC,"nongeordiewriter");
    add ("The Old Bat",                      "BattyPip",      sT,sC,"battypip.wordpress.com");
    add ("Beleaguered Squirrel",             "BS",            sT,sC,"beleagueredsquirrel");
    add ("Writing About Writing",            "Calistro",      sT,sC,"writing-about-writing");
    add ("Cloud Base",                       "Captain Black", sT,sC,"cloud-base");
    add ("Natural Scotland",                 "Caroline J",    sT,sC,"natural-scotland");
    add ("Escaping the 9 to 5",              "Caroline J",    sT,sC,"escapingthe9to5");
    add ("Writing Diary",                    "Caroline J",    sT,sC,"cazjones");
  //add ("In Search of Adam...",             "Caroline S",    sT,sC,"insearchofadam");
    add ("In Search of Me...",               "Caroline S",    sT,sC,"www.carolinesmailes.co.uk/blog");
    add ("My New Notebook",                  "Cathy",         sT,sC,"cwnotebook");
    add ("CC Devine Says",                   "CC Devine",     sT,sC,"ccdevinesays");
    add ("Home Thoughts Weekly",             "ChrisH",        sT,sC,"homethoughtsweekly");
  //add ("Boob Pencil",                      "Clare",         sT,sC,"www.boobpencil.co.uk/index.html");
    add ("With Ink from the Pink Pen",       "Colette",       sT,sC,"withinkfromthepinkpen");
    add ("Debs-Daydreams in the Shed",       "Debs",          sT,sC,"debcarrs-daydreams");
    add ("Writing Humbug",                   "Denise",        sT,sC,"writinghumbug");
    add ("Confessions of a lazy perfectionist","Ellie",       sT,sC,"lazyperfectionista");
    add ("Fia of the Blog",                  "Fia",           sT,sC,"fias-blog");
    add ("Word Counting",                    "Fia",           sT,sC,"chicklitwriter");
    add ("Fiction Is Stranger Than Fact",    "HelenMH",       sT,sC,"fictionisstrangerthanfact");
    add ("Spiral Skies",                     "Jen",           sT,sC,"www.spiralskies.com");
    add ("Tea Stains",                       "JJ",            sT,sC,"tea-stains");
    add ("The Yellow Room Editor",           "Jo",            sT,sC,"theyellowroomeditor");
    add ("The Lady with the Laptop",         "Juliette",      sT,sC,"juliettemcalroy");
    add ("Get On With It",                   "Karen",         sT,sC,"writewritingwritten");
    add ("Read like a Writer",               "Kate H",        sT,sC,"readlikeawriter");
    add ("Wordgirl's Work in Progress",      "Kate H",        sT,sC,"chicklitworkinprogress");
    add ("What Kate Did Next",               "Kate LB",       sT,sC,"katelordbrown");
    add ("Kirsty Greenwood",                 "Kirsty",        sT,sC,"kirstygreenwood.typepad.com");
    add ("Dragon's Flame",                   "Kris",          sT,sC,"intheflameofthedragon");
    add ("L-Plate Author",                   "L-Plate Author",sT,sC,"lplateauthor");
    add ("Itty Bitty Fiction",               "Lane",          sT,sC,"ittybitttyfiction");
    add ("Lane's Write",                     "Lane",          sT,sC,"laneswrite");
    add ("When Life gives you Lemons...",    "Lily",          sT,sC,"lilysheehan");
  //add ("Diary of a Demon",                 "LeatherDykeUK", sT,sC,"jasfoup");
    add ("The Art of Subtle Procrastination","Leigh",         sT,sC,"leighforbes");
  //add ("Wordtryst",                        "Liane",         sT,sC,"lianespicer");
    add ("Hesitant Scribe",                  "Lisa",          sT,sC,"hesitantscribe");
    add ("Just Keep Writing & Other Thoughts","Liz",          sT,sC,"lizfenwick");
    add ("Being Lucy Diamond",               "Lucy Diamond",  sT,sC,"beinglucydiamond");
    add ("My Word Mercedes!",                "Mercedes",      sT,sC,"www.mywordmercedes.blogspot.com");
    add ("Diary of Mother X",                "Mother X",      sT,sC,"diaryofmotherxlivingwithautism");
    add ("NoviceNovelist",                   "NoviceNovelist",sT,sC,"novicenovelist");
    add ("The Last Word!",                   "Paige",         sT,sC,"have-the-last-word");
    add ("QwertyQueen",                      "Queenie",       sT,sC,"qwertyqueen");
  //add ("The Revising Life",                "Revisionista",  sT,sC,"therevisinglife");
  //add ("Rowan's Writing Blog",             "Rowan",         sT,sC,"rowancoleman");
    add ("Writing Etc",                      "Sally Q",       sT,sC,"quillersplace");
    add ("Just Get On With It",              "Sarah*G*",      sT,sC,"iwillwritemybook");
    add ("Life of a British Expat in America","Sarah*G*",     sT,sC,"wehavemovedtousa");
    add ("Can I Have a Word?",               "Secret Writer", sT,sC,"thesecretwriter.wordpress.com");
    add ("Serendipity",                      "Serendipity",   sT,sC,"hope-chances");
    add ("Wordy Blog",                       "Tam",           sT,sC,"wordyblog");
    add ("Real E Fun",                       "Zinnia",        sT,sC,"realefun");

    // Facebook links
    sT = "Facebook"; sC = "Group";
    add ("Amateur Fiction Writing","Captain Black",sT,sC,"www.facebook.com/group.php?gid=2337282643","General discussion group about writing.");
    add ("Novel Racers","Maht Wells",              sT,sC,"www.facebook.com/group.php?gid=3373586683","Very quiet group. Better off visiting the <a target=\"_blank\" href=\"http://novelracers.blogspot.com\">blog</a>.");
    add ("Suspense/Thriller Writers","Pat Bertram",sT,sC,"www.facebook.com/group.php?gid=2397748813","Some good weekly discussion board topics.");

    // Resources
    sT = "Resource"; sC = "General";
    add ("Alexandra Sokolov",            "Alexandra",    sT,sC,"thedarksalon");
    add ("Andrew Lownie Literary Agency","Andrew Lownie",sT,sC,"www.andrewlownie.co.uk");
    add ("Bookersatz",                   "Cathy",        sT,sC,"bookersatz","Book reviews and news.");
    add ("Help! I Need a Publisher!",    "Nicola Morgan",sT,sC,"helpineedapublisher");
    add ("How Publishing Really Works",  "Jane Smith",   sT,sC,"howpublishingreallyworks","A plethora of information about the business.");
    add ("Lighthouse Writing Tips",      "Kathy Krajco", sT,sC,"lighthouse-writing-tips","Not been updated for over a year.");
    add ("The Literary Lab",             "Davin Malasarn, scott G.F. bailey &amp; Michelle Davidson Argyle",sT,sC,"literarylab.blogspot.com");
    add ("The Literary Project",         "Gemma Noon",   sT,sC,"www.theliteraryproject.blogspot.com");
    add ("The New Romantics",            "Various",      sT,sC,"thenewromantics.org","Seven British novelists who are proud to write novels about the ups - and downs - of love.");
    add ("Paperback Writer",             "Lynn Viehl",   sT,sC,"pbackwriter","Blog.");
    add ("Pitch Parlour",                "Miss Pitch",   sT,sC,"pitchparlour","Showcase blog for submissions.");
    add ("StoryFix.com",                 "Larry Brooks", sT,sC,"storyfix.com","'How To' blog.");
    add ("Women's stories: read, write, enjoy!","womagwriter",sT,sC,"womagwriter");
    add ("Writer Beware Blogs!","Ann Crispin & Victoria Strauss",sT,sC,"accrispin","Visit this site <b>before</b> submitting!");
    add ("Writing Calendar",             "Sally Quilford",sT,sC,"www.writingcalendar.com","Competitions, festivals, workshops...");

    sC = "News";
    add ("5th Estate",       "",sT,sC,"fifthestate.co.uk","Blog by authors, editors & publishers.");
    add ("AuthorScoop",      "",sT,sC,"authorscoop.com");
    add ("Book2Book",        "",sT,sC,"www.booktrade.info","Also known as BookTrade Info.");
    add ("BookBrunch",       "",sT,sC,"www.bookbrunch.co.uk");
    add ("The Bookseller",   "",sT,sC,"www.thebookseller.com","Has a news section.");
    add ("GalleyCat",        "",sT,sC,"www.mediabistro.com/galleycat");
    add ("Publishers Lunch", "",sT,sC,"www.publishersmarketplace.com/lunch/free");
    add ("Publishers Weekly","",sT,sC,"www.publishersweekly.com");
    add ("Shelf Awareness",  "",sT,sC,"www.shelf-awareness.com");

    sC = "Plot";
    add ("How to get unstuck",                   "Justine Larbalestier",sT,sC,"justinelarbalestier.com/blog/2009/01/05/jwam-reader-request-no-3-how-to-get-unstuck","What to do if your plot gets stuck.");
    add ("Creating a plot outline",              "Holly Lisle",         sT,sC,"hollylisle.com/pdf/Lisle-Plot-Outline.pdf","Mini-Course document.");
    add ("The 3 act structure",                  "Peder Hill",          sT,sC,"www.musik-therapie.at/PederHill/Structure&Plot.htm","Part of <i>Learn the Elements of a Novel</i> site.");
    add ("Narrative tension",                    "Bill Johnson",        sT,sC,"ezinearticles.com/?Creating-Narrative-Tension-in-a-Novel&id=88160","Ezine article.");
    add ("Tips for adding tension to your novel","Stacy Verdick Case",  sT,sC,"www.fictionfactor.com/guests/tension.html","Article on <i>Fiction Factor</i>.");
    add ("The Hero's journey",                   "Wikipedia",           sT,sC,"en.wikipedia.org/wiki/Monomyth","Monomyth article.");
    add ("Turn up the Wattage - Story Power",    "Lynn Viehl",          sT,sC,"pbackwriter.blogspot.com/2007/07/vw3-turn-up-wattage-story-power.html","<i>Paperback Writer</i> blog article.");

    sC = "Encouragement & Motivation";
    add ("The secret of writing success",    "Sally Quilford",   sT,sC,"sallyquilfordblog.co.uk/2008/12/new-year-message-and-writing-secret-of.html","Blog article.");
    add ("For Writers",                      "Jennifer Weiner",  sT,sC,"jenniferweiner.com/forwriters.htm","Even hugely successful chicklit authors like Jennifer Weiner have been rejected.");
    add ("A Conversation with Jasper Fforde","Kathleen Bolton",  sT,sC,"writerunboxed.com/2007/06/22/author-interview-a-conversation-with-jasper-fforde","Jasper Fforde, rejected 76 times over 10 years.");
    add ("Finishing the Novel",              "Maggie Gee",       sT,sC,"spreadtheword.org.uk/index.php?id=miscellaneous&text=1053","Write as though you've got a gun to your head.");
    add ("How do you know when to quit?",    "Toni McGee Causey",sT,sC,"murderati.com/blog/2009/4/19/how-do-you-know-when-to-quit.html","Article on <i>Murderati</i>.");

    sC = "Agents & Editors";
    add ("The Road Ahead",                  "Scribbly",       sT,sC,"writeblogspotcom.blogspot.com/2008/09/road-ahead.html","What they want.");
    add ("When to Cut Ties with Your Agent","Jessica Faust",  sT,sC,"bookendslitagency.blogspot.com/2008/06/when-to-cut-ties-with-your-agent.html","Bookends LLC article.");
    add ("Revisions Before Representation", "Jessica Faust",  sT,sC,"bookendslitagency.blogspot.com/2008/05/revisions-before-representation.html","When agents ask for revisions but don't offer representation.");
    add ("Talking Websites",                "Agent Kristin",  sT,sC,"pubrants.blogspot.com/2008/03/talking-websites.html","Do agents look at wannabe author's websites?");
    add ("Novel Manuscript Format",         "Matthew Carless",sT,sC,"www.bbc.co.uk/writersroom/scriptsmart/novel.pdf","BBC website on how to lay out a novel for submission to an agent/editor.");

    sC = "Characters";
    add ("Body Language Cues to Emotion",   "Joanna Waugh",    sT,sC,"www.joannawaugh.com/Craft.html","Useful for show vs tell.");
    add ("Character Arc (I)",               "Julie Cohen",     sT,sC,"www.julie-cohen.com/blog/2010/01/17/character-arc","Blog article.");
    add ("Character Arc (II)",              "Julie Cohen",     sT,sC,"www.julie-cohen.com/blog/2010/01/18/character-arc-2","Blog article.");
    add ("Character and Plot: Inseparable!","Nathan Bransford",sT,sC,"nathanbransford.blogspot.com/2008/06/character-and-plot-inseparable.html","What makes a compelling character?");
    add ("Create images of your characters","Channel Four",    sT,sC,"www.channel4.com/entertainment/t4/microsites/M/makingfaces/yourface_createMate.html","Face Identi-Kit.");
    add ("NameVoyager",                     "Baby Name Wizard",sT,sC,"babynamewizard.com/namevoyager/lnv0105.html","Matching a character's name to their age.");
    add ("Sympathy without Saintliness",    "Alicia Rasley",   sT,sC,"www.sff.net/people/alicia/artsympathy.htm","What makes a sympathetic character?");

    sC = "IT & Software";
    add ("Write or Die",        "Dr Wicked",           sT,sC,"lab.drwicked.com/writeordie.html","<span style=\"text-decoration:blink;font-weight:bold\">Write</span> or your computer will bleep at you!");
    add ("yWriter",             "Spacejock Software",  sT,sC,"www.spacejock.com/yWriter.html","Free writing software.");
    add ("Wordle",              "Jonathan Feinberg",   sT,sC,"www.wordle.net","Create a 'word cloud' of your novel or short story.");
    add ("Using the Semi-colon","Improve Your Writing",sT,sC,"www.bristol.ac.uk/arts/skills/grammar/grammar_tutorial/page_44.htm","Semi-colon quiz.");
    add ("The Gender Genie",    "Bookblog",            sT,sC,"bookblog.net/gender/genie.php","Do you write like woman or a man?");
    add ("NaturalReader",       "NaturalSoft",         sT,sC,"www.naturalreaders.com","Get your computer to read out your novel/story for you");
    add ("AutoCrit",            "Nina Davies",         sT,sC,"www.autocrit.com","Manuscript editing wizard.");
    add ("Backups",             "Captain Black",       sT,sC,"cloud-base.blogspot.com/2009/06/computer-disasters.html","Captain's Computer Tips article.");

    sC = "Writers' Block";
    add ("The Nasty Four-Letter Word That Keeps You From Writing","Brian Clark",sT,sC,"www.copyblogger.com/writers-block","Copyblogger article.");
    add ("Just Don't Do It","Slate Magazine",sT,sC,"http://www.slate.com/id/2190909","A special issue on procrastination.");

    sC = "Publishing";
    add ("Chain Reaction",                "Danuta Kean",sT,sC,"www.danutakean.com/blog/?p=245","How do you get your book into the supermarkets?");
    add ("Not just singing into the wind","Emma Darwin",sT,sC,"emmadarwin.typepad.com/thisitchofwriting/2008/02/not-just-singin.html","Don't expect to earn loads of money.");
    add ("Things I've learned since my first book was published","Cherie Priest",sT,sC,"cmpriest.livejournal.com/879864.html","Blog article.");
    add ("Letting go of your first novel is so very hard to do","Antony Moore",sT,sC,"entertainment.timesonline.co.uk/tol/arts_and_entertainment/books/fiction/article2151594.ece","Author tries to promote his first book.");
    add ("How we choose what to publish", "Emma Barnes",sT,sC,"www.snowbooks.com/weblog/2007/06/how_we_choose_what_to_publish.html#more","Article on <i>The Snowblog</i>.");
    add ("Publisher Dating Dictionary","Kit Whitfield",sT,sC,"www.kitwhitfield.com/publisherdating.html","Covering letter/dating analogy.");

    sC = "Advice";
    add ("The Writer's Writing Guide: Common Traps","Rachel Simon",sT,sC,"www.rachelsimon.com/wg_common.htm","35 traps writers fall into");
    add ("Writing Novels","Various",      sT,sC,"www.fictionfactor.com/novel.html","<i>Fiction Factor</i> series.");
    add ("Writing & Publishing","Various",sT,sC,"www.videojug.com/tag/writing-and-publishing","Really informative videos on writing and getting published");
    add ("Novels for Young Readers","Ian Bone",sT,sC,"www.ianbone.com.au/pdfs/NovelsYoung_IanBone.pdf","Writing fiction for 8-12 year olds");
    add ("Tricks of the Trade","Lisa Gardner",sT,sC,"www.lisagardner.com/tricks/index.htm","Writing tips.");
    add ("Writing advice","Caro Clarke",sT,sC,"www.caroclarke.com/writing.html","Collection of articles.");
    add ("Ten Commandments of becoming a Published Author","Julie Cohen",sT,sC,"www.julie-cohen.com/blog/2009/06/23/the-ten-commandments-of-becoming-a-published-author","Blog article.");
    add ("The Secrets to Publishing Success","Jane Friedman",sT,sC,"blog.writersdigest.com/norules/2009/10/06/TheSecretsToPublishingSuccessJanes2009ToughLoveGuide.aspx","Jane's 2009 Tough Love Guide.");
    add ("What It Takes to Become a Master Writer","Mary DeMuth",sT,sC,"michaelhyatt.com/2009/10/what-it-takes-to-become-a-master-writer.html","Guest post on Michael Hyatt's site.");
    add ("Building a reality-based writing career","KeVin K",sT,sC,"novelspaces.blogspot.com/2009/12/building-reality-based-writing-career.html","Keep the day job!");

    sC = "Random Stuff";
    add ("Have a nose at other writer's rooms","BBC",sT,sC,"news.bbc.co.uk/1/hi/uk/7754115.stm");
    add ("How to write","Various",sT,sC,"www.guardian.co.uk/books/series/howtowrite","Guardian newspaper  articles.");
    add ("The Book Show","Various",sT,sC,"www.youtube.com/profile_videos?user=TheBookShow","YouTube videos.");
    add ("Free Rice","UN World Food Program",sT,sC,"www.freerice.com","Test your vocab and help charity at the same time.");
    add ("The Right Brain vs Left Brain test","Perth Now",sT,sC,"www.news.com.au/perthnow/story/0,21598,22492511-5005375,00.html","Are you right-brained or left-brained?");
    add ("Behind the Lines","Times on Line",sT,sC,"entertainment.timesonline.co.uk/tol/arts_and_entertainment/books/article2615414.ece","What drives writers to write?");

    sC = "Editing";
    add ("How to kill your darlings without remorse","Brenda Coulter",sT,sC,"brendacoulter.blogspot.com/2008/01/how-to-kill-your-darlings-without.html","Blog article.");
    add ("Rewriting a novel","Justine Larbalestier",sT,sC,"justinelarbalestier.com/blog/?p=890");
    add ("3 steps to edit your novel","Nina Davies",sT,sC,"www.autocrit.com/websitepublisher/articles/6/1/Edit-Your-Novel-In-Three-Steps/Page1.html","Part of the <i>AutoCrit Writing Centre</i>.");
    add ("Editing","Caro Clarke",sT,sC,"www.caroclarke.com/rewriting.html","Collection of articles.");
    add ("Revision Toolkit","Therese Fowler",sT,sC,"theresefowler.blogspot.com/2007/07/revision-tool-kit.html","Blog article.");
    add ("English Software","EnglishSoftware.org",sT,sC,"www.englishsoftware.org/articles.html","Articles section.");

    // Authors
    sT = "Web"; sC = "Author";
    add ("Cally Taylor","Cally Taylor",          sT,sC,"www.callytaylor.co.uk");
    add ("Captain Black","Captain Black",        sT,sC,"www.kevinmachin.pwp.blueyonder.co.uk");
    add ("Caroline Smailes","Caroline Smailes",  sT,sC,"www.carolinesmailes.co.uk");
    add ("Catherine Walter","Catherine Walter",  sT,sC,"www.catherinewalter.co.uk");
    add ("Deborah Carr","Deborah Carr",          sT,sC,"www.deborahcarr.co.uk");
    add ("Della Galton","Della Galton",          sT,sC,"www.dellagalton.com");
    add ("Wannabe a Writer?","Jane Wenham-Jones",sT,sC,"wannabeawriter.moonfruit.com","Site relating to Jane Wenham-Jones, friends and colleagues, author of the book <i>Wannabe a Writer?</i>.");
    add ("Kate Harrison","Kate Harrison",        sT,sC,"www.kate-harrison.com");
    add ("Lucy Diamond","Lucy Diamond",          sT,sC,"www.lucydiamond.co.uk");

    ///////////////////////////////////////////
    // Priv: add
    // Desc: Add an entry to the database.
    // Args: psName -- Display name for link.
    //       psAuth -- Name of author or owner.
    //       psType -- Type of link.
    //       psCat  -- Category for link.
    //       psURL  -- Location of link.
    //       psDesc -- [Optional] description.
    // Retn: New link object reference.
    ///////////////////////////////////////////

    function add (psName, psAuth, psType, psCat, psURL)
    {
        var oLink, psDesc, oDesc;
        
        // Create new object
        psDesc = (arguments.length > 5) ? arguments[5] : null;
        oLink = new link (psName, psAuth, psType, psCat, psURL, psDesc);
        
        // Update array and count
        aoLink[iCountLinks] = oLink; iCountLinks++;
        
        // Constructor
        function link (psName, psAuth, psType, psCat, psURL, psDesc)
        {
            var sURL;
            
            // Fill in members
            this.sName   = psName;
            this.sAuthor = psAuth;
            this.sType   = psType;
            this.sCat    = psCat;

            // Fill in any missing URL parts
            sURL = psURL;
            if (sURL !== "")
            {
                if (sURL.slice (0, 4) != "http")
                {
                    sURL = "http://" + sURL;
                }
                switch (psType)
                {
                case "Blog":
                case "Fiction":
                case "Group":
                case "Resource":
                    if (sURL.indexOf (".") < 0)
                    {
                        sURL += ".blogspot.com";
                    }
                    break;
                default:
                    break;
                }
            }
            this.sURL = sURL;

            // Description is optional
            if (psDesc === null)
            {
                this.oDesc = null;
                this.sDesc = "";
            }
            else
            {
                oDesc = cbTag ("Span");
                oDesc.innerHTML = psDesc; // Set here as cbTag might interpret embedded '=' as attributes
                this.oDesc = oDesc;
                this.sDesc = cbStrNode (this.oDesc);
            }
        }
        // End of link (constructor)
        
        return (oLink);
    }
    // End of add
    
    // Return the information
    this.iCountLinks = iCountLinks;
    this.aoLink      = aoLink;
    this.add         = add;
}
// End of cbExLinks
/* End of file exlinks.js */
