<!--
loadNull = new Image();
loadNull.src = "/images/null.gif";

function uniqueId(input) {
	re = /[A-Za-z0-9]/g;
	myArray = input.match(re);
	output = "";
	for (i=0;i<myArray.length;i++) {
		output = output + myArray[i];
	}
	return output;
}


function plantheroom(url, w, h, scrlng) {
	var r_w = w, r_h = h, s = '';
	if (scrlng)
		s_scroll = scrlng;
	else
		s_scroll = 'yes';
	s = 'status=no,scrollbars=' + s_scroll + ',width=' + r_w + ',height=' + r_h;
	WindowName = 'SecondWnd';
	window.open(url, WindowName, s);
	return false;
}



function tops(url, w, h) {

	var r_w = w, r_h = h, s = '';



		var leftPos = (screen.width - w)/2;
		var topPos = (screen.height - h)/4;


	s = 'status=no,scrollbars=yes,resizable=yes' + ',width=' + r_w + ',height=' + r_h + ',left=' + leftPos + ',top=' + topPos ;

	secWnd = window.open(url, 'LargePicWindow'+w, s);

	if ((url!="head.html")&&(url!="/head_eng.html")) {

	with (secWnd) {

		document.write("<HTML>\n<head><title>Masse.su</title>");

		document.write("</head>");

        document.write("<BODY MARGINWIDTH=0 MARGINHEIGHT=0 LEFTMARGIN=0 TOPMARGIN=0 BGCOLOR='White'>");

        document.write("<DIV STYLE='left:0px;top:0px;margin:0px 0px 0px 0px;'>");

        document.write("<IMG SRC=\""+url+"\" WIDTH="+ w +" HEIGHT=" + h + " BORDER=0>");

        document.write("</DIV>");

        document.writeln("</BODY>\n</HTML>");

        document.close();

		focus();

        }

	}

    return false;

}

function ops(path, x, y) {
	/*if (x == 1) {
		url = "/images/location_map.gif";
		w_w = 401; w_h = 297;
	} else {
		re = /gallery\/(\d+)t.jpg/; 
		myArray = re.exec(path.innerHTML);
		url = "/gallery/" + RegExp.$1 + ".jpg";
		w_w = x; w_h = y;
	}*/
	w_w = x; w_h = y;
	WindowName = uniqueId(path);
	s = 'status=no,scrollbars=no' + ',width=' + w_w + ',height=' + w_h;
	secWnd = window.open('', WindowName, s);
	with (secWnd) {
		document.write("<HTML>\n<head>\n<title>Массе</title>\n");
		//document.write('<link rel="stylesheet" href="/style/default.css" type="text/css">\n');
		document.write("</head>\n");
        document.write("<body marginwidth=0 marginheight=0 leftmargin=0 topmargin=0 bgcolor='White'>\n");
        document.write("<DIV STYLE='left:0px;top:0px;margin:0px 0px 0px 0px;'>\n");
        document.write("<IMG SRC=\""+path+"\" WIDTH="+ w_w +" HEIGHT=" + y + " BORDER=0>\n");
        document.write("</DIV>\n");
        document.write("</BODY>\n</HTML>");
        document.close();
		focus();
	}
}


function dealers_form() {
	WindowName = 'new_form';
		width = 460;
		height = 300;
		
		var leftPos = (screen.width - width)/2;
		var topPos = (screen.height - height)/4;

	s = 'status=no' + ',width=' + width + ',height=' + height + ',left=' + leftPos + ', top=' + topPos + ', alwaysRaised=yes, toolbar=0, menubar=0, scrollbars=no';
	secWnd = window.open('', WindowName, s);

	
	with (secWnd) {
		document.write("<HTML>\n<head>\n<title>Массе</title>\n");
		document.write('<link rel="stylesheet" href="/include/default.css" type="text/css">\n');
		document.write("</head>\n");
        document.write("<body marginwidth=0 marginheight=0 leftmargin=10 topmargin=0 bgcolor='White' style=\"background-image:none; background-color: #ffffff;\">\n");
        document.write("<DIV STYLE='left:0px;top:0px;margin:0px 0px 0px 0px;'>\n");




		document.write("<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
		document.write("<tr valign=\"top\">");
			document.write("<td width=\"9%\">&nbsp;</td>");
			document.write("<td width=\"80%\">");
			document.write("<p>");
			document.write("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
			document.write("<form action=\"/p.php?s=contacts\" method=\"post\">");
			document.write("<input type=\"hidden\" name=\"command\" value=\"dealer\">");
			document.write("<tr>");
				document.write("<td>ФИО<sup>*</sup></td>");
				document.write("<td>&nbsp;&nbsp;</td>");
				document.write("<td><input type=\"text\" name=\"fio\" class=\"FormInput\"></td>");
			document.write("</tr>");
			document.write("<tr><td colspan=\"3\" height=\"3\"></td></tr>");
			document.write("<tr>");
				document.write("<td>Название компании<sup>*</sup></td>");
				document.write("<td></td>");
				document.write("<td><input type=\"text\" name=\"firm\" class=\"FormInput\"></td>");
			document.write("<tr><td colspan=\"3\" height=\"3\"></td></tr>");
			document.write("<tr>");
				document.write("<td>Город<sup>*</sup></td>");
				document.write("<td></td>");
				document.write("<td><input type=\"text\" name=\"city\" class=\"FormInput\"></td>");
			document.write("<tr><td colspan=\"3\" height=\"3\"></td></tr>");
			document.write("<tr>");
				document.write("<td>Должность</td>");
				document.write("<td></td>");
				document.write("<td><input type=\"text\" name=\"position\" class=\"FormInput\"></td>");
			document.write("<tr><td colspan=\"3\" height=\"3\"></td></tr>");
			document.write("<tr>");
				document.write("<td>Код города<sup>*</sup></td>");
				document.write("<td></td>");
				document.write("<td><input type=\"text\" name=\"phonecode\" class=\"FormInput\"></td>");
			document.write("</tr>");
			document.write("<tr><td colspan=\"3\" height=\"3\"></td></tr>");
			document.write("<tr>");
				document.write("<td>Телефон/Факс<sup>*</sup></td>");
				document.write("<td></td>");
				document.write("<td><input type=\"text\" name=\"phone\" class=\"FormInput\"></td>");
			document.write("</tr>");

			document.write("<tr><td colspan=\"3\" height=\"3\"></td></tr>");
			document.write("<tr>");
				document.write("<td>email*</sup></td>");
				document.write("<td></td>");
				document.write("<td><input type=\"text\" name=\"email\" class=\"FormInput\"></td>");
			document.write("</tr>");

			document.write("<tr><td colspan=\"3\" height=\"3\"></td></tr>");
			document.write("<tr>");
				document.write("<td>опыт работы с бильярд.оборудованием*</td>");
				document.write("<td></td>");
				document.write("<td><input type=\"text\" name=\"exp\" class=\"FormInput\"></td>");
			document.write("</tr>");
			document.write("<tr><td colspan=\"3\" height=\"3\"></td></tr>");
			document.write("<tr>");
				document.write("<td>что привлекло внимание</td>");
				document.write("<td></td>");
				document.write("<td><input type=\"text\" name=\"attention\" class=\"FormInput\"></td>");
			document.write("</tr>");
			document.write("<tr><td colspan=\"3\" height=\"3\"></td></tr>");
			document.write("<tr valign=\"top\">");
				document.write("<td>Ваши замечания/пожелания</td>");
				document.write("<td></td>");
				document.write("<td><textarea name=\"comment\" class=\"FormInput\" style=\"height: 60px;\"></textarea></td>");
			document.write("</tr>");
			document.write("<tr><td colspan=\"3\" height=\"5\"></td></tr>");
			document.write("<tr>");
				document.write("<td></td>");
				document.write("<td></td>");
				document.write("<td><input type=\"submit\" value=\"отправить запрос на доступ в дилерский раздел\" class=\"FormButton\" style=\"width: 300px;\"></td>");
			document.write("</tr>");
			document.write("</form>");
			document.write("</table>");
			document.write("<p>&nbsp;поля, отмеченные<sup>*</sup> - обязательны для заполнения");
			
			document.write("</td>");
			
			document.write("<td width=\"9%\">&nbsp;</td>");
			document.write("<td class=\"InnPict1\">");
			document.write("<div style=\"width: 200px;\"></div>");
			document.write("</td>");
		document.write("</tr>");
		document.write("</table>");
		document.write("<!-- } Параграф 1 -->");	



        document.write("</DIV>\n");
        document.write("</BODY>\n</HTML>");
        document.close();
		focus();
	}
}


function replaceSome(tt) {
	myRe0 = new RegExp('href="[a-z0-9/]+\.html"', 'g');
	midStr0 = tt.replace(myRe0, "href='#' onclick='return false;'");
	myRe1 = new RegExp('left: 318px;', 'gi');
	midStr1 = midStr0.replace(myRe1, 'left: 40px;');
	return midStr1;
}

function prnWin() {
	if (!document.layers) {
		pageTitle = document.title;
		whatToPrint = document.getElementById("content");
		if (whatToPrint == null) whatToPrint = document.getElementById("newspool");
		innerCon = whatToPrint.innerHTML;
		printCon = replaceSome(innerCon);
		s = 'resizable=no,menubar=yes,location=no,toolbar=yes,status=no,scrollbars=yes,width=' + 700 + ',height=' + 600;
	    WindowName = uniqueId(window.location.href);
		var secWnd = window.open('', WindowName, s);
		with (secWnd) {
			document.write("<HTML>\n<head>\n<title>" + pageTitle + "</title>\n<link href=\"/include/default.css\" rel=\"stylesheet\" type=\"text/css\">\n</head>\n");
			document.write("<body bgcolor=\"#FFFFFF\" leftmargin=\"7\" topmargin=\"7\" style=\"background-image: none; background-color: #FFFFFF; margin: 5px 5px 5px 5px;\">\n");
			document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td><img src="/images/logo_print.gif" alt="" width="150" height="79" border="0"></td><td width="100%" align="right"><strong>Кутузовский проспект, дом 76</strong><br>Тел.: +7(095) 445-4624, 778-9068<br>с 10.00 до 21.00<P><b>Большая Сухаревская площадь 16/18, стр1</b><br>тел.: +7(095) 778-7542, 778-7634, тел/факс: +7 (095) 771-6472, 771-6473<br>с 10.00 до 19.00<p><b>Варшавское шоссе, дом 60</b><br>тел.: +7(095) 109-0472, тел/факс: +7(095) 317-4277<br>с 10.00 до 21.00</td></tr></table><br>&nbsp;\n');
			document.write(printCon);
			document.write("\n</body>\n");
			document.write("</html>");
			document.close();
			focus();
		}
	}
}

//-->

