$(document).ready(function() {
	$("#archiveTable tr.rbContentRowsPress").css("display","none");
	$("#errMsgDiv").css("display","none").append("&nbsp;&nbsp;&nbsp;&nbsp;<font color=\"#FF0000\">Wählen Sie ein Jahr</font>");
	//<tr class="rbContentRowsPress none_selected"><td class="singTabCol" colspan="2"><p style="margin:0px;padding:5px 0px 0px 10px;height:35px;">Keine Treffer für den ausgewählten Zeitraum.</p></td></tr>
	$("#archiveTable tbody").append("<tr class=\"rbContentRowsPress none_selected\"><td class=\"singTabCol\" colspan=\"2\"><p style=\"margin:0px;padding:5px 0px 0px 10px;height:35px;\">Keine Treffer für den ausgewählten Zeitraum.</p></td></tr>");

	$("#actionArrow").click(function(){
		//alert($("#yearSelect").val());
		
		switch ($("#yearSelect").val()) {
			case "2009":
				$("#archiveTable tr[class^='rbContentRowsPress release']").css("display","none");
				$("#archiveTable tr[class$='09']").css("display","block");
				$("#errMsgDiv").css("display","none");
				$("#archiveTable tr.none_selected").css("display","none");
				break;
			case "2008":
				$("#archiveTable tr[class^='rbContentRowsPress release']").css("display","none");
				$("#archiveTable tr[class$='08']").css("display","block");
				$("#errMsgDiv").css("display","none");
				$("#archiveTable tr.none_selected").css("display","none");
				break;
			case "2007":
				$("#archiveTable tr[class^='rbContentRowsPress release']").css("display","none");
				$("#archiveTable tr[class$='07']").css("display","block");
				$("#errMsgDiv").css("display","none");
				$("#archiveTable tr.none_selected").css("display","none");
				break;
			case "2006":
				$("#archiveTable tr[class^='rbContentRowsPress release']").css("display","none");
				$("#archiveTable tr[class$='06']").css("display","block");
				$("#errMsgDiv").css("display","none");
				$("#archiveTable tr.none_selected").css("display","none");
				break;
			case "2005":
				$("#archiveTable tr[class^='rbContentRowsPress release']").css("display","none");
				$("#archiveTable tr[class$='05']").css("display","block");
				$("#errMsgDiv").css("display","none");
				$("#archiveTable tr.none_selected").css("display","none");
				break;
			case "2004":
				$("#archiveTable tr[class^='rbContentRowsPress release']").css("display","none");
				$("#archiveTable tr[class$='04']").css("display","block");
				$("#errMsgDiv").css("display","none");
				$("#archiveTable tr.none_selected").css("display","none");
				break;
			case "2003":
				$("#archiveTable tr[class^='rbContentRowsPress release']").css("display","none");
				$("#archiveTable tr[class$='03']").css("display","block");
				$("#errMsgDiv").css("display","none");
				$("#archiveTable tr.none_selected").css("display","none");
				break;
			case "2002":
				$("#archiveTable tr[class^='rbContentRowsPress release']").css("display","none");
				$("#archiveTable tr[class$='02']").css("display","block");
				$("#errMsgDiv").css("display","none");
				$("#archiveTable tr.none_selected").css("display","none");
				break;
			case "none":
				$("#errMsgDiv").css("display","block");
				break;
		}
		//Fixed bug where the bottom border disappears when filter is applied.
		if ($.browser.msie) {
			//alert("IE 6");
			$("#archiveTable").css("border-bottom","1px solid #CACBCE");
			
		}

		
	});
	
});
