function altezze(){
	var co1 = document.getElementById('content').offsetHeight;
	var co2 = document.getElementById('side').offsetHeight;
	var altok = co1;
	var offset = co1 - co2;
	if (co2 > co1) { 
		altok = co2;
		offset = co2 - co1;
	}
	document.getElementById('content').style.height = altok + 'px';
	document.getElementById('side').style.height = altok + 'px';
}

function launchCenteredWin(url, name, width, height, otherfeatures) {
  var str = "height=" + height + ",innerHeight=" + height;
  str += ",width=" + width + ",innerWidth=" + width;
  if (window.screen) {
    var ah = screen.availHeight - 30;
    var aw = screen.availWidth - 10;

    var xc = (aw - width) / 2;
    var yc = (ah - height) / 2;

    str += ",left=" + xc + ",screenX=" + xc;
    str += ",top=" + yc + ",screenY=" + yc;
  }
  newwin = window.open(url, name, str + ',' + otherfeatures);
  if(parseInt(navigator.appVersion) >= 4)
  {
	//delay a bit here because IE4 encounters errors
	//when trying to focus a recently opened window
 	setTimeout('newwin.focus();',250);
  }
}

// Andy Langton's show/hide/mini-accordion
$(document).ready(function() {
	var showText='[+] Leggi tutto';
	var hideText='[-] Riduci';
	var is_visible = false;
	$('.toggle').prev().append(' <a href="#" class="toggleLink" style="color: Red; text-decoration: none; font-size: 13px;">'+showText+'</a>');
	$('.toggle').hide();
	$('a.toggleLink').click(function() {
		is_visible = !is_visible;
		$(this).html( (!is_visible) ? showText : hideText);
		$(this).parent().next('.toggle').toggle('slow');
		return false;
	});
});



$(function() {
	$('a[rel=mod]').nyroModal();
});


