function OpenNewWindow(fileName,target,w,h,x,y) {
   //alert('fileName: ' + fileName + ', title: ' + target + ', w: ' + w + ', h: ' + h + ', x: ' + x + ', y: ' + y);
   var strOpt="height="+h+",width="+w+",menubar=no,personalbar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,left="+x+",top="+y+"";   
   closeup = window.open(fileName,target,strOpt);
   closeup.focus();
   return closeup;
}

function OpenNewWindowDialogue(fileName,target,w,h,x,y) {
   //alert('fileName: ' + fileName + ', title: ' + target + ', w: ' + w + ', h: ' + h + ', x: ' + x + ', y: ' + y);
   var strOpt="height="+h+",width="+w+",menubar=no,personalbar=no,resizable=no,scrollbars=no,status=no,toolbar=no,left="+x+",top="+y+"";   
   closeup = window.open(fileName,target,strOpt);
   closeup.focus();
   return closeup;
}

function OpenNewWindowDialogueWithScrollbar(fileName,target,w,h,x,y) {
   //alert('fileName: ' + fileName + ', title: ' + target + ', w: ' + w + ', h: ' + h + ', x: ' + x + ', y: ' + y);
   var strOpt="height="+h+",width="+w+",menubar=yes,personalbar=no,resizable=no,scrollbars=yes,status=no,toolbar=no,left="+x+",top="+y+"";   
   closeup = window.open(fileName,target,strOpt);
   closeup.focus();
   return closeup;
}

function OpenHelpWindow(fileName) {
   return OpenNewWindowDialogue(fileName, 'MJMHelpWindow', 500, 560, 250, 20);
}

function printWindow(){
   bV = parseInt(navigator.appVersion)
   if (bV >= 4) window.print()
}

// 07.19.2006 TLS - added these 3
function setControlVisiblilty(ctrl, sVisibility)
{
   ctrl.style.display = sVisibility;
}

function setControlVisibiiltyTf(ctrl, bVisible)
{
   if (bVisible)
      setControlVisiblilty(ctrl, "");
   else
      setControlVisiblilty(ctrl, "none");
}

function toggleControlVisibility(ctrlId)
{
  var c = document.getElementById(ctrlId);
  setControlVisibiiltyTf(c, !c.style.display == "");
}

