/*
son of suckerfish menu script from:
http://www.htmldog.com/articles/suckerfish/dropdowns/
 */
 
 sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
			this.style.zIndex=200; //this line added to force flyout to be above relatively positioned stuff in IE
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}

var t;
var p_country="home";
	$(function(){		
		sfHover();
		update_score(p_country);
		t=window.setInterval("update_score(p_country)",60000);
	});
	function update_score(ct){		
		p_country = arguments[0] || "greece";		
		$.ajax({
			type: "POST",
			url: "xml_response.php",			
			beforeSend : function(){
				$('#score_table').block(); 
				$("#loading_image").show();
			},
			data : "country="+p_country+"",
			success: function(msg){			
			$('#score_table').unblock();
			$("#loading_image").hide();
			$("#score_table").html(msg);			
			}
		});
	}
	function show_events(td_id){		
		if($("#"+td_id).parent().next("tr").css("display")=="none"){
			$("#"+td_id).parent().next("tr").fadeIn(300, function(){ $("#"+td_id).attr("bgcolor","#EFFFEF");});			
		}else{
			$("#"+td_id).parent().next("tr").fadeOut(300,function(){ $("#"+td_id).removeAttr("bgcolor"); });			
		}		
	}