function checkSendEmail() {
	hashpos = document.location.href.indexOf('#send_email');
	if (hashpos == -1)
		document.location.href = document.location.href + '#send_email';
	else
		document.location.href = document.location.href.substring(0, hashpos) + "#send_email";
	
	var msg = "";
	with (document.SendEmail) {
		/*alte campuri*/	
		if (nume_tau.value == "" || email_dvs.value == "" || subiect.value=="" || text.value=="")
			msg = "Toate campurile sunt obligatorii.<br/>";

		
		if (!isEmail(email_dvs.value))
			msg += "Adresa de e-mail nu este valida.<br/>";
	}
	
	if (msg != "") {
		document.getElementById('email_error').innerHTML = msg;
		document.getElementById('email_error').style.display = "block";
		return false;
	}
	return true;
}

function checkTipAfriend() {
	hashpos = document.location.href.indexOf('#tip_a_friend');
	if (hashpos == -1)
		document.location.href = document.location.href + '#tip_a_friend';
	else
		document.location.href = document.location.href.substring(0, hashpos) + "#tip_a_friend";
	
	var msg = "";
	with (document.formTipAFriend) {
		/*alte campuri*/	
		if (nume_dvs.value == "" || email_tau.value == "" || email_destinatar.value == "" || mesaj.value == "")
			msg = "Toate campurile sunt obligatorii<br/>";
		
		if (!isEmail(email_tau.value))
			msg += "Adresa ta de e-mail nu este valida.<br/>";
	}
	
	if (msg != "") {
		document.getElementById('tipafriend_error').innerHTML = msg;
		document.getElementById('tipafriend_error').style.display = "block";
		return false;
	}
	return true;
}

function open_close_contact() {
	if (document.getElementById('contact_div').style.display == 'none' || document.getElementById('contact_div').style.display == '') 				
		document.getElementById('contact_div').style.display = 'block';					
	else 
		document.getElementById('contact_div').style.display = 'none';
}

function open_close_tipafriend() {
	if (document.getElementById('tip_friend').style.display == 'none' || document.getElementById('tip_friend').style.display == '') 				
		document.getElementById('tip_friend').style.display = 'block';					
	else 
		document.getElementById('tip_friend').style.display = 'none';				
}

function checkSendEmail() {
	hashpos = document.location.href.indexOf('#send_email');
	if (hashpos == -1)
		document.location.href = document.location.href + '#send_email';
	else
		document.location.href = document.location.href.substring(0, hashpos) + "#send_email";
	
	var msg = "";
	with (document.SendEmail) {
		/*alte campuri*/	
		if (nume_tau.value == "" || email_dvs.value == "" || subiect.value=="" || text.value=="")
			msg = "Toate campurile sunt obligatorii.<br/>";

		
		if (!isEmail(email_dvs.value))
			msg += "Adresa de e-mail nu este valida.<br/>";
	}
	
	if (msg != "") {
		document.getElementById('email_error').innerHTML = msg;
		document.getElementById('email_error').style.display = "block";
		return false;
	}
	return true;
}

function checkTipAfriend() {
	hashpos = document.location.href.indexOf('#tip_a_friend');
	if (hashpos == -1)
		document.location.href = document.location.href + '#tip_a_friend';
	else
		document.location.href = document.location.href.substring(0, hashpos) + "#tip_a_friend";
	
	var msg = "";
	with (document.formTipAFriend) {
		/*alte campuri*/	
		if (nume_dvs.value == "" || email_tau.value == "" || email_destinatar.value == "" || mesaj.value == "")
			msg = "Toate campurile sunt obligatorii<br/>";
		
		if (!isEmail(email_tau.value))
			msg += "Adresa ta de e-mail nu este valida.<br/>";
	}
	
	if (msg != "") {
		document.getElementById('tipafriend_error').innerHTML = msg;
		document.getElementById('tipafriend_error').style.display = "block";
		return false;
	}
	return true;
}

function open_close_contact() {
	if (document.getElementById('contact_div').style.display == 'none' || document.getElementById('contact_div').style.display == '') 				
		document.getElementById('contact_div').style.display = 'block';					
	else 
		document.getElementById('contact_div').style.display = 'none';
}

function open_close_tipafriend() {
	if (document.getElementById('tip_friend').style.display == 'none' || document.getElementById('tip_friend').style.display == '') 				
		document.getElementById('tip_friend').style.display = 'block';					
	else 
		document.getElementById('tip_friend').style.display = 'none';				
}


