function mail(u, s, d, txt)
{
var l="ilto";
	if (txt == null)
		{document.write("<a"+" href="+"ma"+l+":"+u+"&#64;"+s+ "." +d+">"+u+"&#64;"+s+ "." +d+"</a>");}
	else
		{document.write("<a"+" href="+"ma"+l+":"+u+"&#64;"+s+ "." +d+">"+txt+"</a>");}	
}

function show(arg, amount)
{
if (document.getElementById(arg).style.display == "none")
	{
	if (amount != 0)
	{
		for (i=1; i<=amount; i++)
			{
			document.getElementById('tab'+i).style.display = "none";
			document.getElementById('tab'+i+'_switch').className = "direct";
			}
	}
	document.getElementById(arg).style.display = "block";
	document.getElementById(arg+'_switch').className = "on";
	}
else
	{
	document.getElementById(arg).style.display = "none";
	document.getElementById(arg+'_switch').className = "direct";
	}
}

function zoom(url, w, h, alt)
{
if (document.getElementById("zoom_screen").style.display == "none")
	{
	document.getElementById("zoom_screen").style.display = "block";
	document.getElementById("zoomed_photo").src = url;
	document.getElementById("zoomed_photo").width = w;
	document.getElementById("zoomed_photo").height = h;
	document.getElementById("zoomed_photo").alt = alt;
	document.getElementById("zoomed_div").style.marginTop = -((Math.round (h/2))+(8+1))+"px";
	document.getElementById("zoomed_div").style.marginLeft = -((Math.round (w/2))+(8+1))+"px";
	document.getElementById("zoomed_div").style.height = (h+(8*2))+"px";
	document.getElementById("zoomed_div").style.width = (w+(8*2))+"px";
	document.getElementById("zoom_x").style.display = "none";
	}
else
	{
	document.getElementById("zoom_screen").style.display = "none";
	document.getElementById("zoomed_photo").src = "/design/spacer.gif";
	document.getElementById("zoomed_photo").width = "1";
	document.getElementById("zoomed_photo").height = "1";
	document.getElementById("zoomed_photo").alt = "";
	document.getElementById("zoomed_div").style.marginTop = "0";
	document.getElementById("zoomed_div").style.marginLeft = "0"
	document.getElementById("zoom_x").style.display = "none";
	}
}

function zoomx()
{
if (document.getElementById("zoom_x").style.display == "none")
	{document.getElementById("zoom_x").style.display = "block";}
else
	{document.getElementById("zoom_x").style.display = "none";}
}

function get_anchor(hash)
{
var anchor=hash.split('#')[hash.split('#').length-1];
}
function anchor()
{
var a = (location.hash);
if (a == "#tab9")
	{show('tab9');}
//else if (a == "#2")
//	{select('2');}
//else if (a == "#3")
//	{select('3');}
//else
//	{select('0');}
}

function language(id){		
		
	var curr;
	
	if ((document.location.hostname).search(/\.ru/) > 0)
		curr='ru';
	else
		curr='en';
	
	
	if(curr!=id)	
		if(id=="en")	
			window.location = 'http://renaissancesuitesodessa.com' + document.location.pathname;		
		else
			window.location = 'http://renaissancesuitesodessa.ru' + document.location.pathname;
			
			
}