<?php function switchtranslate($fullname, $shortname) {
		$a = '<div class="optiontxt"><div class="bullet">⦿</div>'.''.$fullname.'</div>';
		$optoff = '<div class="onoff"><div class="optiontxt optionoff">Off</div>';
		$x = '<label class="switch"><input id="switchtranslate_'.$shortname.'" name="switchtranslate" type="checkbox"><span class="slider round"></span></label>';
		$opton = '<div class="optiontxt optionon">On</div></div>';
		$z = $a.''.$optoff.''.$x.''.$opton;
		return $z;
	} ?>
<!-- #optionspanel --> 
<div id="optionspanel" class="scrollshowhide">
	<div class="innerpanel typeset" data-control="typeset"><?php echo minmax("down", "typeset"); ?><div class="scttitledsp">Display Type:</div>
		<div id="typeregular" class="optiontxt">Regular</div>
		<label for="switchtype" class="switch"><input title="Switch between Word-2-Word or Sentence layout" placeholder="" id="switchtype" name="switchtype" type="checkbox" <?php echo isOptionSelected("switchtype") ? 'checked' : ''; ?>><span class="slider round"></span></label>
		<div id="typeword" class="optiontxt">Word-by-Word</div>
	</div>
	<div class="innerpanel orientset" data-control="orientset"><?php echo minmax("down", "orientset"); ?><div class="scttitledsp">Word 2 Word Orientation</div>
		<div id="setltr" class="optiontxt" title="Left to Right">LTR</div>
		<label for="switchorientation" class="switch"><input title="Switch reading orientation LTR <-> RTL" placeholder="" id="switchorientation" name="switchorientation" type="checkbox" <?php echo isOptionSelected("switchorientation") ? 'checked' : ''; ?>><span class="slider round"></span></label>
		<div id="setrtl" class="optiontxt" title="Right to Left">RTL</div><div class="note">Text orientation works only in Word-to-Word mode.</div>
		<input title="Reader Mode" placeholder="" id="readermode" name="readermode" type="checkbox" style="display:none;" <?php echo isOptionSelected("readermode") ? 'checked' : ''; ?>>
	</div>
	<?php $langno = count($translations_languages); 
		foreach ($translations_languages as $language) {
			echo '<div class="innerpanel translationsopt trans_'. $language. '" data-control="trans_'. $language. '">'. minmax("down", "trans_".$language) .'<div class="scttitledsp">'.$language.' Translations</div>';
			foreach ($translations_data as $data) {
				if ($data["language"] == $language) {
					$option = "switchtranslate_".$data["sname"];
					echo '
					<div class="optiontxt"><div class="bullet">⦿</div>'.''.$data["fname"].'</div>
					<div class="onoff"><div class="optiontxt optionoff">Off</div>
					<label for="switchtranslate_'.$data["sname"].'" class="switch"><input title="Switch on/off translations by '.$data["fname"].'" placeholder="" id="switchtranslate_'.$data["sname"].'" name="switchtranslate_'.$data["sname"].'" type="checkbox"'. (isOptionSelected($option) ? 'checked' : '').'><span class="slider round"></span></label>
					<div class="optiontxt optionon">On</div></div>';
				}
			}
			echo '</div>';
		} ?>
	<div class="innerpanel chfontsize" data-control="chfontsize"><?php echo minmax("down", "chfontsize"); ?><div class="scttitledsp">Change Reading Size</div>
		<div class="optiontxt">Main English Large Font</div>
		<div class="onoff"><div class="optiontxt optionoff">Off</div>
		<label for="fntsz_englarge" class="switch">
			<input title="Enable English Large Font" placeholder="" id="fntsz_englarge" name="fntsz_englarge" type="checkbox" <?php echo (isOptionSelected("fntsz_englarge") ? 'checked' : ''); ?>><span class="slider round"></span>
		</label>
		<div class="optiontxt optionon">On</div></div>
		<div class="optiontxt">Main Arabic Large Font</div>
		<div class="onoff"><div class="optiontxt optionoff">Off</div>
		<label for="fntsz_arblarge" class="switch">
			<input title="Enable Arabic Large Font" placeholder="" id="fntsz_arblarge" name="fntsz_arblarge" type="checkbox" <?php echo (isOptionSelected("fntsz_arblarge") ? 'checked' : ''); ?>><span class="slider round"></span>
		</label>
		<div class="optiontxt optionon">On</div></div>
	</div>
	<div class="innerpanel dirlinks" data-control="dirlinks"><div class="scttitledsp">Direct Links:</div>
		<div class="optiontxt"><a href="/_translated"><div class="bullet">⦿</div><strong>Map of Translated Ayaat</strong></a></div>
		<br>
		<div class="optiontxt"><a href="_topics"><div class="bullet">⦿</div><strong>Topics of Quran</strong></a></div>
	</div>
</div>
<!-- #optionspanel -->