function openwindescr (dop,descr)
{
//  myWin=window.open('','myWin','menubar,scrollbars,left=30px,top=40px,height=400px,width=600px');
//  myWin.document.write('<html><head> <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAFLEodrpAUsiK6LvWHGrguRQvhOxP-OItX-qfhTi-wpL1m3PbvhQJpt8OOEdBJTNjYEYfWsnaKFvomw" type="text/javascript"> ' +
//'</script><script src="http://ipb.ru/img/scriptmaps.js" type="text/javascript">'+
//'</script><title>My Window</title></head><body  onload="load()" onunload="GUnload()"><DIV id=map style="WIDTH: 600px; HEIGHT: 550px">Загрузка карты...</DIV></body></html>');
 NewWindow('/contacts/openmap.asp?dop='+dop+"&descr=1", 'Info', 820, 670,'yes', 'no', 'no', 'no');
  
}

function openwin2 (dop)
{
//  myWin=window.open('','myWin','menubar,scrollbars,left=30px,top=40px,height=400px,width=600px');
//  myWin.document.write('<html><head> <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAFLEodrpAUsiK6LvWHGrguRQvhOxP-OItX-qfhTi-wpL1m3PbvhQJpt8OOEdBJTNjYEYfWsnaKFvomw" type="text/javascript"> ' +
//'</script><script src="http://ipb.ru/img/scriptmaps.js" type="text/javascript">'+
//'</script><title>My Window</title></head><body  onload="load()" onunload="GUnload()"><DIV id=map style="WIDTH: 600px; HEIGHT: 550px">Загрузка карты...</DIV></body></html>');
 NewWindow('/contacts/openmap.asp?dop='+dop, 'Info', 820, 570,'yes', 'no', 'no', 'no');
  
}

function openwinya (dop,descr)
{
//  myWin=window.open('','myWin','menubar,scrollbars,left=30px,top=40px,height=400px,width=600px');
//  myWin.document.write('<html><head> <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAFLEodrpAUsiK6LvWHGrguRQvhOxP-OItX-qfhTi-wpL1m3PbvhQJpt8OOEdBJTNjYEYfWsnaKFvomw" type="text/javascript"> ' +
//'</script><script src="http://ipb.ru/img/scriptmaps.js" type="text/javascript">'+
//'</script><title>My Window</title></head><body  onload="load()" onunload="GUnload()"><DIV id=map style="WIDTH: 600px; HEIGHT: 550px">Загрузка карты...</DIV></body></html>');
 NewWindow('/contacts/openmap.asp?dop='+dop+"&ya=1&descr="+descr, 'Info', 820, 570,'yes', 'no', 'no', 'no');
  
}

function openwin(id,wes,raz)
{
  NewWindow('/contacts/openphoto.asp?id='+id, 'Info', wes, raz,'no', 'no', 'no', 'no');
//window.open('openkites.asp?id='+id, 'Info',"resizable=no,scrollbars=no");
}

var win= null;

function NewWindow(mypage, myname, w, h, scroll, toolbar, menubar, directories)
{
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  var menubar = 0;

  var settings =  'width=' + w + ',height=' + h + ',';
      settings += 'top='+wint+',';
      settings += 'left='+winl+','
      settings += 'scrollbars='+scroll +',';
      settings += 'toolbar=' + toolbar +',';
      settings += 'menubar=' + menubar + ',';	
      settings += 'directories=' + directories + ',';
      settings += 'resizable=yes';

  win=window.open(mypage,myname,settings);
  if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}  