function ShowWin(url,x,y,name,isscrollbars) {
x=(x > screen.width * 0.7 ? screen.width * 0.7 : x);
y=(y > screen.height * 0.7 ? screen.height * 0.7 : y);
cx=screen.width/2-(x / 2);
cy=screen.height/2-(y/2);
isscrollbars=(isscrollbars=="no")?"no":"yes";
window.open(url,name,"toolbar=no,status=no,directories=no,menubar=no,resizable=yes,width="+x+",height="+y+",scrollbars="+isscrollbars+",top="+cy+",left="+cx);
}
function ShowWinS(url, x, y, scrl) {
var cx, cy, name;
x=(x > screen.width * 0.7 ? screen.width * 0.7 : x);
y=(y > screen.height * 0.7 ? screen.height * 0.7 : y);
cx=screen.width/2 - (x/2);
cy=screen.height/2-(y/2);
name = getNameByDate();
window.open(url,name,"toolbar=no,status=no,directories=no,menubar=no,resizable=yes,width="+x+",height="+y+",scrollbars="+scrl+",top="+cy+",left="+cx);
}
function getNameByDate() {
          var s = "";
          var d = new Date();
	  s += d.getFullYear();
	  s += (d.getMonth() + 1);
	  s += d.getDate();
	  s += "_" + d.getHours();
	  s += d.getMinutes();
	  s += d.getSeconds();
          return s;
}
var NaN = 0;
function checkAllOptions(form) {
 for(var i=0; i<form.elements.length; i++) {
  var elem = form.elements[i];
  if(elem.value == 'all') {
   elem.value = '';
   elem.innerHTML = '';
  }
 }
}
