<div id="main" width="910px" style="display:inline-block;">       
<!--SIDEBAR--> 
<div id="sidebar" class="widget-area" role="complementary">
<a href="index.php"><img src="img/merlin-s1.jpg" alt="Merlin logo image" width="170" height="130" style="float:left;display:inline-block;"/></a>
</div>
<?php
if(isset($current_script)){
	if(preg_match("/simplesearch/", $current_script)){
		$class_top1 ='class="current-lang"';
	}
	else if(preg_match("/about/", $current_script)){
		$class_top2 ='class="current-lang"';
	}
	else if(preg_match("/showkwic|showdocuments|showtext_metadata|showfeatures|openannis_wide/", $current_script)){
		$class_top1 ='class="current-lang"';
	}
	else if(preg_match("/advancedsearch/", $current_script)){
		$class_top1 ='class="current-lang"';
	}
	else if(preg_match("/documentsearch/", $current_script)){
		$class_top1 ='class="current-lang"';
	}
	else if(preg_match("/statistics/", $current_script)){
		$class_top1 ='class="current-lang"';
	}
	else{
	 //$current_script="nix";
	}
}
?>
<!--SIDEBAR END-->
<!--MAIN PART-->
<div id="mainpartwrapper2" width="740" height="80" style="float:left;display:inline-block;">
	<div id="mainpart2">
		<img src="img/banner-s3.jpg" alt="Merlin banner image" width="740" height="80" style="float:left;display:inline-block;"/>
		<div id="top-bar">
		<span  id="top-bar-space2">
			<ul style="float:left;background-color:#035683;">
				<li id="polylang-2" class="widget widget_polytopic">
					<ul>
						<li <?php echo $class_top1 ?>><a href="#" onclick="document.forms['glossary'].submit();"><?php echo $trans['help_search'][$_SESSION['lang']]; ?></a></li>
						<li <?php echo $class_top2 ?>><a href="#" onclick="document.forms['about'].submit();"><?php echo $trans['about'][$_SESSION['lang']]; ?></a></li>	
					</ul>
				</li>
			</ul>					
	      	<ul style="float:right;background-color:#035683;">
				<li id="polylang-2" class="widget widget_polylang">
					<ul><!-- current-lang for highlight -->
						<?php
						foreach ($languages as $language) {
                                                   if ($language == $_SESSION['lang']) {
                                                      $li_classes = ' class="current-lang"'; 
                                                   } else {
                                                      $li_classes = '';
                                                   } 
						   echo '<li'.$li_classes.'><a href="#" onclick="document.forms[\'language-'.$language.'\'].submit();">';
                                                   echo $trans[$language_glosses[$language]][$_SESSION['lang']];
                                                   echo '</a></li>';
						}
						?>
					</ul>
				</li>
			</ul>
					
		</span>		
		</div>
	</div>
</div>
<!--MAIN PART-->
</div>