function showLogin(type) {
	if($('userLoginForm'))$('userLoginForm').style.display=(type=='user'&&$('userLoginForm').style.display=='none')?'block':'none';
	if($('admLoginForm'))$('admLoginForm').style.display=(type=='adm'&&$('admLoginForm').style.display=='none')?'block':'none';
    hideLanguageSelect();
    hideCurrencySelect();
}
function hideLogin() {
	if($('userLoginForm'))$('userLoginForm').style.display='none';
	if($('admLoginForm'))$('admLoginForm').style.display='none';
}
function showLogout() {
	$('LogoutForm').style.display='';
    hideLanguageSelect();
    hideCurrencySelect();
}
function hideLogout() {
	if ($('LogoutForm')) $('LogoutForm').style.display='none';
}

function showCurrencySelect() {
	var obj=$('CurrencySelect');
	obj.style.display=obj.style.display!='none'?'none':'';
    hideLanguageSelect();
    hideLogin();
    hideLogout();
}
function hideCurrencySelect() {
	$('CurrencySelect').style.display='none';
}
function showLanguageSelect() {
	var obj=$('LanguageSelect');
	obj.style.display=obj.style.display!='none'?'none':'';
    hideCurrencySelect();
    hideLogin();
    hideLogout(); 
}
function hideLanguageSelect() {
   $('LanguageSelect').style.display='none'; 
}
function goToCabinet() {
	if (document.URL.lastIndexOf('/cabinet') != -1) showLogin('user');
	else document.location = '/servlet/en/cabinet';
}
function showMenu(place) {

var sel_block_add= '<div id="CurrencySelect" style="display:none; position: absolute;z-index:9999;">'+
'<div style="width:200px; border:1px solid #000000; position: absolute; left: 310px; ">'+
	'<form method="post" action="/servlet/en/setdata" name="SelectPrefCurrency">'+
	'<input type="hidden" name="type" value="pref_currency" />'+
	'<input type="hidden" name="back" value="'+document.location+'" />'+
	'<table border="0" cellpadding="2" cellspacing="0" width="100%">'+
		'<tr>'+
			'<td bgcolor="#FF0000" align="center">'+
				'<font face="Arial" size="1" color="#FFFFFF"><b>CURRENCY SELECTION </b></font>'+
			'</td>'+
			'<td bgcolor="#FF0000" align="right">'+
				'<a title="close" href="#" onclick="hideCurrencySelect(); return false">'+
					'<img alt="close" src="http://static-nl.dosug.cz/images/close.png" border="0" width="18" height="16">'+
				'</a>'+
			'</td>'+
		'</tr>'+
		'<tr>'+
			'<td bgcolor="#F5F5F5" colspan="2">'+
				'<font face="Arial" size="2" color="#666666">select a currency in which you prefer to see the prices on the site</font>'+
				'<div style="background-color: #FFFFFF">'+
					'<table border="0" width="100%" cellspacing="1">'+
						'<tr>'+
							'<td width="30%" align="right" bgcolor="#F5F5F5">'+
								'<input type="radio" value="0" name="id_currency" id="sel_cur_0" checked />'+
							'</td>'+
							'<td width="70%" bgcolor="#F5F5F5" align="left">'+
								'<font face="Arial" size="2"><b><label for="sel_cur_0">default</label></b></font>'+
							'</td>'+
						'</tr>'+
						'<tr>'+
							'<td width="30%" align="right" bgcolor="#F5F5F5">'+
								'<input type="radio" value="1" name="id_currency" id="sel_cur_1"" />'+
							'</td>'+
							'<td width="70%" bgcolor="#F5F5F5" align="left">'+
								'<font face="Arial" size="2"><b><label for="sel_cur_1">rub</label></b></font>'+
							'</td>'+
						'</tr>'+
						'<tr>'+
							'<td width="30%" align="right" bgcolor="#F5F5F5">'+
								'<input type="radio" value="2" name="id_currency" id="sel_cur_2"" />'+
							'</td>'+
							'<td width="70%" bgcolor="#F5F5F5" align="left">'+
								'<font face="Arial" size="2"><b><label for="sel_cur_2">usd</label></b></font>'+
							'</td>'+
						'</tr>'+
						'<tr>'+
							'<td width="30%" align="right" bgcolor="#F5F5F5">'+
								'<input type="radio" value="3" name="id_currency" id="sel_cur_3"" />'+
							'</td>'+
							'<td width="70%" bgcolor="#F5F5F5" align="left">'+
								'<font face="Arial" size="2"><b><label for="sel_cur_3">uah</label></b></font>'+
							'</td>'+
						'</tr>'+
						'<tr>'+
							'<td width="30%" align="right" bgcolor="#F5F5F5">'+
								'<input type="radio" value="4" name="id_currency" id="sel_cur_4"" />'+
							'</td>'+
							'<td width="70%" bgcolor="#F5F5F5" align="left">'+
								'<font face="Arial" size="2"><b><label for="sel_cur_4">eur</label></b></font>'+
							'</td>'+
						'</tr>'+
						'<tr>'+
							'<td width="30%" align="right" bgcolor="#F5F5F5">'+
								'<input type="radio" value="5" name="id_currency" id="sel_cur_5"" />'+
							'</td>'+
							'<td width="70%" bgcolor="#F5F5F5" align="left">'+
								'<font face="Arial" size="2"><b><label for="sel_cur_5">czk</label></b></font>'+
							'</td>'+
						'</tr>'+
						'<tr>'+
							'<td width="30%" align="right" bgcolor="#F5F5F5">'+
								'<input type="radio" value="6" name="id_currency" id="sel_cur_6"" />'+
							'</td>'+
							'<td width="70%" bgcolor="#F5F5F5" align="left">'+
								'<font face="Arial" size="2"><b><label for="sel_cur_6">pln</label></b></font>'+
							'</td>'+
						'</tr>'+
					'</table>'+
				'</div>'+
			'</td>'+
		'</tr>'+
		'<tr>'+
			'<td bgcolor="#E2E2E2" colspan="2" align="center">'+
				'<a href="#" onclick="document.forms[\'SelectPrefCurrency\'].submit(); hideCurrencySelect(); return false;"><font face="Arial" size="1">SELECT</font></a>'+
				' | '+
				'<a href="#" onclick="hideCurrencySelect(); return false"><font face="Arial" size="1">CANCEL</font></a>'+
			'</td>'+
		'</tr>'+
	'</table>'+
	'</form>'+
'</div></div>'+

'<div id="LanguageSelect" style="display:none; position: absolute;z-index:9999;">'+
'<div style="width:200px; border:1px solid #000000; position: absolute; left: 350px; ">'+
	'<form method="get" action="/index.jsp" name="SelectPrefLanguage">'+
	'<input type="hidden" name="back" value="'+document.location+'" />'+
	'<table border="0" cellpadding="2" cellspacing="0" width="100%">'+
		'<tr>'+
			'<td bgcolor="#FF0000" align="center">'+
				'<font face="Arial" size="1" color="#FFFFFF"><b>LANGUAGE SELECTION</b></font>'+
			'</td>'+
			'<td bgcolor="#FF0000" align="right">'+
				'<a title="close" href="#" onclick="hideLanguageSelect(); return false">'+
					'<img alt="close" src="http://static-nl.dosug.cz/images/close.png" border="0" width="18" height="16">'+
				'</a>'+
			'</td>'+
		'</tr>'+
		'<tr>'+
			'<td bgcolor="#F5F5F5" colspan="2">'+
				'<font face="Arial" size="2" color="#666666">select the language in which you prefer to see our pages</font>'+
				'<div style="background-color: #FFFFFF">'+
					'<table border="0" width="100%" cellspacing="1">'+
						'<tr>'+
							'<td width="30%" align="right" bgcolor="#F5F5F5">'+
								'<input type="radio" value="ru" name="set_lang" id="sel_lng_ru"" />'+
							'</td>'+
							'<td width="70%" bgcolor="#F5F5F5" align="left">'+
								'<font face="Arial" size="2"><b><label for="sel_lng_ru">Русский</label></b></font>'+
							'</td>'+
						'</tr>'+
						'<tr>'+
							'<td width="30%" align="right" bgcolor="#F5F5F5">'+
								'<input type="radio" value="en" name="set_lang" id="sel_lng_en"" checked />'+
							'</td>'+
							'<td width="70%" bgcolor="#F5F5F5" align="left">'+
								'<font face="Arial" size="2"><b><label for="sel_lng_en">English</label></b></font>'+
							'</td>'+
						'</tr>'+
						'<tr>'+
							'<td width="30%" align="right" bgcolor="#F5F5F5">'+
								'<input type="radio" value="ua" name="set_lang" id="sel_lng_ua"" />'+
							'</td>'+
							'<td width="70%" bgcolor="#F5F5F5" align="left">'+
								'<font face="Arial" size="2"><b><label for="sel_lng_ua">Українська</label></b></font>'+
							'</td>'+
						'</tr>'+
						'<tr>'+
							'<td width="30%" align="right" bgcolor="#F5F5F5">'+
								'<input type="radio" value="cz" name="set_lang" id="sel_lng_cz"" />'+
							'</td>'+
							'<td width="70%" bgcolor="#F5F5F5" align="left">'+
								'<font face="Arial" size="2"><b><label for="sel_lng_cz">Česky</label></b></font>'+
							'</td>'+
						'</tr>'+
						'<tr>'+
							'<td width="30%" align="right" bgcolor="#F5F5F5">'+
								'<input type="radio" value="de" name="set_lang" id="sel_lng_de"" />'+
							'</td>'+
							'<td width="70%" bgcolor="#F5F5F5" align="left">'+
								'<font face="Arial" size="2"><b><label for="sel_lng_de">Deutsch</label></b></font>'+
							'</td>'+
						'</tr>'+
						'<tr>'+
							'<td width="30%" align="right" bgcolor="#F5F5F5">'+
								'<input type="radio" value="pl" name="set_lang" id="sel_lng_pl"" />'+
							'</td>'+
							'<td width="70%" bgcolor="#F5F5F5" align="left">'+
								'<font face="Arial" size="2"><b><label for="sel_lng_pl">Polski</label></b></font>'+
							'</td>'+
						'</tr>'+
					'</table>'+
				'</div>'+
			'</td>'+
		'</tr>'+
		'<tr>'+
			'<td bgcolor="#E2E2E2" colspan="2" align="center">'+
				'<a href="#" onclick="document.forms[\'SelectPrefLanguage\'].submit(); hideLanguageSelect(); return false;"><font face="Arial" size="1">SELECT</font></a>'+
				' | '+
				'<a href="#" onclick="hideLanguageSelect(); return false"><font face="Arial" size="1">CANCEL</font></a>'+
			'</td>'+
		'</tr>'+
	'</table>'+
	'</form>'+
'</div></div>';

	document.getElementById(place).innerHTML =
	'<div align="right">'+
		'<a href="/servlet/en/gallery" class="menu1_top"> Gallery</a>'+
		'<img src="http://static-nl.dosug.cz/images/top_menu.gif" width="15" height="21" border="0" alt="" align="absmiddle" />'+
		'<a href="/servlet/en/search" class="menu1_top"><b>All searches</b></a>'+
		'<img src="http://static-nl.dosug.cz/images/top_menu.gif" width="15" height="21" border="0" alt="" align="absmiddle" />'+
		'<a href="#" onclick="showCurrencySelect(); return false;" class="menu1_top"> Currency selection </a>'+
		'<img src="http://static-nl.dosug.cz/images/top_menu.gif" width="15" height="21" border="0" alt="" align="absmiddle" />'+
        '<a href="#" onclick="showLanguageSelect(); return false;" class="menu1_top"> Language selection</a>'+ 
        '<img src="http://static-nl.dosug.cz/images/top_menu.gif" width="15" height="21" border="0" alt="" align="absmiddle" />'+
		'<a href="#" onclick="goToCabinet(); return false;" class="menu1_top"> <b>Sign in to personal cabinet</b></a>'+
		'<img src="http://static-nl.dosug.cz/images/top_menu.gif" width="15" height="21" border="0" alt="" align="absmiddle" />'+
//		'<a href="#" onclick="showLogin(\'adm\'); return false;" class="menu1_top"> <b>Sign-in for girls</b></a>&nbsp;&nbsp;'+
		'<a href="/servlet/en/admlogin" class="menu1_top"> <b>Sign-in for girls</b></a>&nbsp;&nbsp;'+
	'</div>'+
    sel_block_add+

'<div id="userLoginForm" class="menu_message" style="display:none" align="right">'+
	'<br />'+
	'PERSONAL CABINET<br />'+
	'<form action="/servlet/en/login" method="POST">'+
'NICKNAME <input type="text" name="login" /> PASSWORD <input type="password" name="password" /> <input type="submit" value="login" />'+
 '<a href="#" onclick="hideLogin(); return false;">CANCEL</a><br />'+
 '<input type="checkbox" name="remember" id="usr_remember" value="1" checked /> <label for="usr_remember">remember me on this computer</label><br />'+
	'<br />'+
	'<a href="/servlet/en/register">REGISTER</a> | '+
	'<a href="/servlet/en/recover">restore password</a>'+
	'</form>'+
	'<br />'+
'</div>'+

'<div id="admLoginForm" class="menu_message" style="display:none" align="right">'+
	'<br />'+
	'SIGN-IN FOR GIRLS<br />'+
	'<form action="/servlet/en/admlogin" method="POST">'+
	'ACCESS CODE <input type="text" name="login" /> <input type="submit" value="login" /> '+
	'<a href="#" onclick="hideLogin(); return false;">cancel</a><br />'+
	'<input type="checkbox" name="remember" id="adm_remember" value="1" checked /> <label for="adm_remember">remember me on this computer</label><br />'+
	'</form>'+
	'<br />'+
'</div>'+


'';
}
