var codProdus;
function galeriePoze(codProdus)
{
    var centerWidth = (window.screen.width - 650) / 2;
    var centerHeight = (window.screen.height - 650) / 2;
    newWindow = window.open('galerie-poze.php?cod-produs=' + codProdus, 'Galerie', 'resizable=0,width=640,height=640,left=' + centerWidth + ',top=' + centerHeight);
    newWindow.focus();
    return;
}
var categorie_meniu_cont;
function meniu_cont(categorie_meniu_cont)
{
	if(categorie_meniu_cont == "detalii_utilizator")
	{
		document.getElementById("detalii_utilizator").style.display = "block";
		document.getElementById("adrese_de_livrare").style.display = "none";
		document.getElementById("firme").style.display = "none";
		document.getElementById("schimba_parola").style.display = "none";
		document.getElementById("schimba_email").style.display = "none";
		document.getElementById("sterge_contul").style.display = "none";
		document.getElementById("menu_detalii_utilizator").style.borderBottom = "1px solid #FFFFFF";
		document.getElementById("menu_detalii_utilizator").style.backgroundColor= "#FFFFFF";
		document.getElementById("menu_adauga_modifica_adrese").style.borderBottom = "1px solid #000000";
		document.getElementById("menu_adauga_modifica_adrese").style.backgroundColor= "#CCCCCC";
		document.getElementById("menu_adauga_modifica_firme").style.borderBottom = "1px solid #000000";
		document.getElementById("menu_adauga_modifica_firme").style.backgroundColor= "#CCCCCC";
		document.getElementById("menu_schimba_parola").style.borderBottom = "1px solid #000000";
		document.getElementById("menu_schimba_parola").style.backgroundColor= "#CCCCCC";
		document.getElementById("menu_schimba_adresa_e_mail").style.borderBottom = "1px solid #000000";
		document.getElementById("menu_schimba_adresa_e_mail").style.backgroundColor= "#CCCCCC";
		document.getElementById("menu_sterge_contul").style.borderBottom = "1px solid #000000";
		document.getElementById("menu_sterge_contul").style.backgroundColor= "#CCCCCC";
	}
	if(categorie_meniu_cont == "adrese_de_livrare")
	{
		document.getElementById("adrese_de_livrare").style.display = "block";
		document.getElementById("detalii_utilizator").style.display = "none";
		document.getElementById("firme").style.display = "none";
		document.getElementById("schimba_parola").style.display = "none";
		document.getElementById("schimba_email").style.display = "none";
		document.getElementById("sterge_contul").style.display = "none";
		document.getElementById("menu_detalii_utilizator").style.borderBottom = "1px solid #000000";
		document.getElementById("menu_detalii_utilizator").style.backgroundColor= "#CCCCCC";
		document.getElementById("menu_adauga_modifica_adrese").style.borderBottom = "1px solid #FFFFFF";
		document.getElementById("menu_adauga_modifica_adrese").style.backgroundColor= "#FFFFFF";
		document.getElementById("menu_adauga_modifica_firme").style.borderBottom = "1px solid #000000";
		document.getElementById("menu_adauga_modifica_firme").style.backgroundColor= "#CCCCCC";
		document.getElementById("menu_schimba_parola").style.borderBottom = "1px solid #000000";
		document.getElementById("menu_schimba_parola").style.backgroundColor= "#CCCCCC";
		document.getElementById("menu_schimba_adresa_e_mail").style.borderBottom = "1px solid #000000";
		document.getElementById("menu_schimba_adresa_e_mail").style.backgroundColor= "#CCCCCC";
		document.getElementById("menu_sterge_contul").style.borderBottom = "1px solid #000000";
		document.getElementById("menu_sterge_contul").style.backgroundColor= "#CCCCCC";
	}
	if(categorie_meniu_cont == "firme")
	{
		document.getElementById("firme").style.display = "block"
		document.getElementById("detalii_utilizator").style.display = "none"
		document.getElementById("adrese_de_livrare").style.display = "none"
		document.getElementById("schimba_parola").style.display = "none"
		document.getElementById("schimba_email").style.display = "none"
		document.getElementById("sterge_contul").style.display = "none"
		document.getElementById("menu_detalii_utilizator").style.borderBottom = "1px solid #000000";
		document.getElementById("menu_detalii_utilizator").style.backgroundColor= "#CCCCCC";
		document.getElementById("menu_adauga_modifica_adrese").style.borderBottom = "1px solid #000000";
		document.getElementById("menu_adauga_modifica_adrese").style.backgroundColor= "#CCCCCC";
		document.getElementById("menu_adauga_modifica_firme").style.borderBottom = "1px solid #FFFFFF";
		document.getElementById("menu_adauga_modifica_firme").style.backgroundColor= "#FFFFFF";
		document.getElementById("menu_schimba_parola").style.borderBottom = "1px solid #000000";
		document.getElementById("menu_schimba_parola").style.backgroundColor= "#CCCCCC";
		document.getElementById("menu_schimba_adresa_e_mail").style.borderBottom = "1px solid #000000";
		document.getElementById("menu_schimba_adresa_e_mail").style.backgroundColor= "#CCCCCC";
		document.getElementById("menu_sterge_contul").style.borderBottom = "1px solid #000000";
		document.getElementById("menu_sterge_contul").style.backgroundColor= "#CCCCCC";
	}
	if(categorie_meniu_cont == "schimba_parola")
	{
		document.getElementById("schimba_parola").style.display = "block"
		document.getElementById("detalii_utilizator").style.display = "none"
		document.getElementById("adrese_de_livrare").style.display = "none"
		document.getElementById("firme").style.display = "none"
		document.getElementById("schimba_email").style.display = "none"
		document.getElementById("sterge_contul").style.display = "none"
		document.getElementById("menu_detalii_utilizator").style.borderBottom = "1px solid #000000";
		document.getElementById("menu_detalii_utilizator").style.backgroundColor= "#CCCCCC";
		document.getElementById("menu_adauga_modifica_adrese").style.borderBottom = "1px solid #000000";
		document.getElementById("menu_adauga_modifica_adrese").style.backgroundColor= "#CCCCCC";
		document.getElementById("menu_adauga_modifica_firme").style.borderBottom = "1px solid #000000";
		document.getElementById("menu_adauga_modifica_firme").style.backgroundColor= "#CCCCCC";
		document.getElementById("menu_schimba_parola").style.borderBottom = "1px solid #FFFFFF";
		document.getElementById("menu_schimba_parola").style.backgroundColor= "#FFFFFF";
		document.getElementById("menu_schimba_adresa_e_mail").style.borderBottom = "1px solid #000000";
		document.getElementById("menu_schimba_adresa_e_mail").style.backgroundColor= "#CCCCCC";
		document.getElementById("menu_sterge_contul").style.borderBottom = "1px solid #000000";
		document.getElementById("menu_sterge_contul").style.backgroundColor= "#CCCCCC";
	}
	if(categorie_meniu_cont == "schimba_email")
	{
		document.getElementById("schimba_email").style.display = "block"
		document.getElementById("detalii_utilizator").style.display = "none"
		document.getElementById("adrese_de_livrare").style.display = "none"
		document.getElementById("firme").style.display = "none"
		document.getElementById("schimba_parola").style.display = "none"
		document.getElementById("sterge_contul").style.display = "none"
		document.getElementById("menu_detalii_utilizator").style.borderBottom = "1px solid #000000";
		document.getElementById("menu_detalii_utilizator").style.backgroundColor= "#CCCCCC";
		document.getElementById("menu_adauga_modifica_adrese").style.borderBottom = "1px solid #000000";
		document.getElementById("menu_adauga_modifica_adrese").style.backgroundColor= "#CCCCCC";
		document.getElementById("menu_adauga_modifica_firme").style.borderBottom = "1px solid #000000";
		document.getElementById("menu_adauga_modifica_firme").style.backgroundColor= "#CCCCCC";
		document.getElementById("menu_schimba_parola").style.borderBottom = "1px solid #000000";
		document.getElementById("menu_schimba_parola").style.backgroundColor= "#CCCCCC";
		document.getElementById("menu_schimba_adresa_e_mail").style.borderBottom = "1px solid #FFFFFF";
		document.getElementById("menu_schimba_adresa_e_mail").style.backgroundColor= "#FFFFFF";
		document.getElementById("menu_sterge_contul").style.borderBottom = "1px solid #000000";
		document.getElementById("menu_sterge_contul").style.backgroundColor= "#CCCCCC";
	}
	if(categorie_meniu_cont == "sterge_contul")
	{
		document.getElementById("sterge_contul").style.display = "block"
		document.getElementById("detalii_utilizator").style.display = "none"
		document.getElementById("adrese_de_livrare").style.display = "none"
		document.getElementById("firme").style.display = "none"
		document.getElementById("schimba_parola").style.display = "none"
		document.getElementById("schimba_email").style.display = "none"
		document.getElementById("menu_detalii_utilizator").style.borderBottom = "1px solid #000000";
		document.getElementById("menu_detalii_utilizator").style.backgroundColor= "#CCCCCC";
		document.getElementById("menu_adauga_modifica_adrese").style.borderBottom = "1px solid #000000";
		document.getElementById("menu_adauga_modifica_adrese").style.backgroundColor= "#CCCCCC";
		document.getElementById("menu_adauga_modifica_firme").style.borderBottom = "1px solid #000000";
		document.getElementById("menu_adauga_modifica_firme").style.backgroundColor= "#CCCCCC";
		document.getElementById("menu_schimba_parola").style.borderBottom = "1px solid #000000";
		document.getElementById("menu_schimba_parola").style.backgroundColor= "#CCCCCC";
		document.getElementById("menu_schimba_adresa_e_mail").style.borderBottom = "1px solid #000000";
		document.getElementById("menu_schimba_adresa_e_mail").style.backgroundColor= "#CCCCCC";
		document.getElementById("menu_sterge_contul").style.borderBottom = "1px solid #FFFFFF";
		document.getElementById("menu_sterge_contul").style.backgroundColor= "#FFFFFF";
	}
}
var div;
function showEmail(div)
{
	if (document.getElementById(div).style.display == "none")
		document.getElementById(div).style.display = "block";
	else
		document.getElementById(div).style.display = "none";
}
function showFirme(div)
{
	if (document.getElementById(div).style.display == "none")
		document.getElementById(div).style.display = "block";
	else
		document.getElementById(div).style.display = "none";
}
var string_cautare = "";
function cautare()
{
	if(document.getElementById('txtCautare').value != "")
	{
		if(document.getElementById('txtCautare').value.length > 2)
		{
			string_cautare = document.getElementById('txtCautare').value;
			window.open('produse.php?cautare=' + string_cautare,'_self');
		}
	}
}
