function MakeRemote(url, win, features) {

	window.open(url, win, features).focus();
}


function Trim(myString) {
	return myString.replace(/^\s+/g, '').replace(/\s+$/g, '');
}


function IsNull(obj) {
	if (obj.value == null) return true;
	else return !Trim(obj.value).length;
}


function CheckEmail(obj) {
	var emailFilter=/^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*$/;
	return emailFilter.test(obj.value);
}


function IsChecked(obj) {
	for (i=0; i<obj.length; i++) {
		if (obj[i].checked) return true;
	}
	return false;	
}


function OnError(obj, message) {
	alert(message);
    obj.focus();
	return false;	
}


function ShowHideObject(obj) {
	if (document.getElementById(obj).style.display == 'none') {
		document.getElementById(obj).style.display = '';
	}
	else {
		document.getElementById(obj).style.display = 'none';
	}
}