nn4 = (document.layers)? true : false;
ie4 = (document.all)? true : false;
nn6 = (document.getElementById && !ie4)? true : false;

function popupWin_Video(cardName, winW, winH, winTitle, text) {

W=480;
H=460;
	
if (nn4 || ie4 || nn6) {
posX = Math.round((screen.width - winW) / 2);
posY = Math.round((screen.height - winH) / 2);
posCode = (nn4 || nn6)? 'screenX='+posX+',screenY='+posY : 'left='+posX+',top='+posY;
} else { posCode = ''; }
cardWindow = window.open('','_blank','menubar=no,toolbar=no,scrollbars=no,status=no,width='+W+',height='+H+','+posCode);
cardWindow.document.open();

cardWindow.document.write('<HTML><HEAD><TITLE>'+winTitle+'</TITLE>');
cardWindow.document.write('<META content="text/html; charset=windows-1251" http-equiv=Content-Type></HEAD>');
cardWindow.document.write('<body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 bgcolor=#ffffff background="img/win/bg.gif">');
cardWindow.document.write('<Table width='+W+' height='+H+' border=0 cellpadding=0 cellspacing=0>');
cardWindow.document.write('<tr><td background="img/win/bgtop.gif" width=100% height="22" style="padding-bottom: 15px;"></td></tr>');
cardWindow.document.write('<tr><td align=center>');
cardWindow.document.write('<div style="padding-top: 15px;"><EMBED src='+cardName+' width='+winW+' height='+winH+'></EMBED><p><A href="" onClick="window.close()">закрыть окно</A></div></td></tr>');
cardWindow.document.write('<tr><td style="padding-left: 30px; padding-right: 150px; BACKGROUND: url(img/win/logo.gif) no-repeat right top; font-size: 11px; color: #535353; font-family: Verdana,Geneva,sans-serif;" width=100% height=60>'+text+'</td></tr>');
cardWindow.document.write('</Table></Body></Html>');

cardWindow.document.close();
cardWindow.focus();
}

