<!--
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/print.css\" rel=\"stylesheet\" type=\"text/css\">\n</head>\n");
			document.write("<body>\n");
			document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td><img src="/images/logo_print.gif" alt="" width="131" height="100" border="0"></td><td width="100%" align="right"><b>тел.: 968-37-17, 768-06-99<br>e-mail: info@ruzpro.ru</b></td></tr></table><br>&nbsp;<br>\n');
			if (textHeader != null) document.write('<h1 style="font-size: 16px; padding-left: 15px;">' + textHeader.innerHTML + '</h1>');
			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 tops(url,w,h,scroll) {
	isScroll = (scroll) ? 'yes' : 'no';
	s = 'resizable=no,status=no,scrollbars=' + isScroll + ',width=' + w + ',height=' + h + 'top=10,left=10';
	WindowName = uniqueId(url);
	secWnd = window.open(url, WindowName, s);
	secWnd.focus();
}

function ops2(path, x, y, ext, dummy_text)
{
	if (typeof(path) == 'object')
    {
		re = /userfiles\/(\w+)t.(\w+)/;
		myArray = re.exec(path.innerHTML);
		url = '/userfiles/' + RegExp.$1 + ext;
	}
    else
		url = path;
	w_w = x; w_h = y + 77;
	WindowName = uniqueId(url);
	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("</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=\"" + url + "\"  BORDER=0>");
		document.write("</td></tr></table>");
		document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0" style="background: #28730A;">\n');
		document.write('<tr><td valign="top" style="background: url(/images/image_view_plate.gif) no-repeat top left;"><div style="text-align: center; padding: 45 0 19 0; width: 191px;"><a href="#" onclick="javascript: window.close();" style="color: #0E3200; font-weight: bold; font-size: 11px; font-family: Tahoma; text-decoration: none;">закрыть окно</a></div></td>\n');
		document.write('<td width="100%" style="background: url(/images/image_view_back.gif) repeat-x top left; padding: 0 15 0 15; color: white; font-size: 11px; font-family: Tahoma;">');
		document.write(dummy_text + '</td></tr></table>\n');
        document.write("</BODY>\n</HTML>");
        document.close();
		focus();
	}
}

function ops4(path, wd, ht) // вставляется в визивиге
{
		WindowName = uniqueId(path);
		wd = wd - 14;
		ht = ht + 37;
		s = 'status=no,scrollbars=yes' + ',width=' + wd + ',height=' + ht;
		secWnd = window.open('', WindowName, s);
		with (secWnd)
    	{
			document.write("<HTML>\n<head>\n<title>Рузские просторы</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('<table width="100%" border="0" cellspacing="0" cellpadding="0" style="background: #28730A;">\n');
			document.write('<tr><td valign="top" style="background: url(/images/image_view_plate.gif) no-repeat top left;"><div style="text-align: center; padding: 45 0 19 0; width: 191px;"><a href="#" onclick="javascript: window.close();" style="color: #0E3200; font-weight: bold; font-size: 11px; font-family: Tahoma; text-decoration: none;">закрыть окно</a></div></td>\n');
			document.write('<td width="100%" style="background: url(/images/image_view_back.gif) repeat-x top left; padding: 0 15 0 15; color: white; font-size: 11px; font-family: Tahoma;">');
			document.write('</td></tr></table>\n');
    	    document.write("</BODY>\n</HTML>");
/*			document.write("<HTML>\n<head>\n<title>Рузские просторы</title>\n");
			document.write("</head>\n");
    	    document.write("<body leftmargin=0 topmargin=0 rightmargin=0 bottommargin=0 marginheight=0 marginwidth=0 bgcolor='White'>\n");
			document.write("<table width=100% height=100% border=0 cellspacing=0 cellpadding=0><tr align=center valign=center><td>");
    	    document.write("<IMG SRC=\'" + path + "\'" + " BORDER=0>\n");
			document.write("</td></tr></table>");
	        document.write("</BODY>\n</HTML>");*/
    	    document.close();
			focus();
		}
}


function ops5(path, wd, ht, explanation) // вставляется в визивиге
{
  WindowName = uniqueId(path);
  wd = wd + 18;
  ht = ht + 77;
  s = 'status=no,resizable=yes,scrollbars=yes' + ',width=' + wd + ',height=' + ht;
  secWnd = window.open('', WindowName, s);
  with (secWnd)
   {
     document.write("<HTML>\n<head>\n<title>Рузские просторы</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('<table width="100%" border="0" cellspacing="0" cellpadding="0" style="background: #28730A;">\n');
     document.write('<tr><td valign="top" style="background: url(/images/image_view_plate.gif) no-repeat top left;"><div style="text-align: center; padding: 45 0 19 0; width: 191px;"><a href="#" onclick="javascript: window.close();" style="color: #0E3200; font-weight: bold; font-size: 11px; font-family: Tahoma; text-decoration: none;">закрыть окно</a></div></td>\n');
     document.write('<td width="100%" style="background: url(/images/image_view_back.gif) repeat-x top left; padding: 0 15 0 15; color: white; font-size: 11px; font-family: Tahoma;">');
     document.write(explanation + '</td></tr></table>\n');
     document.write("</BODY>\n</HTML>");
     document.close();
     focus();
   }
}

function ops5Flash(path, wd, ht, explanation) // вставляется в визивиге
{
  WindowName = uniqueId(path);
  wdW = wd + 18;
  htW = ht + 77;
  s = 'status=no,resizable=yes,scrollbars=yes' + ',width=' + wdW + ',height=' + htW;
  secWnd = window.open('', WindowName, s);
  with (secWnd)
   {
     document.write("<HTML>\n<head>\n<title>Рузские просторы</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('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="' + wd + '" height="' + ht + '" id="FlashShow" align="middle">');
     document.write('<param name="allowScriptAccess" value="sameDomain" />');
     document.write('<param name="movie" value="' + path + '" />');
     document.write('<param name="quality" value="high" />');
     document.write('<param name="bgcolor" value="#ffffff" />');
     document.write('<embed src="' + path + '" quality="high" bgcolor="#ffffff" width="' + wd + '" height="' + ht + '" name="FlashShow" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
     document.write('</object>');

     document.write("</td></tr></table>");
     document.write('<table width="100%" border="0" cellspacing="0" cellpadding="0" style="background: #28730A;">\n');
     document.write('<tr><td valign="top" style="background: url(/images/image_view_plate.gif) no-repeat top left;"><div style="text-align: center; padding: 45 0 19 0; width: 191px;"><a href="#" onclick="javascript: window.close();" style="color: #0E3200; font-weight: bold; font-size: 11px; font-family: Tahoma; text-decoration: none;">закрыть окно</a></div></td>\n');
     document.write('<td width="100%" style="background: url(/images/image_view_back.gif) repeat-x top left; padding: 0 15 0 15; color: white; font-size: 11px; font-family: Tahoma;">');
     document.write(explanation + '</td></tr></table>\n');
     document.write("</BODY>\n</HTML>");
     document.close();
     focus();
   }
}


// -->

