	<script type="text/javascript" src="http://www.google.com/jsapi"></script>
	<script type="text/javascript">/*<![CDATA[*/ google.load("jquery", "1.3.2"); /*]]>*/</script>
	<script type="text/javascript">/*<![CDATA[*/ google.load("jqueryui", "1.7.2"); /*]]>*/</script>
	<script type="text/javascript">
		var $j = jQuery.noConflict();
	</script>
    {literal}
	<script language="javascript" type="text/javascript">
    function toggle(obj) {
        var el = document.getElementById(obj);
        if ( el.style.display != 'none' ) {
            $j('#' + obj).slideUp();
        }
        else {
            $j('#' + obj).slideDown();
        }
    }
    </script>
    {/literal}
    <div id="the_body">
        <div class="container_12">
            <div class="grid_4">
				<div id="sidebar">
                    <div class="widget">
                    	<h4><span>{$profilearray[0].username|stripslashes}</span></h4>
                        {insert name=get_member_profilepicture assign=profilepicture value=var USERID=$profilearray[0].USERID}
                		<img width="300" src="{$membersprofilepicurl}/{$profilepicture}" />
                    </div>
                    <div class="widget">
                        <div class="tab_tags">
                        	{if $smarty.session.USERID ne ""}
                            	{if $smarty.session.USERID ne $profilearray[0].USERID}                                    
                                    {literal}
                                    <script type="text/javascript">
                                    function AddFav() {
                                        add=1;
                                        item_id = {/literal}{$profilearray[0].USERID}{literal};
                                        $j.post("{/literal}{$baseurl}/subscribe.php{literal}",{"add":add,"did":item_id},function(html) {
                                            $j('#afav').hide();
                                            $j('#rfav').show();
                                        });
                                    }
                                    function RemFav() {
                                        rem=1;
                                        item_id = {/literal}{$profilearray[0].USERID}{literal};
                                        $j.post("{/literal}{$baseurl}/subscribe.php{literal}",{"rem":rem,"did":item_id},function(html) {
                                            $j('#rfav').hide();
                                            $j('#afav').show();
                                        });
                                    }
                                    </script>
                                    {/literal}                                    
                                    {insert name=get_subscribed_status assign=issubscribed value=var USERID=$profilearray[0].USERID}
                                    {if $issubscribed eq "false"}
                                    <a id="afav" href="#" onclick="AddFav();">{$lang47}</a>
                                    <a id="rfav" href="#" onclick="RemFav();" style="display:none;">{$lang703}</a>
                                    {else}
                                    <a id="afav" href="#" onclick="AddFav();" style="display:none;">{$lang47}</a>
                                    <a id="rfav" href="#" onclick="RemFav();">{$lang703}</a>
                                    {/if}
                                {else}
                                <a>{$lang289}</a>
                                {/if}
                            {else}
                            <a href="{$baseurl}/login">{$lang290}</a>
                            {/if}
                            <div class="clear"></div>
                        </div>
                    </div>
                    <div class="widget">
                    	{$lang112}: <b>{$profilearray[0].firstname}&nbsp;{$profilearray[0].lastname}</b><br>
                        {$lang130}: <b>{$profilearray[0].birthday}</b><br>
                        {$lang134}: <b>{if $profilearray[0].gender eq "1"}{$lang135}{elseif $profilearray[0].gender eq "0"}{$lang136}{/if}</b><br>				
                        {$lang140}: <b>{$profilearray[0].city}</b> <br>
                        {$lang139}: <b>{$profilearray[0].country}</b> <br>
                        {$lang113}: <b>{insert name=get_stripped_phrase value=a assign=pdesc details=$profilearray[0].description}{$pdesc}</b> <br>
                        {$lang259}: <b><a href="{$profilearray[0].url}" target="_blank">{$profilearray[0].url|stripslashes|truncate:40:"...":true}</a></b> <br>
                        {$lang260}: <b>{insert name=get_time_to_days_ago value=var time=$profilearray[0].lastlogin}</b> <br>
                        {$lang261}: <b>{insert name=get_time_to_days_ago value=var time=$profilearray[0].addtime}</b> <br>
                        {$lang295}: <b>{$profilearray[0].profileviews}</b><br>
                        {$lang296}: <b>{$profilearray[0].docsyouviewed}</b><br>
                        {$lang297}: <b>{$profilearray[0].yourdocsviewed}</b><br>
                        {$lang298}: <b>{insert name=get_member_docs_count value=var USERID=$profilearray[0].USERID}</b><br>
                        {$lang257}: <b>{insert name=get_member_favorited_count value=var USERID=$profilearray[0].USERID}</b><br>
                        {$lang254}: <b>{insert name=get_profile_commentcount assign=commentcount userid=$profilearray[0].USERID}{$commentcount}</b><br>
                        {$lang207}: <b>{insert name=get_member_subscribers_count value=var USERID=$profilearray[0].USERID}</b><br>
                        {$lang280}: <b>{insert name=get_member_subscribedto_count value=var USERID=$profilearray[0].USERID}</b><br>                
                    </div>
                    <div class="clear"></div>
                    <div style="padding-bottom:10px;"></div>
                    <div class="widget">
                    	<center>{insert name=get_advertisement AID=7}</center>
                    </div>
                </div>
            </div>
         
            <div class="grid_8" id="archive">
            	
                <div class="grid_8 alpha omega">
                	<div class="post_columns">
                        <h4><span>{$lang41}</span></h4>
                        <div class="clear"></div>
                        {section name=i loop=$docs}
                        {insert name=seo_clean_titles assign=title value=a title=$docs[i].title}
                        <div class="column {if $smarty.section.i.iteration % 4 == 0}last{/if}">
                            <div class="image"><a href="{$baseurl}/doc/{$docs[i].DID}/{$title}"><img src="{$vthumburl}/{$docs[i].DID}.jpg" alt="{$docs[i].title|stripslashes|truncate:25:"...":true}" ></a></div>
                            <h3><a href="{$baseurl}/doc/{$docs[i].DID}/{$title}">{$docs[i].title|stripslashes|truncate:17:"...":true}</a></h3>
                        </div>
                        {/section}
                        <div class="clear"></div>
                    </div>
                </div>
                
                <div class="grid_8 alpha omega">
                	<div class="post_columns">
                        <h4><span>{$lang257}</span></h4>
                        <div class="clear"></div>
                        {section name=i loop=$fdocs}
                        {insert name=seo_clean_titles assign=title value=a title=$fdocs[i].title}
                        <div class="column {if $smarty.section.i.iteration % 4 == 0}last{/if}">
                            <div class="image"><a href="{$baseurl}/doc/{$fdocs[i].DID}/{$title}"><img src="{$vthumburl}/{$fdocs[i].DID}.jpg" alt="{$fdocs[i].title|stripslashes|truncate:25:"...":true}" ></a></div>
                            <h3><a href="{$baseurl}/doc/{$fdocs[i].DID}/{$title}">{$fdocs[i].title|stripslashes|truncate:17:"...":true}</a></h3>
                        </div>
                        {/section}
                        <div class="clear"></div>
                    </div>
                </div>
                
                <div class="grid_8 alpha omega">
                	<div class="post_grid">
                        <h4><span>{$lang207}</span></h4>
                        <div class="clear"></div>
                        <ul>
                        	{section name=i loop=$m}
                            {insert name=get_member_profilepicture assign=profilefpic value=var USERID=$m[i].USERID}
                          	<li {if $smarty.section.i.iteration % 5 == 0}class="last"{/if}><a class="tooltip" title="{$m[i].username|stripslashes}" href="{$baseurl}/members/profile/{$m[i].USERID}/{$m[i].username|stripslashes}"><img src="{$membersprofilepicurl}/thumbs/{$profilefpic}" alt="{$m[i].username|stripslashes}"><br /><b>{$m[i].username|stripslashes|truncate:13:"...":true}</b></a></li>
							{/section}
                        </ul>
                    </div>
                </div>
                
                <div class="grid_8 alpha omega">
                	<div class="post_grid">
                        <h4><span>{$lang280}</span></h4>
                        <div class="clear"></div>
                        <ul>
                        	{section name=i loop=$m2}
                            {insert name=get_member_profilepicture assign=profilefpic value=var USERID=$m2[i].USERID}
                          	<li {if $smarty.section.i.iteration % 5 == 0}class="last"{/if}><a class="tooltip" title="{$m2[i].username|stripslashes}" href="{$baseurl}/members/profile/{$m2[i].USERID}/{$m2[i].username|stripslashes}"><img src="{$membersprofilepicurl}/thumbs/{$profilefpic}" alt="{$m2[i].username|stripslashes}"><br /><b>{$m2[i].username|stripslashes|truncate:13:"...":true}</b></a></li>
							{/section}
                        </ul>
                    </div>
                </div>
                
                {if $smarty.session.USERID GT "0"}
                {literal}
                <script type="text/javascript">
                function SubMe() {
                    myCom=document.getElementById('comment').value;
                    item_id = {/literal}{$profilearray[0].USERID}{literal};
                    $j.post("{/literal}{$baseurl}/postcomment2.php{literal}",{"comment":myCom,"item_id":item_id},function(html) {
                        $j('#commentsection').html(''+html+'').fadeIn();
						if(myCom != '')
						{
							$j('#comform').hide();
							$j('#comsuccess').show();	
						}
                    });
                }
                </script>
                {/literal}
                {/if}
                <div class="grid_8 alpha omega">
                    <div id="comments">
                    	<h4><span>{$lang63}</span></h4>                        
                        <ol>
                        	<div id="commentsection">
                                {section name=vc loop=$showcomments}
                                <li>
                                    <div class="image"><a href="{$baseurl}/members/profile/{$showcomments[vc].USERID}/{$showcomments[vc].username|stripslashes}"><img src="{$membersprofilepicurl}/thumbs/{insert name=get_member_profilepicture value=var USERID=$showcomments[vc].USERID}" alt="{$showcomments[vc].username|stripslashes}"></a></div>
                                    <div class="details">
                                        <div class="name"><span class="author"><a href="{$baseurl}/members/profile/{$showcomments[vc].USERID}/{$showcomments[vc].username|stripslashes}">{$showcomments[vc].username|stripslashes}</a></span> <span class="date">{$showcomments[vc].time_added|date_format:"%b %e, %Y"}</span></div>
                                        <p>{insert name=get_stripped_phrase value=a assign=comdetails details=$showcomments[vc].details}{$comdetails}</p>
                                    </div>                               
                                </li>
                                {/section}
                            </div>
                        </ol>
                    	<div class="clear"></div>
                    </div>
                    <div class="grid_8 alpha omega">
                    	<div id="respond">
                        	<h4><span>{$lang311}</span></h4>
                            {if $smarty.session.USERID GT "0"}
                            <form id="comform" name="comform" action="{$baseurl}/postcomment2.php" method="post">                               
                                <p>
                                	<textarea id="comment" name="comment"  cols="73" rows="10"></textarea>
                                </p>
                                <p>
                                	<input type="button" id="submitcom" name="submitcom" value="{$lang693}" onclick="SubMe();">
                                </p>
                            </form>
                            <div class="success_box" style="display:none" id="comsuccess">{$lang105}</div>
                            {else}
                            <p>{$lang313} <a href="{$baseurl}/login">{$lang314}</a></p>
                            {/if}
                            <div class="clear"></div>
                        
                        </div>
                    </div>
                </div>
            </div>
            
            
            <div class="clear"></div>
        </div>
    </div>