function trim(Key) {
	while(''+Key.charAt(Key.length-1)==' ')
		{ Key=Key.substring(0,Key.length-1); }
	return Key;
}

function validateContact() {

	a = document.frmContact;
	a.nume.value = trim(a.nume.value);
	a.prenume.value = trim(a.prenume.value);
	a.email.value = trim(a.email.value);
	a.mesaj.value = trim(a.mesaj.value);
	
	if (a.nume.value == '') {
		alert('Va rugam completati cimpul "Nume" !');
		return false;
	}
	
	if (a.prenume.value == '') {
		alert('Va rugam completati cimpul "Prenume" !');
		return false;
	}
	
	if (!a.email.value) {
		alert('Va rugam completati cimpul "E-Mail" !');
		return false;
	}
	
		if (!a.mesaj.value) {
		alert('Va rugam completati cimpul "Mesaj" !');
		return false;
	}

	return true;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features+'status=yes');
}

function NewWindow(mypage, myname, w, h, scroll) {
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}