function Over(n,str){n.style.background='url('+str+')';}
function underShow(){document.getElementById('underMenu'+arguments[0]).style.backgroundColor='#FFF'; document.getElementById('menu'+arguments[0]).style.backgroundColor='#FFF'}
function underHide(){document.getElementById('underMenu'+arguments[0]).style.backgroundColor=''; document.getElementById('menu'+arguments[0]).style.backgroundColor=''}
function createBookmark(name){we = window.external;if (!we) {return true} else {we.addFavorite('http://azov-kurort.com.ua/', name);return false;}}

//==========================================
function Coords(p)
{
_X=0; _Y=0;
while (p!=null)
{_X=_X+p.offsetLeft; _Y=_Y+p.offsetTop; p=p.offsetParent}
return {x:_X, y:_Y}
}
//==========================================
function MenuPosition(n,pos,id)
{
	
	if(pos==0)
	{
	document.getElementById(id).style.top = Coords(n).y+n.offsetHeight+'px';
	document.getElementById(id).style.left = Coords(n).x+'px';
	}
	if(pos==1)
	{
	document.getElementById(id).style.top = Coords(n).y-2+'px';
	document.getElementById(id).style.left = Coords(n).x+5+n.offsetWidth+'px';
	}
}
var Structure = new Array;
var str_count=0;
function Add_str(id)
{
var isin=false;
var i=0;
while(i<Structure.length){if(Structure[i]==id){isin=true; break};i++}
if(isin==false){Structure[str_count]=id; str_count++}
}
//==========================================
var Timer;
var zimer;
var last='';
function Open(n,pos,id)
{
	window.clearTimeout(Timer);window.clearTimeout(zimer);
	if(arguments[3]==0){Clearall(); Structure = new Array; str_count=0;}
	else{if(last!=''){document.getElementById(last).style.display='none';}	last=id;}
	Add_str(id);
	MenuPosition(n,pos,id);
	document.getElementById(id).style.display='block';
}
function Clearall(){var i=0;while(i<Structure.length){document.getElementById(Structure[i]).style.display='none';i++}}
function Close(id){Timer=window.setTimeout('Clearall()',1000);if(id!=null){closer()}}
function stoper(id){window.clearTimeout(Timer); if(id!=null){window.clearTimeout(zimer);}}
function closer(){zimer=window.setTimeout('hide()',1000)}
function hide(){document.getElementById(last).style.display='none';}
