//жаба скрипт
var wait_=false;

function showf(id)
{
	var pr2=document.getElementById('pr2');
	pr2.innerHTML='<img id=im src="">';
	var im = document.getElementById('im');
	var inx = document.getElementById('in'+id.toString());
	var tx = document.getElementById('txt');
	tx.innerHTML = inx.innerHTML;
	if (id==12)
	{
		pr2.innerHTML=document.getElementById('in12p').innerHTML;
	}else
	im.src='im000'+id.toString()+'.jpg';
	return;
}


function GetXmlHttpObject()
{
var xmlHttp=null;
try
  {
  // Firefox, Opera 8.0+, Safari
  xmlHttp=new XMLHttpRequest();
  }
catch (e)
  {
  // Internet Explorer
  try
    {
    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
    }
  catch (e)
    {
    xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
  }
return xmlHttp;
}

function sendMail()
{
	var url='mail.php';
	var params='';
	for (var i=1; i<7; i++)
	{
		params+='f'+i.toString()+'='+document.getElementById('f'+i.toString()).value+'&';
	}

xmlHttp=GetXmlHttpObject();
xmlHttp.onreadystatechange=stateChanged;
xmlHttp.open("POST",url,true);
xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=utf-8");
xmlHttp.setRequestHeader("Content-length", params.length);
xmlHttp.setRequestHeader("Connection", "close");
wait_=true;
xmlHttp.send(params);
}

function stateChanged() 
{ 
	wait_=false;
if (xmlHttp.readyState==4)
{ 
	document.getElementById('mbox_txt').innerHTML = xmlHttp.responseText;
	document.getElementById('mbox').style.visibility='visible';
}
}

function hide_mbox()
{
	document.getElementById('mbox').style.visibility='hidden';
}

function showMenu(id)
{
	el = document.getElementById('menu_'+id.toString());
	el.style.visibility='visible';
}

function hideMenu(id)
{
	el = document.getElementById('menu_'+id.toString());
	el.style.visibility='hidden';
}

function imgShow(src)
{

			var x,y;
			if (self.innerHeight) // all except Explorer
			{
				x = self.innerWidth;
				y = self.innerHeight;
			}
			else if (document.documentElement && document.documentElement.clientHeight)
				// Explorer 6 Strict Mode
			{
				x = document.documentElement.clientWidth;
				y = document.documentElement.clientHeight;
			}
			else if (document.body) // other Explorers
			{
				x = document.body.clientWidth;
				y = document.body.clientHeight;
			}

	document.getElementById('big_image').src=src;
	id = document.getElementById('image_table');
	var yy = y/2-document.getElementById('big_image').height/2+document.documentElement.scrollTop;
	id.style.top = yy.toString() + 'px';
	id.style.visibility='visible';
}

function imgHide()
{
	document.getElementById('image_table').style.visibility='hidden';
}