$(document).ready(function(){
	$('.styles').click(function(event){
			event.stopPropagation();
			var title = this.id;
			setActiveStyleSheet(title);
			return false;
			});
	
 $('.newwindow').click(function(){
        window.open(this.href,'','toolbar=0,location=0,scrollbar=0,width=700,height=500,top=80,left=100');
        return false;
    });
 
});

window.onload=rollover;

function rollover(id) {
var d = document.getElementById(id);
	for (var i = 1; i<=22; i++) {
		if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
	}
if (d) {d.style.display='block';}
}

function setActiveStyleSheet(breakthroughs_title) {
  var i, a, main;
  for(i=0; (a = document.getElementsByTagName("link")[i]); i++) {
    if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) {
      a.disabled = true;
      if(a.getAttribute("title") == breakthroughs_title) a.disabled = false;
    }
  }
}