
function newWindow(mypage,myname,w,h,features) {
  if(screen.width){
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  }else{winl = 0;wint =0;}
  if (winl < 0) winl = 0;
  if (wint < 0) wint = 0;
  var settings = 'height=550,';
  settings += 'width=700,';
  settings += 'top=50,';
  settings += 'left=50,'; 
  settings += 'toolbar=yes,';
  settings += 'scrollbars=yes,';  
  settings += features;
  win = window.open(mypage,myname,settings);
  win.window.focus();
}


function newWindowHelp(mypage,myname,w,h,features) {
  if(screen.width){
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  }else{winl = 0;wint =0;}
  if (winl < 0) winl = 0;
  if (wint < 0) wint = 0;
  var settings = 'height=550,';
  settings += 'width=700,';
  settings += 'top=100,';
  settings += 'left=100,'; 
  settings += 'scrollbars=yes,';   
  settings += features;
  win = window.open(mypage,myname,settings);
  win.window.focus();
}

// name - name of the cookie
// [path] - path of the cookie (must be same as path used to create cookie)
// [domain] - domain of the cookie (must be same as domain used to create cookie)
// * path and domain default if assigned null or omitted if no explicit argument proceeds
function deleteCookie(name, path, domain) {
  if (getCookie(name)) {
    document.cookie = name + "=" + 
    ((path) ? "; path=" + path : "") +
    ((domain) ? "; domain=" + domain : "") +
    "; expires=Thu, 01-Jan-70 00:00:01 GMT";
  }
}
