function popupWindow(url) {
  window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')
}

function mostra2() {
document.getElementById('divpeso').style.visibility='visible';
}
function nascondi2()
{
document.getElementById('divpeso').style.visibility='hidden';
}
//-->
function right(e)
{
if (navigator.appName == 'Netscape' && (e.which == 2 || e.which == 3)) return false;
else if (navigator.appName == "Microsoft Internet Explorer" && (event.button == 2 || event.button == 3))
{
alert("Tasto destro disabilitato");
return false;
}
}
document.onmousedown=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN)
window.onmousedown=right;
function stampa (a,b)
{
window.open("stampa_prodotto.php?cPath="+a+"&products_id="+b);
}
function sottolinea(id)
{
	document.getElementById(id).style.textDecoration="underline";
	//document.getElementById(id).style.cursor="pointer";
	document.getElementById(id).style.cursor="pointer";
}
function togli(id)
{
	document.getElementById(id).style.textDecoration="none";
	document.getElementById(id).style.cursor="none";
}
function registra()
{
	window.alert("Funzionalita riservata agli utenti registrati");
}

function inviaInfo (idcliente,idprodotto)
{
	location.href = "richiestavariazioni.php?codice_cliente="+idcliente+"&codice_prodotto=" +idprodotto;
}
//da togliere a fine dbgt
function evidenziatore()
{}
function deevidenziatore()
{}

function mostrainfo(tipo,tipo2){
	document.getElementById(tipo2+"-img").style.backgroundColor = "#2A5E8D";	document.getElementById(tipo2+"-tipo").style.backgroundColor="#9EBBCB";	document.getElementById(tipo+"-titolo").style.backgroundColor="#2A5E8D";
	document.getElementById(tipo+"-descr").style.backgroundColor="#9EBBCB";
}

function mostrainfo2(tipo,tipo2){
	document.getElementById(tipo2+"-img").style.backgroundColor = "#E4ECF1";
	document.getElementById(tipo2+"-tipo").style.backgroundColor="#FFFFFF";
	document.getElementById(tipo+"-titolo").style.backgroundColor="#E4ECF1";
	document.getElementById(tipo+"-descr").style.backgroundColor="#FFFFFF";
}


function aggiorna_thumb(name)
{
document.getElementById("img_url").src=name;
document.getElementById('foto_big').style.display = "block";
mostra_foto2();
	
}

function mostra_foto(img)
{
	document.getElementById("img_url").src="./images-big/"+img+"-big.jpg";
	document.getElementById('foto_big').style.display = "block";
	mostra_foto2();
}



var initial = 0; var timer;
function mostra_foto2()
{
document.getElementById('foto_big').style.filter='alpha(opacity='+initial+')';
/*
document.getElementById('foto_big').style.MozOpacity = "0.".initial;*/
 if (navigator.appName.indexOf("Netscape")!=-1  &&parseInt(navigator.appVersion)>=5)
  {
    document.getElementById('foto_big').style.MozOpacity=initial/100
    }

    
/*lightup(document.getElementById('foto_big'),initial);*/
initial+=5;
	if (initial < 100)
	{
		timer = setTimeout("mostra_foto2()","10");
	}
	else
	{
	initial = 0;
	clearTimeout(timer);
	}
}



function nascondi_foto2(img) 
{
	var url = "./images-big/"+img+"-big.jpg";
	document.getElementById('foto_big').style.display = "none";
	document.getElementById("img_url").src=url;
}







function nascondi_foto() 
{
	document.getElementById('foto_big').style.display = "none";
}

