var index = 0;
var CLASS = index++;
var LOCATION = index++;
var DAY = index++;
var YEAR_START = index++;
var MONTH_START = index++;
var DAY_START = index++;
var YEAR_END = index++;
var MONTH_END = index++;
var DAY_END = index++;
var DURATION = index++;
var TIME_START = index++;
var TIME_END = index++;
var YEAR_OPEN = index++;
var MONTH_OPEN = index++;
var DAY_OPEN = index++;
var OPENHOUSE_TIME_START = index++;
var OPENHOUSE_TIME_END = index++;
var COST = index++;
var PAID_AT_DOOR = index++;
var NUM_CEUS = index++;
var MISC = index++;

var UNK = -2;
var YES = -1;
var NO = 0;
var WORKSHOP = 1;
var NONE = "";

var num_days = 7;
var days = new Array(num_days);
// Days
var d = 0;
var MON = d;
days[d++] = "Monday";
var TUES = d;
days[d++] = "Tuesday";
var WED = d;
days[d++] = "Wednesday";
var THURS = d;
days[d++] = "Thursday";
var FRI = d;
days[d++] = "Friday";
var SAT = d;
days[d++] = "Saturday";
var SUN = d;
days[d++] = "Sunday";

var num_months = 12;
var months = new Array(num_months);
// Months
var m = 1;
var JAN = m;
months[m++] = "January";
var FEB = m;
months[m++] = "February";
var MAR = m;
months[m++] = "March";
var APR = m;
months[m++] = "April";
var MAY = m;
months[m++] = "May";
var JUN = m;
months[m++] = "June";
var JUL = m;
months[m++] = "July";
var AUG = m;
months[m++] = "August";
var SEP = m;
months[m++] = "September";
var OCT = m;
months[m++] = "October";
var NOV = m;
months[m++] = "November";
var DEC = m;
months[m++] = "December";

var x = 0;
var num_classes = 10;
var TITLE = x++;
var SUMMARY = x++;
var classes = new Array(num_classes);
// Classes and Summaries
var s = 0;
var QHT = s;
classes[s++] = new Array("QiGong Healing Techniques", "This class is for Practitioners as well as for individuals with prior experience in QiGong. You will learn powerful QiGong techniques that you can incorporate into your own life and apply in your work with others. They include \"sweeping\" QiGong, balancing the dantians, increasing chakra energy, and collecting Qi. These techniques have many applications including full body clearing, moving stagnant Qi, aligning the Qi field, balancing the body, and integrating the body, mind and spirit. You will also learn \"Bone Marrow Cleansing QiGong,\" a form that will clear your body after you give others a session. <em>Please bring a pillow for your head and a snack for your belly.</em>");

var QHTR = s;
classes[s++] = new Array("QiGong Healing Techniques Review", "This review is for Individuals/Practitioners that have taken the QiGong Healing Techniques workshop. We will review the protocol and detail the sweeping technique. Please be prepared with your questions. You will receive a new outline of the workshop that should help support you. We will also review the QiGong form that will increase your Qi, as well as clear your body, thus bringing your body back into a balanced state.");

var MQ = s;
classes[s++] = new Array("Medical Longevity QiGong", "Rooted in Chinese tradition, QiGong is a series of gentle movements synchronized with breathing that promote energy movement through the body. It is the foundation for Tai Chi and provides gentle movements that improve health and well-being. When energy moves freely and openly, the body can operate in a healthy and balanced state.<BR><BR>Medical Longevity QiGong specifically focuses on improving physical health and wellness by eliminating blockages, rigidity, and disease through gentle physical movements and synchronized breathing. You will learn the 20 Yin-Yang Medical Longevity QiGong moves which improve health, balance Yin-Yang Qi, and are deeply satisfying movements to experience! This form easily accommodates a beginner with limited flexibility, as well as an advanced student.");

var TR = s;
classes[s++] = new Array("Taiji Ruler", "This unique and powerful QiGong system is called the Taiji Ruler. The Taiji ruler system consists of gentle rocking and circular hand movements designed to build Qi in the three Dan-Tian energy centers (lower abdominal, middle heart, and upper third eye). The system effectively amplifies and stimulates the Lao Gong acupuncture points in the palms of your hands. It can be used for self-healing, healing of others, or as a preparation for any type of bodywork. Your hands will feel warm and full of healing Qi after just a few minutes of practice. This system will enhance any QiGong/Tai Chi forms you are currently practicing and is a great introduction to the power of QiGong for those with no prior experience.<BR><BR>The goal of this QiGong form, the Taiji Ruler, is to increase the level of Qi, or life force, in the body. This set of QiGong moves must be done for 100 consecutive days. Participants may choose to use a wooden hand-crafted 10.5 inches long Taiji Ruler while performing smooth rocking movements to amplify the Qi flow and add depth to their experience. <em>However, the class can be taken effectively with or without the wooden ruler.</em>");

var QM = s;
classes[s++] = new Array("QiGong & Meditation", NONE);

var KYSQ = s;
classes[s++] = new Array("Kuan Yin Standing QiGong", "This graceful set of 10 movements is designed to open the heart, elevate the spirit, and honor the quality of compassion. The Kuan Yin Standing QiGong form is from the Sheng Zhen Wufi Yuan Gong System and is described as an approach to QiGong \"that deepens a student's connection with heaven and earth, strengthening the body, balancing the emotions, and opening the heart.\"");

var TJQ = s;
classes[s++] = new Array("Three Jewels QiGong", "This three-part QiGong series will focus on opening, balancing, and cultivating Qi. The class will start with a set of movements that open every joint in your body, releasing stuck energy (Qi) and relax all the organs. Then you will learn the \"Microcosmic Circulation Meditation\" which serves to open the main vessels in your body, bringing you balance and harmony. Last you will learn an energy cultivation form, \"Taiji Ruler,\" which consists of gentle rocking and circular hand movements designed to build Qi in the three Dan-Tian energy centers (lower abdominal, middle heart, and upper third eye).");

var QHTZB = s;
classes[s++] = new Array("QiGong Healing Techniques for Zero Balancers", "This class is for Zero Balancing Practitioners. You will learn powerful QiGong techniques that you can incorporate into your own life and apply in your work with others. They include \"sweeping\" QiGong, balancing the dantians, increasing chakra energy, and collecting Qi. These techniques have many applications including full body clearing, moving stagnant Qi, aligning the Qi field, balancing the body, and integrating the body, mind and spirit. You will also learn \"Bone Marrow Cleansing QiGong,\" a form that will clear your body after you give others a session.");

var TM = s;
classes[s++] = new Array("Taoist Meditation", "Taoist Meditation \"Microcosmic Circulation\" opens all of the energy channels in the body. The main channels are the Governing and Conception Channels known as \"energy essence paths\". This will brings your body, mind, and spirit into a balanced, integrated and harmonious state. The Microcosmic Circulation can be done while standing or sitting. There are detailed hand-outs for the Meditation.");

var QFG = s;
classes[s++] = new Array("QiGong for Golfers", "Golf is a complex game but what it comes down to is getting out of your head. When you have balance between your mind, your body, and your spirit amazing things happen. Qigong is about letting go of control (your left brain) yet allowing you to become balanced, intergraded and present in your actions. As a golfer my best shots are the ones when I let the club do the work; that means not trying. Once you allow yourself to be free of control, you can reach higher levels of accomplishment in everything you do, even Golf!");

var q = 0;
var num_locations = 5;
var NAME = q++;
var TARGET = q++;
var CONTACT = q++;
var PHONE = q++;
var EMAIL = q++;
var CITY = q++;
var WEBSITE = q++;
var MAP = q++;
var INFO = q++;
var locations = new Array(num_locations);
// Locations, Contacts, Contact Phone Numbers
var k = 0;
var MS = k;
locations[k++] = new Array("Moving in Stillness", "MS", "Karl", 4107720083, "karl@movinginstillness.com", "Columbia", NONE, NONE, NONE);
var BCW = k;
locations[k++] = new Array("Baltimore Centre for Wellness", "BCW", "Karl", 4107720083, "karl@movinginstillness.com", "Ellicott City", NONE, "bcwmap.html", NONE);
var SHH = k;
locations[k++] = new Array("Sacred Healing Hands Wellness Studio", "SHH", "Tracy Houchins", 4107202510, "tracyhouchinsreiki@gmail.com", "Marriottsville", "http://www.sacredhealinghands.com", "http://www.sacredhealinghands.com", "http://www.sacredhealinghands.com/reiki/events/");
var TAI = k;
locations[k++] = new Array("Tai Sophia Institute (TAI)", "TAI", "Mary Kay Kenney", 41088890486611, NONE, "Laurel", "http://tai.edu", "http://www.tai.edu/Directions.aspx", "http://www.tai.edu/MovementClasses.aspx");
var YCC = k;
locations[k++] = new Array("The Yoga Center of Columbia", "YCC", NONE, 4107204340, NONE, "Columbia", "http://www.columbiayoga.com", "http://www.columbiayoga.com/Directions.html", "http://www.columbiayoga.com/ClassSchedule.html");
//
var num_listings = 3;
// Listings
var listings = new Array(num_listings);
var i = 0;

listings[i++] = new Array(MQ, YCC, MON, 2010, SEP, 27, 2010, DEC, 13, 12, 1900, 2000, 2010, SEP, 20, 1900, 2000, 192, NO, NO, NONE);

//listings[i++] = new Array(QHT, BCW, SAT, 2010, JUL, 31, 2010, JUL, 31, WORKSHOP, 1100, 1530, NO, NO, NO, NO, NO, 100, YES, NO, "Act now! The class size is limited to 16 people.");

//listings[i++] = new Array(KYSQ, SHH, SAT, 2010, MAY, 15, 2010, MAY, 15, WORKSHOP, 1000, 1230, NO, NO, NO, NO, NO, 40, NO, NO, "Register and pay online <A HREF=\"http://www.sacredhealinghands.com/kuan-yin-standing-qigong-with-karl-ardo/\">here</A>.");

listings[i++] = new Array(MQ, TAI, WED, 2010, SEP, 29, 2010, DEC, 8, 10, 1800, 1900, 2010, SEP, 22, 1800, 1930, 175, NO, 10, "Save $5 with early registration on or before September 24. Class will not be held on November 24.");

listings[i++] = new Array(TJQ, TAI, WED, 2010, SEP, 29, 2010, DEC, 8, 10, 1900, 2000, 2010, SEP, 22, 1800, 1930, 175, NO, 10, "Save $5 with early registration on or before September 24. Class will not be held on November 24.");

// listings[i++] = new Array(TR, BCW, SAT, 2010, APR, 10, 2010, APR, 10, WORKSHOP, 1200, 1500, NO, NO, NO, NO, NO, 60, YES, NO, NONE);

// listings[i++] = new Array(QFG, YCC, SAT, 2010, FEB, 27, 2010, FEB, 27, WORKSHOP, 1400, 1600, NO, NO, NO, NO, NO, 40, NO, NO, "The flier and registration form can be found <A HREF=\"http://www.columbiayoga.com/pdf/QiGong_Golfers.pdf\">here</A>.");

// listings[i++] = new Array(MQ, SHH, SAT, 2008, SEP, 15, 2008, NOV, 3, 8, 930, 1030, 2008, SEP, 8, 930, 1030, UNK, NO, NO, NONE);

//listings[i++] = new Array(QHTZB, BCW, SAT, 2008, APR, 12, 2008, APR, 12, WORKSHOP, 1200, 1700, NO, NO, NO, NO, NO, 100, YES, NO, "Space is limited to 16 people.");

//listings[i++] = new Array(TM, YCC, SAT, 2009, MAY, 9, 2009, MAY, 9, WORKSHOP, 1400, 1600, NO, NO, NO, NO, NO, 40, NO, NO, "The flier and registration form can be downloaded <A HREF=\"http://www.columbiayoga.com/pdf/Taoist_May2009.pdf\">here</A>.");

//listings[i++] = new Array(QHTR, BCW, SAT, 2009, JUL, 18, 2009, JUL, 18, WORKSHOP, 930, 1130, NO, NO, NO, NO, NO, 20, YES, NO, "The class is limited to 16 people.");

//listings[i++] = new Array(KYSQ, BCW, SAT, 2009, JUL, 18, 2009, JUL, 18, WORKSHOP, 1230, 1700, NO, NO, NO, NO, NO, 60, YES, NO, "The class is limited to 16 people.");

//listings[i++] = new Array(QHTZB, TAI, SAT, 2008, MAY, 31, 2008, MAY, 31, WORKSHOP, 1200, 1700, NO, NO, NO, NO, NO, UNK, NO, NO, NONE);

function createFrontPageSchedule() {
   document.write("<H3><font color=\"#000088\">Ongoing, Drop-in Classes are held on:</font><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tuesday evenings from 7-8pm: <a href=\"schedule.html#BCW\">Medical QiGong classes</a> at the Baltimore Centre for Wellness<br />");

   if (listings.length > 0) {
     document.write("<br /><font color=\"#000088\">The Next Session's Classes begin on:</font><br />");
     for (var n = 0; n < listings.length; n++) {
       document.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
       document.write(months[listings[n][MONTH_START]]);
       document.write("&nbsp;")
       document.write(listings[n][DAY_START]);
       if (listings[n][DURATION] == WORKSHOP) {
         document.write("&nbsp;(workshop)");
       }
       document.write(": <a href=\"schedule.html#");
       document.write(locations[listings[n][LOCATION]][TARGET]);
       document.write("\">");
       document.write(classes[listings[n][CLASS]][TITLE]);
       if (listings[n][DURATION] == WORKSHOP) {
         document.write(" workshop");
       } else {
         document.write(" classes");
       }
       document.write("</a> at ");
       if (listings[n][LOCATION] == BCW || listings[n][LOCATION] == SHH || listings[n][LOCATION] == TAI) {
         document.write("the ");
       }
       document.write(locations[listings[n][LOCATION]][NAME]);
       document.write("<br />");
     }
   }

   document.write("<br />");
   return;
}


function createSchedule() {
   document.write("<P><H2>Click on a link below to view offerings by specific location:</H2><UL>");
   for (var n = 1; n < locations.length; n++) {
     document.write("<LI /><H3><a href=\"#");
     document.write(locations[n][TARGET]);
     document.write("\">");
     document.write(locations[n][NAME]);
     document.write("</a>");
     var new_class = NO;
     var new_workshop = NO;
     for (var i = 0; i < listings.length; i++) {
       if (n == listings[i][LOCATION]) {
         if (listings[i][DURATION] == WORKSHOP) {
           if (new_workshop == NO) {
             document.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*** New Workshop Available ***");
           }
           new_workshop = YES;
         } else {
           if (new_class == NO) {
             document.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*** New Class Available ***");
           }
           new_class = YES;
         }
       }
     }
     if (n == BCW) {
       document.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*** <B>Ongoing, Drop-in Class Available</B> ***");
     }
     document.write("</H3>");
   }
   document.write("</UL></P></td></tr></table></p>");
   document.write("<HR class=\"section\" />");

     document.write("<P class=\"aligned\"><table width=\"75%\" border=\"0\" cellspacing=\"5\">");

     for (var m = 1; m < locations.length; m++) {
       for (var j = 0; j < listings.length; j++) {
         if (m == listings[j][LOCATION]) {
           document.write("<tr><td class=\"aligned\"><a name=\"");
           document.write(locations[m][TARGET]);
           document.write("\"></a><img src=\"images/new_class.jpg\" alt=\"New Class Label\" /><br /><H2>");
           if (listings[j][DURATION] == WORKSHOP) {
             document.write("Offered ");
           } else {
             document.write("Begins ");
           }
           document.write(days[listings[j][DAY]]);
           document.write(", ");
           document.write(months[listings[j][MONTH_START]]);
           document.write("&nbsp;")
           document.write(listings[j][DAY_START]);
           document.write(", ");
           document.write(listings[j][YEAR_START]);
           document.write("</H2></td></tr><tr><td>");

           if (m == BCW || m == SHH || m == TAI) {
             document.write("The ");
           }

           if (locations[listings[j][LOCATION]][WEBSITE] != NONE) {
             document.write("<a href=\"");
             document.write(locations[listings[j][LOCATION]][WEBSITE]);
             document.write("\">");
             document.write(locations[m][NAME]);
             document.write("</a>");
           } else {
             document.write(locations[m][NAME]);
           }

           document.write(" and <b>Moving in Stillness</b> present ");
           if (listings[j][DURATION] == WORKSHOP) {
             document.write("a ");
           }
           document.write(classes[listings[j][CLASS]][TITLE]);

           if (listings[j][DURATION] == WORKSHOP) {
             document.write(" workshop on ");
             document.write(days[listings[j][DAY]]);
             document.write(", ");
             document.write(months[listings[j][MONTH_START]]);
             document.write("&nbsp;")
             document.write(listings[j][DAY_START]);
             document.write(", ");
             document.write(listings[j][YEAR_START]);
           } else {
             document.write(" classes every ");
             document.write(days[listings[j][DAY]]);
             if (listings[j][TIME_START]<1200) {
               document.write(" morning");
             } else if (listings[j][TIME_START]<1600 && listings[j][TIME_END]<1800) {
               document.write(" afternoon");
             } else {
               document.write(" evening");
             }
           }

           document.write(", from ");
           if (listings[j][TIME_START]==1200) {
             document.write("noon");
           } else if (listings[j][TIME_START]>=1300) {
             document.write(Math.floor((listings[j][TIME_START]-1200)/100));
             document.write(":");
             if (((listings[j][TIME_START]-1200)-(Math.floor((listings[j][TIME_START]-1200)/100)*100)) < 10) {
               document.write("0");
             }
             document.write((listings[j][TIME_START]-1200)-(Math.floor((listings[j][TIME_START]-1200)/100)*100));
           } else {
             document.write(Math.floor(listings[j][TIME_START]/100));
             document.write(":");
             if ((listings[j][TIME_START]-(Math.floor(listings[j][TIME_START]/100)*100)) < 10) {
               document.write("0");
             }
             document.write(listings[j][TIME_START]-(Math.floor(listings[j][TIME_START]/100)*100));
             if (listings[j][TIME_END]>=1200) {
               document.write("am");
             }
           }
           document.write("-");

           if (listings[j][TIME_END]==1200) {
             document.write("noon");
           } else if (listings[j][TIME_END]>=1300) {
             document.write(Math.floor((listings[j][TIME_END]-1200)/100));
             document.write(":");
             if (((listings[j][TIME_END]-1200)-(Math.floor((listings[j][TIME_END]-1200)/100)*100)) < 10) {
               document.write("0");
             }
             document.write((listings[j][TIME_END]-1200)-(Math.floor((listings[j][TIME_END]-1200)/100)*100));
             document.write("pm");
           } else {
             document.write(Math.floor(listings[j][TIME_END]/100));
             document.write(":");
             if ((listings[j][TIME_END]-(Math.floor(listings[j][TIME_END]/100)*100)) < 10) {
               document.write("0");
             }
             document.write(listings[j][TIME_END]-(Math.floor(listings[j][TIME_END]/100)*100));
             document.write("am");
           }

           if (listings[j][DURATION] != WORKSHOP) {
             document.write(" ongoing from ");
             document.write(months[listings[j][MONTH_START]]);
             document.write("&nbsp;")
             document.write(listings[j][DAY_START]);
             document.write(", ");
             document.write(listings[j][YEAR_START]);
             document.write(" through ");
             document.write(months[listings[j][MONTH_END]]);
             document.write("&nbsp;")
             document.write(listings[j][DAY_END]);
             document.write(", ");
             document.write(listings[j][YEAR_END]);
           }

           document.write(", at ");
           if (m == BCW || m == SHH || m == TAI) {
             document.write("the ");
           }
           document.write(locations[m][NAME]);
           document.write(" in ");
           document.write(locations[m][CITY]);
           document.write(" (<a href=\"");
           document.write(locations[m][MAP]);
           document.write("\">see a map and get directions</a>).")

           if (listings[j][YEAR_OPEN] != NO) {
             document.write("<H2>Attend the Open House on ");
             if (listings[j][MISC].substring(0,50) != "Note the day of the week change for the open house") {
               document.write(days[listings[j][DAY]]);
               document.write(", ");
             }
             document.write(months[listings[j][MONTH_OPEN]]);
             document.write("&nbsp;")
             document.write(listings[j][DAY_OPEN]);
             document.write(", ");
             document.write(listings[j][YEAR_OPEN]);
             document.write(", from ");
             if (listings[j][OPENHOUSE_TIME_START]==1200) {
               document.write("noon");
             } else if (listings[j][OPENHOUSE_TIME_START]>=1300) {
               document.write(Math.floor((listings[j][OPENHOUSE_TIME_START]-1200)/100));
               document.write(":");
               if (((listings[j][OPENHOUSE_TIME_START]-1200)-(Math.floor((listings[j][OPENHOUSE_TIME_START]-1200)/100)*100)) < 10) {
                 document.write("0");
               }
               document.write((listings[j][OPENHOUSE_TIME_START]-1200)-(Math.floor((listings[j][OPENHOUSE_TIME_START]-1200)/100)*100));
             } else {
               document.write(Math.floor(listings[j][OPENHOUSE_TIME_START]/100));
               document.write(":");
               if ((listings[j][OPENHOUSE_TIME_START]-(Math.floor(listings[j][OPENHOUSE_TIME_START]/100)*100)) < 10) {
                 document.write("0");
               }
               document.write(listings[j][OPENHOUSE_TIME_START]-(Math.floor(listings[j][OPENHOUSE_TIME_START]/100)*100));
               if (listings[j][OPENHOUSE_TIME_END]>=1200) {
                 document.write("am");
               }
             }
             document.write("-");
             if (listings[j][OPENHOUSE_TIME_END]==1200) {
               document.write("noon");
             } else if (listings[j][OPENHOUSE_TIME_END]>=1300) {
               document.write(Math.floor((listings[j][OPENHOUSE_TIME_END]-1200)/100));
               document.write(":");
               if (((listings[j][OPENHOUSE_TIME_END]-1200)-(Math.floor((listings[j][OPENHOUSE_TIME_END]-1200)/100)*100)) < 10) {
                 document.write("0");
               }
               document.write((listings[j][OPENHOUSE_TIME_END]-1200)-(Math.floor((listings[j][OPENHOUSE_TIME_END]-1200)/100)*100));
               document.write("pm");
             } else {
               document.write(Math.floor(listings[j][OPENHOUSE_TIME_END]/100));
               document.write(":");
               if ((listings[j][OPENHOUSE_TIME_END]-(Math.floor(listings[j][OPENHOUSE_TIME_END]/100)*100)) < 10) {
                 document.write("0");
               }
               document.write(listings[j][OPENHOUSE_TIME_END]-(Math.floor(listings[j][OPENHOUSE_TIME_END]/100)*100));
               document.write("am");
             }
             document.write(", for more information.</H2>");
           }

           if (listings[j][NUM_CEUS] != NO) {
             document.write("<H2>");
             document.write(listings[j][NUM_CEUS]);
             document.write(" CEUs are awarded to qualified persons upon completion of the class.</H2>");
           }

           if (listings[j][YEAR_OPEN] == NO && listings[j][NUM_CEUS] == NO) {
             document.write("<br /><br />");
           }

           document.write("The cost for the ");
           document.write(listings[j][DURATION]);
           if (listings[j][DURATION] == 1) {
             document.write("-day session ");
           } else {
             document.write("-week session ");
           }
           if (listings[j][COST] == UNK) {
             document.write("was not available at the time of this posting");
           } else {
             document.write("is $");
             document.write(listings[j][COST]);
             if (listings[j][PAID_AT_DOOR] == YES) {
               document.write(", paid at the door");
             }
           }
           document.write(". For questions concerning registration, please call ");
           if (locations[m][CONTACT] != NONE) {
             document.write(locations[m][CONTACT]);
           } else {
             if (m == BCW || m == SHH || m == TAI) {
               document.write("the ");
             }
             document.write(locations[m][NAME]);
           }

           if (locations[m][PHONE] != NONE) {
             document.write(" at ");

             var num_nums = 2;
             var numbers = new Array(num_nums);
             var ncount = 0;
             numbers[ncount++] = locations[m][PHONE];
             numbers[ncount++] = NO;

             if (numbers[0] != Math.floor(numbers[0])) {
               numbers[1] = numbers[0]*Math.pow(10,10) - Math.floor(numbers[0])*Math.pow(10,10);
               numbers[0] = Math.floor(numbers[0]);
             }

             for (var p = 0; p < num_nums; p++) {
               if (numbers[p] != NO) {
                 if (p != 0) {
                   document.write(" or ");
                 }
                 var ext = NO;
                 if (numbers[p] >= Math.pow(10,11)) {
                   var lengthOfExt = Math.floor(Math.log(Math.floor(numbers[p]/Math.pow(10,10)))/Math.LN10) + 1;
                   ext = numbers[p]-(Math.floor(numbers[p]/Math.pow(10,lengthOfExt))*Math.pow(10,lengthOfExt));
                   numbers[p] = Math.floor(numbers[p]/Math.pow(10,lengthOfExt));
                 }
                 document.write(Math.floor(numbers[p]/Math.pow(10,7)));
                 document.write(".");
                 var sansAreaCode = numbers[p]-(Math.floor(numbers[p]/Math.pow(10,7))*Math.pow(10,7));
                 if (Math.floor(sansAreaCode/Math.pow(10,4)) < 100) {
                   document.write("0");
                 }
                 if (Math.floor(sansAreaCode/Math.pow(10,4)) < 10) {
                   document.write("0");
                 }
                 document.write(Math.floor(sansAreaCode/Math.pow(10,4)));
                 document.write(".");
                 var lastFour = sansAreaCode-(Math.floor(sansAreaCode/Math.pow(10,4))*Math.pow(10,4));
                 if (lastFour < 1000) {
                   document.write("0");
                 }
                 if (lastFour < 100) {
                   document.write("0");
                 }
                 if (lastFour < 10) {
                   document.write("0");
                 }
                 document.write(lastFour);

                 if (ext != NO) {
                   document.write(" ext. ");
                   document.write(ext);
                 }
               }
             }
             if (locations[m][EMAIL] != NONE) {
               document.write(" or ");
             }
           }

           if (locations[m][EMAIL] != NONE) {
             document.write(" contact ");
             if (locations[m][CONTACT] != NONE) {
               document.write(locations[m][CONTACT]);
             } else {
               if (m == BCW || m == SHH || m == TAI) {
                 document.write("the ");
               }
               document.write(locations[m][NAME]);
             }
             document.write(" via email at ");
             document.write(locations[m][EMAIL]);
           }

           document.write(".");

           if (listings[j][MISC] != NONE) {
             document.write(" ");
             document.write(listings[j][MISC]);
           }

           if (classes[listings[j][CLASS]][SUMMARY] != NONE) {
             document.write("<br /><br />");
             document.write(classes[listings[j][CLASS]][SUMMARY]);
           }
           document.write("</td></tr><tr><td><HR class=\"subsection\" /><br /></td></tr>");
         }
       }
       if (m == BCW) {
         document.write("<tr>");
         document.write("<td><a name=\"");
         document.write(locations[m][TARGET]);
         document.write("\"></a>The Baltimore Centre for Wellness and <b>Moving in Stillness</b> present ongoing, drop-in Medical QiGong classes every Tuesday evening, from 7:00-8:00pm, at the Baltimore Centre for Wellness in Ellicott City (<a href=\"bcwmap.html\">see a map and get directions</a>).");
         document.write("<br /><br />The cost per class is $10.00, paid at the door. For questions, please call Karl at 410.772.0083.<br /><br />");
         document.write("You'll learn the 20 Yin-Yang Medical QiGong moves which improve health, balance Yin-Yang Qi, and are deeply satisfying movements to experience!");
         document.write("</td></tr><tr><td><HR class=\"subsection\" /><br /></td></tr>");
       }
     }

   return;
}
