function openW(address, w, h) {
	//w=700;
	//h=650;
	 w=window.open(address,"fotos","width="+w+", height="+h+", menu=false, resizable=yes, scrollbars=yes");
	 w.focus();
}

//функции для показа картинок

function newWinDoc(xx,yy,targetWindow,htmlT){
myWin=open('',targetWindow,'width='+xx+',height='+yy+',status=yes,toolbar=no,menubar=no,resizable=yes,scrollbars=no');
myWin.document.open();
myWin.resizeTo(xx+10,yy+50);
myWin.document.write(htmlT);
myWin.document.close();
if( document.body != null ) { // ie5
innerW = document.body.clientWidth;
innerH = document.body.clientHeight;
} else { // ns4
innerW = window.innerWidth;
innerH = window.innerHeight;
};
myWin.moveTo(screen.width/2-xx/2,screen.height/2-yy/2);
myWin.focus();

}
function fWinDoc(xx,yy,targetWindow,htmlT){
myWin=open('',targetWindow,'width='+xx+',height='+yy+',status=yes,toolbar=no,menubar=no,resizable=yes,scrollbars=no');
myWin.document.open();
myWin.resizeTo(xx+10,yy+40);
myWin.document.write(htmlT);
myWin.document.close();
if( document.body != null ) { // ie5
innerW = document.body.clientWidth;
innerH = document.body.clientHeight;
} else { // ns4
innerW = window.innerWidth;
innerH = window.innerHeight;
};
myWin.moveTo(screen.width/2-xx/2,screen.height/2-yy/2);
myWin.focus();

}
function WinPic(width, height, title, src)
{
  newWinDoc(width,height,'win1', 
  '<html><head><title>'+title+'</title></head>'+
  '<body bgcolor=#FFFFFF leftmargin=0 topmargin=0 rightmargin=0 bottommargin=0 marginwidth=0 marginheight=0>'+
  '<img src="'+src+'">'+
  '</body></html>'); 
  return false;
};

function WinFlash(width, height, title, name, srcFlash, wFlash, hFlash)
{
  str = '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="'+wFlash+'" height="'+hFlash+'" id="'+name+'" align="middle">'+
  '<param name="allowScriptAccess" value="sameDomain">'+
  '<param name="movie" value="'+srcFlash+'">'+
  '<param name="quality" value="high">'+
  '<param name="bgcolor" value="#ffffff">'+
  '<embed src="'+srcFlash+'" quality="high" bgcolor="#ffffff" width="'+wFlash+'" height="'+hFlash+'" name="'+name+'" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">'+
  '</object>';
  fWinDoc(width,height,'win1', 
  '<html><head><title>'+title+'</title></head>'+
  '<body bgcolor=#FFFFFF leftmargin=0 topmargin=0 rightmargin=0 bottommargin=0 marginwidth=0 marginheight=0>'+
  str+
  '</body></html>'); 
  //return false;
};
