// setta altezze uguali ad A e B
function setEqual(a,b) {
    if (document.getElementById) {
        var divs = new Array(document.getElementById(a), document.getElementById(b));
        if (divs[0] == null || divs[1] == null) return;
        //trovo l'altezza maggiore
        var maxHeight = 0;
        for (var i = 0; i < divs.length; i++) {
            divs[i].style.height = 'auto';
            if (divs[i].offsetHeight > maxHeight) maxHeight = divs[i].offsetHeight;
        }
        // setto le colonne alla nuova altezza
        for (var i = 0; i < divs.length; i++) {
            divs[i].style.height = maxHeight + 'px';
            // offsetHeight include padding bordi, ma non lo fa style.height, ricaviamo la differenza e correggiamo
            if (divs[i].offsetHeight > maxHeight) {
                divs[i].style.height = (maxHeight - (divs[i].offsetHeight - maxHeight)) + 'px';
            }
        }
    }
} 


function load() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(41.9107,12.4763), 15);
}
}

// configurare i div qui, da + interni a + esterni!!
function setaltezze() {
setEqual('mainleft','mainright');
}
window.onload = function() {
setaltezze();
}
window.onresize = function() {
setaltezze();
}

function popupfeed(url) {
/*
	Use this function to generate a pop up window for item links generated
	by the Feed2JS service. The name of this function must exactly be
			popupfeed
	
	and you can use the code below to specify specific window features
	See http://jade.mcli.dist.maricopa.edu/feed/index.php?s=mod
*/

	// string to specify window features

	var myfeatures = "toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,status=yes,resizable=no,width=800,height=400";
	
	thefeed = window.open( url, 'feed2jspop', myfeatures);
	if (window.focus) {thefeed.focus()}
}



