function openwindow(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
{
switch(window.screen.width)
{
case 1600: 
	top=(1024-100-height)/2;
	if(left<0) left=0;
	left=(1280-10-width)/2;
	if(top<0) top=0;
	break;
case 1280:
	top=(1024-100-height)/2;
	if(left<0) left=0;
	left=(1280-10-width)/2;
	if(top<0) top=0;
	break;
case 1024:
	top=(768-100-height)/2;
	if(left<0) left=0;
	left=(1024-10-width)/2;
	if(top<0) top=0;
	break;
case 800:
	top=(600-100-height)/2;
	if(left<0) left=0;
	left=(800-10-width)/2;
	if(top<0) top=0;
	break;
default:
	top=(480-100-height)/2;
	if(left<0) left=0;
	left=(640-10-width)/2;
	if(top<0) top=0;
}
  toolbar_str = toolbar ? 'yes' : 'no';
  menubar_str = menubar ? 'yes' : 'no';
  statusbar_str = statusbar ? 'yes' : 'no';
  scrollbar_str = scrollbar ? 'yes' : 'no';
  resizable_str = resizable ? 'yes' : 'no';
  window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
}