var AnimateMemberList_Block = 0;
var AnimateMemberList_BlockAnimate=0;

function AnimateMemberList(sign)
{

	if (AnimateMemberList_Block)
		return;
	
	AnimateMemberList_Block = 1;
	var ul = $("#MemberListUl");
	var margin_before = ul.css("margin-left");
	var mag = 153;
	
	if (sign)
	{
		ul.css("margin-left", parseInt(margin_before) - mag);
		li = ul.find("li:last").detach();
		ul.prepend(li);
		ul.animate({marginLeft:'+=' + mag}, 500, function() {
			AnimateMemberList_Block = 0;
		});
	}
	else
	{
		ul.animate({marginLeft:'-=' + mag}, 500, function() {
			li = ul.find("li:first").detach();
			ul.append(li);
			ul.css("margin-left", margin_before);
			AnimateMemberList_Block = 0;
			});
	}


}

function menuMouseover(elem) 
{
    var ul = $(elem).children("ul");
    var a = $(elem).children("a");
    var hd = $("#hd");
    
    if (ul && a && hd)
    {
        var left = a.offset().left - hd.offset().left;
        var top = a.offset().top + a.height();
        ul.css("left", left + "px");
        ul.css("top", top + "px");
        a.addClass("AspNet-Menu-Hover");
    }
}

function menuMouseout(elem) {
    var ul = $(elem).find("ul");
    var a = $(elem).find("a");
    if (ul && a) {
        ul.css("left", "-9999px");
        a.removeClass("AspNet-Menu-Hover");
    }
}



function setTimer()
{
	if(!AnimateMemberList_BlockAnimate)
		AnimateMemberList(0);		
		
	window.setTimeout("setTimer();", 5000);
}