// Codice per utilizzare le funzionalitą AJAX
var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
// JScript gives us Conditional compilation, we can cope with old IE versions.
// and security blocked creation of the objects.
 try {
  xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
 } catch (e) {
  try {
   xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
  } catch (E) {
   xmlhttp = false;
  }
 }
@end @*/
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
	try {
		xmlhttp = new XMLHttpRequest();
	} catch (e) {
		xmlhttp=false;
	}
}
if (!xmlhttp && window.createRequest) {
	try {
		xmlhttp = window.createRequest();
	} catch (e) {
		xmlhttp=false;
	}
}

// Funzione per creare la lista delle miniature
function changefoto(path) {

	var img = document.getElementById('prodotti_img');
//	img.src = './i/loader.gif';
	
  xmlhttp.open("GET", path, true);
  xmlhttp.onreadystatechange=function() {
		switch (xmlhttp.readyState) {
		//case 0:
		//	alert('Error!');
		//break;
		case 1:
		break;
		case 2:
		break;
		case 3:
		case 4:
			img.src = path;
		break;
		} // end switch
 };
 
 xmlhttp.send(null);

}

function changeselect(elementi_id) {
	var doc = document.getElementById('colD');
	var a_voce = doc.getElementsByTagName("a");
	for(var i=0; i<a_voce.length; i++){
		if ( (a_voce[i].id == elementi_id) && (a_voce[i].id != '') ) {
			a_voce[i].style.color = "#FFC23A";
		} else {
			a_voce[i].style.color = "#FFFFFF";
		}
	}
}