function checkEmail(myForm) {
		if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(myForm.email.value)){
			return (true)
			}
	
	alert("Va rugam introduceti o adresa de e-mail valida.")
	
	return (false)
}


function checkEmail2(myForm) {
		if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(myForm.customer_email.value)){
			return (true)
			}
	
	alert("Va rugam introduceti o adresa de e-mail valida.")
	
	return (false)
}


function isNumberKey(evt)
{
	var charCode = (evt.which) ? evt.which : event.keyCode
		if (charCode > 31 && (charCode < 48 || charCode > 57))
			return false;

	   return true;
}

function contact_form(url) {
    var popUpWidth = 496;
    var popUpHeight = 385;
    var popUpTop = (screen.height - popUpHeight) / 2;
    var popUpLeft = (screen.width - popUpWidth) / 2;
    window.open(url,'Contact', 'top='+popUpTop+',left='+popUpLeft+',height='+popUpHeight+',width='+popUpWidth+',scrollbars=no');
}

function popup(url, title, features)
{
	window.open(url, title, features);
}

function focus(targetId)
{
	document.getElementById(targetId).focus();
}

function toggle_cat(catid)
{
	if(document.getElementById)
	{
		target = document.getElementById("cat" + catid);
		children = target.childNodes;

		for(var i = 0; i < target.childNodes.length; i++)
		{
			if(i > 1)
			{
				if(target.childNodes[i].style.display == "block")
				{
					target.childNodes[i].style.display = "none";
				}
				else
				{
					target.childNodes[i].style.display = "block";
				}
			}
		}
	}
}

function toggle_inline(targetId)
{
	if(document.getElementById)
	{
		target = document.getElementById(targetId);

		if (target.style.display == "")
		{
			target.style.display = "none";
		}
		else
		{
			target.style.display = "";
		}
	}
}

function toggle( targetId ){
	if (document.getElementById){
		target = document.getElementById( targetId );
		if (target.style.display == "block"){
			target.style.display = "none";
		}
		else {
			target.style.display = "block";
		}
	}
}