<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    
    <xsl:template match="overlay">
        <ul style="width:75%; _margin-left:1.5em;">
            <xsl:apply-templates select="listing" />
            <xsl:apply-templates select="community" />
        </ul>
    </xsl:template>

    <xsl:template match="listing">
        <li style="margin:8px 0 0 -30px; _margin-left:0; list-style-type:none;">
            <img style="width:15px; height:15px; vertical-align:bottom;" alt="" onclick="_changeExpansion(this)">
                <xsl:attribute name="src"><xsl:value-of select="@src"/>map4_files/icons/zoom-plus.png</xsl:attribute>
            </img>
            <b style="font-size:8pt; padding-left:4px;">
                Listings
            </b>
            <ul style='list-style-type:none; margin-left: -25px; _margin-left:1.5em;'>
                <xsl:apply-templates select="location" />
            </ul>
        </li>        
    </xsl:template>
    
    <xsl:template match="community">
        <li style="margin:8px 0 0 -30px; _margin-left:0; list-style-type:none;">
            <img style="width:15px; height:15px; vertical-align:bottom;" alt="" onclick="_changeExpansion(this)">
                <xsl:attribute name="src"><xsl:value-of select="@src"/>map4_files/icons/zoom-plus.png</xsl:attribute>
            </img>
            <b style="font-size:8pt; padding-left:4px;">
                Community Information
            </b>
            <ul style='list-style-type:none; margin-left:-25px; _margin-left:1.5em;'>
                <xsl:apply-templates select="location" />
            </ul>
        </li>
    </xsl:template>
    
    <xsl:template match="location">
        <li style="margin-top:6px;">
            <b style="padding-right:6px; font-size:8pt; vertical-align:super;">
                <xsl:value-of select="@id"/>
            </b>
            <xsl:apply-templates select="icon" />
            <a style="margin-left:6px; vertical-align:super;">
                <xsl:attribute name="href">javascript:showLocationInfo('<xsl:value-of select="@id"/>')</xsl:attribute>                    
                <xsl:value-of select="./info/title"/>
            </a>
        </li>
    </xsl:template>
    
    <xsl:template match="icon">
        <img style="width:10px; height:17px" alt="">
            <xsl:attribute name="src"><xsl:value-of select="substring-before(@src, '_')"/>.png</xsl:attribute>
        </img>
    </xsl:template>
    
</xsl:stylesheet>
