function printPopup(mID, sID, w)  {
  url = 'index_print.asp?mainID=' + mID + '&subID=' + sID;
  var printWindow = window.open(url, '', 'resizable=1,menubar=yes,scrollbars=1,location=no,toolbar=1,directories=no,width=' + w);
}

var ie, ns, ns6;

ns6 = (document.getElementById);
ns = (document.layers);
ie = (document.all);

function showObj(obj) {
  if(ie)document.all[obj].style.visibility='visible'
  if(ns)document.layers[obj].visibility='visible'
  if(ns6)document.getElementById(obj).style.visibility = "visible";
}

function hideObj(obj) {
  if(ie)document.all[obj].style.visibility='hidden'
  if(ns)document.layers[obj].visibility='hidden'
  if(ns6)document.getElementById(obj).style.visibility = "hidden";
}

function createPopup(filename, w, h, scroll)  {
	window.open(filename, '', 'resizable=0,menubar=no,scrollbars=' + scroll + ',location=no,toolbar=0,status=0,directories=no,width=' + w + ',height=' + h);	
}

function overlay() {
	if (window.innerHeight && window.scrollMaxY || window.innerWidth && window.scrollMaxX) {
		yScroll = window.innerHeight + window.scrollMaxY;
		xScroll = window.innerWidth + window.scrollMaxX;
		var deff = document.documentElement;
		var wff = (deff&&deff.clientWidth) || document.body.clientWidth || window.innerWidth || self.innerWidth;
		var hff = (deff&&deff.clientHeight) || document.body.clientHeight || window.innerHeight || self.innerHeight;
		xScroll -= (window.innerWidth - wff);
		yScroll -= (window.innerHeight - hff);
	}
  else if (document.body.scrollHeight > document.body.offsetHeight || document.body.scrollWidth > document.body.offsetWidth){ // all but Explorer Mac
		yScroll = document.body.scrollHeight;
		xScroll = document.body.scrollWidth;
	}
  else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
		yScroll = document.body.offsetHeight;
		xScroll = document.body.offsetWidth;
  }
 return "<div style=position:absolute; left:0; top:0; height:" + yScroll + "; width:100%; background-color: #FFFFFF; z-index: 100; opacity: .9; filter: alpha(opacity=80);></div>";
}

function showDiv(divName) {
  document.getElementById(divName).style.visibility='visible';
}

 function hideDiv(divName) {
  document.getElementById(divName).style.visibility='hidden';
}