<table id="pmenu1" cellpadding="0" cellspacing="0" style="display:none;position:absolute;z-index:1000;">
<tr><td class="td_hmnu" style="width:77px;border-top: 1px solid #371E0B;"><a class="a_bo cntr" style="display:block;padding:1px;<?php if($_GET['p'] == 13){echo "color:#FFF9F0;";} ?>" title="Отобразить сведения о данном направлении нашей работы" href="d2.php">Разработка</a></td></tr>
<tr><td class="td_hmnu"><a class="a_bo cntr" style="display:block;padding:1px;<?php if($_GET['p'] == 12){echo "color:#FFF9F0;";} ?>" title="Отобразить сведения о данном направлении нашей работы" href="d1.php">Дизайн</a></td></tr>
<tr><td class="td_hmnu"><a class="a_bo cntr" style="display:block;padding:1px;<?php if($_GET['p'] == 14){echo "color:#FFF9F0;";} ?>" title="Отобразить сведения о данном направлении нашей работы" href="d3.php">Проза</a></td></tr>
<tr><td class="td_hmnu"><a class="a_bo cntr" style="display:block;padding:1px;<?php if($_GET['p'] == 2){echo "color:#FFF9F0;";} ?>" title="Отобразить сведения о нашей работе" href="user.php">О нас</a></td></tr>
<tr><td class="td_hmnu" style="border-bottom: 1px solid #371E0B;"><a class="a_bo cntr" style="display:block;padding:1px;<?php if($_GET['p'] == 15){echo "color:#FFF9F0;";} ?>" title="Расценки на наши работы" href="price.php">Прайс</a>
</td></tr></table>

<img id="img_logo" src="img/logo_onestyle.gif" />
<div id="div_counter">Copyright&nbsp;2008, <a style="color:#FFF9F0;" href="user.php?u=1">Клименко Роман</a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span id="this_si_glava">
<?php
	if (isset($_POST['direct_job'])){
		if (empty($_SESSION['back1_direct_job'])){$_SESSION['back1_direct_job'] = $_POST['direct_job'];
		}elseif (empty($_SESSION['back2_direct_job'])){$_SESSION['back2_direct_job'] = $_POST['direct_job'];
		}else {$_SESSION['back1_direct_job'] = $_SESSION['back2_direct_job'];$_SESSION['back2_direct_job'] = $_POST['direct_job'];}
	}else{
		if (empty($_SESSION['back1_direct_job'])){$_SESSION['back1_direct_job'] = "none";
		}elseif (empty($_SESSION['back2_direct_job'])){$_SESSION['back2_direct_job'] = "none";
		}else {$_SESSION['back1_direct_job'] = $_SESSION['back2_direct_job'];$_SESSION['back2_direct_job'] = "none";}
	}

	if (isset($_POST['user_name'])){
		if (empty($_SESSION['back1_user_name'])){$_SESSION['back1_user_name'] = $_POST['user_name'];
		}elseif (empty($_SESSION['back2_user_name'])){$_SESSION['back2_user_name'] = $_POST['user_name'];
		}else {$_SESSION['back1_user_name'] = $_SESSION['back2_user_name'];$_SESSION['back2_user_name'] = $_POST['user_name'];}
	}else{
		if (empty($_SESSION['back1_user_name'])){$_SESSION['back1_user_name'] = "none";
		}elseif (empty($_SESSION['back2_user_name'])){$_SESSION['back2_user_name'] = "none";
		}else {$_SESSION['back1_user_name'] = $_SESSION['back2_user_name'];$_SESSION['back2_user_name'] = "none";}
	}

	if (isset($_POST['restrict_find'])){
		if (empty($_SESSION['back1_restrict_find'])){$_SESSION['back1_restrict_find'] = $_POST['restrict_find'];
		}elseif (empty($_SESSION['back2_restrict_find'])){$_SESSION['back2_restrict_find'] = $_POST['restrict_find'];
		}else {$_SESSION['back1_restrict_find'] = $_SESSION['back2_restrict_find'];$_SESSION['back2_restrict_find'] = $_POST['restrict_find'];}
	}else{
		if (empty($_SESSION['back1_restrict_find'])){$_SESSION['back1_restrict_find'] = "none";
		}elseif (empty($_SESSION['back2_restrict_find'])){$_SESSION['back2_restrict_find'] = "none";
		}else {$_SESSION['back1_restrict_find'] = $_SESSION['back2_restrict_find'];$_SESSION['back2_restrict_find'] = "none";}
	}

	if (isset($_POST['in_orderby'])){
		if (empty($_SESSION['back1_in_orderby'])){$_SESSION['back1_in_orderby'] = $_POST['in_orderby'];
		}elseif (empty($_SESSION['back2_in_orderby'])){$_SESSION['back2_in_orderby'] = $_POST['in_orderby'];
		}else {$_SESSION['back1_in_orderby'] = $_SESSION['back2_in_orderby'];$_SESSION['back2_in_orderby'] = $_POST['in_orderby'];}
	}else{
		if (empty($_SESSION['back1_in_orderby'])){$_SESSION['back1_in_orderby'] = "none";
		}elseif (empty($_SESSION['back2_in_orderby'])){$_SESSION['back2_in_orderby'] = "none";
		}else {$_SESSION['back1_in_orderby'] = $_SESSION['back2_in_orderby'];$_SESSION['back2_in_orderby'] = "none";}
	}

	if ($_POST['in_desk'] == 'on'){
		if (empty($_SESSION['back1_in_desk'])){$_SESSION['back1_in_desk'] = 'on';
		}elseif (empty($_SESSION['back2_in_desk'])){$_SESSION['back2_in_desk'] = 'on';
		}else {$_SESSION['back1_in_desk'] = $_SESSION['back2_in_desk'];$_SESSION['back2_in_desk'] = 'on';}
	}else{
		if (empty($_SESSION['back1_in_desk'])){$_SESSION['back1_in_desk'] = "none";
		}elseif (empty($_SESSION['back2_in_desk'])){$_SESSION['back2_in_desk'] = "none";
		}else {$_SESSION['back1_in_desk'] = $_SESSION['back2_in_desk'];$_SESSION['back2_in_desk'] = "none";}
	}

	if ($_POST['in_name'] == 'on'){
		if (empty($_SESSION['back1_in_name'])){$_SESSION['back1_in_name'] = 'on';
		}elseif (empty($_SESSION['back2_in_name'])){$_SESSION['back2_in_name'] = 'on';
		}else {$_SESSION['back1_in_name'] = $_SESSION['back2_in_name'];$_SESSION['back2_in_name'] = 'on';}
	}else{
		if (empty($_SESSION['back1_in_name'])){$_SESSION['back1_in_name'] = "none";
		}elseif (empty($_SESSION['back2_in_name'])){$_SESSION['back2_in_name'] = "none";
		}else {$_SESSION['back1_in_name'] = $_SESSION['back2_in_name'];$_SESSION['back2_in_name'] = "none";}
	}

	echo $site_pages[$_GET['p']][0];
	if (($_GET['p']%2 == 0) and $_GET['p'] > 100){
		if ($_SESSION['IsEnter'] <> 1){$tmp_get_stop_limit = 13;}else{$tmp_get_stop_limit = 111;}
		if ($_SESSION['CURR_LIMIT'] < $tmp_get_stop_limit){echo " [ " . ($tmp_get_stop_limit - 1 - $_SESSION['CURR_LIMIT']) . " ]";}
	}	

?>
</span>



</div>
<div onclick="hmenu('pmenu1');" id="block_myreg" class="black_block">
<a class="a_black2" onmouseover="hmenu('pmenu1');<?php if (ismode() and ($_GET['p'] > 99 or $_GET['p'] == 1)){ ?>showUser('divg_601');" onmouseout="showUser('divg_601');<?php } ?>" href="index.php" <?php if(empty($_GET['p']) or $_GET['p'] == 1){echo "style='color:white;'";} ?>>Главная</a>&nbsp;
<a class="a_black2" onmouseover="hmenu('pmenu1');<?php if (ismode() and ($_GET['p'] > 99 or $_GET['p'] == 1)){ ?>showUser('divg_608');" onmouseout="showUser('divg_608');<?php } ?>" href="galary.php" <?php if($_GET['p'] == 8){echo "style='color:white;'";} ?>>Галерея</a>&nbsp;
<a title="Новости нашего сайта" class="a_black2" onmouseover="hmenu('pmenu1');<?php if (ismode() and ($_GET['p'] > 99 or $_GET['p'] == 1)){ ?>showUser('divg_610');" onmouseout="showUser('divg_610');<?php } ?>" href="news.php" <?php if($_GET['p'] == 10){echo "style='color:white;'";} ?>>Новости</a>&nbsp;
<a title="Новости мира IT" class="a_black2" onmouseover="hmenu('pmenu1');<?php if (ismode() and ($_GET['p'] > 99 or $_GET['p'] == 1)){ ?>showUser('divg_618');" onmouseout="showUser('divg_618');<?php } ?>" href="news_it.php" <?php if($_GET['p'] == 18){echo "style='color:white;'";} ?>>Новости IT</a>&nbsp;
<a title="Страница онлайн баз данных" class="a_black2" onmouseover="hmenu('pmenu1');" href="online.php" <?php if($_GET['p'] >= 100){echo "style='color:white;'";} ?>>Онлайн</a>&nbsp;
<a title="Страница проекта Советы мастера" class="a_black2" onmouseover="hmenu('pmenu1');<?php if (ismode() and ($_GET['p'] > 99 or $_GET['p'] == 1)){ ?>showUser('divg_611');" onmouseout="showUser('divg_611');<?php } ?>" href="know.php" <?php if($_GET['p'] == 11){echo "style='color:white;'";} ?>>Советы</a>&nbsp;
<a title="Страница проекта Крупинки мудрости" class="a_black2" onmouseover="hmenu('pmenu1');<?php if (ismode() and ($_GET['p'] > 99 or $_GET['p'] == 1)){ ?>showUser('divg_617');" onmouseout="showUser('divg_617');<?php } ?>" href="umora.php" <?php if($_GET['p'] == 17){echo "style='color:white;'";} ?>>Юмор</a>&nbsp;
<a id="apmenu1" class="a_black2" title="Выберите направление" href="javascript:void(0);" onclick="hmenu('pmenu1');" onmouseover="pmenu('pmenu1');"> Услуги</a>&nbsp;
<a title="Перечень работ, имеющих комментарии" class="a_black2" onmouseover="hmenu('pmenu1');<?php if (ismode() and ($_GET['p'] > 99 or $_GET['p'] == 1)){ ?>showUser('divg_607');" onmouseout="showUser('divg_607');<?php } ?>" href="forcomment.php" <?php if($_GET['p'] == 7){echo "style='color:white;'";} ?>>Комментарии</a>&nbsp;
<a class="a_black2" onmouseover="hmenu('pmenu1');" target="_blank" href="rss/index.php">RSS</a>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</div>
<div onclick="hmenu('pmenu1');" id="div_rights" class="wnw">
<FORM METHOD="POST" class="cinline" id="width_reload" action="<?php echo $_SERVER['REQUEST_URI'];?>">
<select title="Ширина страницы сайта"  class="cinline" style="border: 1px none transparent;" name="list_width" onchange="javascript:document.getElementById('width_reload').submit();">
<?php
for($a=1;$a<5;$a++){
	echo "<option value=" . $a;
	if ($a == $_SESSION['listwidth']) {echo " selected";}
	echo ">" . (900 + $a*100) . " px </option>";
}
?>
</select>
<select title="Размер шрифта" class="cinline" style="border: 1px none transparent;" name="font_size" onchange="javascript:document.getElementById('width_reload').submit();">
<?php
for($a=7;$a<13;$a++){
	echo "<option value=" . $a;
	if ($a == $_SESSION['fontsize']) {echo " selected";}
	echo ">" . $a . " pt </option>";
}
?>
</select>
<input class="cinline input_or" title="Введите логин" name="MyLogin" type="text" style="width:120px;" size="20" maxlength="40" value="<?php if (isset($_SESSION['IsMyLogin'])){echo $_SESSION['IsMyLogin'];}else{ echo "Гость";} ?>" />
<input class="cinline input_or" title="Введите пароль" name="MyPwd" type="Password" style="width:120px;" size="20" maxlength="50" value="<?php if (isset($_SESSION['IsMyLogin'])){echo "";}else{ echo "Гость";} ?>" />
<a href="javascript:document.getElementById('<?php if (isset($_SESSION['IsMyLogin'])){echo "to_register";}else{echo "width_reload";} ?>').submit();"><?php 

		mysql_select_db('onestyle_pwd');
		$result = mysql_query("select email from mypwd");
		echo "<sub>" . mysql_num_rows($result) . "</sub> ";
		mysql_select_db('onestyle_testmy');

if (isset($_SESSION['IsMyLogin'])){echo "Выйти";}else{echo "Войти";} ?></a> <a href="/reg.php"><?php if (isset($_SESSION['IsMyLogin'])){echo "Настройки";}else{ echo "Регистрация/Забыли&nbsp;пароль?";} ?></a>
</form>
</div>
<form METHOD="POST" id="to_light"><input name="is_light" type="Hidden" value="1" /></form>
<form METHOD="POST" id="to_back"><input name="is_to_back" type="Hidden" value="1" /></form>
<form METHOD="POST" id="to_register"><input name="is_exit" type="Hidden" value="1" /></form>
