<?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:.8em 0 0 -3em; _margin-left:0; list-style-type:none;">
            <img style="width:1.5em; height:1.5em; 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:.4em;">
                Listings
            </b>
            <ul style='list-style-type:none; margin-left: -2.5em; _margin-left:1.5em;'>
                <xsl:apply-templates select="location" />
            </ul>
        </li>        
    </xsl:template>
    
    <xsl:template match="community">
        <li style="margin:.8em 0 0 -3em; _margin-left:0; list-style-type:none;">
            <img style="width:1.5em; height:1.5em; 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:.4em;">
                Community Information
            </b>
            <ul style='list-style-type:none; margin-left:-2.5em; _margin-left:1.5em;'>
                <xsl:apply-templates select="city" />
            </ul>
        </li>
    </xsl:template>
    
    <xsl:template match="city">
        <li style="margin-top:.8em;">
            <img style="width:1.5em; height:1.5em; 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>
            <span style="font-size:8pt; padding-left:.4em;">
                <xsl:value-of select="@name" />
            </span>
            <ul style='list-style-type:none; margin-left: -2.5em; _margin-left:1.5em;'>
                <xsl:apply-templates select="location"/>
            </ul>
            <ul style="list-style-type:none; margin-left:-2.5em; _margin-left:1.5em;">
                <xsl:apply-templates select="category"/>
            </ul>
        </li>
    </xsl:template>
    
    <xsl:template match="category">
        <li style="margin-top:.8em;">
            <img style="width:1.5em; height:1.5em; 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>
            <span style="font-size:8pt; padding-left:.4em;">
                <xsl:value-of select="@type" />
            </span>
            <ul style="list-style-type:none; margin-left:-2.5em; _margin-left:1.5em;">
                <xsl:apply-templates select="subcategory"/>
            </ul>
        </li>
    </xsl:template>
    
    <xsl:template match="subcategory">
        <li style="margin-top:.8em;">
            <img style="width:1.5em; height:1.5em;" alt="" onclick="_changeExpansion(this)">
                <xsl:attribute name="src"><xsl:value-of select="@src"/>icons/zoom-plus.png</xsl:attribute>
            </img>
            <span style="font-size:8pt; padding-left:.4em;">
                <xsl:value-of select="@type" />
            </span>
            <ul style='list-style-type:none; margin-left: -2.5em; _margin-left:1.5em;'>
                <xsl:apply-templates select="location"/>
            </ul>
        </li>
    </xsl:template>
    
    <xsl:template match="location">
        <li style="margin-top:.6em;">
            <b style="padding-right:.6em; font-size:8pt; vertical-align:super;">
                <xsl:value-of select="@id"/>
            </b>
            <xsl:apply-templates select="icon" />
            <a style="margin-left:.6em; 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>
