function openwindow(url,windowname,windowwidth,windowheight,windowtop,windowleft,windowresizable,windowscrollbars,windowmenubar,windowstatus,windowdirectories,windowlocation,windowtoolbar) {
//if ie5
  if (document.all&&window.print) {
    if ((windowtop == 0) && (windowleft == 0)) { 
	  eval('window.showModelessDialog(url,windowname,"help:0;edge:raised;center:1;dialogWidth:'+windowwidth+'px;dialogHeight:'+windowheight+'px;resizable:'+windowresizable+';scroll:'+windowscrollbars+';status:'+windowstatus+'")')
    }
    else  {
      eval('window.showModelessDialog(url,windowname,"help:0;edge:raised;center:0;dialogWidth:'+windowwidth+'px;dialogHeight:'+windowheight+'px;dialogTop:'+windowtop+'px;dialogLeft:'+windowleft+'px;resizable:'+windowresizable+';scroll:'+windowscrollbars+';status:'+windowstatus+'")')
    }
  }
  else {
    if ((windowtop == 0) && (windowleft == 0)) { 
	  windowleft = ((screen.width - windowwidth) / 2);
	  windowtop = ((screen.height - windowheight) / 2);
    }
    eval('window.open(url,windowname,"width='+windowwidth+'px,height='+windowheight+'px,top='+windowtop+'px,left='+windowleft+'px,resizable='+windowresizable+',scrollbars='+windowscrollbars+',menubar='+windowmenubar+',status='+windowstatus+',directories='+windowdirectories+',location='+windowlocation+',toolbar='+windowtoolbar+'")')
  }

}
