var JS_CMS_REG = "C:\\dh\\web\\SJC\\nyc\\new\\cms_reg.js (703 lines) 2008-04-24 22:29 Dean Hannotte";
/***********************************************************************
*                                                                      *
*                         C M S _ R E G . J S                          *
*                         -------------------                          *
*                                                                      *
*      This file is a component of Content Management System 101.      *
*                 Run 'help.pl' for more information.                  *
*                                                                      *
*                    (c) 2004 - 2008 Dean Hannotte                     *
***********************************************************************/
x_log("\nJS_CMS_REG = '" + JS_CMS_REG + "'.");
// x_log_all();
// alert(JS_CMS_REG);

/*--------------------------------------------------------------------*/
/*                  cms_change_in_campus() function                   */
/*--------------------------------------------------------------------*/
function cms_change_in_campus()
{
    var TF = document.this_form;
    if (TF.CGI_CAMPUS.selectedIndex > 0)
    {
        TF.CGI_GUEST_OF.value = '';
    }
}

/*--------------------------------------------------------------------*/
/*                   cms_change_in_class() function                   */
/*--------------------------------------------------------------------*/
function cms_change_in_class()
{
    var TF = document.this_form;
    if (TF.CGI_CLASS.selectedIndex > 0)
    {
        TF.CGI_GUEST_OF.value = '';
    }
}

/*--------------------------------------------------------------------*/
/*                   cms_change_in_email() function                   */
/*--------------------------------------------------------------------*/
function cms_change_in_email()
{
x_log("\ncms_change_in_email();");
    var TF = document.this_form;
//     if (TF.CGI_EMAIL.value != '') TF.CGI_REMIND.checked = true;
//     else                          TF.CGI_REMIND.checked = false;
}

/*--------------------------------------------------------------------*/
/*                 cms_change_in_guest_of() function                  */
/*--------------------------------------------------------------------*/
function cms_change_in_guest_of()
{
    var TF = document.this_form;
    if (TF.CGI_GUEST_OF.value)
    {
        TF.CGI_CAMPUS.selectedIndex  = 0;
        TF.CGI_CLASS.selectedIndex   = 0;
        TF.CGI_PROGRAM.selectedIndex = 0;
    }
}

/*--------------------------------------------------------------------*/
/*                  cms_change_in_program() function                  */
/*--------------------------------------------------------------------*/
function cms_change_in_program()
{
x_log("\ncms_change_in_program();");
    var TF = document.this_form;
    if (TF.CGI_PROGRAM.selectedIndex > 0)
    {
        TF.CGI_GUEST_OF.value = '';
    }
}

/*--------------------------------------------------------------------*/
/*                  cms_change_in_remind() function                   */
/*--------------------------------------------------------------------*/
function cms_change_in_remind()
{
// x_log("\ncms_change_in_remind();");
//     var TF = document.this_form;
//     if (TF.CGI_REMIND.checked)
//     {
//         if (TF.CGI_EMAIL.value == '')
//         {
//             x_error(TF.CGI_EMAIL, "If you want to be reminded "
//                 + "about this event, please provide an email address.");
//         }
//     }
}

/*--------------------------------------------------------------------*/
/*                  cms_change_in_retain() function                   */
/*--------------------------------------------------------------------*/
function cms_change_in_retain()
{
}

/*--------------------------------------------------------------------*/
/*               cms_good_registration_form() function                */
/*--------------------------------------------------------------------*/
function cms_good_registration_form()
{
    var TF            = document.this_form;
    var regopts       = TF.cms_regopts.value;
    var dinner        = x_get_parm(regopts, ['-dinner']);
    var fullname      = x_get_parm(regopts, ['-fullname']);
    var require_phone = x_get_parm(regopts, ['-require_phone']);
    var require_email = x_get_parm(regopts, ['-require_email']);

x_log("\ncms_good_registration_form()"
+   "\nfirst='"    + TF.CGI_FIRST.value
+ "',\nlast='"     + TF.CGI_LAST.value
+ "',\nphone='"    + TF.CGI_PHONE.value
+ "',\nemail='"    + TF.CGI_EMAIL.value
+ "',\ncampus='"   + TF.CGI_CAMPUS.selectedIndex
+ "',\nclass='"    + TF.CGI_CLASS.selectedIndex
+ "',\nprogram='"  + TF.CGI_PROGRAM.selectedIndex
+ "',\nguest of='" + TF.CGI_GUEST_OF.value
+ "'.");

x_log
(
      "\npage: '"             + TF.page.value         + "',"
    + "\ncms_timeslot: '"     + TF.cms_timeslot.value + "',"
    + "\ncms_title: '"        + TF.cms_title.value    + "',"
    + "\ncms_regopts: '"      + TF.cms_regopts.value  + "',"
    + "\ncms_id: '"           + TF.cms_id.value       + "',"
    + "\ndinner: '"           + dinner                + "',"
    + "\nfullname: '"         + fullname              + "',"
    + "\nrequire_phone: '"    + require_phone         + "',"
    + "\nrequire_email: '"    + require_email         + "'."
);

    var err_msg  = new String();

    var todays_date = new Date();
x_log("\nToday is " + todays_date);

    var timeslot_date = x_timeslot_as_date_object(TF.cms_timeslot.value);
x_log("\nThis event is scheduled for " + timeslot_date);

    if (todays_date > timeslot_date)
    {
        alert("This event has already occurred.");
        return false;
    }

    if (fullname)
    {
        if (TF.CGI_FIRST.value == ''
        &&  TF.CGI_LAST.value == '')
        {
            x_error(TF.CGI_FIRST, "Our host for this event requires "
                + "that you provide us wth your first and last names.");
            return false;
        }
        if (TF.CGI_FIRST.value == '')
        {
            x_error(TF.CGI_FIRST, "Our host for this event requires that you "
                + "provide us with your first name in addition to your last.");
            return false;
        }
        if (TF.CGI_LAST.value == '')
        {
            x_error(TF.CGI_LAST, "Our host for this event requires that you "
                + "provide us with your last name in addition to your first.");
            return false;
        }
    }
    else
    {
        if (TF.CGI_FIRST.value == ''
        &&  TF.CGI_LAST.value == '')
        {
            x_error(TF.CGI_LAST, "Please enter at least a last name.");
            return false;
        }
    }

//     if (TF.CGI_PHONE.value == ''
//     &&  TF.CGI_EMAIL.value == '')
//     {
//         if (!confirm("If you don't enter a phone number or an email address, "
//             + "we won't be able to notify you if the event is cancelled."
//             + "\n\nClick on 'OK' to submit the form without a phone number or an email address."
//             + "\nClick on 'Cancel' if you want to fill in more of the form."))
//         {
//             x_error(TF.CGI_PHONE);
//             return false;
//         }
//     }

    if (TF.CGI_PHONE.value != ''
    &&  x_bad_phone_number(TF.CGI_PHONE, 'a phone number')) return false;
    if (TF.CGI_PHONE.value == '' && require_phone)
    {
        x_error(TF.CGI_PHONE,
            "You must provide your phone number for this event");
        return false;
    }

    if (TF.CGI_EMAIL.value != ''
    &&  x_bad_email_address(TF.CGI_EMAIL, 'an email address')) return false;
    if (TF.CGI_EMAIL.value == '' && require_email)
    {
        x_error(TF.CGI_EMAIL,
            "You must provide your email address for this event");
        return false;
    }

    if (TF.CGI_GUEST_OF.value == '')
    {
        err_msg = "Please either select your campus, class and program, "
            + "or indicate which alum or student you are a guest of.";
        if (TF.CGI_CAMPUS.selectedIndex < 1)
        {
            x_error(TF.CGI_CAMPUS, "You haven't selected your campus. " + err_msg);
            return false;
        }
        if (TF.CGI_CLASS.selectedIndex < 1)
        {
            x_error(TF.CGI_CLASS, "You haven't selected your class. " + err_msg);
            return false;
        }
        if (TF.CGI_PROGRAM.selectedIndex < 1)
        {
            x_error(TF.CGI_PROGRAM, "You haven't selected your program. " + err_msg);
            return false;
        }
    }

    if (TF.CGI_REMIND.checked)
    {
        todays_date.setHours(0);                                 // Just
        todays_date.setMinutes(0);                            // compare
        todays_date.setSeconds(0);                         // mm/dd/yyyy
        todays_date.setMilliseconds(0);

        timeslot_date.setHours(0);                               // Just
        timeslot_date.setMinutes(0);                          // compare
        timeslot_date.setSeconds(0);                       // mm/dd/yyyy
        timeslot_date.setMilliseconds(0);

        var days_till_event = x_difference_in_days(todays_date, timeslot_date);
        if (days_till_event == 0)
        {
            alert("Since the event is scheduled for later today, "
                + "there's not enough time to send a reminder.");
            TF.CGI_REMIND.checked = false;
        }
        else
        {
            if (TF.CGI_EMAIL.value == '')
            {
                x_error(TF.CGI_EMAIL, "Please enter an email "
                    + "address if you want us to send a reminder.");
                return false;
            }

            var max_leadtime = days_till_event - 1;
x_log("\nWe can't send a reminder before " + todays_date + " + 1, which is '" + max_leadtime + "' days in advance.");

            var leadtime = TF.CGI_LEADTIME.value;
x_log("\nThe visitor wants to be reminded '" + leadtime + "' days in advance.");

            err_msg = "We can't send a reminder '"
                + TF.CGI_LEADTIME.value + "' days before this event. ";
            if (isNaN(leadtime))
            {
                    x_error(TF.CGI_LEADTIME, err_msg
                        + "Please enter a number.");
                    return false;
            }
            else if (leadtime < 0)
            {
                    x_error(TF.CGI_LEADTIME, err_msg
                        + "Please enter a non-negative number.");
                    return false;
            }
            else if (leadtime != Math.floor(leadtime))
            {
                    x_error(TF.CGI_LEADTIME, err_msg
                        + "Please enter a whole number.");
                    return false;
            }
            else if (leadtime > max_leadtime)
            {
                err_msg = "There's not enough time to send a reminder "
                        + x_cardinal(leadtime)
                        + " day" + x_sing_plur(leadtime, '', 's')
                        + " before this event. ";
                if (max_leadtime == 0)
                {
                    x_error(TF.CGI_LEADTIME, err_msg + "\nEnter 0 if you "
                        + "want the reminder sent early tomorrow morning.");
                    return false;
                }
                else
                {
                    x_error(TF.CGI_LEADTIME, err_msg + "\nThe number must "
                        + "be in the range 0 to " + max_leadtime + "."
                        + "\n\nEnter 0 if you want the "
                        + "reminder sent early on the morning of the event. "
                        + "\nEnter " + max_leadtime + " if you want "
                        + "the reminder sent early tomorrow morning.");
                    return false;
                }
            }
        }
    }
    return true;
}

/*--------------------------------------------------------------------*/
/*                        cms_order() function                        */
/*--------------------------------------------------------------------*/
function cms_order(a_col)
{
    var TF = document.this_form;
    if (TF.order.value == a_col)
    {
        if (TF.sequence.value == 'ascending')
        {
            TF.sequence.value = 'descending';
        }
        else
        {
            TF.sequence.value = 'ascending';
        }
    }
    else
    {
        TF.order.value = a_col;
        TF.sequence.value = 'ascending';
    }
    TF.submit();
}

/*--------------------------------------------------------------------*/
/*                       cms_ticket() function                        */
/*--------------------------------------------------------------------*/
function cms_ticket(a_name, a_url)
{
    var name = a_name;
    if (typeof a_name == 'undefined' || a_name == '') name = "a ticket";
//     var handlers = "";
    var handlers = " onmouseover='this.style.border=\"#44ff44 4px solid\";'"
        + " onmouseout='this.style.border=\"#44ff44 4px dashed\";'";
    var result = "<br><br><br><br><b>To buy " + name
        + ": &nbsp; </b><span" + handlers
        + " style='padding: 16px; background-color: "
        + "white; border: #44ff44 4px dashed;'><big>"
       + x_link("CLICK HERE", a_url, "_blank")
        + "</big></span><br><br><br><br>";
// alert(result);
    document.write(result);
    return result;
}

/*--------------------------------------------------------------------*/
/*                        cms_venue() function                        */
/*--------------------------------------------------------------------*/
function cms_venue(a_venue, a_room)
{
    var venue = new String(a_venue);
    var room  = new String(a_room );
    var map = '';
    var result = '';
    if (venue == 'adams_studio')
    {
        map = '130+West+57th+Street,+Suite+13B,+New+York,+NY+10019';
        result = "The Renaissance Studios, "
            + "130 West 57th Street, Suite 13B, "
            + "New York, NY 10019, (212)&nbsp;586&minus;8342.";
    }
    else if (venue == 'azuki')
    {
        map = '520+8th+Avenue,+New+York,+NY+10018';
        result = x_link("Azuki Japanese Restaurant",
            "http://www.yelp.com/biz/IsCVV0EmG6NXsV2RIYbZCw")
            + ", 520 8th Ave, "
            + "New York, NY 10018, (212)&nbsp;736&minus;5116.";
    }
    else if (venue == 'bear_stearns')
    {
        if (typeof room == 'undefined')
        {
            room = "[ROOM TO BE DETERMINED]";
            alert("Room number missing on "
                + "cms_venue('bear_stearns') function call.");
        }
        else if (room == 'G' || room == 'H')
        {
            room = "Conference Room '" + room + "'";
        }
        map = '383+Madison+Avenue,+New+York,+NY,+10017';
        result = "<img align='right' src='/nyc/images/event_calendar/"
            + "bear_stearns_119x46.gif'>The "
            + x_link("Bear Stearns", "http://www.bearstearns.com")
            + " Building, 383 Madison Avenue, "
            + "13th Floor, " + room + ", "
            + "New York, NY 10017. "

            + "Use the entrance at the SW corner "
            + "of 47th Street and Vanderbilt.<br><br><br>"

            + "<script>cms_whitebox('-left -width:100%');</script>"
            + "<big><b>Please note that advance reservations are required, "
            + "must be received no later than 24 hours before the event, "
            + "and that you must produce a photo ID at the entrance.</b></big>"
            + "<script>cms_whitebox_end();</script>";
    }
    else if (venue == "bohemian_hall")
    {
        map = '29-19+24th+Avenue,+Astoria,+NY+11102';
        result = x_link('Bohemian Hall and Beer Garden',
            'http://www.bohemianhall.com')
            + ", 29-19 24th Avenue, "
            + "Astoria, NY 11102, (718)&nbsp;274&minus;4925.";
    }
    else if (venue == "chelsea_gallery")
    {
        map = '72+Seventh+Avenue,+New+York,+NY+10011';
        result = x_link('Chelsea Gallery Diner',
            'http://www.chelseagallerydiner.com/')
            + ", 72 Seventh Avenue, "
            + "between 14th and 15th Streets, "
            + "New York, NY 10011, (212)&nbsp;691&minus;5200.";
    }
    else if (venue == "city_center")
    {
        map = '130+West+56th+Street,+New+York,+NY+10019';
        result = x_link('New York City Center',
            'http://www.nycitycenter.org')
            + ", 130 West 56th Street, 3rd Floor Studio, "
            + "between Sixth and Seventh Avenue, "
            + "New York, NY 10019, (212)&nbsp;247&minus;0430.";
    }
    else if (venue == "classic_stage_company")
    {
        map = '136+East+13th+Street,+New+York,+NY,+10003';
        result = "The " + x_link("Classic Stage Company",
              "http://www.classicstage.org/")
            + ", 136 East 13th St (at Third Avenue), "
            + "New York, NY 10003, (212)&nbsp;677&minus;4210.";
    }
    else if (venue == "connollys")
    {
        map = '14+East+47th+Street,+New+York,+NY,+10017';
        result = x_link("Connolly's Pub and Restaurant",
            "http://www.connollyspubandrestaurant.com")
            + ", 14 East 47th Street (at Madison Avenue), "
            + "New York, NY 10017, (212)&nbsp;867&minus;3767.";
    }
    else if (venue == "dans_office")
    {
        map = '130+West+57th+Street,+New+York,+NY,+10019';
        result = "Chapter President Daniel Van Doren's office, "
            + "130 West 57th Street, Suite 2-D, "
            + "New York, NY 10019, (212)&nbsp;757&minus;9523.";
    }
    else if (venue == "deb_hoffman")
    {
        map = '301+West+57th+Street+New+York+NY+10021';
        result = "Central Park Place, 301 West 57th Street, 6th "
            + "Floor Common Room, New York, NY 10021, courtesy of "
            + "Deborah Hoffman. (Some of the extras that go along "
            + "with this space include a large terrace, ping-pong "
            + "table and piano.) "
            + "<script>cms_whitebox('-width:100%');</script>"
            + "As security is a concern at this building, please "
            + "reserve a spot 24 hours in advance."
            + "<script>cms_whitebox_end();</script>";
    }
    else if (venue == "duke")
    {
        map = '229+w.+42nd+st,+New+York,+NY,+10036';
        result = x_link('The Duke on 42nd Street', 'http://duke.new42.org/')
            + ", <!-- c/o New 42nd Street Studios, -->229 West 42nd Street "
            + "(between 7th & 8th Avenues), Second Floor, "
            + "New York, NY, 10036, (646)&nbsp;223&minus;3042.";
    }
    else if (venue == "harold_pratt_house")
    {
        map = '58+E+68th+St,+New+York,+NY+10021';
        result = x_link("The Harold Pratt House",
            "http://www.prattmansion.com/")
            + ", 58 East 68th Street, at Park Avenue , "
            + "New York, NY 10021, (212)&nbsp;434&minus;9576.";
    }
    else if (venue == 'john_hetland')
    {
        map = '135+W.17th+Street,+New+York,+NY+10011';
        result = x_snapshot('members/John_P._Hetland_300x410.jpg',
              .3, '-right -nocaption')
            + "The Loft of John P. Hetland, A'64, "
            + "135 West 17th Street, Apt. 3B, Manhattan, "
            + "between Sixth and Seventh Avenues, "
            + "212&minus;989&minus;7606. John founded and still runs "
            + x_link("The Renaissance Street Singers of New York",
              "http://www.streetsingers.org/") + '.';
    }
    else if (venue == "kate_sparrow")
    {
        result = x_snapshot('community/kate_sparrows_place_2032x1354.jpg',
            '50%', '-nocaption') + "Kate Sparrow's House, "
            + "350 Mountain Road, Union City, NJ 07087. 201/988-1806. "
            + cms_see_map('350+Mountain+Road,+Union+City,+NJ+07087')

            + "<p>From Port Authority, take the 123 bus to "
            + "Union City. it will eventually go down "
            + "Palisade Avenue. Get off at 18th street "
            + "and walk 2.5 blocks East until you see "
            + "the big 21 story Apt building.(Troy "
            + "Towers) I'm the red brick house on the "
            + "south side of the street, the second "
            + "house before (west of) Troy Towers. 350 "
            + "Mountain Road. - you can't miss it - "
            + "lawn, view, black fence. Some parking "
            + "available. If you hate sitting on the "
            + "bus: get off at first stop: Park Avenue "
            + "and follow directions below: "

            + "<p>From Port Authority, take the Jitney Bus "
            + "to Patterson, NJ. Get off at first stop "
            + "- Park Avenue. Walk south under the 495 "
            + "bridge, up the incline, then East on "
            + "Hackensack Plank Road to Gregory Avenue. "
            + "(Stay up on the Palisades!) Walk down "
            + "Gregory to the big apt bldg: Troy "
            + "Towers, around the bend in the road. My "
            + "house is second house past Troy Towers, "
            + "red brick. 350 Mountain Road. (10 min "
            + "walk) "

            + "<p>Ferries to Hoboken. Take a cab from "
            + "Hoboken to Troy Towers (see above) costs "
            + "approximately $8:"
            + "<br>(1) <script>cms_link('', 'http://www.nyc.gov/html/dot/html/masstran/ferries/hobokenwfc.html');</script> "
            + "<br>(2) <script>cms_link('', 'http://www.nyc.gov/html/dot/html/masstran/ferries/hobokenpier11.html');</script> "

            + "<p>Ferry to Lincoln Harbor, Weehawken from "
            + "39th Street & 12th Avenue "
            + "<script>cms_link('', 'http://www.nyc.gov/html/dot/html/masstran/ferries/lclnwenj.html');</script> "

            + "<p>Path Train (bus is better) to Hoboken. "
            + "Take cab to 350 Mountain Road "

            + "<p><big><b>If you'll need a ride, please call Daniel Van Doren "
            + "at (212)757-9523.</b></big>";
    }
    else if (venue == 'kramer_levin')
    {
        map = '1177+Avenue+of+the+Americas,+New+York,+NY,+10036';
        result = x_link("Kramer Levin Naftalis & Frankel LLP",
              "http://www.kramerlevin.com")
            + ", 1177 Avenue of the Americas (at Sixth Avenue and 46th Street)"
            + ", Room 29D, New York, NY 10036"
            + ", (212)&nbsp;715&minus;9100. "

            + "<script>cms_whitebox('-left -width:100%');</script>"
            + "<big><b>Please note that advance reservations are required, "
            + "must be received no later than 24 hours before the event, "
            + "and that you must produce a photo ID at the entrance.</b></big>"
            + "<script>cms_whitebox_end();</script>"
    }
    else if (venue == "maggies")
    {
        map = '21+East+47th+Street,+New+York,+NY,+10017';
        result = x_link("Maggie's Place",
            "http://www.menupages.com/restaurantdetails.asp"
            + "?neighborhoodid=0&restaurantid=3316")
            + ", 21 East 47th Street (at Madison Avenue), "
            + "New York, NY 10017, (212)&nbsp;753&minus;5757.";
    }
    else if (venue == "market_cafe")
    {
        map = '496+9th+Ave,+New+York+10018';
        result = x_link("The Market Cafe",
            "http://www.menupages.com/restaurantdetails.asp"
            + "?areaid=0&restaurantid=4406&neighborhoodid=0&cuisineid=0")
            + ", 496 Ninth Avenue (between 37th and 38th Streets), "
            + "New York, NY 10018, (212)&nbsp;967&minus;3892.";
    }
    else if (venue == "mira_and_john")
    {
        map = '130+West+57th+Street,+New+York,+NY,+10019';
        result = "the home of Mira and John Van Doren"
            + ", 130 West 57th Street, Apt 11D, "
            + "New York, NY 10019.";
    }
    else if (venue == 'molyvos')
    {
        map = '871+seventh+avenue,+new+york,+ny+10019';
        result = x_link("Molyvos Restaurant", "http://www.molyvos.com")
            + ", 871 Seventh Ave (at 56th Street) "
            + "New York, NY 10019, (212)&nbsp;582&minus;7500.";
    }
    else if (venue == "national_arts_club")
    {
        map = '15+Gramercy+Park+South,+New+York,+NY+10003';
        result = x_link("National Arts Club",
              "http://www.nationalartsclub.org")
            + ", 15 Gramercy Park South (on 20th Street between Park "
            + "Avenue South and Irving Place), "
            + "New York, NY 10003, (212)&nbsp;475&minus;3424.";
    }
    else if (venue == "signature_theatre_company")
    {
        map = '555+West+42nd+Street,+New+York,+NY,+10036';
        result = x_link("Signature Theatre Company at the Peter Norton Space",
              "http://www.signaturetheatre.org")
            + ", 555 West 42nd Street (between 10th and 11th Avenues), "
            + "New York, NY 10036, (212)&nbsp;244&minus;7529.";
    }
    else if (venue == 'smith_barney')
    {
        map = 'one+penn+plaza+10119';
        result = x_link("The One Penn Branch of Smith Barney",
            "http://branches.smithbarney.com/onepenn")
            + ", One Penn Plaza, 34th Street and Eighth Ave, "
            + "43rd Floor, New York, NY 10119. "
            + "The seminar will be held in the Large Conference Room. "

            + "<script>cms_whitebox('-left -width:100%');</script>"
            + "<big><b>Please note that you <i>MUST TELL</i> the front desk that "
            + "you are visiting Lily Englehardt, who is one of their brokers. "
            + "If you don't mention her name you will "
            + "not be allowed into the building. </b></big>"
            + "<script>cms_whitebox_end();</script>";
    }
    else if (venue == 'theatre_com_group')
    {
        map = '520+eighth+ave+10018';
        result = "<img align=right src='/nyc/images/community/tcg_208x110.gif'>"
            + "the board room of the "
            + x_link("Theatre Communications Group", "http://www.tcg.org/")
            + ", 520 8th Ave (betw 36th & 37th streets), 24th floor, "
            + "New York, NY 10018, (212)&nbsp;609&minus;5900."

            + "<script>cms_whitebox('-left -width:100%');</script>"
            + "<big><b>Please note that advance reservations are required, must "
            + "be received no later than 10:00am on the morning of the event, "
            + "and that you must produce a photo ID at the entrance.</b></big>"
            + "<script>cms_whitebox_end();</script>";
    }
    else if (venue == "theatre_for_a_new_audience")
    {
        map = '154+Christopher+Street,+New+York,+NY+10014';
        result = x_link("Theatre for a New Audience",
              "http://www.tfana.org")

            + ", 154 Christopher Street, #3D, "
            + "New York, NY 10014, (212)&nbsp;229&minus;2819.";
    }
    else if (venue == 'tir_na_nog')
    {
        map = '5+Penn+Plaza,+8th+Avenue+at+33rd+Street,+10001';
        result = x_link("T&iacute;r Na N&oacute;g",
            'http://www.tirnanognyc.com/homepage.php')
            + ", 5 Penn Plaza, 8th Avenue at 33rd Street. "
            + "New York, NY 10001, (212)&nbsp;630&minus;0249.";
    }
    else if (venue == "verlaine")
    {
        map = '110+Rivington+Street,+New+York,+NY+10002';
        result = x_link("Verlaine Bar",
              "http://www.worldsbestbars.com/city/"
            + "new-york/verlaine-new-york.htm")
            + ", 110 Rivington Street, "
            + "New York, NY 10002, (212)&nbsp;614&minus;2494.";
    }
    else if (venue == "viseltear")
    {
        map = '131+Essex+Street,+New+York,+NY+10002';
        result = "Jason Viseltear, Violinmaker, 131 Essex Street, "
            + "New York, NY 10002, (212)&nbsp;473&minus;1937.";
    }
    else
    {
        alert("Unknown venue -- '" + venue
            + "'. Please notify webmaster@" + CMS_DOMAIN + ".");
        return;
    }
    result += ' ';
//alert(result);
    document.write(result);
    if (map) document.write(cms_see_map(map));
}

/**********************************************************************/
/*                                                                    */
/*                 P R I V A T E   F U N C T I O N S                  */
/*                                                                    */
/**********************************************************************/

/**********************************************************************/
/*                               E N D                                */
/**********************************************************************/
