function open_window(sURL, iHeight, iWidth, iTop, iLeft, sWinName, sScrollbars)
{
	window.open (sURL, sWinName,'height=' + iHeight + ',width=' + iWidth + ',scrollbars=' + sScrollbars + ',toolbar=no,location=no,directories=no,status=no,menubar=no,titlebar=yes,alwaysRaised=yes,fullscreen=no,resize=no,top=' + iTop + ',left=' + iLeft);
}

function show_image(iImageLibraryID, iImageNo)
{
	open_window("ViewImage.asp?ImageLibraryID=" + iImageLibraryID + "&ImageNo=" + iImageNo, 290, 340, 100, 100, "winPropertyImage", "no") ;
}

/* Validation... */

function go_reset_information_view_count(iInformationID)
{
	if (confirm("Are you sure you wish to reset the information view count to zero?"))
		document.location = "ResetInformationViewCount.asp?InformationID=" + iInformationID ;
}

var oNonEmptyRegex = new RegExp("^[\\w\<\.]") ;

function is_not_empty(sTheString)
{
	return (oNonEmptyRegex.test(sTheString)) ;
}

function validate_email(sEMailAddress)
{
	//var sEmailReg = "^[\\w-_\.]*[\\w-_\.]\@[\\w]+[\.]+[\\w]+[\\w]$" ;
	var sEmailReg = "^([\.a-zA-Z0-9_-])+@([a-zA-Z0-9_\-])+[\.]+(\.[a-zA-Z0-9])+" ;
	var oRegex = new RegExp(sEmailReg) ;
     
	return (oRegex.test(sEMailAddress)) ;
}

function is_numeric(sNumericString)
{
	var iNumericValue = parseInt(sNumericString) ;
	
	var sStringValue = "" + iNumericValue ; // Make it a string...
	
	return (sStringValue == sNumericString) ;
}
