	<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_8" id="archive">
                <div class="grid_8 alpha omega">
                    <div class="description">
                        <h1>{$docarray[0].title|stripslashes}</h1>
                    </div>
                    <div class="meta" style="font-size:16px">
                    	{$lang672} <a href="{$baseurl}/members/profile/{$docarray[0].USERID}/{$docarray[0].username|stripslashes}"><b>{$docarray[0].username|stripslashes}</b></a> - {$docarray[0].time_added|date_format:"%b %e, %Y"} - {insert name=get_doc_categories_list value=a assign=category CATID=$docarray[0].categories}<a href="{$baseurl}/category?id={$docarray[0].categories}"><b>{$category|stripslashes}</b></a>
                    </div>
                    <div class="clear"></div>
                </div>
            	
                <div class="grid_8 alpha omega">
                	<div id="content">
                        <iframe src="http://docs.google.com/viewer?url={$docurl}/{$docarray[0].doc_name}&embedded=true" width="100%" height="700" style="border: none;"></iframe>
                        <div class="clear"></div>
                    </div>
                </div>
                
                <div class="grid_8 alpha omega">
                    <div id="author">
                		<h4><span>{$lang113}</span></h4>
                        <p style="font-size:18px">{$docarray[0].description|stripslashes}</p>
                        <div class="clear"></div>
                	</div>
                </div>
                
                <div class="grid_8 alpha omega">
                    <div id="author">
                		<h4><span>{$lang325}</span></h4>
                        <p>{insert name=get_tags assign=lt tags=$docarray[0].tags}{section name=tt loop=$lt}<a style="font-size:18px" href="{$baseurl}/search?q={$lt[tt]|stripslashes}" >{$lt[tt]|stripslashes}</a>{if !$smarty.section.tt.last},{/if}&nbsp;{/section}</p>
                        <div class="clear"></div>
                	</div>
                </div>
                
                <div class="grid_12 alpha omega">
                    <div id="related">
                    	<h4><span>{$lang399}</span></h4>
                        {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 % 6 == 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>
                
                {if $docarray[0].allowcomments ne "0"}
                {if $smarty.session.USERID GT "0"}
                {literal}
                <script type="text/javascript">
                function SubMe() {
                    myCom=document.getElementById('comment').value;
                    item_id = {/literal}{$docarray[0].DID}{literal};
                    $j.post("{/literal}{$baseurl}/postcomment.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}/postcomment.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>
                {/if}
            </div>
            
            <div class="grid_4">
				<div id="sidebar">
                    
                    <div class="widget">
                    	<h4><span>{$lang681}</span></h4>
                        <input id="Embed" type="text" class="text_input" style="width: 95%;" readonly="readonly" onclick="this.select();" value="{if $docarray[0].allowembeds eq '0'}{$lang395}{else}&lt;iframe src=&quot;http://docs.google.com/viewer?url={$docurl}/{$docarray[0].doc_name}&embedded=true&quot; width=&quot;100%&quot; height=&quot;700&quot; style=&quot;border: none;&quot;&gt;&lt;/iframe&gt;{/if}">
                        <div class="clear" style="padding-bottom:10px;"></div>
                        <h4><span>{$lang642}</span></h4>
                        {insert name=seo_clean_titles assign=dtitle value=a title=$docarray[0].title}
                        <input id="docURL" type="text" class="text_input" style="width: 95%;" readonly="readonly" onclick="this.select();" value="{$baseurl}/doc/{$docarray[0].DID}/{$dtitle}">
                        <div class="clear" style="padding-bottom:10px;"></div>
                        <script type="text/javascript">
						addthis_url    = location.href;   
						addthis_title  = document.title;  
						addthis_pub    = 'videowatchpro';     
						</script>
						<script type="text/javascript" src="http://s7.addthis.com/js/addthis_widget.php?v=12" ></script>
                    </div>
                    
                    <div class="widget">
                    	<div class="rss_widget">
                            <div class="details">
                                <span class="count">{$docarray[0].viewcount}</span>
                                <span class="desc">{$lang204}</span>
                            </div>
                        </div>
                        
                        <div class="twitter_widget">
                        	<div class="details">
                                <span class="count">{$docarray[0].downloadcount}</span>
                                <span class="desc">{$lang536}</span>
                            </div>
                        </div>                        
                    </div>
                    
                    <script type="text/javascript">
						var video_id = "{$docarray[0].DID}";
						var base_url = "{$baseurl}";
					</script>
					<script type="text/javascript" src="{$baseurl}/js/rate.php"></script>
					<div>
                        <div class="video_rating">
                            <input name="current_rating" type="hidden" value="{if $docarray[0].rating GT "0"}{math equation="( x / z )" x=$docarray[0].rating z=2}{else}0{/if}" id="current_rating" />
                            <div id="rating">
                                <ul id="rating_container_video">
                                    {insert name=get_rating_stars value=a rating=$docarray[0].rating type=video id=$docarray[0].DID}
                                </ul>                                        
                            </div>
                            <div id="rating_text">&nbsp;{$docarray[0].ratingcount} {$lang463}</div>
                            <div class="clear:both"></div>
                        </div>
					</div>
                    <div class="clear"></div>
                    <div style="padding-bottom:10px;"></div>

                    <div class="widget">
                    	<div class="tab_tags">
                    	{if $allow_downloads eq "1"}
                            {if $docarray[0].allowdownloads eq "1"}
                                {if $who_can_download eq "1"}
                                    {if $smarty.session.USERID eq ""}
                                        <a href="{$baseurl}/login">{$lang420}</a>
                                    {else}
                                        <a href="{$baseurl}/download/doc/{$docarray[0].DID}/{$dtitle}">{$lang420}</a>
                                    {/if}
                                {else}
                                    <a href="{$baseurl}/download/doc/{$docarray[0].DID}/{$dtitle}">{$lang420}</a>
                                {/if}
                        	{/if}
                        {/if} 
                        </div>
                        
                        <div class="tab_tags">
                        	{if $smarty.session.USERID ne ""}
                            	{literal}
								<script type="text/javascript">
                                function AddFav() {
                                    add=1;
                                    item_id = {/literal}{$docarray[0].DID}{literal};
                                    $j.post("{/literal}{$baseurl}/postfav.php{literal}",{"add":add,"did":item_id},function(html) {
										$j('#afav').hide();
										$j('#rfav').show();
                                    });
                                }
								function RemFav() {
                                    rem=1;
                                    item_id = {/literal}{$docarray[0].DID}{literal};
                                    $j.post("{/literal}{$baseurl}/postfav.php{literal}",{"rem":rem,"did":item_id},function(html) {
										$j('#rfav').hide();
										$j('#afav').show();
                                    });
                                }
                                </script>
                                {/literal}
                            	{insert name=get_fav_doc_status assign=isfav value=var DID=$docarray[0].DID}
                                {if $isfav eq "false"}
                            	<a id="afav" href="#" onclick="AddFav();">{$lang339}</a>
                                <a id="rfav" href="#" onclick="RemFav();" style="display:none;">{$lang423}</a>
                                {else}
                                <a id="afav" href="#" onclick="AddFav();" style="display:none;">{$lang339}</a>
                                <a id="rfav" href="#" onclick="RemFav();">{$lang423}</a>
                                {/if}
                            {else}
                            <a href="{$baseurl}/login">{$lang339}</a>
                            {/if}
                            <div class="clear"></div>
                        </div>
                        
                    	<div class="tab_tags">
                            <a href="#" onclick="toggle('reportvideodiv')">{$lang421}</a>
                            <div class="clear"></div>
                        </div>
                        <div id="reportvideodiv" style="display:none;">
                        	{if $smarty.session.USERID GT "0"}
                            {literal}
                            <script type="text/javascript">
                            function SubReport() {
                                myRep=document.getElementById('vreportremarks').value;
								myRea=document.getElementById('vreportreason').value;
                                item_id = {/literal}{$docarray[0].DID}{literal};
                                $j.post("{/literal}{$baseurl}/postreport.php{literal}",{"remarks":myRep,"reason":myRea,"did":item_id},function(html) {
                                    $j('#repres').html(''+html+'').fadeIn();
                                });
                            }
                            </script>
                            {/literal}
                            <div id="repres">
                            	<div class="clear" style="padding-bottom:15px;"></div>
                            	<span style="font-size:24px;">{$lang344}</span>
                                <div class="clear" style="padding-bottom:15px;"></div>
                                <form name="reportvideoform" method="POST" action="#">
                                <span style="font-size:16px">{$lang358}:</span><br />
                                <textarea name="vreportremarks" id="vreportremarks" style="width:95%; font-size:16px;"></textarea><br /><br />
                                <span style="font-size:16px">{$lang353}:</span><br />
                                <select name="vreportreason" id="vreportreason" style="font-size:16px;"> 
                                    <option selected value="{$lang354}">{$lang354}
                                    <option value="{$lang355}">{$lang355}
                                    <option value="{$lang356}">{$lang356}
                                    <option value="{$lang357}">{$lang357}
                                </select><br /><br />
                                <input type="button" id="submitrep" name="submitrep" value="{$lang693}" onclick="SubReport();">
                                </form>
                                <div class="clear" style="padding-bottom:15px;"></div>
                            </div>
                            {else}
                            <div class="error_box">{$lang422}</div>
                            <div class="clear" style="padding-bottom:5px;"></div>
                            {/if}
                        </div>                        
                        
                        <div class="tab_tags">
                            <a href="#" onclick="toggle('sharediv')">{$lang669}</a>
                            <div class="clear"></div>
                        </div>
                        <div id="sharediv" style="display:none;">
                        	{if $smarty.session.USERID GT "0"}
                            {literal}
                            <script type="text/javascript">
                            function SubShare() {
                                vshareto=document.getElementById('vshareto').value;
								vsharemessage=document.getElementById('vsharemessage').value;
                                item_id = {/literal}{$docarray[0].DID}{literal};
                                $j.post("{/literal}{$baseurl}/postshare.php{literal}",{"vshareto":vshareto,"vsharemessage":vsharemessage,"did":item_id},function(html) {
                                    $j('#sharesd').html(''+html+'').fadeIn();
                                });
                            }
                            </script>
                            {/literal}
                            <div id="sharesd">
                            	<div class="clear" style="padding-bottom:15px;"></div>
                            	<span style="font-size:24px;">{$lang340}</span>
                                <div class="clear" style="padding-bottom:15px;"></div>
                                <form name="shareform" method="POST" action="#">
                                <span style="font-size:16px">{$lang375}:</span><br />({$lang376})<br />
                                <textarea name="vshareto" id="vshareto" style="width:95%; font-size:16px;"></textarea><br /><br />
                                <span style="font-size:16px">{$lang377}:</span><br />
                                <textarea name="vsharemessage" id="vsharemessage" style="width:95%; font-size:16px;"></textarea><br /><br />
                                <input type="button" id="submitsha" name="submitsha" value="{$lang693}" onclick="SubShare();">
                                </form>
                                <div class="clear" style="padding-bottom:15px;"></div>
                            </div>
                            {else}
                            <div class="error_box">{$lang422}</div>
                            <div class="clear" style="padding-bottom:5px;"></div>
                            {/if}
                        </div>
                        
                        <div class="clear" style="padding-bottom:20px;"></div>
                        <center>{insert name=get_advertisement AID=7}</center>
                    </div>
                    
                </div>
            </div>
            <div class="clear"></div>
        </div>
    </div>