function trim(Key) {
	while(''+Key.charAt(Key.length-1)==' ')
		{ Key=Key.substring(0,Key.length-1); }
	return Key;
}

function validareContact() {

	a = document.frmContact;
	a.txtNume.value = trim(a.txtNume.value);
	a.txtEmail.value = trim(a.txtEmail.value);
	a.txtMesaj.value = trim(a.txtMesaj.value);
	
	if (a.txtNume.value == '') {
		alert('Va rugam completati cimpul "Nume" !');
		return false;
	}
		
		if (!a.txtEmail.value) {
		alert('Va rugam completati cimpul "Email" !');
		return false;
	}
	
		if (!a.txtMesaj.value) {
		alert('Va rugam completati cimpul "Mesaj" !');
		return false;
	}

	return true;
}

function validateContact() {

	a = document.frmContact;
	a.txtNume.value = trim(a.txtNume.value);
	a.txtEmail.value = trim(a.txtEmail.value);
	a.txtMesaj.value = trim(a.txtMesaj.value);
	
	if (a.txtNume.value == '') {
		alert('Please enter your name !');
		return false;
	}
	
		if (!a.txtEmail.value) {
		alert('Please enter your email address !');
		return false;
	}
	
		if (!a.txtMesaj.value) {
		alert('Please enter your message !');
		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(); }
}