function OpenWindow(pURL, pWidth, pHeight)
{
  var win = window.open(pURL, 'win', 'dependent,width=' + pWidth + ',height=' + pHeight);
}

function OpenScrollWindow(pURL, pWidth, pHeight)
{
  var win = window.open(pURL, 'scrollwin', 'dependent,width=' + pWidth + ',height=' + pHeight + ',scrollbars=1');
}

function OpenPicture(pPicture, pWidth, pHeight)
{
  OpenWindow('/openpicture.asp?picture=' + pPicture, (parseInt(pWidth) + 20), (parseInt(pHeight) + 45));
}

function checkValidEmail(pValue)
{
	var x = pValue;
	var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
	if (filter.test(x)) return true;
	else return false;
}

function ShowID(pID)
{
  var obj = document.getElementById(pID);
  if (obj) { obj.style.display = 'block'; }
}

function HideID(pID)
{
  var obj = document.getElementById(pID);
  if (obj) { obj.style.display = 'none'; }
}

function ShowHideID(pID)
{
  var obj = document.getElementById(pID);
  if (obj) {
    if (obj.style.display == 'block') {
      obj.style.display = 'none';
    }
    else {
      obj.style.display = 'block';
    }
  }
}
