self.cam_cell_orig = string_to_xml('<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">\
  <xsl:output method="html"/>\
  <xsl:template match="/">\
    <xsl:apply-templates select="/list"/>\
  </xsl:template>\
  <xsl:template match="list">\
    <div id="{@id}" class="clear">\
      <xsl:for-each select="stream">\
        <xsl:call-template name="cell">          <xsl:with-param name="cellclass">\
            <xsl:if test="position() mod 4 = 0"> fourth </xsl:if>\
            <xsl:if test="position() mod 5 = 0"> fifth </xsl:if>\
            <xsl:if test="position() mod 6 = 0"> sixth </xsl:if>\
            <xsl:if test="position() mod 7 = 0"> seventh </xsl:if>\
            <xsl:if test="position() mod 8 = 0"> eighth </xsl:if>\
          </xsl:with-param>\
        </xsl:call-template>\
      </xsl:for-each>\
      <div class="clear"></div>\
    </div>\
  </xsl:template>\
  <xsl:template name="image">\
    <img src="{@photo_file}" class="thumb" />\
    <xsl:choose>\
      <xsl:when test="@online = 2">\
        <div class="cams_cell_img_nude"></div>\
      </xsl:when>\
      <xsl:when test="@online = 3">\
        <div class="cams_cell_img_voyeur"></div>\
      </xsl:when>\
    </xsl:choose>    <div class="extras">\
      <xsl:if test="@audio_enabled &gt; \'0\'"><div class="audio"><img src="http://graphics.streamray.com/images/common/speaker/12x12speaker.gif" /></div></xsl:if>\
      <xsl:if test="@hq_enabled = \'2\'"><div class="hd"><img src="http://graphics.streamray.com/images/common/hd.png" /></div></xsl:if>\
      <div class="clear"/>\
    </div>\
  </xsl:template>\
  <xsl:template name="cell">\
    <xsl:param name="cellclass"/>\
    <div class="cams_cell left {$cellclass}">\
      <xsl:if test="@award_date != \'\'">\
        <div class="w100 center mb2 fwb award_date">\
          <xsl:value-of select="@award_date"/>\
        </div>\
      </xsl:if>\
      <xsl:if test="@minutes != \'\'">\
        <xsl:variable name="chat_percentage">\
          <xsl:value-of select="round(100 - ((30 - @minutes) * 3.33))"/>\
        </xsl:variable>\
        <xsl:choose>\
          <xsl:when test="@minutes &gt; 30">\
            <div class="fs10px wsn tal">Vous avez gagné un Club Gratuit</div>\
              <div class="progress_bar">\
              <div class="chat_progress" style="width:100%;" ></div>\
            </div>\
          </xsl:when>\
          <xsl:otherwise>\
            <div class="fs10px tal"><xsl:value-of select="30 - @minutes"/> Minutes nécessaires</div>\
            <div class="progress_bar">\
              <div class="chat_progress" style="width:{$chat_percentage}%;" ></div>\
            </div>\
          </xsl:otherwise>\
        </xsl:choose>\
      </xsl:if>\
      <xsl:choose>\
        <xsl:when test="//@is_groupshow = \'1\' and //@user_balance &gt; 0">\
          <a href="javascript://" class="cams_cell_img posr"><xsl:attribute name="onclick">popGroupshow(this,\'<xsl:value-of select="@stream_name"/>\',\'add\',\'\',\'\',\'\',<xsl:value-of select="@online"/>)</xsl:attribute><xsl:call-template name="image"/></a>\
        </xsl:when>\
        <xsl:when test="//@is_groupshow = \'1\'">\
          <a href="javascript://" class="cams_cell_img posr"><xsl:attribute name="onclick">popGroupshow(this,\'<xsl:value-of select="@stream_name"/>\',\'order\',\'\',\'\',\'\',<xsl:value-of select="@online"/>)</xsl:attribute><xsl:call-template name="image"/></a>\
        </xsl:when>\
        <xsl:when test="( @online = 0 or @online = \'\' ) and //@anon = 1">\
          <a href="{//@register_link}" class="cams_cell_img posr"><xsl:call-template name="image"/></a>\
        </xsl:when>\
        <xsl:when test="@online = 2 and //@anon = 1">\
          <a href="{//@register_link}" class="cams_cell_img posr"><xsl:call-template name="image"/></a>\
        </xsl:when>\
        <xsl:when test="@online = 3 and //@anon = 1">\
          <a href="{//@register_link}" class="cams_cell_img posr"><xsl:call-template name="image"/></a>\
        </xsl:when>\
        <xsl:when test="//@anon = 1">\
          <a href="{@view_link}" class="cams_cell_img posr"><xsl:call-template name="image"/></a>\
        </xsl:when>\
        <xsl:otherwise>\
          <a href="{@view_link};action=view" class="cams_cell_img posr"><xsl:call-template name="image"/></a>\
        </xsl:otherwise>\
      </xsl:choose>\
      <div class="cams_cell_stream posr" style="display:block !important; margin-bottom:2px;">\
        <xsl:if test="@public_age &gt; 0">\
          <div class="country_con posa" style="right:0px;top:0px;">\
            <xsl:attribute name="onmouseover">this.className=\'country_cono posa\'</xsl:attribute>\
            <xsl:attribute name="onmouseout">this.className=\'country_con posa\'</xsl:attribute>\
            <div class="country {@country_code}"></div>\
            <span><xsl:value-of select="@public_age"/>/<xsl:value-of select="@gender"/></span><b><xsl:value-of select="@gender"/> / <xsl:value-of select="@public_country"/></b>\
            <div class="clear"/>\
          </div>\
        </xsl:if>\
        <a href="{@view_link}" class="dispb left">\
          <xsl:value-of select="@stream_name"/>\
        </a>\
        <div class="clear"/>\
      </div>\
      <div class="cams_cell_info">\
        <div class="onlinestatus">\
          <xsl:choose>\
            <xsl:when test="(@online = 0 or @online = \'\') and //@anon = 1">\
              <a href="{@view_link}">Voir la vidéo</a>\
            </xsl:when>\
            <xsl:when test="@online = 2 and //@anon = 1">\
              <img src="http://graphics.streamray.com/images/cams/12x12cam.gif"/><a href="{//@register_link}">Chat nu en direct</a>\
            </xsl:when>\
            <xsl:when test="@online = 3 and //@anon = 1">\
              <img src="http://graphics.streamray.com/images/cams/12x12cam.gif"/><a href="{//@register_link}">Spectacle privé</a>\
            </xsl:when>\
            <xsl:when test="@online = 0">\
              <a href="{//@recorded_link};stream={@stream_name}">Voir la vidéo</a>\
            </xsl:when>\
            <xsl:when test="@online = 1">\
              <img src="http://graphics.streamray.com/images/cams/12x12cam.gif"/><a href="{@view_link}">Chat en direct gratuit</a>\
            </xsl:when>\
            <xsl:when test="@online = 2">\
              <img src="http://graphics.streamray.com/images/cams/12x12cam.gif"/><a href="{@view_link}">Chat nu en direct</a>\
            </xsl:when>\
            <xsl:when test="@online = 3">\
              <img src="http://graphics.streamray.com/images/cams/12x12cam.gif"/><a href="{@view_link}">Vue voyeur</a>\
            </xsl:when>\
            <xsl:otherwise>\
              <a href="{//@recorded_link};stream={@stream_name}">Voir la vidéo</a>\
            </xsl:otherwise>\
          </xsl:choose>\
        </div>\
        <xsl:if test="@groupshow_remaining &gt; 0 and @groupshow_remaining != \'\'">\
          <div class="remaining">\
            <a href="javascript://">\
              <xsl:choose>\
                <xsl:when test="//@user_balance &gt; 0">\
                  <xsl:attribute name="onclick">popGroupshow(this,\'<xsl:value-of select="@stream_name"/>\',\'add\',\'\',\'\',\'\',<xsl:value-of select="@online"/>)</xsl:attribute>\
                </xsl:when>\
                <xsl:otherwise>\
                  <xsl:attribute name="onclick">popGroupshow(this,\'<xsl:value-of select="@stream_name"/>\',\'order\',\'\',\'\',\'\',<xsl:value-of select="@online"/>)</xsl:attribute>\
                </xsl:otherwise>\
              </xsl:choose>\
              Places disponibles : <xsl:value-of select="@groupshow_remaining"/>\
            </a>\
          </div>\
        </xsl:if>\
      </div>\
      <xsl:if test="//@is_favorite = \'1\' and @last_login_date">\
        <div class="favorite">\
          <xsl:value-of select="@last_login_date"/>\
        </div>\
      </xsl:if>\
      <xsl:if test="//@is_favorite = \'1\'">\
        <div class="favorite">\
          <a>\
            <xsl:attribute name="href">/p/cams/view.cgi?page=my_favorites;action=remove_favorite;stream=<xsl:value-of select="@stream_name"/>;stream_id=<xsl:value-of select="@stream_id"/></xsl:attribute>\
            Enlever des favoris\
          </a>\
        </div>\
      </xsl:if>\
      <xsl:choose>\
        <xsl:when test="@ppmi_adjective and //@admin = 1">\
          <div class="stats fs10px" style="background-color:#eee; color:#111;">\
            <div>Server: <xsl:value-of select="@server"/></div>\
            <div>\
              <xsl:value-of select="@ppmi_adjective"/>,              <xsl:choose>\
                <xsl:when test="@ppmi_type = \'free\'">\
                  <xsl:value-of select="substring(@ratio_free,0,8)"/>\
                </xsl:when>\
                <xsl:when test="@ppmi_type = \'nude\'">\
                  <xsl:value-of select="substring(@ratio_nude,0,8)"/>\
                </xsl:when>\
                <xsl:otherwise>\
                  <xsl:value-of select="substring(@ratio_combined,0,8)"/>\
                </xsl:otherwise>\
              </xsl:choose>\
            </div>\
            <div class="fs9px"><xsl:value-of select="@fms_viewers"/> Members / <xsl:value-of select="@mps_viewers"/> Guests</div>\
            <div class="fs9px"><xsl:value-of select="@percentage * 100"/>%, LF: <xsl:value-of select="@longevity_factor"/> / <xsl:value-of select="@base_longevity_factor"/></div>\
          </div>\
        </xsl:when>\
        <xsl:when test="@ppmi_type = \'combined\' or @ppmi_type = \'free\' or @ppmi_type = \'nude\'">\
          <div class="stats fs10px" style="background-color:#eee;">\
            <div>\
              <xsl:choose>\
                <xsl:when test="@ppmi_type = \'free\'">\
                  Votre classement gratuit : <xsl:value-of select="substring(@ratio_free,0,8)"/>\
                </xsl:when>\
                <xsl:when test="@ppmi_type = \'nude\'">\
                  Votre note de nu : <xsl:value-of select="substring(@ratio_nude,0,8)"/>\
                </xsl:when>\
                <xsl:otherwise>\
                  Combined: <xsl:value-of select="substring(@ratio_combined,0,8)"/>\
                </xsl:otherwise>\
              </xsl:choose>\
            </div>\
            <div class="fs9px"><xsl:value-of select="@fms_viewers"/> Members / <xsl:value-of select="@mps_viewers"/> Guests</div>\
          </div>\
        </xsl:when>\
      </xsl:choose>\
      <div style="font-size:10px;font-weight:normal;position:absolute;top:-12px;left:0px;">\
        <div style="display:none;">\
          <xsl:for-each select="@*">\
            @<xsl:value-of select="name(.)"/> = <xsl:value-of select="."/><br/>\
          </xsl:for-each>\
       </div>\
      </div>\
    </div>\
  </xsl:template>\
</xsl:stylesheet>')
