var isFlow = false;
var isDown = true;
var currentF = "";

(function(func) {
	try {
		window.addEventListener("load", func, false);
	} catch(e) {
		window.attachEvent("onload", func);
	}
})(function() {
	$("#flow01 ul li").click(function () {
		if(currentF != this.id)
		{
			if(isDown)
			{				
				currentF = this.id;
				refreshFloat("hide", "#flow01", currentF);
				$("#flow02").slideUp("normal", function()
				{
					$("#flow02").show();
					isDown = false;
					hideInner();
					var sId = "#result" + currentF;
					$(sId).slideDown("normal", function(){isDown = true;});
					isFlow = true;
				});
			}
			
		}
	});
	
	$("#flow01 ul li").mouseover(function(){
		var id = this.id;
		if(isFlow)
		{
			if(currentF != id)
			{
				$("#" + id + " img").show();
			}
		}
	});
	
	$("#flow01 ul li").mouseout(function(){
		var id = this.id;
		if(isFlow)
		{
			if(currentF != id)
			{
				$("#" + id + " img").hide();
			}
		}
	});
	
});

function hideInner()
{
	$(".resultInner").hide();
}

function refreshFloat(type, parent, tg)
{
	if(type == "show")
	{
		$(parent + " ul li img").show();
		$("#" + tg + " img").hide();
	}
	else
	{
		$(parent + " ul li img").hide();
		$("#" + tg + " img").show();
	}
}


