// left trims
function ltrim(pStr) {
	if (pStr == null) return ("");
	var myRegExp = new RegExp("^[ ]*", "gim");
	return (pStr.replace(myRegExp, ""));
}

// checks whether a text input is empty
function isEmpty(pObj) { return (ltrim(pObj.value) == ""); }

// checks whether a text input contains an integer
function isInteger(pObj) { 	return (pObj.value.search(/[^0-9]/) == -1); }

// checks whether a text input contains an email
function isEmail(pObj) { return (!(pObj.value.search(/.+@.+\..+/i) == -1)); }

function addbookmark() {
	url="http://www.snica-fo.org";
	title="SNICA-FO - Permis de conduire - Sécurité routière";
	if (window.sidebar) { 
		window.sidebar.addPanel(title, url,""); 
	} else if( document.all ) {
		window.external.AddFavorite( url, title);
	} else if( window.opera && window.print ) {
		return true;
	}
}

