function toggleMore(id) {
    var less = document.getElementById("body" + id);
    var more = document.getElementById("more" + id);
    var link = document.getElementById("moreLink" + id);
    if(less.style.display == 'none') {
        less.style.display = 'block';
        more.style.display = 'none';
        link.innerHTML = '<a href="javascript:toggleMore(' + id + ')">Read more</a>.';
    } else {
        less.style.display = 'none';
        more.style.display = 'block';
        link.innerHTML = '<a href="javascript:toggleMore(' + id + ')">Show less</a>.';
    }
}

function makeLinksExternal (divTagID) {
	if(document.getElementById(divTagID) == undefined) return false;
	var div = document.getElementById(divTagID);
	var anchors = div.getElementsByTagName("a");
	for(var i=0; i<anchors.length; i++) {
		var a = anchors[i];
		if(a.getAttribute('href').indexOf('http://') === 0 && a.getAttribute('href').indexOf('rosabiancalaw.com') == -1) a.target = "_blank";
	}
}
window.onload = function () {
	if(top.location.href.indexOf('index.php') > -1) top.location.href = top.location.href.replace('/index.php', '/');
	makeLinksExternal("rightContent");
}