// JavaScript Document
function carrello(str,w,h){
    msg = window.open(str,'Oggetto','resizable=no,width='+w+',height='+h+',status=no,location=no,toolbar=no,resize=no,left='+(screen.width-w)/2+',top='+(screen.height-h)/2);
	msg.document.write("<html><head><title>Oggetto</title></head><body topmargin=0 leftmargin=0>");
	msg.document.write("<a href=javascript:self.close();><img src="+str+" border=0 alt=Chiudi></a></body></html>");
}

function edit(str,w,h){
    msg = window.open(str,'Edit','resizable=yes,width='+w+',height='+h+',status=no,location=no,toolbar=no,resize=no,left='+(screen.width-w)/2+',top='+(screen.height-h)/2);
}
function finestra(str){
	msg = window.open(str,'','width=420,height=300,scrollbars=yes');
}
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
//controllo campi
function checkrequired(which){
var pass=true
if (document.images){
for (i=0;i<which.length;i++){
var tempobj=which.elements[i]
if (tempobj.name.substring(0,1)=="c"){
if (((tempobj.type=="text"||tempobj.type=="textarea"||tempobj.type=="select")&&tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&tempobj.selectedIndex==-1)){
pass=false
break
}
}
}
}
if (!pass){
alert("Non hai compilato correttamente il form. Alcune informazioni non sono state inserite. Clicca su OK e verifica l'errore")
return false
}
else
alert("Grazie per esserti registrato")
return true
}
// function not
function not()
{
return alert("Non puoi creare un nuovo carrello quando ne hai uno già aperto.");
}
//---------------------------------------------------------------------------------------------------------------------------------------------------------------------
function elimina()
{
return confirm("Eliminare l'articolo selezionato?");
}
//-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
function loadPage(list) { 
location.href = list.options[list.selectedIndex].value
} 