// JavaScript Press

// Initialise the effects

var pressq, pressp, presso, pressn, pressm, pressl, pressk, pressj, pressi, pressh, pressg, pressf, presse, pressd, pressc, pressb, pressa, pressx1, pressx2, press20101, press20102, press20103, press20104, press20105, press20106, press2010_1, press2010_2, press2010_3, press2010_4, press2010_5, press2010_6, press2010_7, press2010_8, press2010_9, press2011_1, press2011_2, press2011_3, press2011_4, press2011_5, press2011_6, press2011_7, press2011_8;



window.onload = function() {	
	press2010_1 = new fx.Combo('press2010_1', {height: true, opacity: true, duration: 500});
	press2010_2 = new fx.Combo('press2010_2', {height: true, opacity: true, duration: 500});
	press2010_3 = new fx.Combo('press2010_3', {height: true, opacity: true, duration: 500});
	press2010_4 = new fx.Combo('press2010_4', {height: true, opacity: true, duration: 500});
	press2010_5 = new fx.Combo('press2010_5', {height: true, opacity: true, duration: 500});
	press2010_6 = new fx.Combo('press2010_6', {height: true, opacity: true, duration: 500});
	press2010_7 = new fx.Combo('press2010_7', {height: true, opacity: true, duration: 500});
	press2010_8 = new fx.Combo('press2010_8', {height: true, opacity: true, duration: 500});
	press2010_9 = new fx.Combo('press2010_9', {height: true, opacity: true, duration: 500});
	
	press2011_1 = new fx.Combo('press2011_1', {height: true, opacity: true, duration: 500});
	press2011_2 = new fx.Combo('press2011_2', {height: true, opacity: true, duration: 500});
	press2011_3 = new fx.Combo('press2011_3', {height: true, opacity: true, duration: 500});
	press2011_4 = new fx.Combo('press2011_4', {height: true, opacity: true, duration: 500});
	press2011_5 = new fx.Combo('press2011_5', {height: true, opacity: true, duration: 500});
	press2011_6 = new fx.Combo('press2011_6', {height: true, opacity: true, duration: 500});
	press2011_7 = new fx.Combo('press2011_7', {height: true, opacity: true, duration: 500});
	press2011_8 = new fx.Combo('press2011_8', {height: true, opacity: true, duration: 500});

	press20106 = new fx.Combo('press20106', {height: true, opacity: true, duration: 500});
	press20105 = new fx.Combo('press20105', {height: true, opacity: true, duration: 500});	press20104 = new fx.Combo('press20104', {height: true, opacity: true, duration: 500});
	press20103 = new fx.Combo('press20103', {height: true, opacity: true, duration: 500});
	press20101 = new fx.Combo('press20101', {height: true, opacity: true, duration: 500});	press20102 = new fx.Combo('press20102', {height: true, opacity: true, duration: 500});
	pressq = new fx.Combo('pressq', {height: true, opacity: true, duration: 500});
	pressp = new fx.Combo('pressp', {height: true, opacity: true, duration: 500});
	presso = new fx.Combo('presso', {height: true, opacity: true, duration: 500});
	pressn = new fx.Combo('pressn', {height: true, opacity: true, duration: 500});
	pressm = new fx.Combo('pressm', {height: true, opacity: true, duration: 500});
	pressl = new fx.Combo('pressl', {height: true, opacity: true, duration: 500});
	pressk = new fx.Combo('pressk', {height: true, opacity: true, duration: 500});
	pressj = new fx.Combo('pressj', {height: true, opacity: true, duration: 500});
	pressi = new fx.Combo('pressi', {height: true, opacity: true, duration: 500});
	pressh = new fx.Combo('pressh', {height: true, opacity: true, duration: 500});
	pressg = new fx.Combo('pressg', {height: true, opacity: true, duration: 500});
	pressf = new fx.Combo('pressf', {height: true, opacity: true, duration: 500});
	presse = new fx.Combo('presse', {height: true, opacity: true, duration: 500});
	pressd = new fx.Combo('pressd', {height: true, opacity: true, duration: 500});
	pressc = new fx.Combo('pressc', {height: true, opacity: true, duration: 500});
	pressb = new fx.Combo('pressb', {height: true, opacity: true, duration: 500});
	pressa = new fx.Combo('pressa', {height: true, opacity: true, duration: 500});
	pressx1 = new fx.Combo('pressx1', {height: true, opacity: true, duration: 500});
	pressx2 = new fx.Combo('pressx2', {height: true, opacity: true, duration: 500});

	// Hide them to begin with
	press2010_1.hide();
	press2010_2.hide();
	press2010_3.hide();
	press2010_4.hide();
	press2010_5.hide();
	press2010_6.hide();
	press2010_7.hide();
	press2010_8.hide();
	press2010_9.hide();
	press2011_1.hide();
	press2011_2.hide();
	press2011_3.hide();
	press2011_4.hide();
	press2011_5.hide();	
	press2011_6.hide();
	press2011_7.hide();
	press2011_8.hide();
	press20101.hide();	press20102.hide();
	press20103.hide();
	press20104.hide();
	press20105.hide();
	press20105.hide();
	press20106.hide();
	pressq.hide();
	pressp.hide();
	presso.hide();
	pressn.hide();
	pressm.hide();
	pressl.hide();
	pressk.hide();
	pressj.hide();
	pressi.hide();
	pressh.hide();
	pressg.hide();
	pressf.hide();
	presse.hide();
	pressd.hide();
	pressc.hide();
	pressb.hide();
	pressa.hide();
	pressx1.hide();
	pressx2.hide();
	
	
	externalLinks();
}

function externalLinks() {
 if(!document.getElementsByTagName) return;
 var links_marcus,a,i;
 links_marcus = document.getElementsByTagName("a");
 for(i=0;i<links_marcus.length;i++) {
 a = links_marcus[i];
 if(a.getAttribute("rel") && a.getAttribute("rel").indexOf("external") > -1) {
   	 a.onclick = function() {
   	   	 window.open(this.href);
   	   	 return false;
   	 }
 	 }
 }
}
myPressYears = new Array("y2001","y2002","y2003","y2005","y2006","y2007","y2008","y2009","y2010","y2011");

function showPress() {
	toShow = document.getElementById('yearselect').value;
	
	if (toShow == "all") {
		for (var i = 0; i < myPressYears.length; i++) {
			if (myPressYears[i] != "all") { 
				document.getElementById(myPressYears[i]).style.display = "block";
			}
		}
	} else {
		for (var i = 0; i < myPressYears.length; i++) {
			if (myPressYears[i] != "all") {
				if(myPressYears[i] == toShow) {
					document.getElementById(myPressYears[i]).style.display = "block";
				} else {
					document.getElementById(myPressYears[i]).style.display = "none";
				}
				
			}
		}
	}
	
	
}
