  function closewaitwindow() {
    if(typeof(waitwindow)!="undefined") {
      waitwindow.close();
    }
  }
