self.info_icon_xslt_beta_new = string_to_xml('<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">\
  <xsl:output method="html"/>\
  <xsl:template match="/response">\
    <div id="memberinfo" onmouseout="hide_info();" onmouseover="self.show_info=true;return false;">\
      <xsl:attribute name="style">left:<xsl:value-of select="@x"/>px;top:<xsl:value-of select="@y"/>px;</xsl:attribute>\
	  <xsl:attribute name="class"><xsl:value-of select="@c"/></xsl:attribute>\
      <xsl:call-template name="pointer"/>\
          <div class="iicon_header">\
                <h2>\
                  <div class="left">\
                    <xsl:if test="//pwsid != \'\'">\
                        <span class="fsb">\
                            <a>\
                              <xsl:attribute name="href"><xsl:call-template name="link"><xsl:with-param name="origin" select="view_more"/></xsl:call-template></xsl:attribute>\
                              <xsl:value-of select="data/handle"/>\
                            </a>\
                        </span>\
                        <span class="pl10">\
                          <xsl:value-of select="data/features/age"/>/<xsl:call-template name="sex_id_type">\
                            <xsl:with-param name="sex" select="data/gender"/>\
                          </xsl:call-template>\
                        </span>\
                    </xsl:if>\
                  </div>\
                  <div class="ibox_close" onclick="document.body.removeChild(document.getElementById(\'memberinfo\'));self.current=[];">\
                    <span class="iicon_close"><img src="http://graphics.pop6.com/images/ffadult/spacer.gif" alt="Close" border="0"/></span>\
                  </div>\
                  <div class="clear"/>\
                </h2>\
          </div>\
          <div class="iicon_body"  style="position:relative;z-index:2;" onmouseover="self.show_info=true;">\
                <xsl:choose>\
                  <xsl:when test="//pwsid != \'\'">\
                    <div class="iicon_user-info">\
                        <xsl:call-template name="location">\
                            <xsl:with-param name="p_ci"   select="//geo/city" />\
                            <xsl:with-param name="p_st"   select="//geo/state" />\
                            <xsl:with-param name="p_sa"   select="//geo/state_abbr" />\
                            <xsl:with-param name="p_co"   select="//geo/country" />\
                            <xsl:with-param name="p_co_e" select="//geo/viewee_c" />\
                            <xsl:with-param name="v_co"   select="//geo/viewer_c" />\
                        </xsl:call-template>                        <xsl:variable name="u">\
                            <xsl:call-template name="distance">\
                                <xsl:with-param name="unit" select="//unit" />\
                                <xsl:with-param name="dist" select="//distance" />\
                            </xsl:call-template>\
                        </xsl:variable> (<xsl:value-of select="$u"/>)\
                    </div>\
                    <div class="iicon_user-info">\
                      <xsl:if test="//online_now = 1">\
                          <span class="iicon_green fwb">Online Now</span>\
                      </xsl:if>\
                    </div>\
                    <xsl:if test="count(data/photos/photo) &gt; 0">\
                          <div class="clear ibox_photos" onmouseover="self.show_info=true;">\
                            <span class="fwb pr3">Photos:</span>\
                            <a>\
                              <xsl:attribute name="href"><xsl:value-of select="//@manage_photos_url" /><![CDATA[&mid=]]><xsl:value-of select="data/pwsid"/></xsl:attribute>\
                              <xsl:value-of select="count(data/photos/photo)"/>\
                            </a>\
                          </div>\
                    </xsl:if>\
                    <div class="ibox_img_wraper">\
                      <xsl:for-each select="data/photos/photo[position() &lt; 4]">\
                        <div class="left ibox_mem_photos">\
                          <a>\
                            <xsl:choose>\
                                <xsl:when test="//@memberlevel &gt; 100">\
                                   <xsl:attribute name="href">\
                                     <xsl:value-of select="//@manage_photos" /><![CDATA[;photoid=]]><xsl:value-of select="photoid"/><![CDATA[;mid=]]><xsl:value-of select="//data/pwsid"/>\
                                   </xsl:attribute>\
                                </xsl:when>\
                                <xsl:otherwise><xsl:attribute name="href"><xsl:value-of select="//@orderurl"/>;p_pwsid=<xsl:value-of select="//data/pwsid"/></xsl:attribute></xsl:otherwise>\
                            </xsl:choose>\
                            <xsl:choose>\
                              <xsl:when test="//@filter = 1 and rating &gt; 20"><div class="w85 h85 gender_{//data/gender}"/></xsl:when>\
                              <xsl:otherwise><img src="{url}"/></xsl:otherwise>\
                            </xsl:choose>\
                          </a>\
                        </div>\
                      </xsl:for-each>\
                      <div class="clear"/>\
                    </div>\
                    <div>\
                    <xsl:if test="count(data/photos/photo) &gt; 0">\
                        <xsl:if test="//verified_photo = 2 or //verified_photo = 3 or //verified_photo = 4">\
                          <span class="iicon_green">Photo verified</span>\
                          	<xsl:if test="//verify = 2"> | </xsl:if>\
                        </xsl:if>\
                    </xsl:if>\
                    <xsl:if test="//verify = 2">\
                        <span class="iicon_green"><![CDATA[ID confirmed]]></span>\
                    </xsl:if>\
                    </div>\
                    <xsl:if test="count(data/videos/video) &gt; 0">\
                          <div class="clear ibox_videos">\
                            <span class="fwb pr3 pt3">\
                              Videos:\
                              <a>\
                                <xsl:attribute name="href"><xsl:value-of select="//@video_manager_url" /><![CDATA[&stream_id=]]><xsl:value-of select="data/pwsid"/><![CDATA[&mid=]]><xsl:value-of select="data/pwsid"/></xsl:attribute>\
                                <xsl:value-of select="count(data/videos/video)"/>\
                              </a>\
                            </span>\
                          </div>\
                    </xsl:if>\
                    <div class="ibox_img_wraper" style="height:1%;" onmouseover="self.show_info=true;">\
                      <xsl:for-each select="data/videos/video">\
                        <xsl:if test="position() &lt; 4">\
                          <div class="left ibox_mem_videos">\
                            <a>\
                              <xsl:attribute name="href"><xsl:value-of select="watch_link"/></xsl:attribute>\
                              <xsl:choose>\
                                <xsl:when test="//@filter = 1 and rating &gt; 20"><div class="w85 h62 gender_{//data/gender}"/></xsl:when>\
                                <xsl:otherwise><img src="{movie_thumb}" onmouseover="this.src=\'{movie_thumb}\'.replace(/\.gif|\.jpg/,\'_a.gif\')" onmouseout="this.src=\'{movie_thumb}\'"/></xsl:otherwise>\
                              </xsl:choose>\
                            </a>\
                          </div>\
                        </xsl:if>\
                      </xsl:for-each>\
                    </div>\
                    <div class="clear"/>\
                    <xsl:if test="@memberlevel &lt;= 100">\
                      <div class="i_box_upgrade_now_wrapper" onmouseover="self.show_info=true;">\
                            <div class="pb10">\
                                <a class="tdn">\
                                    <xsl:attribute name="href"><xsl:call-template name="link"><xsl:with-param name="to" select="\'upgrade\'"/></xsl:call-template></xsl:attribute>\
                                    <div class="std_upgrade_btn"><![CDATA[Upgrade Now!]]></div>\
                                </a>\
                            </div>\
                            <div class="i_box_upgrade_now_text tal">\
                              <xsl:choose>\
                                <xsl:when test="data/gender = 1"><xsl:call-template name="std_member_messages"><xsl:with-param name="GENDER" select="1"/></xsl:call-template></xsl:when>\
                                <xsl:when test="data/gender = 2"><xsl:call-template name="std_member_messages"><xsl:with-param name="GENDER" select="2"/></xsl:call-template></xsl:when>\
                                <xsl:when test="data/gender = 3"><xsl:call-template name="std_member_messages"><xsl:with-param name="GENDER" select="3"/></xsl:call-template></xsl:when>\
                                <xsl:when test="data/gender = 4"><xsl:call-template name="std_member_messages"><xsl:with-param name="GENDER" select="3"/></xsl:call-template></xsl:when>\
                                <xsl:when test="data/gender = 5"><xsl:call-template name="std_member_messages"><xsl:with-param name="GENDER" select="3"/></xsl:call-template></xsl:when>\
                                <xsl:when test="data/gender = 6"><xsl:call-template name="std_member_messages"><xsl:with-param name="GENDER" select="3"/></xsl:call-template></xsl:when>\
                                <xsl:when test="data/gender = 7"><xsl:call-template name="std_member_messages"><xsl:with-param name="GENDER" select="3"/></xsl:call-template></xsl:when>\
                                <xsl:otherwise><xsl:call-template name="std_member_messages"><xsl:with-param name="GENDER" select="3"/></xsl:call-template></xsl:otherwise>\
                              </xsl:choose>\
                            </div>\
                      </div>\
                    </xsl:if>\
                    <div class="clearfloat"/>\
                    <xsl:if test="count(data/photos/photo) &lt; 1">\
                        <xsl:if test="count(data/videos/video) &lt; 1">\
                            <div class="iicon_subhead">Basic info:</div>\
                                                            <div class="i_box_user_info clear" onmouseover="self.show_info=true;">\
                                  <div class="i_box_cat">Orientation:</div>\
                                  <div class="left">\
                                    <xsl:choose>\
                                      <xsl:when test="data/orientation = 1">Straight</xsl:when>\
                                      <xsl:when test="data/orientation = 2">Bisexual</xsl:when>\
                                      <xsl:when test="data/orientation = 3">Bi-curious</xsl:when>\
                                      <xsl:when test="data/orientation = 4">Gay/Lesbian</xsl:when>\
                                      <xsl:when test="data/orientation = 17">Straight</xsl:when>\
                                      <xsl:when test="data/orientation = 18">Bisexual</xsl:when>\
                                      <xsl:when test="data/orientation = 19">Bi-curious</xsl:when>\
                                      <xsl:when test="data/orientation = 20">Gay/Lesbian</xsl:when>                                      <xsl:otherwise>Prefer not to say</xsl:otherwise>\
                                    </xsl:choose>\
                                  </div>\
                                </div>\
                                                        <div class="i_box_user_info clear" onmouseover="self.show_info=true;">\
                              <div class="i_box_cat">Status:</div>\
                              <div class="left">\
                                <xsl:choose>\
                                  <xsl:when test="data/status = 1">Single</xsl:when>\
                                  <xsl:when test="data/status = 2">Married</xsl:when>\
                                  <xsl:when test="data/status = 3">Divorced</xsl:when>\
                                  <xsl:when test="data/status = 4">Separated</xsl:when>\
                                  <xsl:when test="data/status = 5">Attached</xsl:when>\
                                  <xsl:when test="data/status = 6">Widowed</xsl:when>\
                                  <xsl:otherwise>Prefer not to say</xsl:otherwise>\
                                </xsl:choose>\
                              </div>\
                            </div>\
                            <div class="i_box_user_info clear" onmouseover="self.show_info=true;">\
                              <div class="i_box_cat">Eye Color:</div>\
                              <div class="left">\
                                <xsl:choose>\
                                  <xsl:when test="data/features/eyecolor = 1">Black eyes</xsl:when>\
                                  <xsl:when test="data/features/eyecolor = 2">Brown eyes</xsl:when>\
                                  <xsl:when test="data/features/eyecolor = 3">Blue eyes</xsl:when>\
                                  <xsl:when test="data/features/eyecolor = 4">Hazel eyes</xsl:when>\
                                  <xsl:when test="data/features/eyecolor = 5">Green eyes</xsl:when>\
                                  <xsl:when test="data/features/eyecolor = 6">Gray eyes</xsl:when>\
                                  <xsl:when test="data/features/eyecolor = 7">Other eyes color</xsl:when>\
                                  <xsl:when test="data/features/eyecolor = 8">Inconsistent/Variable eye color</xsl:when>\
                                  <xsl:otherwise>Prefer not to say</xsl:otherwise>\
                                </xsl:choose>\
                              </div>\
                            </div>\
                            <div class="i_box_user_info clear" onmouseover="self.show_info=true;">\
                              <div class="i_box_cat">Hair Color:</div>\
                              <div class="left">\
                                <xsl:choose>\
                                  <xsl:when test="data/features/haircolor = 1">Black Hair</xsl:when>\
                                  <xsl:when test="data/features/haircolor = 2">Brown HairBlonde Hair</xsl:when>\
                                  <xsl:when test="data/features/haircolor = 3">Blonde Hair</xsl:when>\
                                  <xsl:when test="data/features/haircolor = 4">Red Hair</xsl:when>\
                                  <xsl:when test="data/features/haircolor = 5">White Hair</xsl:when>\
                                  <xsl:when test="data/features/haircolor = 6">Gray Hair</xsl:when>\
                                  <xsl:when test="data/features/haircolor = 7">Hair?  What Hair?p</xsl:when>\
                                  <xsl:when test="data/features/haircolor = 8">Platinum Blonde Hair</xsl:when>\
                                  <xsl:when test="data/features/haircolor = 9">Salt and Pepper Hair</xsl:when>\
                                  <xsl:when test="data/features/haircolor = 10">Silver Hair</xsl:when>\
                                  <xsl:when test="data/features/haircolor = 11">Other Hair Color</xsl:when>\
                                  <xsl:otherwise>Prefer not to say</xsl:otherwise>\
                                </xsl:choose>\
                              </div>\
                            </div>\
                            <div class="i_box_user_info clear" onmouseover="self.show_info=true;">\
                              <div class="i_box_cat">Speaks:</div>\
                              <div class="left" style="width:150px;"><xsl:value-of select="data/features/langspoken"/></div>\
                            </div>\
                        </xsl:if>\
                    </xsl:if>\
                    <div class="clearfloat"/>\
                    <div class="iicon_subhead">Interested in:</div>\
                    <div class="iicon_user-info">\
                    	<xsl:value-of select="data/features/lookingfor"/>\
                    </div>\
                    <xsl:if test="data/act_feed_status !=\'\'">\
                        <div class="iicon_subhead">Status:</div>\
                        <div class="iicon_user-info">\
                          <xsl:call-template name="stripapos"><xsl:with-param name="string" select="data/act_feed_status"/></xsl:call-template>\
                        </div>\
                    </xsl:if>\
                    <div class="iicon_subhead">Profile:</div>\
                    <div class="iicon_user-info">\
                    <div class="fwb pb5"><em><xsl:call-template name="stripapos"><xsl:with-param name="string" select="data/title"/></xsl:call-template></em></div>\
                      <xsl:choose>\
                        <xsl:when test="string-length(data/profile) &lt; 125">"<xsl:call-template name="stripapos"><xsl:with-param name="string" select="data/profile"/></xsl:call-template>"</xsl:when>\
                        <xsl:otherwise>\
                          <xsl:call-template name="stripapos"><xsl:with-param name="string" select="substring(data/profile,1,125)"/></xsl:call-template>...\
                          <a>\
                            <xsl:attribute name="href"><xsl:call-template name="link"><xsl:with-param name="origin" select="view_more"/></xsl:call-template></xsl:attribute>\
                            more\
                          </a>\
                        </xsl:otherwise>\
                      </xsl:choose>\
                    </div>\
                    <div class="clear"/>\
                    <xsl:if test="//@memberlevel &gt;= 200">                        <div class="activity_button_wrapper" onmouseover="self.show_info=true;">\
                          <div class="activitybutton left">\
                              <div>\
                              <xsl:attribute name="onclick">store_action({\'pwsid\':\'<xsl:value-of select="data/pwsid"/>\',\'type\':\'flirt\'});FlirtManager.doFlirt(0,\'flirt\',\'<xsl:value-of select="data/pwsid"/>\',\'<xsl:value-of select="data/handle"/>\',\'<xsl:value-of select="data/level"/>\');return false;</xsl:attribute>\
                                      <xsl:attribute name="class">\
                                        <xsl:choose>\
                                            <xsl:when test="data/is_flirted = 1">i_box_sprite flirt_int_disabled</xsl:when>\
                                            <xsl:otherwise>i_box_sprite flirt_int</xsl:otherwise>\
                                        </xsl:choose>\
                                      </xsl:attribute>\
                                  <a href="javascript://">\
                                      <xsl:attribute name="alt">\
                                        <xsl:choose>\
                                            <xsl:when test="data/is_flirted = 1">\
                                              Flirted\
                                            </xsl:when>\
                                            <xsl:otherwise>\
                                              Flirt\
                                            </xsl:otherwise>\
                                        </xsl:choose>\
                                      </xsl:attribute>\
                                      <span class="iicon_spite_text_bg">\
                                      <xsl:choose>\
                                          <xsl:when test="data/is_flirted = 1">\
                                            Flirted\
                                          </xsl:when>\
                                          <xsl:otherwise>\
                                            Flirt\
                                          </xsl:otherwise>\
                                      </xsl:choose>\
                                      </span>\
                                  </a>\
                              </div>\
                          </div>\
                          <div class="activitybutton left">\
                            <a>\
                            <xsl:attribute name="class">\
                                  <xsl:choose>\
                                      <xsl:when test="data/is_invited = 1">i_box_sprite left invite_int_disabled</xsl:when>\
                                      <xsl:otherwise>i_box_sprite left invite_int</xsl:otherwise>\
                                  </xsl:choose>\
                            </xsl:attribute>\
                              <xsl:attribute name="href"><![CDATA[javascript://]]></xsl:attribute>\
                              <xsl:attribute name="onclick">store_action({\'pwsid\':\'<xsl:value-of select="data/pwsid"/>\',\'type\':\'invite_f\'});<![CDATA[window.open(\'../../p/circle/people.cgi?width=410&mid=]]><xsl:value-of select="data/pwsid"/><![CDATA[&action=invite_more&to_handle=]]><xsl:value-of select="data/handle"/><![CDATA[&brief=1&auto_invite=0\', \'invite\',\'resizable=yes,scrollbars=yes,height=520,width=430,false\');]]><![CDATA[this.setAttribute(\'alt\', \'Invite sent\'); this.setAttribute(\'class\', \'i_box_sprite left invite_int_disabled\');members[\']]><xsl:value-of select="data/pwsid"/><![CDATA[\'].getElementsByTagName(\'is_invited\')[0].firstChild.nodeValue = 1; self.current = []; current[0] = \']]><xsl:value-of select="data/pwsid"/><![CDATA[\' ; delayed_render(\']]><xsl:value-of select="data/pwsid"/><![CDATA[\');]]></xsl:attribute>\
                              <xsl:attribute name="alt">Invite as friend</xsl:attribute>\
                              <span class="iicon_spite_text_bg">\
                                  <xsl:choose>\
                                      <xsl:when test="data/is_invited = 1">\
                                         <![CDATA[Invite sent]]>\
                                      </xsl:when>\
                                      <xsl:otherwise>\
                                         <![CDATA[Invite as friend]]>\
                                      </xsl:otherwise>\
                                  </xsl:choose>\
                              </span>\
                            </a>\
                          </div>\
                          <div class="activitybutton left">\
                            <xsl:choose>\
                              <xsl:when test="data/is_hotlisted != 1">\
                                <a pwsid="{data/pwsid}" class="i_box_sprite left hotlist_int">\
                                  <xsl:attribute name="href">\
                                    <xsl:call-template name="link">\
                                      <xsl:with-param name="to" select="\'hotlist\'"/>\
                                    </xsl:call-template>\
                                  </xsl:attribute>\
                                  <xsl:attribute name="alt">Hotlist</xsl:attribute>\
                                  <xsl:attribute name="onclick">store_action({\'pwsid\':\'<xsl:value-of select="data/pwsid"/>\',\'type\':\'hotlist\'});<![CDATA[ajax.send(this.href+\';ajax=1;use_ajax=1;\',function() {members[\']]><xsl:value-of select="data/pwsid"/><![CDATA[\'].getElementsByTagName(\'is_hotlisted\')[0].firstChild.nodeValue = 1; self.current = []; current[0] = \']]><xsl:value-of select="data/pwsid"/><![CDATA[\' ; delayed_render(\']]><xsl:value-of select="data/pwsid"/><![CDATA[\') });return false;]]>\
                                  </xsl:attribute>\
                                  <span class="hotlistlink"><span class="iicon_spite_text_bg">Hotlist</span></span>\
                                </a>\
                              </xsl:when>\
                              <xsl:otherwise>\
                                <span>\
                                  <xsl:attribute name="class">i_box_sprite hotlist_int_disabled</xsl:attribute>\
                                  <xsl:attribute name="alt"><![CDATA[Hotlisted]]></xsl:attribute>\
                                  <span class="iicon_spite_text_bg">Hotlisted</span>\
                                </span>\
                              </xsl:otherwise>\
                            </xsl:choose>\
                          </div>\
                          <div class="activitybutton left">\
                            <a class="i_box_sprite left email_int" >\
                              <xsl:attribute name="href"><xsl:call-template name="link"><xsl:with-param name="to" select="\'upgrade\'"/></xsl:call-template></xsl:attribute>\
                              <xsl:attribute name="alt">Email</xsl:attribute>\
                              <span class="iicon_spite_text_bg">Email</span>\
                            </a>\
                          </div>\
                          <div class="clearfloat"/>\
                        </div>\
                    </xsl:if>\
                    <div class="clearfloat"></div>\
                    <xsl:choose>\
                      <xsl:when test="//@memberlevel = 100">\
                        <xsl:if test="//@memberlevel = 100">\
                          <div class="pt5 pb5 clear" onmouseover="self.show_info=true;">\
                            <xsl:choose>                              <xsl:when test="//@format != \'\'">\
                                <a>\
                                  <xsl:attribute name="href"><xsl:value-of select="//@recommendurl"/>;format=<xsl:value-of select="//@format"/>;handle=<xsl:value-of select="data/handle"/>;pwsid=<xsl:value-of select="//pwsid"/></xsl:attribute>\
                                  Show similar members\
                                </a>\
                              </xsl:when>\
                              <xsl:otherwise>\
                                <a>\
                                  <xsl:attribute name="href"><xsl:value-of select="//@recommendurl"/>;format=<xsl:value-of select="//@gallery"/>;handle=<xsl:value-of select="data/handle"/>;pwsid=<xsl:value-of select="//pwsid"/></xsl:attribute>\
                                  Show similar members\
                                </a>\
                              </xsl:otherwise>\
                            </xsl:choose>\
                          </div>\
                        </xsl:if>\
                      </xsl:when>\
                      <xsl:otherwise>\
                        <xsl:if test="//@memberlevel &gt;= 200">\
                        <div class="pt5 pb5">\
                          <xsl:choose>\
                            <xsl:when test="//@format != \'\'">\
                              <a>\
                                <xsl:attribute name="href"><xsl:value-of select="//@recommendurl"/>;format=<xsl:value-of select="//@format"/>;handle=<xsl:value-of select="data/handle"/>;pwsid=<xsl:value-of select="//pwsid"/></xsl:attribute>\
                                Show similar members\
                              </a>\
                            </xsl:when>\
                            <xsl:otherwise>\
                              <a>\
                                <xsl:attribute name="href"><xsl:value-of select="//@recommendurl"/>;format=<xsl:value-of select="//@gallery"/>;handle=<xsl:value-of select="data/handle"/>;pwsid=<xsl:value-of select="//pwsid"/></xsl:attribute>\
                                Show similar members\
                              </a>\
                            </xsl:otherwise>\
                          </xsl:choose>\
                        </div>\
                        </xsl:if>\
                      </xsl:otherwise>\
                    </xsl:choose>\
                    <div class="clear"/>\
                    <xsl:variable name="quote">"</xsl:variable>\
                  </xsl:when>\
                  <xsl:otherwise>\
                    <div class="left fwb p5">Loading.....</div>\
                    <div class="clear" style="padding:40px 0px;text-align:center;">\
                      <img src="http://graphics.pop6.com/images/getiton/common/anim_preloader2.gif" style="margin:auto;"/>\
                    </div>\
                  </xsl:otherwise>\
                </xsl:choose>\
      	  </div>\
    </div>\
  </xsl:template>\
  <xsl:template name="pointer"><div class="pointer_left"><img src="http://graphics.pop6.com/images/ffadult/spacer.gif" class="iicon_arrow" width="33px" height="42px" border="0" /></div></xsl:template>\
  <xsl:template name="stripapos">\
    <xsl:param name="string"/>\
    <xsl:call-template name="globalreplace">\
      <xsl:with-param name="outputstring" select="$string"/>\
      <xsl:with-param name="target"><![CDATA[&#39;]]></xsl:with-param>\
      <xsl:with-param name="replacement"><![CDATA[\']]></xsl:with-param>\
    </xsl:call-template>\
  </xsl:template>\
  <xsl:template name="globalreplace">\
    <xsl:param name="outputstring"/>\
    <xsl:param name="target"/>\
    <xsl:param name="replacement"/>\
    <xsl:choose>\
      <xsl:when test="contains($outputstring,$target)">\
        <xsl:value-of select="concat(substring-before($outputstring,$target),$replacement)"/>\
        <xsl:call-template name="globalreplace">\
          <xsl:with-param name="outputstring" select="substring-after($outputstring,$target)"/>\
          <xsl:with-param name="target" select="$target"/>\
          <xsl:with-param name="replacement" select="$replacement"/>\
        </xsl:call-template>\
      </xsl:when>\
      <xsl:otherwise>\
        <xsl:value-of select="$outputstring"/>\
      </xsl:otherwise>\
    </xsl:choose>\
  </xsl:template>\
  <xsl:template name="link">\
    <xsl:param name="origin"/>\
    <xsl:param name="to"/>\
    <xsl:choose>\
      <xsl:when test="$to = \'hotlist\'"><xsl:value-of select="//@hotlisturl"/>;addid=<xsl:value-of select="//pwsid"/></xsl:when>\
      <xsl:when test="//@memberlevel &gt; 100"><xsl:value-of select="//@profileurl"/>;mid=<xsl:value-of select="//pwsid"/></xsl:when>\
      <xsl:when test="//@memberlevel = 100"><xsl:value-of select="//@orderurl"/>;p_pwsid=<xsl:value-of select="//pwsid"/></xsl:when>      <xsl:otherwise><xsl:value-of select="//@registerurl"/>;mid=<xsl:value-of select="//pwsid"/></xsl:otherwise>\
    </xsl:choose>\
  </xsl:template>\
  <xsl:template name="location">\
    <xsl:param name="p_ci"/>\
    <xsl:param name="p_st"/>\
    <xsl:param name="p_sa"/>\
    <xsl:param name="p_co"/>\
    <xsl:param name="p_co_e"/>\
    <xsl:param name="v_co"/>\
    <xsl:param name="trun" select="0"/>\
    <xsl:variable name="t_loc">\
        <xsl:choose>\
            <xsl:when test="$p_co_e = $v_co">\
                <xsl:choose>\
                    <xsl:when test="$v_co = \'United States\'">\
                        <xsl:value-of select="$p_ci"/>, <xsl:value-of select="$p_sa"/>\
                    </xsl:when>\
                    <xsl:otherwise>\
                        <xsl:value-of select="$p_ci"/>, <xsl:value-of select="$p_st"/>\
                    </xsl:otherwise>\
                </xsl:choose>\
            </xsl:when>\
            <xsl:otherwise>\
                <xsl:choose>\
                    <xsl:when test="$p_co_e = \'United States\'">\
                        <xsl:value-of select="$p_ci"/>, <xsl:value-of select="$p_sa"/>, <xsl:value-of select="$p_co"/>\
                    </xsl:when>\
                    <xsl:otherwise>\
                        <xsl:value-of select="$p_ci"/>, <xsl:value-of select="$p_co"/>\
                    </xsl:otherwise>\
                </xsl:choose>            </xsl:otherwise>\
        </xsl:choose>\
    </xsl:variable>\
    <xsl:choose>\
      <xsl:when test="$trun = \'1\'">\
          <xsl:choose>\
              <xsl:when test="string-length($t_loc) &gt; 17">\
                  <span>\
                      <xsl:attribute name="tooltip"><xsl:value-of select="$t_loc"/></xsl:attribute>\
                      <xsl:attribute name="y">-15</xsl:attribute>\
                      <xsl:value-of select="substring($t_loc,1,14)"/>...\
                  </span>\
              </xsl:when>\
              <xsl:otherwise>\
                  <xsl:value-of select="$t_loc"/>\
              </xsl:otherwise>\
          </xsl:choose>\
      </xsl:when>\
      <xsl:otherwise>\
          <xsl:value-of select="$t_loc"/>\
      </xsl:otherwise>\
    </xsl:choose>\
</xsl:template>\
  <xsl:template name="distance">\
    <xsl:param name="unit"/>\
    <xsl:param name="dist"/>    <xsl:value-of select="$dist"/>\
    <xsl:choose>        <xsl:when test="$dist &lt; 2">\
            <xsl:choose>\
                <xsl:when test="$unit = \'m\' or $unit = \'M\'"><![CDATA[ mile away]]></xsl:when>\
                <xsl:otherwise> <![CDATA[ kilometer away]]></xsl:otherwise>\
            </xsl:choose>\
        </xsl:when>\
        <xsl:otherwise>\
            <xsl:choose>\
                <xsl:when test="$unit = \'m\' or $unit = \'M\'"><![CDATA[ miles away]]></xsl:when>\
                <xsl:otherwise><![CDATA[ kilometers away]]></xsl:otherwise>\
            </xsl:choose>        </xsl:otherwise>\
    </xsl:choose>\
</xsl:template>\
  <xsl:template name="std_member_messages">\
   <xsl:param name="GENDER"/>\
    <xsl:variable name="gender_var"><xsl:choose>\
          <xsl:when test="$GENDER = \'1\'"><![CDATA[his]]></xsl:when>\
          <xsl:when test="$GENDER = \'2\'"><![CDATA[her]]></xsl:when>\
          <xsl:otherwise><![CDATA[their]]></xsl:otherwise>\
        </xsl:choose></xsl:variable>\
    <xsl:variable name="gender_var_2"><xsl:choose>\
          <xsl:when test="$GENDER = \'1\'"><![CDATA[him]]></xsl:when>\
          <xsl:when test="$GENDER = \'2\'"><![CDATA[her]]></xsl:when>\
          <xsl:otherwise><![CDATA[them]]></xsl:otherwise>\
        </xsl:choose></xsl:variable>\
    <xsl:variable name="msg_1"><![CDATA[Experience GENDER_TOKEN photos and videos]]></xsl:variable>\
    <xsl:variable name="msg_2"><![CDATA[Connect with GENDER_TOKEN via email and flirt]]></xsl:variable>\
    <xsl:variable name="msg_3"><![CDATA[Become GENDER_TOKEN friend]]></xsl:variable>\
    <xsl:variable name="msg_4"><![CDATA[View GENDER_TOKEN profile]]></xsl:variable>\
    <ul>\
        <li>\
          <xsl:call-template name="string-replace-all">\
              <xsl:with-param name="text" select="$msg_1"/>\
              <xsl:with-param name="replace" select="\'GENDER_TOKEN\'"/>\
              <xsl:with-param name="by" select="$gender_var" />\
          </xsl:call-template>\
        </li>\
        <li>\
          <xsl:call-template name="string-replace-all">\
              <xsl:with-param name="text" select="$msg_2"/>\
              <xsl:with-param name="replace" select="\'GENDER_TOKEN\'"/>\
              <xsl:with-param name="by" select="$gender_var_2" />\
          </xsl:call-template>\
        </li>\
        <li>\
          <xsl:call-template name="string-replace-all">\
              <xsl:with-param name="text" select="$msg_3"/>\
              <xsl:with-param name="replace" select="\'GENDER_TOKEN\'"/>\
              <xsl:with-param name="by" select="$gender_var" />\
          </xsl:call-template>\
        </li>\
        <li>\
          <xsl:call-template name="string-replace-all">\
              <xsl:with-param name="text" select="$msg_4"/>\
              <xsl:with-param name="replace" select="\'GENDER_TOKEN\'"/>\
              <xsl:with-param name="by" select="$gender_var" />\
          </xsl:call-template>\
        </li>\
    </ul>\
</xsl:template>\
<xsl:template name="string-replace-all">\
  <xsl:param name="text"/>\
  <xsl:param name="replace"/>\
  <xsl:param name="by"/>\
  <xsl:choose>\
    <xsl:when test="contains($text,$replace)">\
      <xsl:value-of select="substring-before($text,$replace)"/>\
      <xsl:value-of select="$by"/>\
      <xsl:call-template name="string-replace-all">\
        <xsl:with-param name="text" select="substring-after($text,$replace)"/>\
        <xsl:with-param name="replace" select="$replace"/>\
        <xsl:with-param name="by" select="$by"/>\
      </xsl:call-template>\
    </xsl:when>\
    <xsl:otherwise>\
      <xsl:value-of select="$text"/>\
    </xsl:otherwise>\
  </xsl:choose>\
</xsl:template>\
      <xsl:template name="sex_id_type">\
  <xsl:param name="sex"/>\
  <xsl:choose>\
    <xsl:when test="$sex = \'1\'"><![CDATA[M]]></xsl:when>\
    <xsl:when test="$sex = \'2\'"><![CDATA[F]]></xsl:when>\
    <xsl:when test="$sex = \'3\'"><![CDATA[C]]></xsl:when>\
    <xsl:when test="$sex = \'4\'"><![CDATA[G]]></xsl:when>\
    <xsl:when test="$sex = \'5\'"><![CDATA[LC]]></xsl:when>\
    <xsl:when test="$sex = \'6\'"><![CDATA[GC]]></xsl:when>\
    <xsl:when test="$sex = \'7\'"><![CDATA[T]]></xsl:when>\
    <xsl:otherwise><![CDATA[Prefer not to say]]></xsl:otherwise>\
  </xsl:choose>\
</xsl:template>\
</xsl:stylesheet>')
