
function getID(obj){
	return document.getElementById(obj);
};

function checkEmailFormat(obj){
	var str = obj.value.trim();
	var re = /^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/;
	if(!str.match(re))
		return false;
	else
		return true;
};

function checkInteger(obj){
	if(parseInt(obj.value)){
		if(parseInt(obj.value)!=obj.value)
			obj.value = parseInt(obj.value);
	}else
		obj.value = '';
};

String.prototype.trim = function(){
	return this.replace(/(^\s*)|(\s*$)/g, '');
};

function SetFontSize(strFontSize){
	getID('txtFontSize').value = strFontSize;
	getID('frmFontSize').submit();
};
