//uso de preLoad
//body onload="preLoad('images/image1.gif','images/image2.jpg')" etc...
function preLoad(v)
{
var images = new Array(v);
preloadImages(images);
}
function preloadImages(images)
{
//ciclo del preload
for(loop = 0; loop < images.length; loop++)
{
//costructor imágen
var image = new Image();
//cambio la source de la imágen para cada índice del Array
image.src = images[loop];
}
}
//uso de roll 
//<a href="#" onMouseOver="roll('nombreimagen','http://eofo.net/images/imagea.gif')"
//onMouseOut="roll('nombreimagen','http://eofo.net/images/imageb.gif')"
function roll(a,b)
{
if (document.images) document.images[a].src=b
}

function poplogin(){
dimwidth=540;
dimheight=235;
   x = (800 - dimwidth)/2, y = (600 - dimheight)/2;
   if (screen) {
       x = (screen.availWidth - dimwidth)/2;
       y = (screen.availHeight - dimheight)/2;
   }
	loginfin=window.open('login.php','login','scrollbars=yes,width='+dimwidth+',height='+dimheight+',screenX='+x+',screenY='+y+',top='+y+',left='+x);
	loginfin.focus();
}


function poptreg(){
dimwidth=382;
dimheight=350;
   x = (800 - dimwidth)/2, y = (700 - dimheight)/2;
   if (screen) {
       x = (screen.availWidth - dimwidth)/2;
       y = (screen.availHeight - dimheight)/2;
   }
	tregifin=window.open('sceltareg.php','tiporeg','width='+dimwidth+',height='+dimheight+',screenX='+x+',screenY='+y+',top='+y+',left='+x);

	tregifin.focus();
}

function poptute(){
dimwidth=520;
dimheight=600;
   x = (800 - dimwidth)/2, y = (600 - dimheight)/2;
   if (screen) {
       x = (screen.availWidth - dimwidth)/2;
       y = (screen.availHeight - dimheight)/2;
   }
	tutefin=window.open('tuteladati.php','tutela','scrollbars=yes,resizable=yes,width='+dimwidth+',height='+dimheight+',screenX='+x+',screenY='+y+',top='+y+',left='+x);

	tutefin.focus();
}

function poplegge(){
dimwidth=514;
dimheight=600;
   x = (800 - dimwidth)/2, y = (600 - dimheight)/2;
   if (screen) {
       x = (screen.availWidth - dimwidth)/2;
       y = (screen.availHeight - dimheight)/2;
   }
	leggfin=window.open('leggepr.php','legge','scrollbars=yes,resizable=yes,width='+dimwidth+',height='+dimheight+',screenX='+x+',screenY='+y+',top='+y+',left='+x);

	leggfin.focus();
}

function poppreg(){
dimwidth=506;
dimheight=357;
   x = (800 - dimwidth)/2, y = (600 - dimheight)/2;
   if (screen) {
       x = (screen.availWidth - dimwidth)/2;
       y = (screen.availHeight - dimheight)/2;
   }
	pregfin=window.open('registrasi.php','perche','width='+dimwidth+',height='+dimheight+',screenX='+x+',screenY='+y+',top='+y+',left='+x);

	pregfin.focus();
}

function popregis(pagina){
dimwidth=400;
dimheight=285;
   x = (800 - dimwidth)/2, y = (600 - dimheight)/2;
   if (screen) {
       x = (screen.availWidth - dimwidth)/2;
       y = (screen.availHeight - dimheight)/2;
   }
	regisfin=window.open(pagina,'registrazione','scrollbars=yes,resizable=yes,width='+dimwidth+',height='+dimheight+',screenX='+x+',screenY='+y+',top='+y+',left='+x);

	regisfin.focus();
}

function popregis2(pagina){
dimwidth=400;
dimheight=485;
   x = (800 - dimwidth)/2, y = (600 - dimheight)/2;
   if (screen) {
       x = (screen.availWidth - dimwidth)/2;
       y = (screen.availHeight - dimheight)/2;
   }
	regisfin=window.open(pagina,'registrazione','scrollbars=yes,resizable=yes,width='+dimwidth+',height='+dimheight+',screenX='+x+',screenY='+y+',top='+y+',left='+x);

	regisfin.focus();
}

function poppdim(){
dimwidth=382;
dimheight=157;
   x = (800 - dimwidth)/2, y = (600 - dimheight)/2;
   if (screen) {
       x = (screen.availWidth - dimwidth)/2;
       y = (screen.availHeight - dimheight)/2;
   }
	pdimfin=window.open('dimenticata.php','dimenticata','width='+dimwidth+',height='+dimheight+',screenX='+x+',screenY='+y+',top='+y+',left='+x);

	pdimfin.focus();
}

function popchange(){
dimwidth=400;
dimheight=300;
   x = (800 - dimwidth)/2, y = (600 - dimheight)/2;
   if (screen) {
       x = (screen.availWidth - dimwidth)/2;
       y = (screen.availHeight - dimheight)/2;
   }
	pchange=window.open('cambio1.php','cambio','scrollbars=yes,width='+dimwidth+',height='+dimheight+',screenX='+x+',screenY='+y+',top='+y+',left='+x);

	pchange.focus();
}

function popchangepsw(){
dimwidth=0;
dimheight=130;
   x = (760 - dimwidth)/2, y = (600 - dimheight)/2;
   if (screen) {
       x = (screen.availWidth - dimwidth)/2;
       y = (screen.availHeight - dimheight)/2;
   }
	pchange=window.open('cambiopsw.php','cambio','scrollbars=no,width='+dimwidth+',height='+dimheight+',screenX='+x+',screenY='+y+',top='+y+',left='+x);

	pchange.focus();
}

function poptutela(){
dimwidth=502;
dimheight=600;
   x = (800 - dimwidth)/2, y = (600 - dimheight)/2;
   if (screen) {
       x = (screen.availWidth - dimwidth)/2;
       y = (screen.availHeight - dimheight)/2;
   }
	ptutela=window.open('tuteladati.php','tutela','scrollbars=yes,resizable=yes,width='+dimwidth+',height='+dimheight+',screenX='+x+',screenY='+y+',top='+y+',left='+x);

	ptutela.focus();
}

function pophelp(){
dimwidth=600;
dimheight=600;
   x = (1200 - dimwidth)/2, y = (600 - dimheight)/2;
   if (screen) {
       x = (screen.availWidth - dimwidth)/2;
       y = (screen.availHeight - dimheight)/2;
   }
	paiuto=window.open('help.htm','aiuto','scrollbars=yes,resizable=yes,width='+dimwidth+',height='+dimheight+',screenX='+x+',screenY='+y+',top='+y+',left='+x);

	paiuto.focus();
}

function popfaq(){
dimwidth=480;
dimheight=400;
   x = (800 - dimwidth)/2, y = (600 - dimheight)/2;
   if (screen) {
       x = (screen.availWidth - dimwidth)/2;
       y = (screen.availHeight - dimheight)/2;
   }
	pafaq=window.open('faq.htm','FAQ','scrollbars=yes,resizable=yes,width='+dimwidth+',height='+dimheight+',screenX='+x+',screenY='+y+',top='+y+',left='+x);

	paiuto.focus();
}

function popthepic(idfoto){
dimwidth=720;
dimheight=490;
   x = (800 - dimwidth)/2, y = (600 - dimheight)/2;
   if (screen) {
       x = (screen.availWidth - dimwidth)/2;
       y = (screen.availHeight - dimheight)/2;
   }
	pthepic=window.open('fotografia.php?ID_FOTO='+idfoto,'fotogrande','scrollbars=yes,width='+dimwidth+',height='+dimheight+',screenX='+x+',screenY='+y+',top='+y+',left='+x);

	pthepic.focus();
}

function popcrealbum(){
dimwidth=522;
dimheight=222;
   x = (800 - dimwidth)/2, y = (600 - dimheight)/2;
   if (screen) {
       x = (screen.availWidth - dimwidth)/2;
       y = (screen.availHeight - dimheight)/2;
   }
	crealbum=window.open('crealbum.php','newalbum','width='+dimwidth+',height='+dimheight+',screenX='+x+',screenY='+y+',top='+y+',left='+x);
	crealbum.focus();
}

function popmodalbum(idalbum){
dimwidth=522;
dimheight=222;
   x = (800 - dimwidth)/2, y = (600 - dimheight)/2;
   if (screen) {
       x = (screen.availWidth - dimwidth)/2;
       y = (screen.availHeight - dimheight)/2;
   }
	modalbum=window.open('modalbum.php?ID_ALBUM='+idalbum,'modifyalbum','width='+dimwidth+',height='+dimheight+',screenX='+x+',screenY='+y+',top='+y+',left='+x);
	modalbum.focus();
}

function popaddalbum(idfoto){
dimwidth=522;
dimheight=222;
   x = (800 - dimwidth)/2, y = (600 - dimheight)/2;
   if (screen) {
       x = (screen.availWidth - dimwidth)/2;
       y = (screen.availHeight - dimheight)/2;
   }
	addalbum=window.open('addalbum.php?ID_FOTO='+idfoto,'addtoalbum','width='+dimwidth+',height='+dimheight+',screenX='+x+',screenY='+y+',top='+y+',left='+x);
	addalbum.focus();
}

function popaddserval(idservizio){
dimwidth=522;
dimheight=222;
   x = (800 - dimwidth)/2, y = (600 - dimheight)/2;
   if (screen) {
       x = (screen.availWidth - dimwidth)/2;
       y = (screen.availHeight - dimheight)/2;
   }
	addserval=window.open('addserval.php?ID_SERVIZIO='+idservizio,'addtoserval','width='+dimwidth+',height='+dimheight+',screenX='+x+',screenY='+y+',top='+y+',left='+x);
	addserval.focus();
}

function popaddpreve(idfoto){
dimwidth=5;
dimheight=5;
   x = (800 - dimwidth)/2, y = (600 - dimheight)/2;
   if (screen) {
       x = (screen.availWidth - dimwidth)/2;
       y = (screen.availHeight - dimheight)/2;
   }
	addpreve=window.open('addpreve.php?ID_FOTO='+idfoto,'addtopreve','width='+dimwidth+',height='+dimheight+',screenX='+x+',screenY='+y+',top='+y+',left='+x);
	addpreve.focus();
}

function popaddalpreve(idalbum){
dimwidth=5;
dimheight=5;
   x = (800 - dimwidth)/2, y = (600 - dimheight)/2;
   if (screen) {
       x = (screen.availWidth - dimwidth)/2;
       y = (screen.availHeight - dimheight)/2;
   }
	addalpreve=window.open('addalpreve.php?ID_ALBUM='+idalbum,'addtoalpreve','width='+dimwidth+',height='+dimheight+',screenX='+x+',screenY='+y+',top='+y+',left='+x);
	addalpreve.focus();
}


function popaddpreveserv(idserv){
dimwidth=5;
dimheight=5;
   x = (800 - dimwidth)/2, y = (600 - dimheight)/2;
   if (screen) {
       x = (screen.availWidth - dimwidth)/2;
       y = (screen.availHeight - dimheight)/2;
   }
	addpreve=window.open('addpreve.php?ID_SERVIZIO='+idserv,'addtopreve','width='+dimwidth+',height='+dimheight+',screenX='+x+',screenY='+y+',top='+y+',left='+x);
	addpreve.focus();
}

function popcerchiamo(){
dimwidth=382;
dimheight=390;
   x = (800 - dimwidth)/2, y = (600 - dimheight)/2;
   if (screen) {
       x = (screen.availWidth - dimwidth)/2;
       y = (screen.availHeight - dimheight)/2;
   }
	cerchiapop=window.open('cerchiamo.php','cerchiamo','width='+dimwidth+',height='+dimheight+',screenX='+x+',screenY='+y+',top='+y+',left='+x);
	cerchiapop.focus();
}
 
function validafoto(idcliente,idfoto){
dimwidth=400;
dimheight=350;
   x = (800 - dimwidth)/2, y = (600 - dimheight)/2;
   if (screen) {
       x = (screen.availWidth - dimwidth)/2;
       y = (screen.availHeight - dimheight)/2;
   }
	validaf=window.open('utilizzo.php?ID_CLIENTE='+idcliente+'&ID_FOTO='+idfoto,'utilizzo','scrollbars=yes,width='+dimwidth+',height='+dimheight+',screenX='+x+',screenY='+y+',top='+y+',left='+x);
	validaf.focus();
}

function eliminafotopre(idcliente,idfoto){
dimwidth=5;
dimheight=5;
   x = (800 - dimwidth)/2, y = (600 - dimheight)/2;
   if (screen) {
       x = (screen.availWidth - dimwidth)/2;
       y = (screen.availHeight - dimheight)/2;
   }
	eliminaf=window.open('elifotopre.php?ID_CLIENTE='+idcliente+'&ID_FOTO='+idfoto,'eliminafoto','width='+dimwidth+',height='+dimheight+',screenX='+x+',screenY='+y+',top='+y+',left='+x);
	eliminaf.focus();
}

function sicurprof(mess) { 
 if (confirm(mess)) { 
return true; 
 } else { 
return false; 
 } 
}

function poplegenda(){
dimwidth=440;
dimheight=270;
   x = (800 - dimwidth)/2, y = (600 - dimheight)/2;
   if (screen) {
       x = (screen.availWidth - dimwidth)/2;
       y = (screen.availHeight - dimheight)/2;
   }
	legendapop=window.open('legenda.php','legendap','scrollbars=yes,width='+dimwidth+',height='+dimheight+',screenX='+x+',screenY='+y+',top='+y+',left='+x);
	legendapop.focus();
}

function loadterm(){
dimwidth=520;
dimheight=570;
   x = (800 - dimwidth)/2, y = (600 - dimheight)/2;
   if (screen) {
       x = (screen.availWidth - dimwidth)/2;
       y = (screen.availHeight - dimheight)/2;
   }
	info1fin=window.open('info.php','info1','location=no,status=no,scrollbars=yes,resizable=yes,width='+dimwidth+',height='+dimheight+',screenX='+x+',screenY='+y+',top='+y+',left='+x);
	info1fin.focus();
}

//copyright® Eduardo Figueroa 2002

//funzioni di dreamweaver :

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
