function deleteWin(winName,features){
    // serve a sovrascrivere una scheda eventualmente aperta precedentemente
    openedWin = window.open('',winName,features);
    openedWin.blur()
    openedWin.close()
}
//------------
function openWin(url,type){

 if(type == "foto"){

    winName = 'foto'
    features = 'menubar=no,scrollbars=auto,width=670,height=400'

    if(window.foto){
        // serve a sovrascrivere una scheda eventualmente aperta precedentemente
        deleteWin(winName,features)
        }
    foto = window.open(url,winName,features);
    window.foto.focus()
 }

 if(type == "crediti"){

    winName = 'crediti'
    features = 'menubar=no,scrollbars=no,width=400,height=300'

    if(window.crediti){
        // serve a sovrascrivere una scheda eventualmente aperta precedentemente
        deleteWin(winName,features)
		}
    crediti = window.open(url,winName,features);
    window.crediti.focus();
	}

 if(type == "sitemap"){

    winName = 'sitemap'
    features = 'menubar=no,scrollbars=no,width=700,height=400'

    if(window.sitemap){
        // serve a sovrascrivere una scheda eventualmente aperta precedentemente
        deleteWin(winName,features)
		}
    sitemap = window.open(url,winName,features);
    window.sitemap.focus();
	}

 if(type == "construction"){

    winName = 'construction'
    features = 'menubar=no,scrollbars=no,width=165,height=106'

    if(window.construction){
        // serve a sovrascrivere una scheda eventualmente aperta precedentemente
        deleteWin(winName,features)
		}
    construction = window.open(url,winName,features);
    window.construction.focus();
	}

}
