/**
 * @Autore Daniele Corti * @Azienda GESTWEB Research	 **/


function changeThis(elem, key, path)
{
	var value = elem.options[elem.selectedIndex].value;
	
	if(value != "")
	{
		//window.location.href = "./"+key+"/"+value;
		switch(key)
		{
			case 'type':				
				window.location.href = path+value+".xhtml";				
			break;
		}
		//window.location.href = "./index.php?"+key+"="+value;
	}
}

function myPress(evt, elem, path)
{
	var e = (window.event) ? window.event : evt;
	if(e && (e.keyCode == 13 || e.keyCode == 3))
	{	
		var value = elem.value;
		
		if(value != "")
		{
			//window.location.href = "./filter/"+value;
			//window.location.href = "./index.php?filter="+value;
			window.location.href = path+value+".xhtml";
			
		}
	}
	
	return !(e && (e.keyCode == 13 || e.keyCode == 3)); 
}


function Popup(img, width, height) {
	var stile = 'top=20, left=200, width='+width+', height='+height+', status=no, menubar=no, toolbar=no scrollbar=no';
	window.open(img, "", stile);
}
