<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
    <meta http-equiv = "Content-Language" content = "{$smarty.const._HEADERLANGUAGETAG}" />
    <meta http-equiv = "keywords"         content = "education" />
    <meta http-equiv = "description"      content = "Collaborative Elearning Platform" />
    <meta http-equiv = "Content-Type"     content = "text/html; charset = utf-8"/>
    <link rel="shortcut icon" href="images/favicon.ico" >
    <link rel="icon" href="images/favicon.gif" type="image/gif" >
     {if !isset($T_CUSTOM_CSS)}
        <link rel = "stylesheet" type = "text/css" href = "css/css_global.php" />   
    {else}
        <link rel = "stylesheet" type = "text/css" href = "css/custom_css/{$T_CUSTOM_CSS}" />   
    {/if}

<script>{if $T_BROWSER == 'IE6'}var globalImageExtension = 'gif';{else}var globalImageExtension = 'png';{/if}</script>
    <script type = "text/javascript" src = "js/eF_scripts.php"></script>
    <script type = "text/javascript" src = "js/print-script.php"></script>
    {*<script type = "text/javascript" src = "js/PieNG.js"></script> *}
    <script language = "JavaScript" type = "text/javascript" src = "js/scriptaculous/prototype.php"></script>
    <script language = "JavaScript" type = "text/javascript" src = "js/scriptaculous/effects.php"></script>   
{literal}
    <script language = "JavaScript" type = "text/javascript">
<!--        
        var ie_str;
        var detect = navigator.userAgent.toLowerCase();
        detect.indexOf("msie") > 0 ? ie_str = "?ie=1" :ie_str = "";
        makeAjaxRequest('ask_unread_messages.php'+ie_str,'special_get_request','general');
        setInterval("makeAjaxRequest('ask_unread_messages.php' + ie_str, 'special_get_request', 'general')", 10000);
//-->
    </script>
    <script language = "JavaScript" type = "text/javascript">
<!--    
    var arrow_status = "down";
    function initArrows() {
        windowSize = getWindowSize();
        windowHeight = parseInt(windowSize[1]);
        scrollHeight = parseInt(document.documentElement.scrollHeight);
        
        if(scrollHeight>windowHeight) {
            if(arrow_status == "down") {
                document.getElementById('arrow_up').style.display = 'none';
                document.getElementById('arrow_down').style.display = 'block';
            } else {
                document.getElementById('arrow_up').style.display = 'block';
                document.getElementById('arrow_down').style.display = 'none';
            }
        } else {
            document.getElementById('arrow_up').style.display = 'none';
            document.getElementById('arrow_down').style.display = 'none';            
        }
        
        window.onresize = resizeFunction;
        //alert("windowHeight = "+windowHeight+" scrollHeight = "+scrollHeight);
    }
    
    function setArrowStatus(status) {
        arrow_status = status;
        initArrows();
    }
    
    function resizeFunction() {
        new Effect.ScrollTo('top',{offset:-140});
        initArrows();
    }
//-->    
    </script>
{/literal}
</head>

<body class = "sidebar" onload = "initArrows();">
{literal}
<a id = "arrow_down" href="#bottom" onclick="new Effect.ScrollTo('bottom',{offset:-140}); setArrowStatus('up');   return false;" style="position:{/literal}{if $T_BROWSER == 'IE6'}absolute{else}fixed{/if}{literal}; z-index:50; bottom:5px; right:1px; display:none;">{/literal}<img src="images/16x16/navigate_down.png" border = "0" alt="{$smarty.const._SCROLLTOBOTTOMOFPAGE}" title="{$smarty.const._SCROLLTOBOTTOMOFPAGE}"{literal}/></a>
<a id = "arrow_up" 	 href="#top" 	onclick="new Effect.ScrollTo('top',{offset:-140}); 	  setArrowStatus('down'); return false;" style="position:{/literal}{if $T_BROWSER == 'IE6'}absolute{else}fixed{/if}{literal}; z-index:50; bottom:5px; right:1px; display: none;">{/literal}<img src="images/16x16/navigate_up.png" border = "0" alt="{$smarty.const._SCROLLTOTOPOFPAGE}" title="{$smarty.const._SCROLLTOTOPOFPAGE}"{literal}/></a>
{/literal}
<span id = "nobookmarks" style = "display:none">{$smarty.const._YOUHAVENOBOOKMARKS}</span>

{if $smarty.session.s_type == 'administrator'}
    {assign var = 'logo_link' value = '/'|cat:$smarty.session.s_type|cat:'.php'}
{else}
    {assign var = 'logo_link' value = '/'|cat:$smarty.session.s_type|cat:'.php?ctg=personal'}
{/if}

{if $T_ROLE == 'student'}
    {assign var = "user_type" value = $smarty.const._STUDENT}
{elseif $T_ROLE == 'professor'}
    {assign var = "user_type" value = $smarty.const._PROFESSOR}
{elseif $T_ROLE == 'administrator'}
    {assign var = "user_type" value = $smarty.const._ADMINISTRATOR}
{else}
    {assign var = "user_type" value = $T_ROLE}
{/if}
<a id="top"></a>
<table style = "position:relative;left:1px;" valign = "top" width = "99%" height = "100%" id = "main_table" class = "sidebarMainTable">

    <!-- Main Row -->
    <tr><td colspan = "100%">&nbsp;</td></tr>
    <tr height = "100%" valign = "top">
        <td align = "left">
            <table width = "100%" border = "0">
                <tr><td align = "center">
                        <a href = "{$logo_link}" target = "mainframe">
{if $smarty.session.s_avatar}
                            <img src = "images/avatars/{$smarty.session.s_avatar}" border = "0" title="{$smarty.const._CURRENTAVATAR}" alt="{$smarty.const._CURRENTAVATAR}" /></a>
{else}
                            <img src = "images/avatars/system_avatars/unknown_small.png" border = "0" title="{$smarty.const._EFRONT}" alt="{$smarty.const._EFRONT}"/></a>
{/if}
                    </td></tr>
                <tr><td align = "center">{$smarty.session.s_login} [{$user_type}]</td></tr>
                <tr><td align = "center">
                        <table>
{if $T_UNREAD_MESSAGES != 0}
                            <tr><td id="unread_img"><img src = "images/16x16/mail2.png" title="{$smarty.const._MESSAGES}" alt="{$smarty.const._MESSAGES}"/></td>
                                <td id="recent_unread_left">(<a href = "jsforum/messages_index.php" target="mainframe">{$T_UNREAD_MESSAGES}</a>)</td></tr>
{/if}
                        </table>
                    </td></tr>

                <tr><td align = "center" class = "horizontalSeparator">
{*                        <!--<a href = "jsindex.php?logout=true" target=_top>
                        <img src = "images/12x12/arrow_left_blue.png" border = "0" style="position: relative; top:2px;" title="{$smarty.const._LOGOUT}" alt="{$smarty.const._LOGOUT}"/>
                        &nbsp;{$smarty.const._LOGOUT}</a>-->*}
                    </td></tr>
            </table>

            <br/>

            {eF_template_printIconMenu menu = $T_MENU ctg = $T_MENUCTG lesson_name = $T_LESSON_NAME user_type = $smarty.session.s_type}
            
            <table width = "100%">
                <form action = "{$smarty.session.s_type}.php?ctg=control_panel&op=search" method = "post" target="mainframe">
                <tr>
                    <td align = "left"  class = "horizontalSeparator">
                        <img align = "right" src = "images/others/blank.gif" class = "minus"
                                onClick = "toggleVisibility(document.getElementById('search_box'),this)" title = "{$smarty.const._SHOWHIDE}" alt = "{$smarty.const._SHOWHIDE}"/ style = "position:relative;left:0px;"> {*small position fix*}<b>{$smarty.const._SEARCH}</b>
                    </td></tr>
                <tr>
                    <td align = "left"><div id="search_suggest"></div></td></tr>
                <tr>
                    <td nowrap align = "left" id = "search_box">
                        <input style="background-image:url('images/16x16/search.png'); background-repeat:no-repeat; padding-left:18px; width:120px;" type = "text" name = "search_text" size = "10" value = "{if isset($smarty.post.search_text)}{$smarty.post.search_text}{/if}" onFocus = "javascript:makeAjaxRequest('ask_suggestions.php','special_get_request','suggestions')"/>
                        <input type = "hidden" name = "current_location" id = "current_location" value = ""/>
                    </td>
		</tr>
                </form>
            </table>
            <br/>
{if isset($T_ONLINE_USERS_LIST)}      
            <table width = "100%">
                <tr>
                    <td align = "left"  class = "horizontalSeparator">
                        <img align = "right" src  =  "images/others/blank.gif" class = "minus"
                                onClick = "toggleVisibility(document.getElementById('users_online'),this)" title = "{$smarty.const._SHOWHIDE}" alt = "{$smarty.const._SHOWHIDE}"/ style = "position:relative;left:0px;"> {*small position fix*}
                 <b>{$smarty.const._ONLINEUSERS}</b></td></tr>
                <tr>
                	{if $T_ONLINE_USERS_LIST|@count > 20}
                		<td>
							<a href="#" onClick = "toggleVisibility(document.getElementById('users_online'),this)">{$T_ONLINE_USERS_LIST|@count} {$smarty.const._USERS}</a>							
						</td>
					</tr>
					<tr>
					   <td id = "users_online" style="display:none;">                    	
	                        {*eF_template_printOnlineUsers data = $T_ONLINE_USERS_LIST*}
	                   </td></tr>
                    </tr>
                	{else}
	                    <td id = "users_online">                    	
	                        {*eF_template_printOnlineUsers data = $T_ONLINE_USERS_LIST*}
	                    </td></tr>
	                {/if}
            </table>
{/if}     
            <br/>

            <table width = "100%">
                <tr><td align = "center" id = 'new_chat_message'></td></tr>
            </table>
            <table width = "100%">
                <tr><td align = "center" id = 'new_private_message'></td></tr>
            </table>
        </td>
        {*<!--<td style = "border-right:1px solid #3399ff" width = "2">&nbsp;</td>-->*}
    </tr>
    <tr><td colspan = "100%"><a id="bottom"></a></td></tr>
</table>
<img id = "toggleSidebarImage" src = "images/others/blank.gif" onClick = "toggleSidebar('{$smarty.session.s_login}')" style = "position: fixed; top:4px; right: -1px; cursor: pointer; " align = "right" alt = "{$smarty.const._SHOWHIDE}" title = "{$smarty.const._SHOWHIDE}"/>
<img id = "logoutImage" src = "images/16x16/exit.png" onClick = "window.location='index.php?logout=true'" style = "position: fixed; top:45px; left: 1000px;cursor: pointer; " align = "right" {if ($smarty.session.s_lessons_ID!='')}alt = "{$smarty.const._LOGOUT}" title = "{$smarty.const._LOGOUT}"{/if}/>


<script language = "JavaScript" type = "text/javascript">
{literal}
<!--
    if (typeof(changeColorOnRefresh) != 'undefined') {
        changeColorOnRefresh();
    }
    //alert(typeof(changeColorOnRefresh));

initSidebar({/literal}'{$smarty.session.s_login}'{literal});          //initialization of sidebar according to cookie value
//-->
{/literal}
</script>
<!--<script type = "text/javascript" src = "jsslashfiles/menu.js"></script> There is no that file any more....Why?-->
{*<script type = "text/javascript" src = "js/PieNG.js"></script>*}
<div id="dimmer" class = "dimmerDiv" style="display:none;"></div>
<script>if (parent.frames[0].document.getElementById('dimmer')) parent.frames[0].document.getElementById('dimmer').style.display = 'none'</script>

</body>
</html>
