var a = '';
var c = 15;

function color(id)
{
document.getElementById('menu'+id).style.background = 'url(images/main_09.jpg) repeat-y';
document.getElementById('menu'+id).style.borderTop = '1px solid #cccccc';
document.getElementById('menu'+id).style.borderBottom = '1px solid #cccccc';
};

function color_none(id)
{
if ( a != 'menu'+id)
	{
		document.getElementById('menu'+id).style.background = '';
		document.getElementById('menu'+id).style.border = 'none';
	}
};

function clear_input(id)
{
t = document.getElementById(id).value;
if ( t == 'Ihr Name' || t == 'Ihr Email' || t == 'Ihre  Bestellung und Telefon')
	{
		document.getElementById(id).value = '';
	}
};

function menu_7 ()
{
	document.getElementById('menu7').style.visibility = 'visible';
	document.getElementById('menu7').style.background = 'url(images/main_09.jpg) repeat-y';	
	document.getElementById('menu7').style.borderTop = '1px solid #cccccc';
	document.getElementById('menu7').style.borderBottom = '1px solid #cccccc';
};

function menu()
{
z = new Array();
z[0] = "index.php";
z[1] = "gal.php";
z[2] = "bron.php";
z[3] = "pay.php";
z[4] = "services.php";
z[5] = "contacts.php";
z[6] = "send.php";
z[7] = "transfer.php";
z[8] = "partners.php";
lh = location.href;

 // 
 if (lh.search('nevskiy88') != -1)
	{
		menu_7();
		document.getElementById('menu7').innerHTML = 'Newskij 88';
		z[6] = "nevskiy88.php";
	}; 
 if (lh.search('marata4') != -1)
	{
		menu_7();
		document.getElementById('menu7').innerHTML = 'Marata Stra&szlig;e 4';
		z[6] = "marata4.php";
	}; 
 if (lh.search('novo59') != -1)
	{
		menu_7();
		document.getElementById('menu7').innerHTML = 'Nowotscherkasski 59';
		z[6] = "novo59.php";
	};
	
 for (i = 0; i<z.length; i++) 
  {
   if (lh.search(z[i]) != -1)
	{
		if ( i == 6 || i == 7 )
			{
				document.getElementById('menu'+(i+1)).style.visibility = 'visible';
				document.getElementById('menu'+(i+1)).style.background = 'url(images/main_09.jpg) repeat-y';	
				document.getElementById('menu'+(i+1)).style.borderTop = '1px solid #cccccc';
				document.getElementById('menu'+(i+1)).style.borderBottom = '1px solid #cccccc';
				a = 'menu'+(i+1);
			}
		else
			{
				document.getElementById('menu'+(i+1)).style.background = 'url(images/main_09.jpg) repeat-y';	
				document.getElementById('menu'+(i+1)).style.borderTop = '1px solid #cccccc';
				document.getElementById('menu'+(i+1)).style.borderBottom = '1px solid #cccccc';
				a = 'menu'+(i+1);
			}
	}
  };
if (lh.search('.php') == -1)
			{
				document.getElementById('menu1').style.background = 'url(images/main_09.jpg) repeat-y';	
				document.getElementById('menu1').style.borderTop = '1px solid #cccccc';
				document.getElementById('menu1').style.borderBottom = '1px solid #cccccc';
				a = 'menu1';
			}

z[6] = "send.php";
 
 /* 
 if (lh.search(z[0]) == -1 && lh.search(z[6]) == -1)
	{
		document.getElementById('text').style.minHeight = '565px';
	}; 
	
 */ 
 if (lh.search(z[0]) != -1 || lh.search(z[6]) != -1 || lh.search('.php') == -1)
	{
		document.getElementById('right_table').style.background = '';
	}
 else
	{
		document.getElementById('right_table').style.background = 'url(images/top.jpg) top center no-repeat';
	};
};

function timedCount()
{
document.getElementById('back').value = c;
c = c - 1;
if (c > 0)
	{
		setTimeout("timedCount()",1000);
	}
else
	{
		history.go(-1);
	}
}
