function windowOpen(newLoc, width, height, resizable, scrollbars)  {
  if (!width)  
    width = 750;
  if (!height)  
    height = 500;
  if (!resizable)  
    resizable = 'no';
  if (!scrollbars)  
    scrollbars = 'no';
  if (!newLoc)
    newLoc = "about:blank";

  var params = 'toolbar=no, location=no, directories=no, menubar=no, scrollbars=' + scrollbars + ', resizable=' + resizable + ', status=no, top=20, left=60, height=' + height + ', width='+ width;
  
  newWin = window.open(newLoc, 'newWin', params);
  newWin.window.focus();
}

function checkUncheckCheckbox(formObj, status)  {
  for (i = 0; i < formObj.length; i++)  {
    if (formObj[i].type == 'checkbox')  {
      formObj[i].checked = status;
    }
  }
}

function Go(url)  {
  if (url)  {
    window.location.href = url;
  }
}

function resizeUnderSubMenuImage()  
{
  if (document.getElementById('underSubMenuImage') && document.getElementById('subMenuDiv'))  {
    oUnderSubMenuImage = document.getElementById('underSubMenuImage');
    oSubMenuDiv        = document.getElementById('subMenuDiv');
  }

  oUnderSubMenuImage.width  = oSubMenuDiv.offsetWidth;
  oUnderSubMenuImage.height = oSubMenuDiv.offsetHeight;
}

var prwWnd = null;
function fShowImagePopup(oImg, sTitle)  
{
  //rSrcReg = new RegExp("(.*)\.(.*?)$");
  //sThumbSrc = sThumbSrc.replace(rSrcReg, "$1_big.$2");
  var sSrc = '';
  if (typeof(oImg) == 'object') {
    sSrc = oImg.src;
    sTitle = oImg.alt;
  }
  else  {
    sSrc = oImg;
  }
  if(!sTitle)  {
    sTitle = '';
  }
  url = 'files/images/?src='+ sSrc +'&title='+sTitle;
//  oImage = new Image;
//  oImage.src = sSrc;
  if(!prwWnd)  {
    prwWnd = window.open(url, '', 'toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,copyhistory=no,scrollbars=yes, width='+ (200) +',height='+ (200) +',top='+ (50) +',left='+ (50));
    prwWnd.focus();
  }
  else  
  {
    try {prwWnd.location = url;prwWnd.focus();}
    catch(e)  {
      prwWnd = null;
      fShowImagePopup(oImg, sTitle);
    }
  }
}
