var win = null;
function NewWindow(mypage,myname,w,h,scroll,resize) {
  LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
  TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
  settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable='+resize+',titlebar=no';
  win = window.open(mypage,myname,settings);
  if(win.window.focus){win.window.focus();}
}
function LeftWindow(mypage,myname,w,h,scroll,resize) {
  settings = 'height='+h+',width='+w+',top=0,left=0,scrollbars='+scroll+',resizable='+resize+',titlebar=no';
  win = window.open(mypage,myname,settings);
  if(win.window.focus){win.window.focus();}
}
function downloaddata() {
  marqueedata.startDownload(externalmarquee.src,displaydata);
}
function displaydata(data) {
  externalmarquee.innerHTML=data;
}
function printWindow() {
bV = parseInt(navigator.appVersion);
if (bV >= 4) window.print();
}
function openMyWindow(target,winname, mw, mh, mleft, resize, scrollbar) {
  var leftPosition, topPosition, settings;
  var win = null;
  if (mleft){
    leftPosition = 0;
  } else {
    leftPosition = (screen.width) ? (screen.width-mw)/2 : 0;
  }
  topPosition = (screen.height) ? (screen.height-mh)/2 : 0;
  settings = "height=" + mh + ", width=" + mw + ", top=" + topPosition + ", left=" + leftPosition+ ", scrollbars=" + (scrollbar ? "yes" : "no") + ", resizable=" + (resize ? "yes" : "no") + ", titlebar=no";
  win = window.open(target,winname,settings);
  if(win.window.focus){
    win.window.focus();
  }
  return win;
}
