function newWindow(file,window) {
msgWindow=open(file,window,'resizable=no,width=350,height=200,top=25,left=200');
if (msgWindow.opener == null) msgWindow.opener = self;
}

function openWin1(file,w,h) { w=w+10,h=h+10 
  myWin= window.open('','_blank',  'width='+w+',Height='+h+',status=no,scrollbar=yes,menubar=no');
  myWin.document.write('<link href=/css/layers.css rel=stylesheet type=text/css><title>Елита-HOME</title><body leftmargin=0 topmargin=0><table cellspacing=0 cellpadding=4 border=0 align=center><tr><td colspan=2><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+w+'" height="'+h+'" title="&#1096;&#1072;&#1087;&#1082;&#1072;"><param name="movie" value="'+file+'"><param name="quality" value="high"><embed src="'+file+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+w+'" height="'+h+'"></embed></object></td></tr></table></body>');
}


function openWin3(file,w,h) { w=w+10,h=h+10 
  myWin= window.open('','_blank',  'width='+w+',Height='+h+',status=no,scrollbar=yes,menubar=no');
  myWin.document.write("<link href=/templates/001/css/layers_default.css rel=stylesheet type=text/css><title>Елита-HOME</title><body leftmargin=0 topmargin=0><table cellspacing=0 cellpadding=4 border=0 align=center><tr><td colspan=2><a href=# onclick=javascript:window.close()><img name=im src="+file+" alt=закрыть&nbsp;окно border=1 style=border-color:dddddd></a></td></tr> </table></body>");
}


function sure(form){if(confirm('Вы уверены?')){form.submit()}}
function sure2(url){if(confirm('Вы уверены?')){document.location.replace(url)}}


function checkform(which) {
var pass=true;
if (document.images) {
for (i=0;i<which.length;i++) {
var tempobj=which.elements[i];
if (tempobj.name.substring(0,1)=="_") {
if (((tempobj.type=="text"||tempobj.type=="textarea"||tempobj.type=="password")&&
tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&
tempobj.selectedIndex==0)) {
pass=false;
break;
}
}
}
}
if (!pass) {

alert("Вы не заполнили обязательные поля");
return false;
}
else
return true;
}

