<!--
function NewWindow(mypage,myname,w,h,pos,infocus){
var win=null;
if(pos=="random"){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
else if((pos!='center' && pos!="random") || pos==null){myleft=0;mytop=20}
settings="width=" + w + ",height=" + h + ",top=" + (mytop-30) + ",left=" + myleft + ",scrollbars=no,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";win=window.open(mypage,myname,settings);
win.focus();}

function NewWindow2(mypage,myname,w,h,pos,infocus){
var win=null;
if(pos=="random"){myleft=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;mytop=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){myleft=(screen.width)?(screen.width-w)/2:100;mytop=(screen.height)?(screen.height-h)/2:100;}
else if((pos!='center' && pos!="random") || pos==null){myleft=0;mytop=20}
settings="width=" + w + ",height=" + h + ",top=" + (mytop-30) + ",left=" + myleft + ",scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no";win=window.open(mypage,myname,settings);
win.focus();}

function checkLoginAreaRiservata()
{
	if (document.areariservata.user.value=="" | document.areariservata.password.value=="")
	{
		alert("Inserire utente e password");
	}
	else
	{
		document.areariservata.login.value = "1";
		document.areariservata.submit();
	}
}

function checkRicercaSito()
{
	if (document.areariservata.cerca.value=="")
	{
		alert("Inserire le parole da cercare");
	}
	else
	{
		document.areariservata.login.value = "0";
		document.areariservata.action = "/ricerca.asp";
		document.areariservata.submit();
	}
}

function aggiungiProdotti(id)
{
	var strProdotti;
	strProdotti = window.document.inviaDati.filtroIdProdotto.value;
	if (strProdotti=='')
	{strProdotti=id}
	else
	{strProdotti=strProdotti + ',' + id};
	window.document.inviaDati.filtroIdProdotto.value=strProdotti;
}


function rimuoviProdotti(id)
{
	var i;
	var strProdotti;
	var arrProdotti;
	strProdotti = window.document.inviaDati.filtroIdProdotto.value;

	if (strProdotti!='')
	{
		arrProdotti = strProdotti.split(',');
		strProdotti = ''

		for (i = 0; i < arrProdotti.length; i++)
		{

			if (arrProdotti[i]!=id)
			{
				if (strProdotti!='')
				{
					strProdotti = strProdotti + ',';
				}
				strProdotti = strProdotti + arrProdotti[i];
			}

		}
		window.document.inviaDati.filtroIdProdotto.value=strProdotti;
	}
}
// -->