
function popup(theURL,winName,features) { //v2.0
	features+=",top="
	features+=screen.height/2-200/2
	features+=",left="
	features+=screen.width/2-200/2
	window.open(theURL,winName,features);
}


function popup_sito(theURL,larghezza,altezza) { //v2.0

	winName="window";
	winName+=Math.floor(Math.random()*100000)+1; //crea un nome univoco per ogni finestra
	features="";
	features+=",top=";
	features+=screen.height/2-altezza/2;
	features+=",left=";
	features+=screen.width/2-larghezza/2;
	features+=",width="+larghezza+",height="+altezza+",toolbar=yes,location=yes,status=yes,menubar=yes,scrollbars=auto,resizable=yes";
	window.open(theURL,winName,features);
}


function popup_resize(theURL) 
{
	winName="window";
	winName+=Math.floor(Math.random()*100000)+1;
	features="";
	features+=",top=";
	features+=screen.height/2-850/2+100;
	features+=",left=";
	features+=screen.width/2-790/2+100;
	features+=",width=580,height=580,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes";
	window.open(theURL,winName,features);
}


function popup_scroll(theURL) { //v2.0

	winName="window";
	winName+=Math.floor(Math.random()*100000)+1;
	features="";
	features+=",top=";
	features+=screen.height/2-370/2;
	features+=",left=";
	features+=screen.width/2-590/2;
	features+=",width=590,height=370,toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no";
	window.open(theURL,winName,features);
}


function popup_img (theURL) { //v2.0

	winName="window";
	winName+=Math.floor(Math.random()*100000)+1;
	features="";
	features+=",top=";
	features+=screen.height/2-270/2;
	features+=",left=";
	features+=screen.width/2-450/2;
	features+=",width=450,height=270,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no";
	window.open(theURL,winName,features);

}


function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
}

<!-- redirect ad un altro url -->
function MM_goToURL() { //v3.0

	var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
	for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");

}


<!-- conversione del formato data da echo PHP in gg/mm/aaaa con scrittura nell'HTML-->
function conversione(datax) {

gdata=datax.substring(8,10);
mdata=datax.substring(5,7);
adata=datax.substring(0,4);
document.write(gdata+"/"+mdata+"/"+adata);

}


<!-- conversione del formato data da echo PHP in gg/mm/aaaa -->
function conversioneinvio(datax) {

gdata=datax.substring(0,2);
mdata=datax.substring(3,5);
adata=datax.substring(6,10);
return adata+mdata+gdata;

}


<!-- scritta sulla status bar -->
function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}

