if (navigator.userAgent.match(/msie/i) && !navigator.userAgent.match(/opera/i)) var browser = 'ie';
else if (navigator.userAgent.match(/opera/i)) var browser = 'opera';
else var browser = 'mozilla';
var activeSection = null;
var tId = null;
var delayTime = 300;
var corrections = new Array();
corrections.yPosition = new Array();
corrections.xPosition = new Array();
corrections.yPosition.ie = 23;
corrections.yPosition.opera = 25;//33; - так было раньше не знаю даже под какую Opera
corrections.yPosition.mozilla = 26;
corrections.xPosition.ie = -2;
corrections.xPosition.opera = (-15);
corrections.xPosition.mozilla = 1;
var subItems = new Array();
subItems[0] = 'subCountries';
subItems[1] = 'subTours';
subItems[2] = 'subExposition';
subItems[3] = 'subSpec';
subItems[4] = 'subAirTickets';
subItems[5] = 'subForPartners';
subItems[6] = 'subAbout';
document.open();
if (browser == 'ie' || browser == 'opera') document.write('');
else document.write('');
document.close();
function hideAllSubMenu()
{
for (var i = 0; i < subItems.length; ++i)
{
var tmp = document.getElementById('_' + subItems[i]);
if (tmp) tmp.style.display = 'none';
document.getElementById(subItems[i]).style.display = 'none';
}
}
function hideByTime()
{
tId = setTimeout("hideAllSubMenu(); makeDefault(activeSection); switchSearchSelect(false)", delayTime);
}
function abortHide()
{
clearTimeout(tId);
}
function makeHover(el)
{
el.className = 'section_hover';
}
function makeDefault(el)
{
el.className = '';
}
function CurSw(tab)
{
var els = document.getElementsByTagName("div");
if (els) for (var x = 0; x < els.length; x++)
{
var attr = els[x].getAttribute("curr");
if (attr == tab) els[x].style.display = "";
else if (attr && attr != tab) els[x].style.display = "none";
}
return false;
}
function switchSearchSelect(showOn) {
var tmp;
if (browser == 'ie') {
if (tmp = document.getElementById('search_country')) {
tmp.style.display = showOn ? 'none' : 'block';
tmp.style.visibility = showOn ? 'hidden' : 'visible';
}
if (tmp = document.getElementById('search_cities')) {
tmp.style.display = showOn ? 'none' : 'block';
tmp.style.visibility = showOn ? 'hidden' : 'visible';
}
if (tmp = document.getElementById('search_categories')) {
tmp.style.display = showOn ? 'none' : 'block';
tmp.style.visibility = showOn ? 'hidden' : 'visible';
}
}
}