/*<!--
function getFocus() {
  // place the id below of the field you want to have focus upon page load
  var focusHere = document.getElementById("yourName");
  focusHere = focusHere.focus();
}

// Multiple onload function
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

addLoadEvent(function() {
  getFocus();
});
-->*/

function wait(waitmsecs) {
	var startwait = new Date().getTime();
	var waitcur = startwait;
	while(waitcur - startwait < waitmsecs) {
		waitcur = new Date().getTime();
	}
}
function openWindow(openURL, openName, openWidth, openHeight, openScrollbar) {
	if (window.newWindow) {
		window.newWindow.close();
		newWindow = null;
		openWindow(openURL, openName, openWidth, openHeight, openScrollbar);
	} else {
		if (openWidth == 0) openWidth = 800;
		if (openHeight == 0) openHeight = 600;
		newWindow = open(openURL, openName,"width = " + openWidth + ", height = " + openHeight + ", toolbar = 0, location = 0, directories = 0, status = 0, menuBar = 0, scrollBars = " + openScrollbar + ", resizable = 0, dependent = 1");
		window.newWindow.focus();
	}
}
