function $(el)
{
	return document.getElementById(el);
}

function removeStartText(obj) {
	if (obj && obj.value == obj.defaultValue) {
		obj.value = '';
	}
}



//var xyz = new Function("var obj = arguments[0];	if (obj && obj.value == obj.defaultValue) {obj.value = '';}");

function setStartText(obj) {
	if (obj && obj.value == '') {
		obj.value = obj.defaultValue;
	}
}

function removeStartTextWachtwoord() {
	var ne;
	var obj = arguments[0];
    ne = document.createElement('input');
    ne.type = 'password';
    ne.id = obj.id;
    ne.name = obj.name;
	ne.className = obj.className;
 	ne.value = '';
 	ne.onblur = new Function("setStartTextWachtwoord(this, '" + obj.defaultValue + "')");
 	obj.parentNode.insertBefore(ne,obj);
	obj.parentNode.removeChild(obj);
 	ne.focus(); 
 	return false;
}

function setStartTextWachtwoord() {
	var ne;
	var obj = arguments[0];
	if(obj && obj.value == '')
	{
        ne = document.createElement('input');
        ne.type = 'text';
        ne.id = obj.id;
        ne.name = obj.name;
    	ne.className = obj.className;
     	ne.value = arguments[1];
     	ne.onfocus = new Function("removeStartTextWachtwoord(this)");
     	obj.parentNode.insertBefore(ne,obj);
    	obj.parentNode.removeChild(obj);
    }
 	return false;
}

function checkValidEmail(id)
{
	var regExp = /^[\w\-_]+(\.[\w\-_]+)*@[\w\-_]+(\.[\w\-_]+)*\.[a-z]{2,4}$/i;

	if(regExp.test($(id).value))
		return true;
	else
		return false;
}