function creaTesto(titolo,corpo) {
	return "<strong>" + titolo + "</strong><br/>" + corpo + "<br/>&nbsp;";
}
function loadMap(cond) {
	if (cond == true) {
		var latlng = new google.maps.LatLng(43.62849229069952, 12.678946852684021);
		var latlng2 = new google.maps.LatLng(43.980187435593926, 12.684383690357208);
		var myOptions = {
			zoom: 7,
			center: latlng2,
			disableDefaultUI: true,
			navigationControl: true,
			navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL},
			mapTypeControl: true,
			mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU},
			mapTypeId: google.maps.MapTypeId.HYBRID
		};
		var map = new google.maps.Map(document.getElementById("cartina"), myOptions);
		

		var marker = new google.maps.Marker({
			position: latlng,
			title:"Grilli Caminetti - Acqualagna"
		});
		var marker2 = new google.maps.Marker({
			position: latlng2,
			title:"Grilli Caminetti - Misano"
		});

		marker.setMap(map); 
		marker2.setMap(map); 
	}
}

function doCompare(a, b) {
    return a - b
}
function maxHeight() {
	if (typeof(valuta) != 'undefined') {
		var heights = new Array();
		jQuery('div#prodottizoom').css('height', 'auto');
		jQuery('div#prodottimenu').css('height', 'auto');
		jQuery('div#prodottithumbs').css('height', 'auto');
		jQuery('div#prodottidett').css('height', 'auto');
		jQuery('div#static').css('height', 'auto');
	
		if (jQuery('div#static').height() != null) { //pagine statiche
			heights.push(jQuery('div#prodottimenu').height());
			heights.push(jQuery('div#static').height());
			heights = heights.sort(doCompare).reverse();
			jQuery('div#prodottimenu').css('height', heights[0]);
			jQuery('div#static').css('height', heights[0]);
		} else if (jQuery('div#prodottizoom').height() == null) { //tipo diverso da 3
			heights.push(jQuery('div#prodottimenu').height());
			heights.push(jQuery('div#prodottithumbs').height());
			heights.push(jQuery('div#prodottidett').height());
			heights = heights.sort(doCompare).reverse();
			jQuery('div#prodottimenu').css('height', heights[0]);
			jQuery('div#prodottithumbs').css('height', heights[0]);
			jQuery('div#prodottidett').css('height', heights[0]);
		} else { // tipo 3
			heights.push(jQuery('div#prodottimenu').height());
			heights.push(jQuery('div#prodottithumbs').height()+jQuery('div#prodottizoom').height());
			heights.push(jQuery('div#prodottidett').height()+jQuery('div#prodottizoom').height());
			heights = heights.sort(doCompare).reverse();
			jQuery('div#prodottimenu').css('height', heights[0]);
			jQuery('div#prodottithumbs').css('height', heights[0]-jQuery('div#prodottizoom').height());
			jQuery('div#prodottidett').css('height', heights[0]-jQuery('div#prodottizoom').height());
		}
	}

}

function rollover(n,meno) { 
	if (n != meno) jQuery('div#pnum'+n).fadeTo('fast',1); 
}
function rollout(n,meno) { 
	if (n != meno) jQuery('div#pnum'+n).fadeTo('fast',0.4); 
}

