function trim(strText) {
	while (strText.substring(0,1)== ' ')
		strText = strText.substring(1,strText.length);
	while (strText.substring(strText.length-1, strText.length) == ' ' )
		strText = strText.substring(0, strText.length-1);
	return strText;
}
	
function check_email(p) {
	var reEmail = /^.+\@.+\..+$/;
	 if (reEmail.test(p)) return true;
	else return false;
}

function open_window(theURL,winName,features) {
  window.open(theURL,winName,features);
}