// JavaScript Document

//  hide/show functions ----
function show(obj) {
	obj.style.display = 'block';
}
function hide(obj) {
	obj.style.display = 'none';
}
// --------------------------


//  temp functions ----
fotoN = 1;
function nextFoto(foto) {
	return;
	if(fotoN < 17) fotoN ++;
	else fotoN = 0;
	foto.src = 'img/photoes/' + foto.name + fotoN + '.jpg';
}

function nextBigFoto(foto) {
    return;
	if(fotoN < 5) fotoN ++;
	else fotoN = 1;
	foto.src = 'img/photoes/' + foto.name + fotoN + '.jpg';
}

function printit(container,stylepath) { 	/* функция вывода на печать содержимого элемента (c) 2004 Юрий Кетов 'Rottor'(rottor@mail.ru) */
		var cont = (document.getElementById)? document.getElementById(container) : document.all[container];
		var newpage = "<html><head><meta http-equiv='Content-Type' content='text/html; charset=utf-8'>";
		newpage += "<title>" + document.title + "</title>";
		newpage += "<meta http-equiv='Cache-Control' content='no-cache'>";
		newpage += "<link rel='stylesheet' type='text/css' href='/" + stylepath + "'></head>";
		newpage += '<body bgcolor="#FFFFFF" text="#000000" style="margin:0;" onload="javascript:window.print();">';
		newpage += cont.innerHTML; // внедрение содержимого слоя с документом в новый документ
		newpage += '</body></html>';
		document.write(newpage);
		document.close();
		return false;
}

function wopenPic(pic) {
	var path = "/img/apartments/" + pic + ".jpg";
	if (pic=="moscow14b3") {
		var obj_window = window.open(path,"apartment","width=552,height=374,top=268,left=340");
		obj_window.focus();
		return obj_window;
	} else {
		var obj_window = window.open(path,"apartment","width=611,height=401,top=268,left=340");
		obj_window.focus();
		return obj_window;
	}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  return window.open(theURL,winName,features);
}
