function ChangeVisibility(id) {
	if(id==1) {
		document.getElementById("b_formular").style.fontWeight = "bold";
		document.getElementById("b_produse").style.fontWeight = "normal";
	} else  {
		document.getElementById("b_produse").style.fontWeight = "bold";
		document.getElementById("b_formular").style.fontWeight = "normal";
	}
}

var lastId='2';
function ChangeVisibilityEnergy(id) {
	
	document.getElementById("b_"+lastId).style.fontWeight = "normal";
	document.getElementById("b_"+id).style.fontWeight = "bold";
	lastId = id;
}

function ChangeView(id) {

	if(id==1) {
		document.getElementById("descriere").style.fontWeight = "normal";
		document.getElementById("depozite").style.fontWeight = "bold";
		document.getElementById("tab_depozite").style.display = "block";
		document.getElementById("tab_descriere").style.display = "none";
	} else  {
		document.getElementById("descriere").style.fontWeight = "bold";
		document.getElementById("depozite").style.fontWeight = "normal";
		document.getElementById("tab_depozite").style.display = "none";
		document.getElementById("tab_descriere").style.display = "block";
	}
}

lastIntrebare=0;

function ChangeIntrebare(id) {
	
	if(lastIntrebare == 0){
		document.getElementById(id).style.display = "block";	
		lastIntrebare = id;
	}
	else if(lastIntrebare !=id ){
			document.getElementById(lastIntrebare).style.display = "none";
			document.getElementById(id).style.display = "block";
			lastIntrebare = id;	
	}
}

function ChangeContact(id) {

	if(id==1) {
		
		document.getElementById("adresa").style.fontWeight='bold';
		document.getElementById("departamente").style.fontWeight='normal';
		document.getElementById("formular_contact").style.fontWeight='normal';
		document.getElementById("tab_adresa").style.display = "block";
		document.getElementById("tab_departamente").style.display = "none";
		document.getElementById("tab_formular").style.display = "none";
	} 
	if(id==2)  {
		document.getElementById("adresa").style.fontWeight='normal';
		document.getElementById("departamente").style.fontWeight='bold';
		document.getElementById("formular_contact").style.fontWeight='normal';
		document.getElementById("tab_adresa").style.display = "none";
		document.getElementById("tab_departamente").style.display = "block";
		document.getElementById("tab_formular").style.display = "none";
	}
	if(id==3)  {
		document.getElementById("adresa").style.fontWeight='normal';
		document.getElementById("departamente").style.fontWeight='normal';
		document.getElementById("formular_contact").style.fontWeight='bold';;
		document.getElementById("tab_adresa").style.display = "none";
		document.getElementById("tab_departamente").style.display = "none";
		document.getElementById("tab_formular").style.display = "block";
	}
}

var lastLocation = '';

function ShowInfo(location) {
	if (lastLocation =='') {
		document.getElementById(location).style.fontWeight = "bold";
	} else {
		document.getElementById(lastLocation).style.fontWeight = "normal";
		document.getElementById(location).style.fontWeight = "bold";
	}
	lastLocation = location;
	var url = 'util/ajaxFunctions.php?action=info';
	var loc = location;
	new Ajax.Request(url, {
		asynchronous: true,
		method: "post",
		parameters: 'loc='+loc,
		onSuccess: function showResponse(request){
		document.getElementById("info_produse").innerHTML = request.responseText;
	},
	onFailure: function showFailure(request){
	}
});
}

var lastMina = '';

function ShowMine(location) {
	if (lastMina =='') {
		document.getElementById(location).style.fontWeight = "bold";
	} else {
		document.getElementById(lastMina).style.fontWeight = "normal";
		document.getElementById(location).style.fontWeight = "bold";
	}
	lastMina = location;
	var url = 'util/ajaxFunctions.php?action=mine';
	var loc = location;
	new Ajax.Request(url, {
		asynchronous: true,
		method: "post",
		parameters: 'loc='+loc,
		onSuccess: function showResponse(request){
		document.getElementById("info_produse").innerHTML = request.responseText;
	},
	onFailure: function showFailure(request){
	}
});
}

function flash1(){
		var params = {
				quality: "high",
				scale: "noscale",
				wmode: "transparent",
				allowfullscreen: "true",
				allowscriptaccess: "always",
				bgcolor: "#ffffff"
			};
			var attributes = {id:"flashcontent1"};
			swfobject.embedSWF("./galerie1.swf", "flashcontent1", "100%", "100%", "9.0.124", false, "expressInstall.swf", params, attributes);
}

