// JavaScript Document


function go_home(hh)
{window.location.href("default.asp");}
function go_to(hh)
{window.location.href(hh);}


function openpop(url,larg,alt) 
 {
	window.open(url,"", "scrollbars=no,resizable=no, left=150, top=150, width="+larg+",height="+alt+",status=no,location=no,toolbar=no,menubar=no");
}


function openpopup(url) 
 {
	window.open(url,"", "scrollbars=no,resizable=no, left=150, top=240, width=230,height=120,status=no,location=no,toolbar=no,menubar=no");
}

function openpopupmodal(url) 
 {
	window.showModalDialog(url,"", "dialogWidth: 215px; dialogHeight: 120px; left=150px; top=240px; resizable: 0; scroll: 0; help: 0; status: 0;scrollbars=no,resizable=no, left=32, top=140, width=210,height=120,status=no,location=no,toolbar=no,menubar=no");
}
function open_editor(tag,popup){

//onclick="open_editor('<<sottotitolo_cs>>1040')"
editor=window.open("./editor/default.asp?tag="+tag+"&popup="+popup,"editor","width=690,height=350,toolbar=no,status=no,resizable=no,location=no")

}

function open_cuslogon(){
		//window.showModalDialog("customer/logon.asp","", "dialogWidth: 230px; dialogHeight: 160px; left=150px; top=240px; resizable: 0; scroll: 0; help: 0; status: 0;scrollbars=no,resizable=no, left=32, top=140, width=210,height=120,status=no,location=no,toolbar=no,menubar=no");

       window.open("customer/logon.asp","","width=800px,height=600px,toolbar=no,status=no,resizable=yes")

}
function return_logon(){
		//window.showModalDialog("customer/logon.asp","", "dialogWidth: 230px; dialogHeight: 160px; left=150px; top=240px; resizable: 0; scroll: 0; help: 0; status: 0;scrollbars=no,resizable=no, left=32, top=140, width=210,height=120,status=no,location=no,toolbar=no,menubar=no");

       window.open("/.customer/logon.asp","","width=800px,height=600px,toolbar=no,status=no,resizable=yes")

}

function goback(n){
		//window.showModalDialog("customer/logon.asp","", "dialogWidth: 230px; dialogHeight: 160px; left=150px; top=240px; resizable: 0; scroll: 0; help: 0; status: 0;scrollbars=no,resizable=no, left=32, top=140, width=210,height=120,status=no,location=no,toolbar=no,menubar=no");
		n = n * (-1)
	window.history.go(n);

}


 function Modale(riferimento,tipo) 
 {
	if (tipo==1)
	{ 
		//Finestra gestione menù
		var percorso="gestione/gest_menu.asp?org="+riferimento;
		var prop1 = "dialogWidth: 775px; dialogHeight: 568px; center: 1; resizable: 0; scroll: 0; help: 0; status: 0;";
		var prop2 ="scrollbars=no,resizable=no, left=150, top=140, width=770,height=540,status=no,location=no,toolbar=no,menubar=no";
	}

	if (tipo==3)
	{ 
		//Finestra Gestione Immagini
		var percorso="gestione/gest_image2.asp?"+riferimento;
		var prop1 = "dialogWidth: 405px; dialogHeight: 235px; center: 1; resizable: no; scroll: no; help: 0;toolbar=no; menubar=no; status: 0;";
		var prop2 ="scrollbars=no,resizable=no, left=150, top=240, width=400,height=130,status=no,location=no,toolbar=no,menubar=no";
	}

	if (tipo==4)
	{ 
		//Finestra Modifica Prodotti
		var percorso="products/modify_prod.asp?org="+riferimento;
		var prop1 = "dialogWidth: 683px; dialogHeight: 405px; center: 1; resizable: 0; scroll: 0; help: 0; status: 0;";
		var prop2 ="scrollbars=no,resizable=no, left=150, top=240, width=850,height=250,status=no,location=no,toolbar=no,menubar=no";
	}

	if (tipo==5)
	{ 
		//Finestra Modifica Prodotti
		var percorso="../customer/customer.asp";
		var prop1 = "dialogWidth: 575px; dialogHeight: 290px; center: 1; resizable: 0; scroll: 0; help: 0; status: 0;";
		var prop2 ="scrollbars=no,resizable=no, left=150, top=240, width=575,height=290,status=no,location=no,toolbar=no,menubar=no";
	}
if (tipo==6)
	{
	var percorso="./popup_excluded_country.asp?code="+riferimento;
	var prop1 = "dialogWidth: 575px; dialogHeight: 290px; center: 1; resizable: 0; scroll: 0; help: 0; status: 0;";
	var prop2 ="scrollbars=no,resizable=no, left=150, top=240, 	width=400, height=400, status=no, location=no, toolbar=no, menubar=no";
		}

	if (document.all) 
	{
		//window.showModalDialog(percorso,null, prop1);
		window.open(percorso,null,prop2);
	}
	else 
	{
		window.open(percorso,null,prop2); 
	}
  }
  
  	function selected(id) {
	document.all[id].style.backgroundColor='#FBFBBB';
	}
	function deselected(id) {
	document.all[id].style.backgroundColor='#ffffdd';
	}
function who(azione){

document.logon.handle.value=azione;
document.logon.submit();

}
function selected(id) {
document.all[id].style.backgroundColor='#FBFBBB';
}
function deselected(id) {
document.all[id].style.backgroundColor='#ffffdd';
}
function disabled() {
Via2.disabled="false";
Citta2.disabled="false";
Barra2.disabled="false";
Cap2.disabled="false";
Numero2.disabled="false";
}
function disabled2() {
accetta.avanti2.disabled="true";

}


function switchMappa() 
{
    if (mappa == 1)
    {
      document.images.mappa.src = 'images/mappa/mapNew2.jpg';
      mappa =2;
    }
    else
    {
     document.images.mappa.src = 'images/mappa/mapNew1.jpg';
     mappa =1;
    }
    window.event.cancelBubble = true;
    return false;
}


/*	function OpenPage(){
	window.open("ProvaPopUp.htm","","scrollbars=no,resizable=no, left=32, top=140, width=210,height=120,status=no,location=no,toolbar=no,menubar=no");
	}*/