nn4 = (document.layers)? true : false;
ie4 = (document.all)? true : false;
nn6 = (document.getElementById && !ie4)? true : false;

function popupVideo(cardName, winW, winH, winTitle, text) {

var W=130+winW
H=150+winH

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('<!-- LINK href="/files/main.css" rel=stylesheet type=text/css --><\/head>');
cardWindow.document.write('<body bgcolor="FBF8F1" aLink=CFBAB9 link=CFBAB9 vLink=#fde18a marginwidth=0 marginheight=0 topmargin=0 leftmargin=0 rightmargin=0 bottommargin=0>');
cardWindow.document.write('<Table border=0 width="'+W+'" height="'+H+'" cellpadding=0 cellspacing=0 valign=top>');
cardWindow.document.write('<TR height=26 valign=top><TD width=60 height=26><Img Src=/phot/1.gif></TD><TD height=26 background=/phot/1-4.gif align=left><Img Src=/phot/2.gif></TD><TD height=26 background=/phot/1-4.gif align=right><Img Src=/phot/3.gif></TD><TD width=56 height=26><Img Src=/phot/4.gif></TD></TR>');
cardWindow.document.write('<TR bgcolor=white valign=bottom><TD width=60 height=100% background=/phot/5_1.gif><Img Src="/phot/5.gif"></TD><TD width=100% height=313 colspan=2 align=center valign=middle bgcolor=ffffff>');
cardWindow.document.write('<object type="application/x-shockwave-flash" width="'+winW+'" height="'+winH+'" wmode="transparent" data="http://www.reality-dom.ru/video/flvplayer.swf?file=http://www.reality-dom.ru/video/'+cardName+'">');
cardWindow.document.write('<param name="movie" value="http://www.reality-dom.ru/video/flvplayer.swf?file=http://www.reality-dom.ru/video/'+cardName+'" />');
cardWindow.document.write('<param name="wmode" value="transparent" />');
cardWindow.document.write('</object>');
cardWindow.document.write('<p><a href="" onClick="window.close()">закрыть окно</A></p>');
cardWindow.document.write('</TD><TD width=56 height=313 background=/phot/6_1.gif><Img Src=/phot/6.gif></TD></TR>');
cardWindow.document.write('<TR height=26><TD width=60 height=20><Img Src=/phot/7.gif></TD><TD height=20 background=/phot/9_1.gif align=left><Img Src=/phot/8.gif></TD><TD height=20 background=/phot/9_1.gif align=right><Img Src=/phot/9.gif></TD><TD width=56 height=20><Img Src=/phot/10.gif></TD></TR>');
cardWindow.document.write('<TR height=61><TD width=60 height=61><Img Src=/phot/11.gif></TD><TD width=100% height=61 align=left bgcolor=FBF8F1 colspan=3 valign=top>');
cardWindow.document.write('<Table border=0 cellpadding=7 cellspacing=0><Tr><TD valign=top>'+text+'</TD></Tr></Table>');
cardWindow.document.write('</TD></TR>');
cardWindow.document.write('</Table>');
cardWindow.document.write('</body></html>');
cardWindow.document.close();
cardWindow.focus();
}

