
var wnd;
var wndMap;

function showImage(url)
{
	if (wnd && !wnd.closed) wnd.close();
	wnd = window.open(url,"","resizable=yes,status=no,width=400,height=300");
}

function showMap(href)
{
	if (wndMap && !wndMap.closed) wndMap.close();
	wndMap = window.open(href,"","resizable=yes,status=no,width=578,height=580");
}

function checkform()
{
	document.VillageForm.page.value=1;
	document.VillageForm.submit();
}

function checkform2()
{
	document.VillageForm.submit();
}

function checkPage(number_page)
{
	document.VillageForm.page.value=number_page;
	document.VillageForm.submit();
}

function showPlan(url)
{
	if (wnd && !wnd.closed) wnd.close(); wnd = window.open(url,"","scrollbars=yes,resizable=yes,status=yes,width=500,height=500");
}

function popupWin(url,ww,hh)
{
	newWindow = window.open('','newWin','width='+(ww+20)+',height='+(hh+20)+'');
	newWindow.document.write("<html>\n<body bgcolor=#ffffff>\n<img src="+url+" width="+ww+" height="+hh+" border=0></body>\n</html>\n");
}

function changeImages() { document[changeImages.arguments[0]].src = changeImages.arguments[1]; }

function Show_layer(layer_number) {

	if (layer_number/10<2)
		{	j=10	}
	else
		{	j=20	}

	for (var i=j; i < j+4; i++) {
	if (document.getElementById('l'+i)) document.getElementById('l'+i).style.visibility = 'hidden';
	if (document.getElementById('d'+i)) document.getElementById('d'+i).style.visibility = 'hidden';
	if (document.getElementById('f'+i)) document.getElementById('f'+i).className='floor';
	}
	if (document.getElementById('l'+layer_number)) document.getElementById('l'+layer_number).style.visibility = 'visible';
	if (document.getElementById('d'+layer_number)) document.getElementById('d'+layer_number).style.visibility = 'visible';
	if (document.getElementById('f'+layer_number)) document.getElementById('f'+layer_number).className='floor active';
}


