var data = {};

data.alt = {};
data.alt.label = "Alta Loma";
data.alt.addressURL = "http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=1745+Vineyard+Avenue+Los+Angeles,+CA+90019&sll=34.057963,-118.261866&ie=UTF8&z=17&iwloc=addr";
data.alt.parkingURL = "http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=4640+Saturn+St,+Los+Angeles,+CA+90019&sll=33.980439,-118.440405&sspn=0.013932,0.027852&ie=UTF8&z=17"
data.alt.markerpt = new GLatLng(34.042507,-118.338806);
data.alt.parkingpt = new GLatLng(34.043361, -118.339272);
data.alt.marker = createMarker(data.alt);
data.alt.parkingmarker = createParkingMarker(data.alt);
data.alt.labelmarkerwidth = 100;
data.alt.labellat = 34.042507;
data.alt.labellong = -118.327806;
data.alt.labellatoffset = 0;
data.alt.labellongoffset = -.0055; 
data.alt.labelmarker = [];
for (var i = 0; i < 7; i++)
{
    data.alt.labelmarker.push(createLabelMarker(data.alt,i));
}
data.alt.longlabel = "Alta Loma Elementary School";
data.alt.address1 = "1745 Vineyard Avenue";  
data.alt.address2 = "Los Angeles, CA 90019";
data.alt.parking = "(Parking lot is at 4640 Saturn St.)";
data.alt.addressP = "4640 Saturn St.";
data.alt.e10 = "Take the La Brea Avenue exit (Exit 8). Keep left at the fork, and merge onto La Brea Ave. Turn right at Washington Blvd. Turn left at Vineyard Ave.  After three blocks on Vineyard, you will see the school on your left.  Turn left onto Saturn St. and look for the entrance to one of two school parking lots on the left.  If the parking lots are full by the time you arrive, please park on the street.  From the parking lots, follow the signs to the auditorium.";
data.alt.w10 = "Take the Crenshaw Blvd. exit and turn right to head north on Crenshaw. Turn left on Washington Blvd. Turn right on Vineyard Ave. After three blocks on Vineyard, you will see the school on your left.  Turn left onto Saturn St. and look for the entrance to one of two school parking lots on the left.  If the parking lots are full by the time you arrive, please park on the street.  From the parking lots, follow the signs to the auditorium.";
data.alt.infobub = createInfoBubHTML(data.alt);
data.alt.parkinginfobub = createParkingInfoBubHTML(data.alt);
for (var i = 0; i < 7; i++)
{
    GEvent.addListener(data.alt.labelmarker[i], "click", getClickFunc(data.alt));
}
GEvent.addListener(data.alt.marker, "click", getClickFunc(data.alt));
GEvent.addListener(data.alt.parkingmarker, "click", getClickFunc(data.alt,data.alt.parkinginfobub,data.alt.parkingmarker));

data.esp = {}
data.esp.label = "Esperanza";
data.esp.addressURL = "http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=680+Little+Street+Los+Angeles,+CA+90017&sll=33.980439,-118.440405&ie=UTF8&iwloc=addr";
data.esp.parkingURL = "http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=679+S.+Union+Ave.,90017&sll=34.057326,-118.264529&ie=UTF8&iwloc=addr";
data.esp.markerpt = new GLatLng(34.055112,-118.272599);
data.esp.marker = createMarker(data.esp);
data.esp.parkingpt = new GLatLng(34.054677, -118.270657);
data.esp.parkingmarker = createParkingMarker(data.esp);
data.esp.labellat = 34.051312;
data.esp.labellong = -118.272599;
data.esp.labellatoffset = .0019;
data.esp.labellongoffset = 0;

data.esp.labelmarkerwidth = 100;
data.esp.labelmarker = [];
for (var i = 0; i < 7; i++)
{
    data.esp.labelmarker.push(createLabelMarker(data.esp,i));
}
data.esp.longlabel = "Esperanza Elementary School";
data.esp.address1 = "680 Little Street";
data.esp.address2 = "Los Angeles, CA 90017";
data.esp.parking = "(Parking lot is at 679 S. Union Ave.)";
data.esp.n110 = "Take the 9th Street exit towards Downtown L.A. As you exit the freeway, get in the left lane, and take an immediate left onto Francisco Street (the first light). Turn left at the dead end on 8th Street (away from Downtown L.A.). Go west on 8th Street, until you get to Union Street. Turn right on Union Street for 1 1/2 blocks (past 7th Street but before Wilshire Blvd.). You will see Esperanza Elementary School to your left. Turn left into the parking lot halfway up the block (before you get to Wilshire Blvd.). The address for the parking lot is 679 S. Union Ave. The entrance to the auditorium is at the end of the parking lot.";
data.esp.s110 = "Take the Wilshire Blvd. exit and turn right on Wilshire away from Downtown L.A. Go west on Wilshire Blvd., passing Lucas Avenue, until you get to Union Street. Turn left on Union, and go halfway down the block to Ingraham. Turn right on Ingraham (between Wilshire and 7th), into the school parking lot (parking lot address is 679 S. Union Ave.). The entrance to the auditorium is at the end of the parking lot.";
data.esp.addressP = "679 S. Union Ave.";
data.esp.infobub = createInfoBubHTML(data.esp);
data.esp.parkinginfobub = createParkingInfoBubHTML(data.esp);
for (var i = 0; i < 7; i++)
{
    GEvent.addListener(data.esp.labelmarker[i], "click", getClickFunc(data.esp));
}
GEvent.addListener(data.esp.marker, "click", getClickFunc(data.esp));
GEvent.addListener(data.esp.parkingmarker, "click", getClickFunc(data.esp,data.esp.parkinginfobub,data.esp.parkingmarker));

data.gra = {}
data.gra.label = "Gratts";
data.gra.addressURL = "http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=309+S.+Lucas+Avenue,+Los+Angeles,+CA+90017&sll=34.047037,-118.157104&ie=UTF8&iwloc=addr"; 
data.gra.addressP = "1475 W. 4th Street";
data.gra.parkingURL = "http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=1475+W.+4th+Street,+90017&sll=34.055892,-118.286876&ie=UTF8&iwloc=addr";
data.gra.markerpt = new GLatLng(34.057955,-118.261847);
data.gra.marker = createMarker(data.gra);
data.gra.parkingpt = new GLatLng(34.057370508397064, -118.26315522193909);
data.gra.parkingmarker = createParkingMarker(data.gra);
data.gra.labelmarkerwidth = 60;
data.gra.labellat = 34.062255;
data.gra.labellong = -118.261847;
data.gra.labellatoffset = -.00213;
data.gra.labellongoffset = 0;

data.gra.labelmarker = [];
for (var i = 0; i < 7; i++)
{
    data.gra.labelmarker.push(createLabelMarker(data.gra,i));
}
data.gra.longlabel = "Gratts Elementary School";
data.gra.address1 = "309 S. Lucas Avenue"; 
data.gra.address2 = "Los Angeles, CA 90017";
data.gra.parking = "(Parking lot entrance is at 1475 W. 4th Street)";
data.gra.n110 = "Take the 3rd Street exit; head left at the fork in the ramp, away from Downtown L.A. Drive up the hill, passing Boylston and Bixel, till you get to Lucas Ave. At the intersection of 3rd and Lucas you'll see Gratts Elementary School to your left. Turn left on Lucas, and turn right on 4th Street. To your right you will see an entrance to the school playground. Park at the end of the playground (close to the entrance gate). Please drive slowly; there may be students in the playground. From the playground, walk towards the lunch benches into the auditorium.";
data.gra.s110 = "Take the 3rd Street exit; turn left off the exit to get to 3rd Street. When you reach the light at 3rd Street, turn right, away from Downtown L.A. Drive up the hill, passing Boylston and Bixel, till you get to Lucas Ave. Turn left on Lucas, and turn right on 4th Street. To your right you will see an entrance to the school playground. Park at the end of the playground (close to the entrance gate). Please drive slowly; there may be students in the playground. From the playground, walk towards the lunch benches into the auditorium."; 
data.gra.infobub = createInfoBubHTML(data.gra);
data.gra.parkinginfobub = createParkingInfoBubHTML(data.gra);
for (var i = 0; i < 7; i++)
{
    GEvent.addListener(data.gra.labelmarker[i], "click", getClickFunc(data.gra));
}
GEvent.addListener(data.gra.marker, "click", getClickFunc(data.gra));
GEvent.addListener(data.gra.parkingmarker, "click", getClickFunc(data.gra,data.gra.parkinginfobub,data.gra.parkingmarker));

data.los = {};
data.los.label = "Los Angeles";
data.los.addressURL = "http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=1211+S.+Hobart+Blvd.+Los+Angeles,+CA+90006&sll=34.056815,-118.284948&ie=UTF8&z=17&iwloc=addr";
data.los.markerpt = new GLatLng(34.048625,-118.305744);
data.los.marker = createMarker(data.los);
data.los.labelmarkerwidth = 120;
data.los.labellat = 34.048625;
data.los.labellong = -118.316744;
data.los.labellatoffset = 0;
data.los.labellongoffset = .0055; 

data.los.labelmarker = [];
for (var i = 0; i < 7; i++)
{
    data.los.labelmarker.push(createLabelMarker(data.los,i));
}
data.los.longlabel = "Los Angeles Elementary School";
data.los.address1 = "1211 S. Hobart Blvd.";
data.los.address2 = "Los Angeles, CA 90006";
data.los.all10 = "Take the Western Ave. exit and go north on Western Ave. Proceed two blocks past Pico Blvd. and turn right onto 12th St.  Proceed three blocks and turn right onto Hobart Blvd.  Take your first right into the parking lot of Los Angeles Elementary School.  From the parking lot, go through the gate towards the main entrance of the building. You will walk into a courtyard. When you are standing in the courtyard with your back to the parking lot, you will see the auditorium to your right.";
data.los.n110 = "Take the 110 Freeway North to the 10 West.  Follow the directions from the 10 Freeway (see above).";
data.los.s110 = "Take the 110 Freeway South to the 10 West.  Follow the directions from the 10 Freeway (see above).";
data.los.s101 = "Take the Western/Santa Monica Blvd. exit.  Turn left at Lexington Ave.  Turn right at N. Western Ave. and head south on Western Ave.  Turn left at Olympic Blvd.  Turn right at S. Hobart Blvd.  Proceed two blocks to 12th St.  Just past 12th St., take your first right into the parking lot of Los Angeles Elementary School.  From the parking lot, go through the gate towards the main entrance of the building.  You will walk into a courtyard.  When you are standing in the courtyard with your back to the parking lot, you will see the auditorium to your right.";
data.los.n101 = "Take the Vermont exit.  Turn left onto Vermont Ave and head south.  Turn right onto Olympic Blvd.  Turn left at S. Hobart Blvd.  Proceed two blocks to 12th St.  Just past 12th St., take your first right into the parking lot of Los Angeles Elementary School.  From the parking lot, go through the gate towards the main entrance of the building.  You will walk into a courtyard.  When you are standing in the courtyard with your back to the parking lot, you will see the auditorium to your right.";
data.los.infobub = createInfoBubHTML(data.los);
for (var i = 0; i < 7; i++)
{
    GEvent.addListener(data.los.labelmarker[i], "click", getClickFunc(data.los));
}
GEvent.addListener(data.los.marker, "click", getClickFunc(data.los));

data.mag = {};
data.mag.label = "Magnolia";
data.mag.addressURL = "http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=1626+Orchard+Avenue+Los+Angeles,+CA&sll=34.036346,-118.288231&ie=UTF8&z=17";
data.mag.parkingURL = "http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=1695++Magnolia+Ave.,90006&sll=33.980439,-118.440405&ie=UTF8&z=17&iwloc=addr";
data.mag.addressP = "1695 Magnolia Ave.";
data.mag.markerpt = new GLatLng(34.04398,-118.288532);
data.mag.marker = createMarker(data.mag);
data.mag.labelmarkerwidth = 90;
data.mag.labellat = 34.04398;
data.mag.labellong = -118.297532;

data.mag.parkingpt = new GLatLng(34.043295, -118.286412);
data.mag.parkingmarker = createParkingMarker(data.mag);
data.mag.labellatoffset = 0;
data.mag.labellongoffset = .0045; 
data.mag.labelmarker = [];
for (var i = 0; i < 7; i++)
{
    data.mag.labelmarker.push(createLabelMarker(data.mag,i));
}
data.mag.longlabel = "Magnolia Elementary School";
data.mag.address1 = "1626 Orchard Avenue";
data.mag.address2 = "Los Angeles, CA 90006";
data.mag.parking = "(Parking lot is at 1695 Magnolia Ave.)";
data.mag.all10 = "Take the Vermont Ave. exit and go north. Pass Washington Blvd. and turn right on Venice Blvd. At the intersection of Venice and Orchard you'll see Magnolia Elementary School to your right. Keep driving on Venice Blvd. one more block and then turn right on Magnolia Ave. Immediately to your right you will see the school playground.  Continue on Magnolia for approximately 500 feet, until you see the entrance to the school's parking structure on the right (parking lot address is 1695 S. Magnolia Ave.).  Please park in the parking structure and follow the stairs up to the auditorium.";
data.mag.n110 = "Take the Adams Blvd. exit and turn left. Turn right on Hoover St and then left on Washington Blvd. Go two blocks and turn right on Magnolia Ave. As you drive up Magnolia you will see Magnolia Elementary School to your left.   Approximately a quarter of a mile up Magnolia, you will see the entrance to the school's parking structure (parking lot address is 1695 S. Magnolia Ave.). Please park in the parking structure and follow the stairs up to the auditorium.";
data.mag.infobub = createInfoBubHTML(data.mag);
data.mag.parkinginfobub = createParkingInfoBubHTML(data.mag);
for (var i = 0; i < 7; i++)
{
    GEvent.addListener(data.mag.labelmarker[i], "click", getClickFunc(data.mag));
}
GEvent.addListener(data.mag.marker, "click", getClickFunc(data.mag));
GEvent.addListener(data.mag.parkingmarker, "click", getClickFunc(data.mag,data.mag.parkinginfobub,data.mag.parkingmarker));

data.pol = {};
data.pol.label = "Politi";
data.pol.addressURL = "http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=2481+W.+11th+St.+Los+Angeles,+CA+90006&sll=34.04398,-118.288511&sspn=0.006961,0.013926&ie=UTF8&ll=34.049948,-118.288389&spn=0.00696,0.013926&z=17&iwloc=addr";
data.pol.markerpt = new GLatLng(34.050788,-118.286944);
data.pol.marker = createMarker(data.pol);
data.pol.labelmarkerwidth = 50;
data.pol.labellat = 34.050788;
data.pol.labellong = -118.292444;
data.pol.labellatoffset = 0;
data.pol.labellongoffset = .00275; 
data.pol.labelmarker = [];
for (var i = 0; i < 7; i++)
{
    data.pol.labelmarker.push(createLabelMarker(data.pol,i));
}
data.pol.longlabel = "Politi Elementary School";
data.pol.address1 = "2481 W. 11th St.";
data.pol.address2 = "Los Angeles, CA 90006";
data.pol.all10 = "Take the Vermont Ave. exit and go north. Pass Pico Blvd. and turn right on West 11th St. At the intersection of 11th and Magnolia you'll see Leo Politi Elementary School to your left. After you pass the main entrance you will see the entrance to the parking lot. From the parking lot, go through the gate towards the main entrance of the building. You will walk through a hallway into a courtyard. Take a right and walk across the courtyard to enter the auditorium.";
data.pol.n110 = "Take the Adams Blvd. exit (before you reach Downtown L.A.) and turn left. Turn right on Vermont Ave and proceed past Pico Blvd. Turn right on West 11th. At the intersection of 11th and Magnolia you'll see Leo Politi Elementary School to your left. After you pass the main entrance you will see the entrance to the parking lot. From the parking lot, go through the gate towards the main entrance of the building. You will walk through a hallway into a courtyard. Take a right and walk across the courtyard to enter the auditorium.";
data.pol.s110 = "Take the 8th Street exit and turn right (away from Downtown Los Angeles). Turn left on Hoover St and take a right on Olympic Blvd. Continue for half a block and turn left on Arapahoe. Take a right on West 11th St. The parking lot to the elementary school is on your right.  From the parking lot, go through the gate towards the main entrance of the building. You will walk through a hallway into a courtyard. Take a right and walk across the courtyard to enter the auditorium.";
data.pol.all101 = "Take the Alvarado St. exit south to Olympic Blvd. Turn right on Olympic Blvd and proceed past Hoover Blvd. Continue for half a block after you pass Hoover Blvd. and turn left on Arapahoe. Take a right on West 11th St. and the parking lot to the elementary school is on your right. From the parking lot, go through the gate towards the main entrance of the building. You will walk through a hallway into a courtyard. Take a right and walk across the courtyard to enter the auditorium.";
data.pol.infobub = createInfoBubHTML(data.pol);

for (var i = 0; i < 7; i++)
{
    GEvent.addListener(data.pol.labelmarker[i], "click", getClickFunc(data.pol));
}
GEvent.addListener(data.pol.marker, "click", getClickFunc(data.pol));

data.whi = {};
data.whi.label = "White";
data.whi.addressURL = "http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=2401+Wilshire+Blvd.,+90057&sll=34.049948,-118.288389&sspn=0.00696,0.013926&ie=UTF8&z=17&iwloc=addr";
data.whi.addressP = "627 S. Carondelet St.";
data.whi.parkingURL = "http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=627+S.+Carondelet+St,+Los+Angeles,+CA+90057&sspn=0.013932,0.027852&ie=UTF8&z=17&iwloc=addr";
data.whi.markerpt = new GLatLng(34.06078, -118.280309);
data.whi.marker = createMarker(data.whi);
data.whi.parkingpt = new GLatLng(34.06088143126974, -118.28003168106079);
data.whi.parkingmarker = createParkingMarker(data.whi);
data.whi.labelmarkerwidth = 58;
data.whi.labellat = 34.064811;
data.whi.labellong = -118.279608;
data.whi.labellatoffset = -.00220;
data.whi.labellongoffset = 0; 
data.whi.labelmarker = [];
for (var i = 0; i < 7; i++)
{
    data.whi.labelmarker.push(createLabelMarker(data.whi,i));
}
data.whi.longlabel = "White Elementary School";
data.whi.address1 = "2401 Wilshire Blvd.";
data.whi.address2 = "Los Angeles, CA 90057";
data.whi.parking = "(Parking lot is located on 627 S. Carondelet St. between Wilshire Blvd. and 6th St.)";
data.whi.note = "You will be parking in a public parking structure across the street from the elementary school. Give the parking attendant your name; you will be instructed to park on the 2nd floor.";


data.whi.all10 = "Take the Hoover St. exit and follow the signs to go north on Hoover.  Just after 8th Street, veer right at the fork onto Rampart Blvd.  Continue two blocks on Rampart until you reach Wilshire Blvd.  Turn right on Wilshire Blvd.  Continue on Wilshire until you see Carondelet St.  Turn left on Carondelet.  You will see the elementary school to your right.  There is a parking structure three quarters of the way down the street on the left-hand side.  Enter the structure and tell the parking attendant your name and that you are from Reading to Kids.  Park on the 2nd floor.  Follow the signs to exit the structure and cross the street to enter White Elementary.  Follow the signs to the auditorium.";
data.whi.n110 = "Take the 9th Street exit towards Downtown L.A. As you exit the freeway, get in the left lane, and take an immediate left onto Francisco Street (the first light).  Turn left at the dead end on 8th Street (away from Downtown L.A.).  Go west on 8th Street until you get to Alvarado St. Turn right onto Alvarado. Continue on Alvarado until you reach Wilshire Blvd.  Turn left onto Wilshire Blvd. Continue on Wilshire (past MacArthur Park on your right) until you see Carondelet St.  Turn right on Carondelet.  You will see the elementary school to your right.   There is a parking structure three quarters of the way down the street on the left-hand side.  Enter the structure and tell the parking attendant your name and that you are from Reading to Kids.  Follow the signs to exit the structure and cross the street to enter White Elementary.  Follow the signs to the auditorium.";
data.whi.s110 = "Take the Wilshire Blvd. exit and turn right onto Wilshire (away from Downtown L.A.).  Go west on Wilshire Blvd. (past MacArthur park on your right) until you see Carondelet St.  Turn right on Carondelet.  You will see the elementary school to your right.  There is a parking structure three quarters of the way down the street on the left-hand side.  Enter the structure and tell the parking attendant your name and that you are from Reading to Kids.  Follow the signs to exit the structure and cross the street to enter White Elementary.  Follow the signs to the auditorium.";
data.whi.all101 = "Take the Alvarado St. exit and follow the signs to go south on Alvarado.  Continue on Alvarado until you see 6th St.  Turn right onto 6th.  Continue on 6th (past MacArthur Park on your left) until you see Carondelet St.  Turn left on Carondelet.  You will see the school near the end of the street to your left.  There is a parking structure a quarter of the way down the street on the right-hand side.  Enter the structure and tell the parking attendant your name and that you are from Reading to Kids.  Follow the signs to exit the structure and cross the street to enter White Elementary.  Follow the signs to the auditorium.";
data.whi.infobub = createInfoBubHTML(data.whi);
data.whi.parkinginfobub = createParkingInfoBubHTML(data.whi);

for (var i = 0; i < 7; i++)
{
    GEvent.addListener(data.whi.labelmarker[i], "click", getClickFunc(data.whi));
}
GEvent.addListener(data.whi.marker, "click", getClickFunc(data.whi));
GEvent.addListener(data.whi.parkingmarker, "click", getClickFunc(data.whi,data.whi.parkinginfobub,data.whi.parkingmarker));

function createParkingInfoBubHTML(sData) {
    var html = "";
    html += "<span><img src='../r2k/images/icon15.png' style='padding-right:3px; vertical-align:middle'/>";
    html += "<b>Parking for " + sData.label + "</b>";
    html += "</span><br><div class='subNorm' style='padding-left:12px'>";
    html += sData.addressP;
    html += "<br><a href='" + sData.parkingURL + "' target='_blank'>View larger map</a>, <a href='#dirs'>view directions</a>";
    html += "</div>";

    return html;
}

function createInfoBubHTML(sData) {
    var html = "";

    html += "<span><img src='../r2k/images/icon31.png' style='padding-right:3px; vertical-align:middle'/><b>";
    html += sData.label + " Elementary";
    html += "</b></span><div class='subNorm' style='padding-left:12px'>";
    html += sData.address1;
    html += "<br>";
    html += sData.address2;
    html += "<br>";
    html += "<a href='" + sData.addressURL + "' target='_blank'>View larger map</a>, <a href='#dirs'>view directions</a>";
    html += "</div>"; 

    if (sData.addressP) {
        html += "<span><img src='../r2k/images/icon15.png' style='padding-right:3px; vertical-align:middle'/>";
        html += "<b>Parking for " + sData.label + "</b>";
        html += "</span><br><div class='subNorm' style='padding-left:12px'>";
        html += sData.addressP;
        html += "<br><a href='" + sData.parkingURL + "' target='_blank'>View larger map</a>, <a href='#dirs'>view directions</a>";
        html += "</div>";
    }

    return html;
}


function getDirNode(label,dir) {
    node = document.createElement("P");
    node.className = 'norm';
    nodeTitle = document.createElement('SPAN');
    nodeTitle.className = 'normB';
    nodeTitle.appendChild(document.createTextNode(label));
    node.appendChild(nodeTitle);
    node.appendChild(document.createElement('BR'));
    node.appendChild(document.createTextNode(dir));
    return node;
}

function getNoteNode(note) {
    node = document.createElement("P");
    node.className = 'norm';
    notenode = document.createElement("span");
    notenode.style.color="red";
    notenode.appendChild(document.createTextNode("Note: "));
    node.appendChild(notenode);
    node.appendChild(document.createTextNode(note));
    return node;
}

function getClickFunc(sData, infobub, targetmarker) {
    var labelclickfunc = function() {
        if (infobub == undefined)
        {
            infobub = sData.infobub;
        }
        if (targetmarker == undefined)
        {
            targetmarker = sData.marker;
        }
        targetmarker.openInfoWindowHtml(infobub);

        var schoolinfo = document.createElement("P");
	    schoolinfo.className = 'norm';
        schoolinfo.setAttribute('id', 'schoolinfo');

        var directions = document.createElement("DIV");
        directions.setAttribute('id', 'directions');

        var anchorElement = document.createElement('A');
        anchorElement.name = "dirs";
        anchorElement.id = "dirs";

        var titleElement = document.createElement('SPAN');
	    titleElement.className = 'largeNormB';
        titleElement.appendChild(document.createTextNode(sData.longlabel + " Directions"));

        anchorElement.appendChild(titleElement);
        schoolinfo.appendChild(anchorElement)

        schoolinfo.appendChild(document.createElement('BR'));
        schoolinfo.appendChild(document.createTextNode(sData.address1));
        if (sData.parking)
        {
            var parkingspan = document.createElement('SPAN');
    	    parkingspan.className = 'subNorm';
            parkingspan.appendChild(document.createTextNode("  " + sData.parking));
            schoolinfo.appendChild(parkingspan);
        }

        schoolinfo.appendChild(document.createElement('BR'));
        schoolinfo.appendChild(document.createTextNode(sData.address2));

        if (sData.note)
        {
            schoolinfo.appendChild(getNoteNode(sData.note));
        }

        //directions
        if (sData.all10)
        {
            directions.appendChild(getDirNode("Directions from the 10 Freeway: ", sData.all10));
        }

        if (sData.e10)
        {
            directions.appendChild(getDirNode("Directions from the East 10 Freeway: ", sData.e10));
        }

        if (sData.w10)
        {
            directions.appendChild(getDirNode("Directions from the West 10 Freeway: ", sData.w10));
        }

        if (sData.n110)
        {
            directions.appendChild(getDirNode("Directions from the North 110 Freeway: ", sData.n110));
        }

        if (sData.s110)
        {
            directions.appendChild(getDirNode("Directions from the South 110 Freeway: ", sData.s110));
        }

        if (sData.all101)
        {
            directions.appendChild(getDirNode("Directions from the 101 Freeway: ", sData.all101));
        }

        if (sData.n101)
        {
            directions.appendChild(getDirNode("Directions from the North 101 Freeway: ", sData.n101));
        }

        if (sData.s101)
        {
            directions.appendChild(getDirNode("Directions from the South 101 Freeway: ", sData.s101));
        }


        //set the school info 
        var si = document.getElementById('schoolinfo');
        si.parentNode.replaceChild(schoolinfo,si);
        

        //set the directions
        var dirs = document.getElementById('directions');
        dirs.parentNode.replaceChild(directions,dirs);
        return false;
    }

    return labelclickfunc;
}

function createMarker(sData) {
    var icon = new GIcon();
    icon.image = "../../r2k/images/icon31.png";
    icon.shadow = "../../r2k/images/icon31s.png";
    icon.iconSize = new GSize(32, 32);
    icon.shadowSize = new GSize(59, 32);
    icon.iconAnchor = new GPoint(16, 16);
    icon.infoWindowAnchor = new GPoint(16, 16);

    var marker = new GMarker(sData.markerpt, {icon: icon});

    return marker;
}

function createParkingMarker(sData) {
    var icon = new GIcon();
    icon.image = "../../r2k/images/icon15.png";
    icon.shadow = "../../r2k/images/icon15s.png";
    icon.iconSize = new GSize(32, 32);
    icon.shadowSize = new GSize(59, 32);
    icon.iconAnchor = new GPoint(16, 16);
    icon.infoWindowAnchor = new GPoint(16, 16);

    var marker = new GMarker(sData.parkingpt, {icon: icon});

    return marker;
}

function createLabelMarker(sData,zoomLevel) {
    var iconOptions = {};
    iconOptions.height = 32;
    iconOptions.primaryColor = "#0000FF";
    iconOptions.labelSize = 0;
    iconOptions.labelColor = "#FFFFFF";
    iconOptions.shape = "roundrect";

    iconOptions.label = sData.label;
    iconOptions.width = sData.labelmarkerwidth;

    var icon = MapIconMaker.createFlatIcon(iconOptions);

    if (zoomLevel > 0)
    {
        var latoffset = sData.labellatoffset;
        var longoffset = sData.labellongoffset;

        //update the position and offset
        sData.labellatoffset = sData.labellatoffset / 2;
        sData.labellongoffset = sData.labellongoffset / 2;
    }
    else
    {
        var latoffset = 0;
        var longoffset = 0;
    }


    var plat = sData.labellat + latoffset;
    var plong = sData.labellong + longoffset;

    var pt = new GLatLng(plat,plong);

    var marker = new GMarker(pt, {icon: icon});

    sData.labellat = plat;
    sData.labellong = plong;

    return marker;
}

function load() {
    if (GBrowserIsCompatible()) {
        //set up some visual thingies
        var divmap = document.getElementById("map");
        divmap.style.width = "580px";
        divmap.style.height = "300px";
        var mapborder = document.getElementById("mapborder");
        mapborder.style.width = "586px";
        mapborder.style.border = "1px solid black";

        var map = new GMap2(document.getElementById("map"));

        map.setCenter(new GLatLng(34.051459,-118.299966), 13);
        map.addControl(new GSmallMapControl());

        var mgr = new MarkerManager(map, {maxZoom:19});
        
        //these should be added at every zoom level
        var markers = [];
        markers.push(data.alt.marker);
        markers.push(data.alt.parkingmarker);
        markers.push(data.esp.marker);
        markers.push(data.esp.parkingmarker);
        markers.push(data.gra.marker);
        markers.push(data.gra.parkingmarker);
        //markers.push(data.hoo.marker);
        //markers.push(data.hoo.parkingmarker);
        markers.push(data.los.marker);
        markers.push(data.mag.marker);
        markers.push(data.mag.parkingmarker);
        markers.push(data.pol.marker);
        markers.push(data.whi.marker);
        markers.push(data.whi.parkingmarker);
        mgr.addMarkers(markers,1);

        //these need to change at every zoom level
        for (var i = 0; i < 7; i++)
        {
            var labels = [];
            labels.push(data.alt.labelmarker[i]);
            labels.push(data.esp.labelmarker[i]);
            labels.push(data.gra.labelmarker[i]);
            //labels.push(data.hoo.labelmarker[i]);
            labels.push(data.los.labelmarker[i]);
            labels.push(data.mag.labelmarker[i]);
            labels.push(data.pol.labelmarker[i]);
            labels.push(data.whi.labelmarker[i]);
            mgr.addMarkers(labels,13+i,13+i);
        }


        mgr.refresh();

    }
}
