function Toggle(id, ButtonName, LabelName){
	if (document.all[id].style.display == "none")
	{
		if(LabelName != "")
			document.all[LabelName].innerText = "true";
			
		document.all[ButtonName].src = "images/btn_info_down.Gif";
		hide(id);
	}
	else 
	{
		if(LabelName != "")
			document.all[LabelName].innerText = "false";

		document.all[ButtonName].src = "images/btn_info_over.Gif";
		show(id);
	}
}

function show(id) {
	document.all[id].style.display = "none";
}

function hide(id) {
	document.all[id].style.display = "block";
}

function checkTextSearch() {
	var check = false;
	var query = "";
	var brand = -1;
	
	for (var i=0; i < document.forms[0].elements.length; i++) { // cerco il primo input con quel nome
		if (document.forms[0].elements[i].name.indexOf("q") != -1) {
			query = document.forms[0].elements[i].value;
		}
		if (document.forms[0].elements[i].name.indexOf("DrpBrands") != -1) {
			brand = document.forms[0].elements[i].selectedIndex;
		}
	}
	
	if (query != "")
		check = true;
	else {
		if (brand != 0 && brand != -1)
			check = true;
	}
	
	if (check == false) {
		alert ('Specificare almeno un parametro di ricerca !');
		return false;
	}
	else {
		return true;
	}
}
function loginSubmit(whatkey)
{
	if (whatkey==13) { 
		document.all["Loginpanelcontrol:imgbtnLoginSubmit"].focus();
	}
}
