<!--
window.name= "winmain";
function init() {
window.focus();
}
onload = init ;
function showHead() {
	if (document.all) window.document.xyz.Play();
}

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 replaceSome(tt) {
	myRe0 = new RegExp('href="[a-z0-9/\_\:\-]+\.html"', 'g');
	midStr0 = tt.replace(myRe0, "href='#' onclick='return false;'");
	myRe1 = new RegExp('cnt_top', 'g');
	midStr1 = midStr0.replace(myRe1, "xyz");
	myRe2 = new RegExp('href=', 'g');
	midStr2 = midStr1.replace(myRe2, "xyz=");
	myRe3 = new RegExp('gotop', 'g');
	midStr3 = midStr2.replace(myRe3, "null");
	return midStr3;
}

function prnWin() {
	if (!document.layers) {
		pageTitle = document.title;
		whatToPrint = document.getElementById("content");
		textHeader =  document.getElementById("content_header");
		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=\"/style/common.css\" rel=\"stylesheet\" type=\"text/css\">\n</head>\n");
			document.write("<body style=\"padding: 6;\">\n");
			document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td><img src="/images/logo.gif" alt="" width="239" height="52" border="0"></td><td width="100%" align="right"><b>тел.: 777-0203<br>e-mail: info@farwest.ru</b></td></tr></table><br>&nbsp;<br>\n');
			if (textHeader != null)
                document.write('<p><h1>' + textHeader.innerHTML + '</h1></p>');
			document.write('<div id="content">\n');
			document.write(printCon);
			document.write('</div>\n');
			document.write("\n</body>\n");
			document.write("</html>");
			document.close();
			focus();
		}
	}
}

function ops4(path, wd, ht)
{
		pageTitle = document.title;
		WindowName = uniqueId(path);
		wd = wd - 14;
		ht = ht + 37;
		s = 'resizable=yes,status=no,scrollbars=yes' + ',width=' + wd + ',height=' + ht;
		secWnd = window.open('', WindowName, s);
		with (secWnd)
    	{
			document.write("<HTML>\n<head>\n<title>" + pageTitle + "</title>\n");
			document.write("</head>\n");
        	document.write("<body leftmargin=0 topmargin=0 rightmargin=0 bottommargin=0 marginheight=0 marginwidth=0 bgcolor='#BECF9E'>\n");
			document.write("<table width=100% border=0 cellspacing=0 cellpadding=0><tr align=center valign=center><td>");
    	    document.write("<IMG SRC=\"" + path + "\"  BORDER=0>");
			document.write("</td></tr></table>");
    	    document.write("</BODY>\n</HTML>");
    	    document.close();
			focus();
		}
}
// -->
