// pop-up function

var newWin = null;

function closeWin() {
	if (newWin != null) {
		if(!newWin.closed) newWin.close();
	}
}

function openWin(strURL,strType,strWidth,strHeight) {
  closeWin();
  var strOptions="";
  // c = console | f = full
  if (strType=="c") strOptions="resizable,height="+strHeight+",width="+strWidth;
  if (strType=="f") strOptions="toolbar,menubar,scrollbars,resizable,location,height="+strHeight+",width="+strWidth;
  else strOptions="resizable,height="+strHeight+",width="+strWidth;
  newWin = window.open(strURL, 'newWin', strOptions);
  newWin.focus();
}

function showHideElement(element,displayType) {
  el = document.getElementById(element);
	if (el.style.display == displayType) {
	  el.style.display = "none";
	} else {
	  el.style.display = displayType;
	}
}


