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 MailTo(pUsername, pDomain)
{
  var strLink = 'mailto:' + pUsername + '@' + pDomain;
  window.open(strLink);
}

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 ShowRow(pID)
{
  var myRow = document.all(pID);
  if (myRow)
  {    
    myRow.style.position = "static";
    myRow.style.visibility = "visible";
  }
}

function HideRow(pID)
{
  var myRow = document.all(pID);
  if (myRow)
  {    
    myRow.style.position = "absolute";
    myRow.style.left = "-1000";
    myRow.style.top = "-1000";
    myRow.style.visibility = "hidden";    
  }
}
