 function ajax_encode (value)
{
  value = escape(value);
  var utf, win, pos=value.indexOf("%u");
  while (pos > -1)
  {
    utf = value.substring(pos, pos+6);
    win = "%" + ("BCDEF").charAt(utf.charAt(4)) + utf.charAt(5);
    value = value.replace(utf, win);
    pos = value.indexOf("%u");
  }
  return value;
}


var xmlHttp

function mainmenu()
{		file="/main-house-1000.html";		if (!((document.mainform[0].checked) ||(document.mainform[1].checked) ||(document.mainform[2].checked) ||(document.mainform[3].checked) ))
				file="/causae.html";
		if (document.mainform[0].checked)
		{
			if (!((document.mainform1[0].checked) ||(document.mainform1[1].checked) ||(document.mainform1[2].checked) ||(document.mainform1[3].checked) ||(document.mainform1[4].checked)))
				document.mainform1[0].checked=true;
			if (document.mainform1[0].checked)
			{
				file="main-house-h1.html";
			}
			if (document.mainform1[1].checked)
			{
				file="main-house-h2.html";
			}
			if (document.mainform1[2].checked)
			{
				file="main-house-h3.html";
			}
			if (document.mainform1[3].checked)
			{
				file="main-house-h4.html";
			}
			if (document.mainform1[4].checked)
			{
				file="main-house-h5.html";
			}
		}
		if (document.mainform[1].checked)
		{
			if (!((document.mainform1[0].checked) ||(document.mainform1[1].checked) ||(document.mainform1[2].checked) ||(document.mainform1[3].checked) ||(document.mainform1[4].checked)))
				document.mainform1[0].checked=true;
			if (document.mainform1[0].checked)
			{
				file="main-shopping-s1.html";
			}
			if (document.mainform1[1].checked)
			{
				file="main-shopping-s2.html";
			}
			if (document.mainform1[2].checked)
			{
				file="main-shopping-s3.html";
			}
			if (document.mainform1[3].checked)
			{
				file="main-shopping-s4.html";
			}
			if (document.mainform1[4].checked)
			{
				file="main-shopping-s5.html";
			}
		}
		if (document.mainform[2].checked)
		{
			if (!((document.mainform1[0].checked) ||(document.mainform1[1].checked) ||(document.mainform1[2].checked) ||(document.mainform1[3].checked) ||(document.mainform1[4].checked)))
				document.mainform1[0].checked=true;
			if (document.mainform1[0].checked)
			{
				file="main-refinancing-r1.html";
			}
			if (document.mainform1[1].checked)
			{
				file="main-refinancing-r2.html";
			}
			if (document.mainform1[2].checked)
			{
				file="main-refinancing-r3.html";
			}
			if (document.mainform1[3].checked)
			{
				file="main-refinancing-r4.html";
			}
			if (document.mainform1[4].checked)
			{
				file="main-refinancing-r5.html";
			}
		}
		if (document.mainform[3].checked)
		{
			if (!((document.mainform1[0].checked) ||(document.mainform1[1].checked) ||(document.mainform1[2].checked) ||(document.mainform1[3].checked) ||(document.mainform1[4].checked)))
				document.mainform1[0].checked=true;
			if (document.mainform1[0].checked)
			{
				file="main-business-b1.html";
			}
			if (document.mainform1[1].checked)
			{
				file="main-business-b2.html";
			}
			if (document.mainform1[2].checked)
			{
				file="main-business-b3.html";
			}
			if (document.mainform1[3].checked)
			{
				file="main-business-b4.html";
			}
			if (document.mainform1[4].checked)
			{
				file="main-business-b5.html";
			}
		}
		xmlHttp=GetXmlHttpObject()
	//	var url="content.php";
		xmlHttp.onreadystatechange=stateChanged;
		xmlHttp.open("GET",file,true);
		xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
		xmlHttp.send();
	//	document.getElementById('show_text').innerHTML=file;
}


function stateChanged()
{
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{                                               //escape(
		//alert(xmlHttp.responseText);
		document.getElementById('show_text').innerHTML=xmlHttp.responseText;
	}
}


function GetXmlHttpObject()
{
	var objXMLHttp=null
	if (window.XMLHttpRequest)
	{
		objXMLHttp=new XMLHttpRequest()
	}
	else if (window.ActiveXObject)
	{
		objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
	}
return objXMLHttp
}

function showHint(action,pole)
{
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Браузер не поддерживает запросы HTTP")
		return
	}
	var url="content.php";
	xmlHttp.onreadystatechange=stateChanged;
	xmlHttp.open("post",url,true);
	//xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
	xmlHttp.send(null);

}

//function stateChanged(file)
//{
//	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
//	{
		//;//xmlHttp.responseText;
//	}
//}

function GetXmlHttpObject()
{
var objXMLHttp=null
if (window.XMLHttpRequest)
{
objXMLHttp=new XMLHttpRequest()
}
else if (window.ActiveXObject)
{
objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
}
return objXMLHttp
}

