function popCreaPageFtoZoomai(ids,i) {
    var w=555;
    var h=700;
    var leftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    var topPosition = (screen.height) ? (screen.height-h)/2 : 0;
    var ppzoom=window.open('creative_pageftozoomai.do?ids='+ids+'&i='+i,'popZoom','width='+w+',height='+h+',top='+topPosition+',left='+leftPosition+',scrollbars=yes,resizable=yes,status=no,location=no,toolbar=no,menubar=no,directories=no');
    ppzoom.focus();
}
function popAddCds() {
    var w=420;
    var h=300;
    var leftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    var topPosition = (screen.height) ? (screen.height-h)/2 : 0;
    var ppaddcds=window.open('/creative_popAddCds.do','popAddCds','width='+w+',height='+h+',top='+topPosition+',left='+leftPosition+',scrollbars=yes,resizable=yes,status=no,location=no,toolbar=no,menubar=no,directories=no');
    ppaddcds.focus();
}
function popAddFotos() {
    var w=420;
    var h=300;
    var leftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    var topPosition = (screen.height) ? (screen.height-h)/2 : 0;
    var ppaddfotos=window.open('/creative_popAddFotos.do','popAddFotos','width='+w+',height='+h+',top='+topPosition+',left='+leftPosition+',scrollbars=yes,resizable=yes,status=no,location=no,toolbar=no,menubar=no,directories=no');
    ppaddfotos.focus();
}
function popAddFotosLbox() {
    var w=420;
    var h=300;
    var leftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    var topPosition = (screen.height) ? (screen.height-h)/2 : 0;
    var ppaddfotos=window.open('/creative_popAddFotosLbox.do','popAddFotos','width='+w+',height='+h+',top='+topPosition+',left='+leftPosition+',scrollbars=yes,resizable=yes,status=no,location=no,toolbar=no,menubar=no,directories=no');
    ppaddfotos.focus();
}
function popOrdine(cod) {
    var w=655;
    var h=700;
    var leftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    var topPosition = (screen.height) ? (screen.height-h)/2 : 0;
    var ppord=window.open('/creative_ordinePop.do?ido='+cod,'popOrd','width='+w+',height='+h+',top='+topPosition+',left='+leftPosition+',scrollbars=yes,resizable=yes,status=no,location=no,toolbar=no,menubar=no,directories=no');
    ppord.focus();
}
function popZoomailbx(i,t) {
    var w=555;
    var h=700;
    var leftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    var topPosition = (screen.height) ? (screen.height-h)/2 : 0;
    var ppzoom=window.open('creative_zoomailbx.do?i='+i+'&t='+t,'popZoom','width='+w+',height='+h+',top='+topPosition+',left='+leftPosition+',scrollbars=yes,resizable=yes,status=no,location=no,toolbar=no,menubar=no,directories=no');
    ppzoom.focus();
}
function popZoom(cod) {
    var w=555;
    var h=700;
    var leftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    var topPosition = (screen.height) ? (screen.height-h)/2 : 0;
    var ppzoom=window.open('/news_zoom.do?cod='+cod,'popZoom','width='+w+',height='+h+',top='+topPosition+',left='+leftPosition+',scrollbars=yes,resizable=yes,status=no,location=no,toolbar=no,menubar=no,directories=no');
    ppzoom.focus();
}
function popZoomaicd(idcd,i) {
    var w=555;
    var h=700;
    var leftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    var topPosition = (screen.height) ? (screen.height-h)/2 : 0;
    var ppzoom=window.open('/creative_zoomaicd.do?idcd='+idcd+'&i='+i,'popZoom','width='+w+',height='+h+',top='+topPosition+',left='+leftPosition+',scrollbars=yes,resizable=yes,status=no,location=no,toolbar=no,menubar=no,directories=no');
    ppzoom.focus();
}
function popZoomRm(cod) {
    var w=555;
    var h=700;
    var leftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    var topPosition = (screen.height) ? (screen.height-h)/2 : 0;
    var ppzoom=window.open('/creative_zoomRm.do?id='+cod,'popZoom','width='+w+',height='+h+',top='+topPosition+',left='+leftPosition+',scrollbars=yes,resizable=yes,status=no,location=no,toolbar=no,menubar=no,directories=no');
    ppzoom.focus();
}
function popZoomRf(cod) {
    var w=555;
    var h=700;
    var leftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    var topPosition = (screen.height) ? (screen.height-h)/2 : 0;
    var ppzoom=window.open('/creative_zoomRf.do?id='+cod,'popZoom','width='+w+',height='+h+',top='+topPosition+',left='+leftPosition+',scrollbars=yes,resizable=yes,status=no,location=no,toolbar=no,menubar=no,directories=no');
    ppzoom.focus();
}
function popZoomairCr(c,i) {
    var w=555;
    var h=700;
    var leftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    var topPosition = (screen.height) ? (screen.height-h)/2 : 0;
    var ppzoom=window.open('/creative_zoomair.do?c='+c+'&i='+i,'popZoom','width='+w+',height='+h+',top='+topPosition+',left='+leftPosition+',scrollbars=yes,resizable=yes,status=no,location=no,toolbar=no,menubar=no,directories=no');
    ppzoom.focus();
}
function popZoomBasket(cod) {
    var w=555;
    var h=700;
    var leftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    var topPosition = (screen.height) ? (screen.height-h)/2 : 0;
    var ppzoomb=window.open('/creative_zoomBasket.do?id='+cod,'popZoomb','width='+w+',height='+h+',top='+topPosition+',left='+leftPosition+',scrollbars=yes,resizable=yes,status=no,location=no,toolbar=no,menubar=no,directories=no');
    ppzoomb.focus();
}
function popZoomCd(cod) {
    var w=555;
    var h=700;
    var leftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    var topPosition = (screen.height) ? (screen.height-h)/2 : 0;
    var ppzoomcd=window.open('/creative_zoomCd.do?id='+cod,'popZoomCd','width='+w+',height='+h+',top='+topPosition+',left='+leftPosition+',scrollbars=yes,resizable=yes,status=no,location=no,toolbar=no,menubar=no,directories=no');
    ppzoomcd.focus();
}
function popZoomCdOff(cod) {
    var w=555;
    var h=700;
    var leftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    var topPosition = (screen.height) ? (screen.height-h)/2 : 0;
    var ppzoomcdoff=window.open('/creative_zoomCdOff.do?id='+cod,'popZoomCdOff','width='+w+',height='+h+',top='+topPosition+',left='+leftPosition+',scrollbars=yes,resizable=yes,status=no,location=no,toolbar=no,menubar=no,directories=no');
    ppzoomcdoff.focus();
}
function popZoomCdBasket(cod) {
    var w=555;
    var h=700;
    var leftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    var topPosition = (screen.height) ? (screen.height-h)/2 : 0;
    var ppzoomcdb=window.open('/creative_zoomCdBasket.do?id='+cod,'popZoomCdb','width='+w+',height='+h+',top='+topPosition+',left='+leftPosition+',scrollbars=yes,resizable=yes,status=no,location=no,toolbar=no,menubar=no,directories=no');
    ppzoomcdb.focus();
}
function popTesto(url) {
    var w=535;
    var h=580;
    var leftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    var topPosition = (screen.height) ? (screen.height-h)/2 : 0;
    var pptxt=window.open(url,'pptxt','width='+w+',height='+h+',top='+topPosition+',left='+leftPosition+',scrollbars=yes,resizable=yes,status=no,location=no,toolbar=no,menubar=no,directories=no');
    pptxt.focus();
}
function popDiritti(cod) {
    var w=720;
    var h=500;
    var leftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    var topPosition = (screen.height) ? (screen.height-h)/2 : 0;
    var ppdir=window.open('/creative_richiestaDirittiPop.do?cod='+cod,'ppdir','width='+w+',height='+h+',top='+topPosition+',left='+leftPosition+',scrollbars=no,resizable=yes,status=no,location=no,toolbar=no,menubar=no,directories=no');
    ppdir.focus();
}
function popPiantaMilano() {
    var w=408;
    var h=390;
    var leftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    var topPosition = (screen.height) ? (screen.height-h)/2 : 0;
    var ppm=window.open('/creative/images/Milanob.gif','ppm','width='+w+',height='+h+',top='+topPosition+',left='+leftPosition+',scrollbars=no,resizable=yes,status=no,location=no,toolbar=no,menubar=no,directories=no');
    ppm.focus();
}
function popPiantaRoma() {
    var w=408;
    var h=390;
    var leftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    var topPosition = (screen.height) ? (screen.height-h)/2 : 0;
    var ppr=window.open('/creative/images/Romab.gif','ppr','width='+w+',height='+h+',top='+topPosition+',left='+leftPosition+',scrollbars=no,resizable=yes,status=no,location=no,toolbar=no,menubar=no,directories=no');
    ppr.focus();
}
function popLicenza(idColl) {
    var w=555;
    var h=580;
    var leftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    var topPosition = (screen.height) ? (screen.height-h)/2 : 0;
    var pplicenza=window.open('/creative_popLicenza.do?idcoll='+idColl,'popLicenza','width='+w+',height='+h+',top='+topPosition+',left='+leftPosition+',scrollbars=yes,resizable=yes,status=no,location=no,toolbar=no,menubar=no,directories=no');
    pplicenza.focus();
}
function popLicenze() {
    var w=555;
    var h=580;
    var leftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    var topPosition = (screen.height) ? (screen.height-h)/2 : 0;
    var pplicenze=window.open('/creative_popLicenze.do','popLicenze','width='+w+',height='+h+',top='+topPosition+',left='+leftPosition+',scrollbars=yes,resizable=yes,status=no,location=no,toolbar=no,menubar=no,directories=no');
    pplicenze.focus();
}
function popLicenzeRF() {
    var w=555;
    var h=580;
    var leftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    var topPosition = (screen.height) ? (screen.height-h)/2 : 0;
    var pplicenze=window.open('/creative_popLicenzeRF.do','popLicenze','width='+w+',height='+h+',top='+topPosition+',left='+leftPosition+',scrollbars=yes,resizable=yes,status=no,location=no,toolbar=no,menubar=no,directories=no');
    pplicenze.focus();
}
function popHelp(c) {
    var w=555;
    var h=580;
    var leftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    var topPosition = (screen.height) ? (screen.height-h)/2 : 0;
    var pplicenza=window.open('/creative_help.do?code='+c,'pophelp','width='+w+',height='+h+',top='+topPosition+',left='+leftPosition+',scrollbars=yes,resizable=yes,status=no,location=no,toolbar=no,menubar=no,directories=no');
    pplicenza.focus();
}
function popGallery(name, lar, alt ) {
    var w = (lar==0) ? 500 : lar;
    var h = (alt==0) ? 500 : alt;
    var leftPosition = (screen.width) ? (screen.width-w)/2 : 0;
    var topPosition = (screen.height) ? (screen.height-h)/2 : 0;
    var ppgallery=window.open('/creative/'+name,'popGallery','width='+w+',height='+h+',top='+topPosition+',left='+leftPosition+',scrollbars=yes,resizable=yes,status=no,location=no,toolbar=no,menubar=no,directories=no');
    ppgallery.focus();
}

function previewOn(imgsrc,eventObj) {
    var xOffset = 25;
    var yOffset = 50;
    if(eventObj) {
        // hide any currently-visible popups
        previewOff();
        // stop event from bubbling up any farther
        eventObj.cancelBubble = true;
        var newXCoordinate = 0;
        var newYCoordinate = 0;
        if (eventObj.pageX || eventObj.pageY) 	{
		    newXCoordinate = eventObj.pageX + document.body.scrollLeft
			    + document.documentElement.scrollLeft;
		    newYCoordinate = yOffset + document.body.scrollTop
			    + document.documentElement.scrollTop;
	    } else if (eventObj.clientX || eventObj.clientY) 	{
		    newXCoordinate = eventObj.clientX + document.body.scrollLeft
			    + document.documentElement.scrollLeft;
		    newYCoordinate = yOffset + document.body.scrollTop
			    + document.documentElement.scrollTop;
	    }
        if (newXCoordinate>(412+xOffset)) {
           newXCoordinate = newXCoordinate - 412 - xOffset + ((document.body.scrollLeft)?document.body.scrollLeft:0);
        } else {
           newXCoordinate = newXCoordinate + xOffset + xOffset + ((document.body.scrollLeft)?document.body.scrollLeft:0);
        }

        document.imgprw.src='/creative/images/spacer.gif';
        document.imgprw.src=imgsrc;
        if(document.getElementById && document.getElementById("prw")) {
            document.getElementById("prw").style.left = newXCoordinate;
            document.getElementById("prw").style.top = newYCoordinate;
            document.getElementById("prw").style.visibility='visible';
        } else if (document.all && document.all("prw")) {
            // MSIE 4 DOM
            document.all("prw").style.left = newXCoordinate;
            document.all("prw").style.top = newYCoordinate;
            document.all("prw").style.visibility='visible';
        } else if (document.layers && document.layers["prw"]) {
            // NN 4 DOM.. note: this won't find nested layers
            document.layers["prw"].left = newXCoordinate;
            document.layers["prw"].top = newYCoordinate;
            document.layers["prw"].visibility='visible';
        }
    }
}
function previewOff() {
    // cross-browser function to get an object's style object given its id
    if(document.getElementById && document.getElementById("prw")) {
        document.getElementById("prw").style.visibility='hidden';
    } else if (document.all && document.all("prw")) {
        // MSIE 4 DOM
        document.all("prw").style.visibility='hidden';
    } else if (document.layers && document.layers["prw"]) {
        // NN 4 DOM.. note: this won't find nested layers
        document.layers["prw"].visibility='hidden';
    }
}

