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 setPosition( layer, x, y ) {
	if( document.getElementById ) {
		obj = document.getElementById( layer )
		obj.style.left = x;
		obj.style.top = y;
	} else if( document.all ) {
		document.all[layer].style.left = x;
		document.all[layer].style.top = y;
	} else {
		document[layer].left = x;
		document[layer].top = y;
	}
}