
function mediacenter(str) {
 var mcwnd = window.open(str,"MediaCenter","statusbar=0,width=825,height=600,top=10,left=10");
 mcwnd.focus();
}

function mediacenter2(str) {
window.open(str,"MediaCenter","statusbar=0,width=825,height=600,top=10,left=10");
}

function galleriaN(str,str2) {
var larghezza = screen.Width;
if (larghezza >= 1024) {
window.open('/gallery/' + str + '/vuoto.shtml?' + str2 + '','gallery','width=745,height=650,status=no');
} else {
window.open('/gallery/' + str + '/vuoto.shtml?' + str2 + '','gallery','width=760,height=550,status=no');
}
}

function audiovideo(str) {
window.open('' + str + '','audiovideo','width=735,height=480,status=no');
}


if (document.layers){
document.write("<link href='/vivimilano/nuovo-sito/stili/genericoNN.css' rel='stylesheet' type='text/css'>");
} 
else {
document.write("<link href='/vivimilano/nuovo-sito/stili/generico.css' rel='stylesheet' type='text/css'>");
}

function vivivideoDSL(percorso) {
var pathToRemove = "/Corriere della Sera";
var lenPathToRemove = pathToRemove.length;
if (percorso.indexOf(pathToRemove) > -1) percorso = percorso.substring(lenPathToRemove);
window.open('/vivimilano/speciali/multimedia/nuova/multimedia-vDSL.shtml?'+percorso,'ViviMilanoIT','height=470,width=380,toolbar=no,menubar=no,status=no,directories=no,location=no,resizable=no,scrollbars=no')
}

function vivivideo56k(percorso) {
var pathToRemove = "/Corriere della Sera";
var lenPathToRemove = pathToRemove.length;
if (percorso.indexOf(pathToRemove) > -1) percorso = percorso.substring(lenPathToRemove);
window.open('/vivimilano/speciali/multimedia/nuova/multimedia-v56k.shtml?'+percorso,'ViviMilanoIT','height=360,width=320,toolbar=no,menubar=no,status=no,directories=no,location=no,resizable=no,scrollbars=no')
}

function vivivideoDSLs(percorso) {
var pathToRemove = "/Corriere della Sera";
var lenPathToRemove = pathToRemove.length;
if (percorso.indexOf(pathToRemove) > -1) percorso = percorso.substring(lenPathToRemove);
window.open('/vivimilano/speciali/multimedia/nuova/multimedia-vDSLsolo.shtml?'+percorso,'ViviMilanoIT','height=450,width=380,toolbar=no,menubar=no,status=no,directories=no,location=no,resizable=no,scrollbars=no')
}

function vivivideo56ks(percorso) {
var pathToRemove = "/Corriere della Sera";
var lenPathToRemove = pathToRemove.length;
if (percorso.indexOf(pathToRemove) > -1) percorso = percorso.substring(lenPathToRemove);
window.open('/vivimilano/speciali/multimedia/nuova/multimedia-v56ksolo.shtml?'+percorso,'ViviMilanoIT','height=340,width=320,toolbar=no,menubar=no,status=no,directories=no,location=no,resizable=no,scrollbars=no')
}

function vivivideoDSLtr(percorso) {
var pathToRemove = "/Corriere della Sera";
var lenPathToRemove = pathToRemove.length;
if (percorso.indexOf(pathToRemove) > -1) percorso = percorso.substring(lenPathToRemove);
window.open('/vivimilano/speciali/multimedia/trailer/multimedia-vDSL.shtml?'+percorso,'ViviMilanoIT','height=470,width=380,toolbar=no,menubar=no,status=no,directories=no,location=no,resizable=no,scrollbars=no')
}

function vivivideo56ktr(percorso) {
var pathToRemove = "/Corriere della Sera";
var lenPathToRemove = pathToRemove.length;
if (percorso.indexOf(pathToRemove) > -1) percorso = percorso.substring(lenPathToRemove);
window.open('/vivimilano/speciali/multimedia/trailer/multimedia-v56k.shtml?'+percorso,'ViviMilanoIT','height=360,width=320,toolbar=no,menubar=no,status=no,directories=no,location=no,resizable=no,scrollbars=no')
}

function viviaudio(percorso) {
var pathToRemove = "/Corriere della Sera";
var lenPathToRemove = pathToRemove.length;
if (percorso.indexOf(pathToRemove) > -1) percorso = percorso.substring(lenPathToRemove);
window.open('/vivimilano/speciali/multimedia/nuova/multimedia-audio.shtml?'+percorso,'ViviMilanoIT','height=300,width=320,toolbar=no,menubar=no,status=no,directories=no,location=no,resizable=no,scrollbars=no')
}

function galleria(path,n_galleria){
pathcompleta="/vivimilano/speciali/gallerie/"+path+"/galleria/sopra.shtml?"+n_galleria
path_sin="/vivimilano/speciali/foto.shtml"
path_des="/vivimilano/speciali/vuoto.shtml"
newWin=open("","","menubar=no,location=no,toolbar=yes,status=no,scrollbars=yes,resizable=no,width=680,height=480");
newWin.document.write('<html><head><title>Galleria di immagini</title>');
newWin.document.write('</head>');
newWin.document.write('<frameset rows="45,*" border="0" frameborder="NO" framespacing="0">');
newWin.document.write('<frame src="'+pathcompleta+'" name="sopra" scrolling="NO" marginheight="5" marginwidth="5">');
newWin.document.write('<frameset cols="120,*" border="0" frameborder="NO" framespacing="0">');
newWin.document.write('<frame src="'+path_sin+'" name="sin">');
newWin.document.write('<frame src="'+path_des+'" name="des">');
newWin.document.write('</frameset></frameset>');
newWin.document.write('<noframes><body>Per visualizzare questa pagina &egrave; necessario un browser che supporti i frames</body></noframes>');
newWin.document.write('</html>');
//newWin.frames["sopra"].location.href=pathcompleta
}

function pr5(nomefile,larghezza,altezza) {
	parametri="menubar=no,location=no,toolbar=yes,status=no,scrollbars=no,resizable=no,width="
	parametri=parametri+larghezza+",height="+altezza
	newWin=open('','',parametri)
	newWin.location.href=nomefile
}

// FUNZIONE POPUP SONDAGGI
function apripop_sondaggio(PATH, width, height)
{
window.open('/sondaggi/popup.jsp?xml='+PATH,'Sondaggio','height='+height+',width='+width+',toolbar=no,menubar=no,status=no,directories=no,location=no,resizable=YES,scrollbars=yes,marginwidth=0,marginheight=0,left=120,top=85')
}

function apri_finestra_sondaggi(url_pag, windowsname, dimLar, left, top, dimAlt){
			var hWnd = window.open(url_pag, windowsname, "toolbar=no,width=" + dimLar + ",height=" + dimAlt + ",left=" + left + ",top=" + top + ",directories=no,location=no,status=yes,statusbar=yes,resizable=1,menubar=no,scrollbars=yes");
			if(!hWnd.opener) hWnd.opener=self;	
			if(hWnd.focus!=null) hWnd.focus();
		}


 /*funzione per apertura link esterni */
function openlink(xlink){
	window.open("/vivimilano/speciali/openlink/openxlink.shtml?" + xlink, "xpage");
	}

function pr6(nomefile,larghezza,altezza) {
var pathToRemove = "/Corriere della Sera";
var lenPathToRemove = pathToRemove.length;
if (nomefile.indexOf(pathToRemove) > -1) nomefile = nomefile.substring(lenPathToRemove);
if (nomefile.indexOf(".xml") > -1)  nomefile = nomefile.substring(0, nomefile.indexOf(".xml")) + ".shtml";
	parametri="menubar=no,location=no,toolbar=no,status=no,scrollbars=yes,resizable=no,width="
	parametri=parametri+larghezza+",height="+altezza
	newWin=open('','',parametri)
	newWin.location.href=nomefile
}

/* FUNZIONE POP UP UNIVERSALE */
function pr4(nomefile,larghezza,altezza) {
var pathToRemove = "/Corriere della Sera";
var lenPathToRemove = pathToRemove.length;
if (nomefile.indexOf(pathToRemove) > -1) nomefile = nomefile.substring(lenPathToRemove);
if (nomefile.indexOf(".xml") > -1)  nomefile = nomefile.substring(0, nomefile.indexOf(".xml")) + ".shtml";
	parametri="menubar=no,location=yes,toolbar=yes,status=no,scrollbars=yes,resizable=yes,width="
	parametri=parametri+larghezza+",height="+altezza
	newWin=open('','',parametri)
	newWin.location.href=nomefile
}


/* FUNZIONE POP UP e Coupon Vivimilano */
function prvivi(nomefile,larghezza,altezza) {
var pathToRemove = "/ViviMilano";
if (nomefile.indexOf(pathToRemove) > -1) {
 nomefile = "/vivimilano" + nomefile.substring(11, nomefile.indexOf(".xml"))+ ".shtml";
}
 parametri="menubar=no,location=yes,toolbar=yes,status=no,scrollbars=yes,resizable=yes,width="
 parametri=parametri+larghezza+",height="+altezza
 newWin=open('','',parametri)
 newWin.location.href=nomefile
}

 function Apri(quale){
    if (window.name=='popup')
	{
  
    window.close()
    opener.parent.location.href=quale             
    
    }
    else
    {
    document.location.href=quale             
    }
 }


function Apri2(quale){
   window.close()
   opener.parent.location.href=quale             
}



function pagprec (x){
    history.go(x);

    }

 function Rimanda(quale){
    window.close()
    opener.parent.location.href=quale             
 }

 function Apri2(quale){
    window.close()
    opener.parent.location.href=quale             
     }

 function Apri(quale){
    if (window.name=='popup')
	{
  
    window.close()
    opener.parent.location.href=quale             
    
    }
    else
    {
    document.location.href=quale             
    }
 }
function init() {
if (!document.getElementById) return
var imgOriginSrc;
var imgTemp = new Array();
var imgarr = document.getElementsByTagName('img');
for (var i = 0; i < imgarr.length; i++) {
if (imgarr[i].getAttribute('hsrc')) {
imgTemp[i] = new Image();
imgTemp[i].src = imgarr[i].getAttribute('hsrc');
imgarr[i].onmouseover = function() {
imgOriginSrc = this.getAttribute('src');
this.setAttribute('src',this.getAttribute('hsrc'))
}
imgarr[i].onmouseout = function() {
this.setAttribute('src',imgOriginSrc)
}
}
}
}
onload=init;





