Salva questo in un file html

<html>

<head>

<title>standard popup v.1</title>



<script type="text/javascript" src="standardpop.js"></script>
<script type="text/javascript">
////////////////////////////////////////////////////////////
/// funzioni per l'interfaccia

function valore(radio,text) {
var val
var rad = false
for(i=0; i< document.setta["R"+radio].length; i++)
if(document.setta["R"+radio][i].checked)
{val = document.setta["R"+radio][i].value;
rad = true;}
if(!rad) val = eval(document.setta["T"+text].value) || null;
return(val)
}


function setarea(nomef,urlf,tools,iwf,ihf,fwf,fhf,inleftf,i ntopf,fileftf,fitopf,passowf,passohf,msf,aff) {
if(tools!=null) tools = "'"+tools+"'"
if(typeof(iwf)=="string") iwf="'max'"
if(typeof(ihf)=="string") ihf="'max'"
if(typeof(fwf)=="string") fwf="'max'"
if(typeof(fhf)=="string") fhf="'max'"
if(typeof(inleftf)=="string") inleftf="'"+inleftf+"'"
if(typeof(intopf)=="string") intopf="'"+intopf+"'"
if(typeof(fileftf)=="string") fileftf="'"+fileftf+"'"
if(typeof(fitopf)=="string") fitopf="'"+fitopf+"'"

document.setta.S1.value = ""
newaction = null
if(aff) {
document.setta.S1.value = "newaction = \""+aff+"\"\n"
newaction = "newaction"
}

document.setta.S1.value += "addpop('"+nomef+"','"+urlf+"',"+tools+","+iwf+"," +ihf+","+fwf+","+fhf+","+inleftf+","+intopf+","+fi leftf+","+fitopf+","+passowf+","+passohf+","+msf+" ,"+newaction+",null)"
}



function verifica() {
var errore=false;
if (document.setta.T1.value =='') errore=true; else nomef = document.setta.T1.value;

urlf = document.setta.T2.value || '' ;
tools = document.setta.T2b.value || null;

if (document.setta.T3.value =='') errore=true;
else iwf = (document.setta.T3.value=='max') ? iwf = 'max' : eval(document.setta.T3.value);
if (document.setta.T4.value =='') errore=true;
else ihf = (document.setta.T4.value=='max') ? ihf = 'max' : eval(document.setta.T4.value);

inleftf = valore(1,5); if(inleftf == null) errore=true;
intopf = valore(2,6); if(intopf == null) errore=true;

fwf = (document.setta.T7.value=='max') ? fwf = 'max' : (eval(document.setta.T7.value) || null);
fhf = (document.setta.T8.value=='max') ? fhf = 'max' : (eval(document.setta.T8.value) || null);

fileftf = valore(3,9);
fitopf = valore(4,10);

passowf = eval(document.setta.T11.value) || null;
passohf = eval(document.setta.T12.value) || null;

msf = eval(document.setta.T13.value) || null;
aff = document.setta.T14.value || null;
if(!errore) {
setarea(nomef,urlf,tools,iwf,ihf,fwf,fhf,inleftf,i ntopf,fileftf,fitopf,passowf,passohf,msf,aff)
addpop(nomef,urlf,tools,iwf,ihf,fwf,fhf,inleftf,in topf,fileftf,fitopf,passowf,passohf,msf,aff);
}
else alert("ERRORE NELLA COMPILAZIONE DEL FORM")
}

function nocheck(indice) {
for(i=0; i<document.setta["R"+indice].length; i++)
document.setta["R"+indice][i].checked = false
}

function notext(indice) {
document.setta["T"+indice].value = ''
}



</script>

</head>
<body>

<input type="button" name="aprifin2" value="CIAO!!!!" onclick="addpop('fin2','pagina.html',null,250,250, 440,300,'right','bottom','left','top')">

</body>
</html>


salva questo nel file standardpop.js

/////////////////////////////////////////////
/// ///
/// creato da standard © 2002 ///
/// ///
/// con la collaborazione di kronik ///
/// ///
/////////////////////////////////////////////


function initleft(valleft,valwidth) {
if(typeof(valleft)== "string") {
switch(valleft) {
case "left": retleft = 0; break;
case "center": retleft = (screen.width - valwidth)/2; break;
case "right": retleft = screen.width - valwidth; break;
default: alert("STRINGA ERRATA\n(avviso per il debugging)");break;
}
}
else retleft = valleft
return(retleft)
}


function inittop(valtop,valheight) {
if(typeof(valtop)== "string") {
switch(valtop) {
case "top": rettop = 0; break;
case "center": rettop = (screen.height - valheight)/2; break;
case "bottom": rettop = screen.height - valheight; break;
default: alert("STRINGA ERRATA\n(avviso per il debugging)");break;
}
}
else rettop = valtop
return(rettop)
}


function initpassitot() {
this.passitot = Math.round(Math.max(Math.abs((this.fw-this.iw))/Math.abs(this.passow),Math.abs((this.fh-this.ih))/Math.abs(this.passoh)))

if(!this.passitot || this.passitot==0)
this.passitot = Math.round(Math.max(Math.abs((this.fl-this.il))/Math.abs(this.passow),Math.abs((this.ft-this.it))/Math.abs(this.passoh)))
}


function popplay() {

if(!this.pp.closed){

this.pp.focus()

if(this.ciclo < this.passitot) {
opw = (this.passow > 0) ? "<" : ">" ;
oph = (this.passoh > 0) ? "<" : ">" ;

if(eval("this.iw "+opw+" this.fw")) this.iw += this.passow
if(eval("this.ih "+oph+" this.fh")) this.ih += this.passoh

this.il += this.passol
this.it += this.passot
this.pp.resizeTo(this.iw,this.ih)
this.pp.moveTo(this.il,this.it)
this.ciclo++
eval("setTimeout(this.obj+'.play()',"+this.ms+")")
}
else {
this.ciclo = 0
eval(this.af)
}
}
}


function popslide(fw,fh,fileft,fitop,passow,passoh,ms,af,no slide){

this.fw = (fw == "max") ? screen.width : (fw || this.iw);
this.fh = (fh == "max") ? screen.height : (fh || this.ih);
this.fl = (fileft) ? initleft(fileft,this.fw) : initleft(this.inleft,this.fw);
this.ft = (fitop) ? inittop(fitop,this.fh) : inittop(this.intop,this.fh);
this.inleft = fileft || this.inleft;
this.intop = fitop || this.intop;
this.passow = (this.fw - this.iw >=0) ? (passow || 10) : eval("-"+(passow || 10));
this.passoh = (this.fh - this.ih >=0) ? (passoh || 10) : eval("-"+(passoh || 10));
this.passi()
this.passol = (this.fl - this.il)/this.passitot
this.passot = (this.ft - this.it)/this.passitot
this.ms = ms || 10;
this.af = af || ''
if(!noslide) this.play()
}


function pop(nome,url,tools,iw,ih,fw,fh,inleft,intop,fileft ,fitop,passow,passoh,ms,af,noslide) {
this.obj = nome
this.iw = (iw == "max") ? screen.width : iw;
this.ih = (ih == "max") ? screen.height : ih;

this.il = initleft(inleft,this.iw)
this.it = inittop(intop,this.ih)

tools = tools || '';
if(document.layers)
tools = (tools.toLowerCase().indexOf("resizable")==-1) ? 'resizable=yes,'+tools : tools;

this.pp = window.open(url,nome,tools+" width=100,height=100,left="+this.il+",top="+this.i t)
this.pp.resizeTo(this.iw,this.ih)
this.ciclo = 0

this.inleft = inleft
this.intop = intop
this.slide(fw,fh,fileft,fitop,passow,passoh,ms,af, noslide)

}



function popclose() {
this.pp.close()
}


function poplocation(url) {
this.pp.location = url
this.pp.focus()
}


function addpop(nome,url,tools,iw,ih,fw,fh,inleft,intop,fil eft,fitop,passow,passoh,ms,af,noslide) {
eval(nome+" = new pop(nome,url,tools,iw,ih,fw,fh,inleft,intop,fileft ,fitop,passow,passoh,ms,af,noslide);")
}


pop.prototype.passi = initpassitot
pop.prototype.slide = popslide
pop.prototype.play = popplay
pop.prototype.close = popclose
pop.prototype.location = poplocation





CIAO